Hoff

Untitled

Jul 26th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function movetotree()
  2. for i=1,7 do
  3. turtle.forward()
  4. end
  5. end
  6.  
  7. function drop()
  8. for d=1,15 do
  9. turtle.select(i)
  10. turtle.dropDown()
  11. end
  12. end
  13.  
  14. function cut()
  15. while true do
  16. if not turtle.digUp() then
  17. turtle.up()
  18. else turtle.back()
  19. break
  20. end
  21. end
  22. end
  23.  
  24. function movetodrop()
  25. for g=1,7 do
  26. turtle.back()
  27. end
  28. end
  29.  
  30. function refuel()
  31. if (turtle.getFuel()=="Unlimited") then
  32. break
  33. else turtle.select(16)
  34. turtle.suck()
  35. turtle.refuel(64)
  36. turtle.select(1)
  37.  
  38. function plant()
  39. turtle.select(15)
  40. turtle.place()
  41. turtle.select(1)
  42. end
  43.  
  44. function saplings()
  45. turtle.select(15)
  46. turtle.suckRight()
  47. turtle.select(1)
  48. end
  49.  
  50. while true do
  51. refuel()
  52. saplings()
  53. movetotree()
  54. for z=1,64 do
  55. plant()
  56. sleep(180)
  57. cut()
  58. end
  59. movetodrop()
  60. drop()
  61. end
Advertisement
Add Comment
Please, Sign In to add comment