Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- local control = 107
- local function up()
- while not turtle.up() do
- turtle.attackUp()
- sleep(0.1)
- end
- end
- while true do
- local id, message = rednet.receive()
- if id == control and message == "construct" then
- if turtle.getItemCount(1) > 0 then
- turtle.select(1)
- turtle.refuel(64)
- end
- if turtle.getFuelLevel() < 24 then
- rednet.send(control, "fuel")
- end
- turtle.down()
- turtle.turnLeft()
- turtle.select(1)
- turtle.suck()
- turtle.drop(turtle.getItemCount(1) - 4)
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.suck()
- turtle.drop(turtle.getItemCount(2) - 3)
- turtle.turnLeft()
- turtle.up()
- turtle.forward()
- turtle.forward()
- for i = 1, 4 do
- turtle.down()
- end
- turtle.select(1)
- turtle.placeDown()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.up()
- turtle.placeDown()
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.up()
- turtle.turnLeft()
- turtle.placeDown()
- up()
- up()
- turtle.back()
- turtle.back()
- rednet.send(control, "ok")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement