Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- local event, side, channel, replyChannel, message, distance
- function listener()
- while true do
- local event, modemSide, channel, replyChannel, message, distance = os.pullEvent()
- if event == "timer" then
- modem.close(i)
- print(i)
- elseif event == "modem_message" then
- print("aaaa")
- break
- end
- end
- end
- while true do
- for i = 0, 21 do
- os.startTimer(0)
- modem.open(i)
- print(i)
- listener()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement