Advertisement
BillBodkin

BBCCfarm1

Jun 7th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.50 KB | None | 0 0
  1. function hoe()
  2.     turtle.select(16)
  3.     local data = turtle.getItemDetail()
  4.     if data.name == "minecraft:diamond_hoe" then
  5.         turtle.equipRight()
  6.     end
  7.     turtle.select(1)
  8. end
  9. function axe()
  10.     turtle.select(16)
  11.     local data = turtle.getItemDetail()
  12.     if data.name == "minecraft:diamond_axe" then
  13.         turtle.equipRight()
  14.     end
  15.     turtle.select(1)
  16. end
  17. function refuel()
  18.     turtle.select(15)
  19.     turtle.suckUp(10)
  20.     turtle.refuel()
  21. end
  22. function dump()
  23.     for i = 1,14 do
  24.         turtle.select(i)
  25.         local data = turtle.getItemDetail()
  26.         turtle.dropDown(64)
  27.         if data then
  28.             print(data.name)
  29.         end
  30.     end
  31. end
  32. function wheat()
  33.     turtle.turnRight()
  34.     turtle.select(14)
  35.     turtle.suck(10)
  36.     turtle.turnLeft()
  37.     hoe()
  38.     turtle.forward()
  39.     turtle.up()
  40.     for i=1,10 do
  41.         turtle.select(1)
  42.         turtle.forward()
  43.         axe()
  44.         turtle.digDown()
  45.         hoe()
  46.         turtle.select(14)
  47.         turtle.suckDown()
  48.         turtle.digDown()
  49.         turtle.placeDown()
  50.     end
  51.     for i=1,10 do
  52.         turtle.back()
  53.     end
  54.     turtle.down()
  55.     turtle.back()
  56.     dump()
  57. end
  58. function tree()
  59.     axe()
  60.     turtle.select(14)
  61.     turtle.turnLeft()
  62.     turtle.suck(10)
  63.     turtle.turnRight()
  64.     turtle.forward()
  65.     turtle.up()
  66.     turtle.turnRight()
  67.     for i=1,10 do
  68.         turtle.forward()
  69.     end
  70.     turtle.turnLeft()
  71.     for i=1,10 do
  72.         turtle.select(1)
  73.         turtle.dig()
  74.         turtle.forward()
  75.         turtle.digDown()
  76.         for ii=1,7 do
  77.             turtle.digUp()
  78.             turtle.up()
  79.         end
  80.         for ii=1,7 do
  81.             turtle.digDown()
  82.             turtle.down()
  83.         end
  84.         turtle.select(14)
  85.         turtle.placeDown()
  86.     end
  87.     for i=1,150 do
  88.         print("i: "..i)
  89.         os.sleep(1)
  90.     end
  91.     turtle.select(1)
  92.     turtle.forward()
  93.     turtle.down()
  94.     turtle.turnRight()
  95.     turtle.forward()
  96.     turtle.turnRight()
  97.     turtle.forward()
  98.     turtle.suckDown()
  99.     turtle.down()
  100.     for i=1,10 do
  101.         turtle.suck()
  102.         turtle.forward()
  103.     end
  104.     turtle.up()
  105.     turtle.forward()
  106.     turtle.turnRight()
  107.     turtle.forward()
  108.     turtle.forward()
  109.     turtle.turnRight()
  110.     turtle.forward()
  111.     turtle.suckDown()
  112.     turtle.down()
  113.     for i=1,10 do
  114.         turtle.suck()
  115.         turtle.forward()
  116.     end
  117.     turtle.turnLeft()
  118.     turtle.turnLeft()
  119.     for i=1,10 do
  120.         turtle.suck()
  121.         turtle.forward()
  122.     end
  123.     turtle.up()
  124.     turtle.forward()
  125.     turtle.turnRight()
  126.     for i=1,9 do
  127.         turtle.forward()
  128.     end
  129.     turtle.turnLeft()
  130.     turtle.forward()
  131.     turtle.turnLeft()
  132.     turtle.turnLeft()
  133.     dump()
  134. end
  135.  
  136.  
  137. print("i need to be one block above the floor")
  138. print("")
  139. print("Press Enter when done")
  140. p = read()
  141. shell.run("clear")
  142. print("I need The Following:")
  143. print("Starting Fuel In Slot 15,")
  144. print("A CraftBanch Equipped on the LEFT,")
  145. print("A Hoe Equipped on the RIGHT,")
  146. print("A axe in Slot 16,")
  147. print("A chest on every side of me including above and below except infront")
  148. print("Birtch sapplings in the left chest,")
  149. print("Seeds In The Right Chest")
  150. print("Charcol in the top chest")
  151. print("")
  152. print("Press Enter when done")
  153. p = read()
  154. shell.run("clear")
  155. print("you need to setup the farm now:")
  156. print("infront of me have a gap,")
  157. print("then a row of dirt, 10 long")
  158. print("to the right of that, A row of water,")
  159. print("then a row for torches")
  160. print("then a 6 row gap for water to run to the sapplings")
  161. print("which is on a row of dirt")
  162. print("which will be in the row after that")
  163. print("then another stream going the other way from the other side")
  164. print("")
  165. print("Press Enter when done")
  166. p = read()
  167. shell.run("clear")
  168.  
  169. print("i shall begin")
  170.  
  171. on = true
  172. T = 0
  173.  
  174. refuel()
  175. dump()
  176. tree()
  177. wheat()
  178.  
  179. while on == true do
  180.     os.sleep(1)
  181.     T = T + 1
  182.     print("Timer: "..T)
  183.     if T > 1500 then
  184.         T = 0
  185.         refuel()
  186.         dump()
  187.         tree()
  188.         wheat()
  189.     end
  190. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement