Advertisement
xeritt

OpenComputers Robot modem get messages

Aug 28th, 2018
172
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local event = require("event")
  2. local modem = require("component").modem
  3. modem.open(225) --порт по которому идет прием
  4. function onChatMessage(...)
  5.     for n,arg in ipairs({...}) do
  6.         print(arg)
  7.     end
  8. --  for i=1,#mass do
  9. --    print(mass[i])
  10. --  end
  11. end
  12. event.listen("modem_message", onChatMessage)
Advertisement
RAW Paste Data Copied
Advertisement