Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. while true do
  2. local reactor1 = peripheral.wrap("BigReactors-Reactor_1")
  3. local reactor2 = peripheral.wrap("BigReactors-Reactor_2")
  4. local reactor3 = peripheral.wrap("BigReactors-Reactor_3")
  5. local reactor4 = peripheral.wrap("BigReactors-Reactor_4")
  6.  
  7. write("Reactor 1-4: ")
  8. --r1
  9. if reactor1.getActive == true then
  10. term.setTextColor(colors.green)
  11. write("[Online] ")
  12. end
  13. if reactor1.getActive == not true then
  14. term.setTextColor(colors.red)
  15. write("[Offline] ")
  16. end
  17.  
  18. --r2
  19. if reactor2.getActive == true then
  20. term.setTextColor(colors.green)
  21. write("[Online] ")
  22. end
  23. if reactor2.getActive == not true then
  24. term.setTextColor(colors.red)
  25. write("[Offline] ")
  26. end
  27.  
  28. --r3
  29. if reactor3.getActive == true then
  30. term.setTextColor(colors.green)
  31. write("[Online] ")
  32. end
  33. if reactor3.getActive == not true then
  34. term.setTextColor(colors.red)
  35. write("[Offline] ")
  36. end
  37.  
  38. --r4
  39. if reactor1.getActive == true then
  40. term.setTextColor(colors.green)
  41. write("[Online] ")
  42. end
  43. if reactor1.getActive == not true then
  44. term.setTextColor(colors.red)
  45. write("[Offline] ")
  46. end
  47. term.setTextColor(colors.white)
  48. --end r status
  49.  
  50. print("")
  51. write("Which reactor do you wish to manage: ")
  52. local input1 = read()
  53. if input1 == "1" then
  54. --insert commands for reactor here
  55. print("")
  56. write("Auto-set to toggle generator.")
  57. reactor1.setActive()
  58. end
  59.  
  60. if input1 == "2" then
  61. --insert commands for reactor here
  62. print("")
  63. write("Auto-set to toggle generator.")
  64. reactor2.setActive()
  65. end
  66.  
  67. if input1 == "3" then
  68. --insert commands for reactor here
  69. print("")
  70. write("Auto-set to toggle generator.")
  71. reactor3.setActive()
  72. end
  73.  
  74. if input1 == "4" then
  75. --insert commands for reactor here
  76. print("")
  77. write("Auto-set to toggle generator.")
  78. reactor4.setActive()
  79. end
  80. term.clear()
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement