Advertisement
BanditDragon

Farm V1.0 WIP

Jul 10th, 2015
1,705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.11 KB | None | 0 0
  1. -- 1=pickaxe 2=hoe 3=water 4=seed
  2. -- need to make a find item thing
  3.  
  4. local robot = require("robot")
  5. local component = require("component")
  6.  
  7. function Awater ()
  8.  
  9. robot.forward()
  10. robot.forward()
  11. robot.forward()
  12. robot.forward()
  13. robot.forward()
  14. robot.forward()
  15. robot.turnRight()
  16. robot.forward()
  17. robot.forward()
  18. robot.forward()
  19. robot.forward()
  20. robot.forward()
  21.  
  22. end
  23.  
  24. function Bwater()
  25.  
  26. robot.select(1)
  27. component.inventory_controller.equip()
  28. robot.swingDown()
  29. robot.turnAround()
  30. component.inventory_controller.equip()
  31. robot.select(3)
  32. component.inventory_controller.equip()
  33. robot.useDown()
  34. component.inventory_controller.equip()
  35.  
  36. end
  37.  
  38. function Rwater()
  39.  
  40. robot.forward()
  41. robot.forward()
  42. robot.forward()
  43. robot.forward()
  44.  
  45. robot.turnLeft()
  46. robot.forward()
  47. robot.forward()
  48. robot.forward()
  49. robot.forward()
  50. robot.forward()
  51. robot.forward()
  52. robot.turnAround()
  53.  
  54. end
  55.  
  56. function PosFarm()
  57.  
  58. robot.forward()
  59. robot.up()
  60.  
  61. end
  62.  
  63. function Row()
  64.  
  65. robot.forward()
  66. robot.useDown()
  67. robot.forward()
  68. robot.useDown()
  69. robot.forward()
  70. robot.useDown()
  71. robot.forward()
  72. robot.useDown()
  73. robot.forward()
  74. robot.useDown()
  75. robot.forward()
  76. robot.useDown()
  77. robot.forward()
  78. robot.useDown()
  79. robot.forward()
  80. robot.useDown()
  81. robot.forward()
  82. robot.useDown()
  83. robot.forward()
  84.  
  85. end
  86.  
  87. function Tright()
  88.  
  89. robot.turnRight()
  90. robot.forward()
  91. robot.turnRight()
  92.  
  93. end
  94.  
  95. function Tleft()
  96.  
  97. robot.turnLeft()
  98. robot.forward()
  99. robot.turnLeft()
  100.  
  101. end
  102.  
  103. function Ehoe()
  104.  
  105. robot.select(2)
  106. component.inventory_controller.equip()
  107.  
  108. end
  109.  
  110. function Dhoe()
  111.  
  112. component.inventory_controller.equip()
  113.  
  114. end
  115.  
  116. function Eseed()
  117.  
  118. robot.select(4)
  119. component.inventory_controller.equip()
  120.  
  121. end
  122.  
  123. function Dseed()
  124.  
  125. component.inventory_controller.equip()
  126.  
  127. end
  128.  
  129. Awater()
  130. Bwater()
  131. Rwater()
  132. PosFarm()
  133. Ehoe()
  134. Row()
  135. Tright()
  136. Row()
  137. Tleft()
  138. Row()
  139. Tright()
  140. Row()
  141. Tleft()
  142. Row()
  143. Tright()
  144. Row()
  145. Tleft()
  146. Row()
  147. Tright()
  148. Row()
  149. Tleft()
  150. Row()
  151. Dhoe()
  152. robot.turnAround()
  153. Eseed()
  154. Row()
  155. Tright()
  156. Row()
  157. Tleft()
  158. Row()
  159. Tright()
  160. Row()
  161. Tleft()
  162. Row()
  163. Tright()
  164. Row()
  165. Tleft()
  166. Row()
  167. Tright()
  168. Row()
  169. Tleft()
  170. Row()
  171. Dseed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement