Advertisement
Lyqyd

Wither Farm

May 25th, 2014
263
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("right")
  2.  
  3. local control = 107
  4.  
  5. local function up()
  6.     while not turtle.up() do
  7.         turtle.attackUp()
  8.         sleep(0.1)
  9.     end
  10. end
  11.  
  12. while true do
  13.     local id, message = rednet.receive()
  14.     if id == control and message == "construct" then
  15.         if turtle.getItemCount(1) > 0 then
  16.             turtle.select(1)
  17.             turtle.refuel(64)
  18.         end
  19.         if turtle.getFuelLevel() < 24 then
  20.             rednet.send(control, "fuel")
  21.         end
  22.         turtle.down()
  23.         turtle.turnLeft()
  24.         turtle.select(1)
  25.         turtle.suck()
  26.         turtle.drop(turtle.getItemCount(1) - 4)
  27.         turtle.turnRight()
  28.         turtle.turnRight()
  29.         turtle.select(2)
  30.         turtle.suck()
  31.         turtle.drop(turtle.getItemCount(2) - 3)
  32.         turtle.turnLeft()
  33.         turtle.up()
  34.         turtle.forward()
  35.         turtle.forward()
  36.         for i = 1, 4 do
  37.             turtle.down()
  38.         end
  39.         turtle.select(1)
  40.         turtle.placeDown()
  41.         turtle.turnRight()
  42.         turtle.place()
  43.         turtle.turnLeft()
  44.         turtle.turnLeft()
  45.         turtle.place()
  46.         turtle.up()
  47.         turtle.placeDown()
  48.         turtle.select(2)
  49.         turtle.place()
  50.         turtle.turnRight()
  51.         turtle.turnRight()
  52.         turtle.place()
  53.         turtle.up()
  54.         turtle.turnLeft()
  55.         turtle.placeDown()
  56.         up()
  57.         up()
  58.         turtle.back()
  59.         turtle.back()
  60.         rednet.send(control, "ok")
  61.     end
  62. end
Advertisement
RAW Paste Data Copied
Advertisement