Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Made for version 2.3.3
- side = nil
- tArgs = {...}
- if tArgs[1] ~= nil then
- side = tArgs[1]
- end
- term.clear()
- term.setCursorPos(1,1)
- if not side then
- print("Modem Side?")
- side = io.read()
- end
- rednet.open(side)
- pass = false
- repeat
- print("Computer #"..os.getComputerID().." is waiting for turtle message")
- turt, initCheck, dist = rednet.receive()
- if initCheck == "Initial Confirm" then
- sleep(1)
- print("Turtle Confirmed! Program Functioning")
- rednet.send(turt, "Host Confirm")
- pass = true
- end
- until pass == true
- receivedMessages = 0
- while pass do
- receivedMessages = receivedMessages + 1
- turtCheck, message, dist = rednet.receive()
- if turtCheck == turt then
- rednet.send(turt, "Quarry Confirm")
- if message == "Stop" then
- pass = false
- _, final, _ = rednet.receive()
- final = textutils.unserialize(final)
- term.clear()
- term.setCursorPos(1,1)
- print("Turtle Done!")
- print("Fuel: "..final.fuel)
- print("Blocks Mined: "..final.mined)
- print("Cobble: "..final.cobble)
- print("Other Raw: "..final.sand)
- print("Other: "..final.other)
- else --The display section until end
- message = textutils.unserialize(message)
- term.clear()
- term.setCursorPos(1,1)
- print("Mine Dimensions: "..message.length.." x "..message.width.." x "..
- message.height)
- print("Turtle #"..message.ID)
- print("Fuel: "..message.fuel)
- print("Percent Complete: "..message.percent.."%")
- print("")
- print("Blocks Mined: "..message.blocksMined)
- print("Moved Blocks: "..message.blocksMoved.." out of "..message.volume)
- print("Blocks remaining: "..message.blocksLeft)
- print("")
- print("Rows done this layer: "..message.finishedWidth)
- print("On Layer: "..message.finishedLayers)
- print("")
- if message.finishedWidth == message.width then
- print("Turtle moving to next layer...")
- rows = 0
- else
- term.clearLine()
- end
- end
- end
- end
- rednet.close(side)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement