Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function moveUp()
- turtle.select(1)
- rednet.broadcast("moveUp")
- while turtle.getItemCount(1) > 0 do
- redstone.setOutput("bottom", true)
- os.sleep(.4)
- redstone.setOutput("bottom", false)
- os.sleep(.4)
- turtle.place()
- end
- end
- local function moveDown()
- turtle.select(1)
- rednet.broadcast("moveDown")
- while turtle.getItemCount(1) < 50 do
- redstone.setOutput("left", true)
- os.sleep(.4)
- redstone.setOutput("left", false)
- os.sleep(.4)
- turtle.dig()
- end
- end
- local function firstRun()
- if turtle.getItemCount(1) > 0 then
- moveUp()
- end
- end
- local function comms()
- state = rednet.receive()
- end
- parallel.waitForAny(comms())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement