Hoff

tr

Jul 26th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. turtle.dig()
  16. turtle.forward()
  17. while true do
  18. if turtle.digUp() then
  19. turtle.up()
  20. else if not turtle.down() then
  21. turtle.back()
  22. break
  23. end
  24. end
  25. end
  26. end
  27.  
  28. function movetodrop()
  29. for g=1,7 do
  30. turtle.back()
  31. end
  32. end
  33.  
  34. function refuel()
  35. if (turtle.getFuelLevel()=="Unlimited") then
  36. return true
  37. end
  38. turtle.select(16)
  39. turtle.turnRight()
  40. turtle.turnRight()
  41. turtle.suck()
  42. turtle.refuel(64)
  43. turtle.select(1)
  44. turtle.turnLeft()
  45. turtle.turnLeft()
  46. end
  47.  
  48. function plant()
  49. turtle.select(14)
  50. turtle.place()
  51. turtle.select(1)
  52. end
  53.  
  54. function saplings()
  55. turtle.select(14)
  56. turtle.turnRight()
  57. turtle.suck()
  58. turtle.select(1)
  59. turtle.turnLeft()
  60. end
  61.  
  62. function getbonemeal()
  63. turtle.select(15)
  64. turtle.up()
  65. turtle.turnRight()
  66. turtle.suck()
  67. turtle.select(1)
  68. turtle.turnLeft()
  69. turtle.down()
  70. end
  71.  
  72. function bonemeal()
  73. turtle.select(15)
  74. turtle.place()
  75. turtle.place()
  76. turtle.select(1)
  77. end
  78. while true do
  79. refuel()
  80. saplings()
  81. getbonemeal()
  82. movetotree()
  83. for z=1,32 do
  84. plant()
  85. bonemeal()
  86. cut()
  87. end
  88. movetodrop()
  89. drop()
  90. end
Advertisement
Add Comment
Please, Sign In to add comment