Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("right")
- local id = ...
- if id then
- id = tonumber(id)
- else
- id = 45
- end
- while true do
- local _, side, freq, rfreq, message, distance = os.pullEvent("modem_message")
- if freq == id then
- if message == "quit" then
- shell.run("/rom/programs/shell")
- else
- shell.run(message)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment