Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modemPort = 199
- local component = require("component")
- local gpu = component.gpu
- local event = require("event")
- local ser = require("serialization")
- local term = require("term")
- local computer = component.computer
- local modem = component.modem
- local link = component.tunnel
- local localAddress = nil
- local remoteAddress = nil
- while true do
- if modem.isOpen(modemPort) == false then
- modem.open(modemPort)
- end
- local _, _, from, port, _, command, msg, address = event.pull("modem_message")
- print("Received message")
- if port == 0 then
- print("From Link Card. ReBroadcasting :D")
- remoteAddress = address
- modem.broadcast(modemPort, command, msg)
- else
- print("From Modem. Sending to other boost right now!")
- localAddress = from
- link.send(command, msg, localAddress)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement