Darknio

Uhr mit Finder

Feb 19th, 2023 (edited)
1,056
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local monitors = {peripheral.find("monitor")}  -- "find" needs CC 1.6 or later
  2.  
  3. local multiTerm = {}
  4. for funcName,_ in pairs(monitors[1]) do
  5.         multiTerm[funcName] = function(...)
  6.                 for i=1,#monitors-1 do monitors[i][funcName](unpack(arg)) end
  7.                 return monitors[#monitors][funcName](unpack(arg))
  8.         end
  9. end
  10. term.redirect(multiTerm)
  11. while true do
  12.  
  13. term.clear()
  14. term.setCursorPos(1,1)
  15. term.write(textutils.formatTime(os.time(),true))
  16. term.setCursorPos(1,2)
  17. term.write("Tag: ")
  18. term.setCursorPos(1,3)
  19. term.write(textutils.serialize(os.day()),number)
  20. sleep(0.5)
  21. end
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment