Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. round = 1
  2. max = 5
  3.  
  4. function pickUp()
  5. for i = 0, 5 do turtle.suck(64) end
  6. for i = 0, 5 do turtle.suckUp(64) end
  7. for i = 0, 5 do turtle.suckDown(64) end
  8. end
  9.  
  10. while round < max do
  11. for rot = 0, 3 do
  12. success, data = turtle.detectUp()
  13. if success then
  14. turtle.digUp()
  15. pickUp()
  16. end
  17.  
  18. success, data = turtle.detectDown()
  19. if success then
  20. turtle.digDown()
  21. pickUp()
  22. end
  23.  
  24. success, data = turtle.detect()
  25. if success then
  26. turtle.dig()
  27. pickUp()
  28. end
  29.  
  30. for i = 0, round do
  31. turtle.forward()
  32. end
  33.  
  34. turtle.turnLeft()
  35. end
  36.  
  37. print("Round", round, "done")
  38. round = round + 1
  39. end
  40.  
  41. print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement