Advertisement
marko_rus

dns.lua

Oct 16th, 2018
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local com =require("component")
  2. local event =require("event")
  3. local pc = require("computer")
  4. local dn = {city17 ="8df1899e-070c-4269-985f-015578ed34d3"}
  5. local message
  6. local address, address2
  7. if com.isAvailable("modem") then
  8. mod =com.modem
  9. else return 0
  10. end
  11.  
  12. mod.open(110)
  13. while true do
  14. address2, _, address, address2, _, message =event.pull("modem_message")
  15. print(message)
  16. print (mod.send(address, 110, dn[message]))
  17. print(address)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement