Advertisement
Guest User

t-mobile

a guest
May 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. component = require("component")
  2. term = require("term")
  3. event = require("event")
  4.  
  5. computer = component.computer
  6. modem = component.modem
  7.  
  8. modem.open(457)
  9.  
  10. msg = term.read()
  11. msg = msg:gsub("%s+", "")
  12.  
  13. if msg == "pingtmobile1" then
  14.  
  15.  modem.broadcast(457, "PING_TMOBILE1")
  16.  
  17.  local _, _, from, port, dst, message = event.pull("modem_message")
  18.  
  19.  print(dst)
  20.  
  21. else
  22.  
  23. os.exit()
  24.  
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement