Ibot02

Track

Mar 29th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. if not rednet.isOpen() then
  2.   rednet.open("back")
  3. end
  4. while true do
  5.   s, m, p = rednet.receive("track")
  6.   if m == "getPos" then
  7.     x,y,z = gps.locate()
  8.     rednet.send(s,{ x = x, y = y, z = z}, "track")
  9.     print("send "..x.." "..y.." "..z.." to "..s)
  10.   end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment