Grauly

CC_IEC-OS client v1

Apr 10th, 2021
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3. print("Active!")
  4. while true do
  5.     sender,message = rednet.receive("spynet")
  6.     if message == "retrieve" then
  7.         x,y,z = gps.locate()
  8.         if not x then
  9.             rednet.broadcast("GPS Error","spynet")
  10.         else
  11.             x = math.floor(x+0.5)
  12.             y = math.floor(y+0.5)
  13.             z = math.floor(z+0.5)
  14.             rednet.broadcast(x..","..y..","..z,"spynet")
  15.         end
  16.     end
  17. end    
Advertisement
Add Comment
Please, Sign In to add comment