Advertisement
MCFunRide

EAS PocketComputer

Jun 11th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. rednet.open("back")
  4. while true do
  5. local id, message = rednet.receive()
  6. if id == 6915 then
  7. if message == "code1" then
  8. print("EAS")
  9. print("A Primary Entry Point")
  10. print("has triggered a Code 1 EAS announcment")
  11. shell.run("red")
  12. while true do
  13. local id2, msg = rednet.receive()
  14. if id2 == 6915 and msg == "allclear" then
  15. os.reboot()
  16. end
  17. end
  18. elseif message == "code2" then
  19. print("EAS")
  20. print("A Primary Entry Point")
  21. print("has triggered a Code 2 EAS announcment")
  22. shell.run("red")
  23. while true do
  24. local id2, msg = rednet.receive()
  25. if id2 == 6915 and msg == "allclear" then
  26. os.reboot()
  27. end
  28. end
  29. elseif message == "code3" then
  30. print("EAS")
  31. print("A Primary Entry Point")
  32. print("has triggered a Code 3 EAS announcment")
  33. shell.run("red")
  34. while true do
  35. local id2, msg = rednet.receive()
  36. if id2 == 6915 and msg == "allclear" then
  37. os.reboot()
  38. end
  39. end
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement