Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- peripheral.wrap("back").open(1)
- topChannel = 0
- a = {}
- while true do
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- a[replyChannel] = message
- if replyChannel > topChannel then
- topChannel = replyChannel
- end
- term.clear()
- term.setCursorPos(1,1)
- for i=1,topChannel do
- if a[i] then
- term.setTextColor(8192)
- print("Last Message from " ..i)
- term.setTextColor(16384)
- print(message)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement