Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- local tArgs = {...}
- if tArgs[1] == nil then tArgs[1] = 1 end
- local function placeWell()
- while turtle.detect() do
- turtle.select(4)
- turtle.dig()
- sleep(0.3)
- end
- turtle.select(1)
- turtle.place()
- end
- local function placeChest()
- while turtle.detectUp() do
- turtle.select(5)
- turtle.digUp()
- sleep(0.3)
- end
- turtle.up()
- turtle.select(2)
- turtle.placeDown()
- end
- local function placeEnergy()
- while turtle.detect() do
- turtle.select(6)
- turtle.dig()
- sleep(0.3)
- end
- turtle.select(3)
- turtle.place()
- end
- local function unload()
- for e = 4,8 do
- turtle.select(e)
- turtle.dropDown()
- end
- end
- local function workDone()
- turtle.select(3)
- turtle.dig()
- turtle.select(2)
- turtle.digDown()
- turtle.down()
- turtle.select(1)
- turtle.dig()
- turtle.forward()
- end
- for i = 1,tArgs[1] do
- rednet.broadcast("start")
- placeWell()
- placeChest()
- placeEnergy()
- sleep(3)
- rednet.broadcast("unload")
- unload()
- sleep(3)
- rednet.broadcast("done")
- workDone()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement