Advertisement
Tanoro

Turtle Place Scaffold

Feb 23rd, 2014
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. -- pastebin get PRXT4dBc placeScaff
  2.  
  3. local selected = 1
  4. local itemCount = turtle.getItemCount(selected)
  5.  
  6. turtle.select(selected)
  7.  
  8. os.startTimer(1)
  9.  
  10. while true do
  11. redstone.setOutput("left", false)
  12.  
  13. -- Check item count
  14. if itemCount == 0 then
  15. -- Out of items; Switch cells
  16. selected = selected + 1
  17. turtle.select(selected)
  18. end
  19.  
  20. if turtle.detectDown() == false then
  21. -- Place scaffold and signal activator
  22. turtle.placeDown()
  23. redstone.setOutput("left", true)
  24. end
  25.  
  26. os.pullEvent("timer")
  27. os.startTimer(1)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement