Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("top")
- while true do
- for i=0,65535,128 do
- print("Hopping on channel range " i .. " to " .. i+127)
- for i=i,i+127 do
- modem.open(i)
- end
- os.startTimer(2.5)
- while true do
- local e,side,recvChan,replyChan,msg,dist = os.pullEvent()
- if e == "timer" then
- break
- elseif e == "modem_message" then
- print("Message on " .. recvChan .. ":" .. replyChan .. ", '"..msg.."'")
- end
- end
- modem.closeAll()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment