Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = turtle
- local error = 0
- function openDoor()
- t.select(2)
- if(t.getItemCount(2) > 0) then
- print("Error: ItemCount slot 2 > 0")
- error = 11
- return
- end
- rs.setOutput("top",true)
- sleep(0.05)
- rs.setOutput("top",false)
- if(t.getItemCount(2) == 0) then
- print("Error: ItemCount slot 2 == 0")
- error = 12
- return
- end
- if(not t.transferTo(3)) then
- print("Error: transfer to slot 3 failed")
- error = 13
- return
- end
- if(not t.digUp()) then
- print("Error: cannot break Block Breaker")
- error = 21
- return
- end
- t.select(1)
- if(not t.placeUp()) then
- print("Error: cannot place Auto Placer")
- error = 22
- return
- end
- if(t.getItemCount(1) < 1) then
- print("Error: less than one Auto Placer remaining")
- error = 14
- return
- end
- rs.setOutput("left",true)
- sleep(0.1)
- rs.setOutput("left",false)
- end
- function closeDoor()
- end
Advertisement
Add Comment
Please, Sign In to add comment