Advertisement
osmarks

Road Constructor

Apr 1st, 2018
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function findFilledSlot()
  2. for i = 1, 16 do
  3. if turtle.getItemCount(i) > 0 then
  4. turtle.select(i)
  5. return true
  6. end
  7. end
  8.  
  9. return false
  10. end
  11.  
  12. turtle.select(1)
  13.  
  14. while true do
  15. if turtle.getItemCount() > 0 then
  16. turtle.forward()
  17. turtle.dig()
  18. turtle.digDown()
  19. turtle.digUp()
  20. turtle.placeDown()
  21. else
  22. if not findFilledSlot() then
  23. turtle.back()
  24. end
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement