Advertisement
Guest User

Untitled

a guest
Sep 20th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. peripheral.wrap("back").open(1)
  2. topChannel = 0
  3. a = {}
  4. while true do
  5.  
  6. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  7.  
  8. a[replyChannel] = message
  9. if replyChannel > topChannel then
  10. topChannel = replyChannel
  11. end
  12. term.clear()
  13. term.setCursorPos(1,1)
  14.  
  15. for i=1,topChannel do
  16. if a[i] then
  17. term.setTextColor(8192)
  18. print("Last Message from " ..i)
  19. term.setTextColor(16384)
  20. print(message)
  21. end
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement