Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("modem")
- for i = 1, 128 do
- modem.open("right", i)
- print("opened channel "..i.."")
- sleep(0.05)
- end
- while true do
- modem.receive()
- side = modem.getside()
- sender = modem.getfromchan()
- replychan = modem.getreplychan()
- msg = modem.getmsg()
- distance = modem.getdistance()
- if distance and msg and replychan and sender and side then
- print(sender..": "..msg.."["..distance.." Blocks away] sender wants us to reply on "..replychan.."")
- end
- end
Add Comment
Please, Sign In to add comment