Operating system for OpenComputers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
400B

  1. local delay = 60
  2. local port = 3442
  3. local message = "WoLBeacon"
  4. for modem in component.list("modem") do
  5. component.invoke(modem,"setWakeMessage",message)
  6. end
  7. local ltime = computer.uptime()
  8. while true do
  9. if computer.uptime() > ltime+delay then
  10. for modem in component.list("modem") do
  11. component.invoke(modem,"broadcast",port,message)
  12. end
  13. ltime=computer.uptime()
  14. end
  15. coroutine.yield()
  16. end