Guest User

Untitled

a guest
Nov 22nd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. local tArgs = { ... }
  2. local CompID = tonumber(tArgs[1])
  3.  
  4. io.write "Message: "
  5. local message = read()
  6. print ""
  7.  
  8. if #tArgs ~= 1 then
  9. print "Usage: message <compid>"
  10. return
  11. end
  12.  
  13. if CompID == -1 then
  14. rednet.open("right")
  15. rednet.broadcast(message)
  16. return
  17. end
  18.  
  19. rednet.open("right")
  20. rednet.send(CompID, message)
Add Comment
Please, Sign In to add comment