Ignius12

Status_Readout

Jul 23rd, 2021 (edited)
1,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. function display()
  2. local monitor = peripheral.find("monitor")
  3. local modem = peripheral.find("modem")
  4.  
  5. rednet.open("left")
  6. monitor.clear()
  7.  
  8. while true do
  9. local sender, message, protocol = rednet.receive("miners")
  10. if(sender == 11) then
  11.     monitor.setCursorPos(1,1)
  12. else
  13.     monitor.setCursorPos(1,sender + 1)
  14. end
  15. monitor.write(message)
  16. end
  17. end
  18.  
  19. function checkConnection()
  20.     while true do
  21.         rednet.broadcast(" ", "failsafe")
  22.     end
  23. end
  24.  
  25. parallel.waitForAll(display, checkConnection)
  26.  
  27.  
  28.  
Add Comment
Please, Sign In to add comment