mack29446

WIS BIOS lighting

Jan 11th, 2020
754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. --set program to run
  2. local modemside = ""
  3. local monitorside = "" --OPTIONAL
  4. local lightid= "" --OPTIONAL]
  5. local lightside= "" --OPTIONAL
  6.  
  7. rednet.open(modemside)
  8. shell.run("delete modemside")
  9. shell.run("delete monitorside")
  10. shell.run("delete lightid")
  11. shell.run("delete lightside")
  12. local h = fs.open("modemside", "w")
  13. h.write(modemside)
  14. h.close()
  15. local h = fs.open("monitorside", "w")
  16. h.write(monitorside)
  17. h.close()
  18. local h = fs.open("lightid", "w")
  19. h.write(lightid)
  20. h.close()
  21. local h = fs.open("lightside", "w")
  22. h.write(lightside)
  23. h.close()
  24. print("WIS OS")
  25. print("LOADING...")
  26. print("update check...")
  27. shell.run("delete lighton")
  28. shell.run("pastebin","get","Hajkj8GX,"lighton")
  29. shell.run("delete lightoff")
  30. shell.run("pastebin","get","e6hJEH96","lightoff")
  31. print("update successful")
  32. print("running...")
  33. shell.run("fg lighton")
  34. shell.run("bg lightoff")
  35. while true do
  36. local senderId, message, protocol = rednet.receive()
  37. if senderId == 40 then
  38. if message == "update" then
  39. os.reboot()
  40. end
  41. end
  42. end
Add Comment
Please, Sign In to add comment