Stary2001

Untitled

Feb 12th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. local modem = peripheral.wrap("top")
  2.  
  3. while true do
  4. for i=0,65535,128 do
  5. print("Hopping on channel range " i .. " to " .. i+127)
  6. for i=i,i+127 do
  7. modem.open(i)
  8. end
  9.  
  10. os.startTimer(2.5)
  11. while true do
  12. local e,side,recvChan,replyChan,msg,dist = os.pullEvent()
  13. if e == "timer" then
  14. break
  15. elseif e == "modem_message" then
  16. print("Message on " .. recvChan .. ":" .. replyChan .. ", '"..msg.."'")
  17. end
  18. end
  19.  
  20. modem.closeAll()
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment