Advertisement
DubstepDentist

Turtle Plant 9x9

Mar 28th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function Forward ()
  2. for i = 1,8 do
  3. Plant()
  4. turtle.forward()
  5. end
  6. Plant()
  7. turtle.turnRight()
  8. turtle.forward()
  9. turtle.turnRight()
  10. end
  11.  
  12. function Back()
  13. for i = 1,8 do
  14. Plant()
  15. turtle.forward()
  16. end
  17. Plant()
  18. turtle.turnLeft()
  19. turtle.forward()
  20. turtle.turnLeft()
  21. end
  22.  
  23. function Count()
  24. C = turtle.getItemCount(1)
  25. if C==0 then
  26. turtle.select(2)
  27. end
  28. end
  29.  
  30. function Plant()
  31. Count()
  32. turtle.placeDown()
  33. end
  34.  
  35. function BackToStart()
  36. turtle.turnRight()
  37. for i = 1,9 do
  38. turtle.forward()
  39. end
  40. turtle.turnLeft()
  41. for i = 1,8 do
  42. turtle.forward()
  43. end
  44. turtle.turnRight()
  45. turtle.turnRight()
  46. end
  47.  
  48. for g = 1,4 do
  49. Forward()
  50. Back()
  51. end
  52.  
  53. Forward()
  54. BackToStart()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement