Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a,b in pairs(rs.getSides()) do
- if peripheral.getType(b) == 'modem' then
- rednet.open(b)
- break
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Press Enter key when ready to proceed. You'll have 1 minute to enter coordinates before the system times out.")
- dud = read()
- rednet.broadcast("waypoint")
- id, confirm = rednet.receive(1)
- if confirm == "ready" then
- write("Enter X coordinate: ")
- x = read()
- write("Enter Y coordinate: ")
- y = read()
- write("Enter Z coordinate: ")
- z = read()
- term.clear()
- term.setCursorPos(1,1)
- rednet.send(id, x)
- sleep(.1)
- rednet.send(id, y)
- sleep(.1)
- rednet.send(id, z)
- id, confirm = rednet.receive()
- if confirm == "complete" then
- print("Coordinates sent")
- sleep(3)
- else
- print("No response from pilot. Coordinates not sent.")
- os.sleep(3)
- end
- else
- term.clear()
- term.setCursorPos(1,1)
- print("No responce from pilot. Ship out of range")
- os.sleep(3)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement