Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --component=require("component")
- local coordx=89
- local coordy=-94
- local coordz=76
- local identification_string="first_relay"
- local wireless_modem,wired_modem
- for i in component.list("modem") do
- local tmpmodemproxy=component.proxy(i)
- if tmpmodemproxy.isWireless() then wireless_modem=tmpmodemproxy else
- wired_modem=tmpmodemproxy end
- end
- if not wireless_modem and not wired_modem then component.computer.beep(3); component.computer.stop() end
- wireless_modem.open(312)
- while true do
- local ename,laddr,raddr,port,dist,message=computer.pullSignal()
- if ename=="modem_message" and dist>0 and message=="gps_request" then
- wired_modem.broadcast(312,"gps_response",identification_string,coordx,coordy,coordz,dist,raddr)
- end
- end
Add Comment
Please, Sign In to add comment