Guest User

Force Farm

a guest
Aug 11th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function movetotree()
  2. turtle.forward()
  3. turtle.forward()
  4. turtle.forward()
  5. end
  6.  
  7. function othermove()
  8. while true do
  9. if not turtle.forward() then
  10. turtle.turnLeft()
  11. break
  12. end
  13. end
  14. end
  15.  
  16. function drop()
  17. for d=1,14 do
  18. turtle.select(d)
  19. turtle.dropDown()
  20. end
  21. end
  22.  
  23. function cut()
  24. turtle.dig()
  25. turtle.forward()
  26. while true do
  27. if turtle.digUp() then
  28. turtle.up()
  29. else if not turtle.down() then
  30. turtle.back()
  31. break
  32. end
  33. end
  34. end
  35. end
  36.  
  37. function movetodrop()
  38. for g=1,7 do
  39. turtle.back()
  40. end
  41. end
  42.  
  43. function refuel()
  44. if turtle.getFuelLevel()<175 then
  45. refuel2()
  46. end
  47. end
  48.  
  49. function refuel2()
  50. turtle.select(16)
  51. turtle.turnRight()
  52. turtle.turnRight()
  53. turtle.suck()
  54. turtle.refuel(64)
  55. turtle.select(1)
  56. turtle.turnLeft()
  57. turtle.turnLeft()
  58. end
  59.  
  60. function plant()
  61. turtle.select(14)
  62. turtle.place()
  63. turtle.select(1)
  64. end
  65.  
  66. function saplings()
  67. turtle.select(14)
  68. turtle.turnRight()
  69. turtle.suck()
  70. turtle.select(1)
  71. turtle.turnLeft()
  72. end
  73.  
  74. function getbonemeal()
  75. turtle.select(15)
  76. turtle.up()
  77. turtle.turnRight()
  78. turtle.suck()
  79. turtle.select(1)
  80. turtle.turnLeft()
  81. turtle.down()
  82. end
  83.  
  84. function bonemeal()
  85. turtle.select(15)
  86. turtle.place()
  87. turtle.place()
  88. turtle.place()
  89. turtle.place()
  90. turtle.select(1)
  91. end
  92.  
  93.  
  94. while true do
  95. refuel()
  96. saplings()
  97. getbonemeal()
  98. turtle.forward()
  99. plant()
  100. bonemeal()
  101. cut()
  102. othermove()
  103. turtle.turnRight()
  104. turtle.back()
  105. plant()
  106. bonemeal()
  107. cut()
  108. othermove()
  109. othermove()
  110. turtle.turnRight()
  111. turtle.back()
  112. plant()
  113. bonemeal()
  114. cut()
  115. othermove()
  116. turtle.forward()
  117. turtle.forward()
  118. plant()
  119. bonemeal()
  120. cut()
  121. othermove()
  122. othermove()
  123. drop()
  124. turtle.up()
  125. turtle.turnRight()
  126. turtle.select(15)
  127. turtle.drop()
  128. turtle.turnLeft()
  129. turtle.down()
  130. sleep(130)
  131. end
Advertisement
Add Comment
Please, Sign In to add comment