Advertisement
Guest User

Multiplayer Farm (Carrots)

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