Advertisement
AnonGaming

Untitled

Mar 8th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3.  
  4. while true do
  5.  
  6.  
  7. senderID,message = rednet.receive()
  8.  
  9.  
  10. if message then
  11. local messageArr = textutils.unserailise(message)
  12.  
  13. if messageArr then
  14. --Check message formats for cmd
  15. if messageArr["requestRoute"] then
  16. local resp = {}
  17. resp["hops"] = 1
  18. resp["route"] = {os.getComputerID()}
  19. resp["relay"] = false
  20. resp["sever"] = true
  21. local ms = textutils.serialise(resp)
  22. rednet.send(senderID,ms)
  23. end
  24.  
  25. end
  26. end
  27.  
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement