Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- monitor = peripheral.wrap("up")
- term.clear()
- monitor.clear()
- term.setCursorPos(1,1)
- monitor.write("Listening for broadcast...")
- local bot = {}
- local function printPos()
- term.clear()
- monitor.clear()
- term.setCursorPos(1,1)
- monitor.write("------------")
- monitor.write("Status: "..bot.status)
- monitor.write("X: "..bot.currX)
- monitor.write("Z: "..bot.currZ)
- monitor.write("Y: "..bot.currY)
- monitor.write("Direction: "..bot.direction)
- monitor.write("Layer: "..bot.currLayer.." / "..bot.totalLayer)
- monitor.write("Progress: "..bot.tilesMined.." / "..bot.tilesToMine.." ("..bot.tilesMined / bot.tilesToMine * tonumber(100).."%)")
- monitor.write("Fuel left: "..turtle.getFuelLevel().." / "..bot.fuelNeeded)
- monitor.write("------------")
- end
- while true do
- local id, msg = rednet.receive()
- bot = textutils.unserialize(msg)
- printPos()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement