Advertisement
Guest User

Turtle Multiplayer Farm Fixed sleepwait

a guest
Mar 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. print("Farmin'")
  2.  
  3.  
  4. function refuel()
  5. turtle.suck(1)
  6. turtle.select(2)
  7. turtle.refuel(1)
  8. end
  9.  
  10. function needsFuel()
  11. if turtle.getFuelLevel() < 100 then
  12. return true
  13. else
  14. return false
  15. end
  16. end
  17.  
  18. function a()
  19. turtle.transferTo(1)
  20. end
  21.  
  22. function moveSeeds()
  23. turtle.select(2)
  24. a()
  25. turtle.select(3)
  26. a()
  27. turtle.select(4)
  28. a()
  29. turtle.select(5)
  30. a()
  31. turtle.select(6)
  32. a()
  33. end
  34.  
  35. function bankRight()
  36. turtle.turnRight()
  37. turtle.forward()
  38. turtle.turnRight()
  39. end
  40.  
  41. function bankLeft()
  42. turtle.turnLeft()
  43. turtle.forward()
  44. turtle.turnLeft()
  45. end
  46.  
  47. function plant()
  48. turtle.digDown()
  49. turtle.select(1)
  50. turtle.placeDown(1)
  51. end
  52.  
  53. function pootis()
  54. turtle.select(2)
  55. turtle.dropDown()
  56. turtle.select(3)
  57. turtle.dropDown()
  58. turtle.select(4)
  59. turtle.dropDown()
  60. turtle.select(5)
  61. turtle.dropDown()
  62. turtle.select(6)
  63. turtle.dropDown()
  64. turtle.select(7)
  65. turtle.dropDown()
  66. turtle.select(8)
  67. turtle.dropDown()
  68. turtle.select(9)
  69. turtle.dropDown()
  70. turtle.select(10)
  71. turtle.dropDown()
  72. turtle.select(11)
  73. turtle.dropDown()
  74. turtle.select(12)
  75. turtle.dropDown()
  76. end
  77.  
  78. function jobDone()
  79. turtle.turnLeft()
  80. turtle.back()
  81. turtle.back()
  82. turtle.back()
  83. turtle.back()
  84. turtle.back()
  85. turtle.back()
  86. pootis()
  87. turtle.back()
  88. turtle.turnRight()
  89. turtle.back()
  90. turtle.turnLeft()
  91.  
  92. if needsFuel() == true then
  93. turtle.turnLeft()
  94. refuel()
  95. turtle.turnRight()
  96. end
  97.  
  98. turtle.select(1)
  99. end
  100.  
  101.  
  102.  
  103. turtle.turnRight()
  104. turtle.forward()
  105. turtle.turnLeft()
  106. turtle.forward()
  107. turtle.forward()
  108. turtle.turnLeft()
  109.  
  110.  
  111. for row = 1, 8 do
  112. plant()
  113. turtle.forward()
  114. end
  115. plant()
  116.  
  117. bankRight()
  118. for row = 1, 8 do
  119. plant()
  120. turtle.forward()
  121. end
  122. plant()
  123.  
  124. bankLeft()
  125. for row = 1, 8 do
  126. plant()
  127. turtle.forward()
  128. end
  129. plant()
  130.  
  131. bankRight()
  132. for row = 1, 8 do
  133. plant()
  134. turtle.forward()
  135. end
  136. plant()
  137.  
  138. bankLeft()
  139. for row = 1, 8 do
  140. plant()
  141. turtle.forward()
  142. end
  143. plant()
  144.  
  145. bankRight()
  146. for row = 1, 8 do
  147. plant()
  148. turtle.forward()
  149. end
  150. plant()
  151.  
  152. jobDone()
  153.  
  154. print("Standing by for growth")
  155. sleep(10)
  156.  
  157. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement