Advertisement
Guest User

lockdown

a guest
Dec 17th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. function begin()
  4. while true do
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. print("House Control Systems:")
  8. print("")
  9. print("1 - Quarantine")
  10. print("")
  11. print("What do you want to do?")
  12. menu = read()
  13. if menu == "1" then
  14. term.clear()
  15. term.setCursorPos(1,1)
  16. print("Quarantine setting")
  17. print("----------------------------------------------")
  18. if rs.getOutput("top") == true then
  19. print("Quarantine is active. Type off to deactivate")
  20. off = read()
  21. if off == off then
  22. print("Deactivating Quarantine")
  23. rs.setOutput("top",false)
  24. sleep(2)
  25. begin()
  26. end
  27. end
  28. if rs.getOutput("top") == false then
  29. print("Quarantine is deactivated. type on to activate or Press 2 to return to the main menu")
  30. on = read()
  31. if on == on then
  32. print("Activating Quarantine")
  33. rs.setOutput("top",true)
  34. sleep(2)
  35. begin()
  36. end
  37. end
  38. end
  39. end
  40. end
  41. begin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement