Advertisement
Guest User

infoBoard.lua

a guest
Apr 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. monitors = {
  2. peripheral.wrap("left");
  3. peripheral.wrap("right");
  4. --You could add tons of monitors here because the allMonitors function will write on every monitor!
  5. }
  6. function allMonitors(message)
  7.   for i=1,#monitors do
  8.   term.redirect(monitors[i])
  9. term.clear()
  10. print(message)
  11. term.redirect(term.native())
  12. end
  13. end
  14. while true do
  15. rednet.open("top")
  16. senderId, message, protocol = rednet.receive("infoBoard")
  17. term.setBackgroundColor(colors.black)
  18. term.clear()
  19. allMonitors(message)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement