Guest User

Fixed?

a guest
Apr 2nd, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.42 KB | None | 0 0
  1. term.setTextColor(colors.green)
  2. while x ~= "exit" do
  3. print("-------------------------------")
  4. print("Titan Manifold Control System:")
  5. print("Alpha to select Titan Activation Protocols.")
  6. print("Omega to select Titan Adminstrative Protocols.")
  7. print("Type exit to go back to previous menu.")
  8.  
  9. write(" Enter a command now my princeps.")
  10.  
  11. print("-------------------------------")
  12.  
  13. x = io.read()
  14.  
  15. if x == "Alpha" then
  16.  
  17.  
  18. while y ~= "exit" do
  19. y = io.read()
  20.  
  21. if y == "on" then
  22.  
  23. term.clear()
  24. term.setCursorPos(1,1)
  25. term.setTextColor(colors.green)
  26. print" ---------------------------------------------- "
  27. print" | |"
  28. print" | |"
  29. print" | |"
  30. print" | |"
  31. print" | |"
  32. print" | |"
  33. print" | |"
  34. print" | |"
  35. print" | |"
  36. print" | |"
  37. print" | |"
  38. print" | |"
  39. print" | |"
  40. print" | |"
  41. print" | |"
  42. print" ---------------------------------------------- "
  43. term.setCursorPos(19,3)
  44. print"Current Status:"
  45. if colors.test(redstone.getBundledOutput("back"), colors.blue) == false then
  46. Reactor = "Off"
  47. else
  48. Reactor = "On"
  49. end
  50. if colors.test(redstone.getBundledOutput("back"), colors.black) == false then
  51. Containment = "Off"
  52. else
  53. Containment = "On"
  54. end
  55. if colors.test(redstone.getBundledOutput("back"), colors.yellow) == false then
  56. Flood_Protocol = "Off"
  57. else
  58. Flood_Protocol = "On"
  59. end
  60. if colors.test(redstone.getBundledOutput("back"), colors.gray) == false then
  61. Illumination = "Off"
  62. else
  63. Illumination = "On"
  64. end
  65. if colors.test(redstone.getBundledOutput("back"), colors.red) == false then
  66. Reactor_Access = "Off"
  67. else
  68. Reactor_Access = "On"
  69. end
  70. if colors.test(redstone.getBundledOutput("back"), colors.orange) == false then
  71. HazMat_locker = "Off"
  72. else
  73. HazMat_locker = "On"
  74. end
  75. term.setCursorPos(5,5)
  76. write("1 - Reactor activation: ")
  77. write(Reactor)
  78. term.setCursorPos(28,5)
  79. write("2 - Reactor_Containment: ")
  80. write(Containment)
  81. term.setCursorPos(5,7)
  82. write("3 - Flood_Protocol: ")
  83. write(Flood)
  84. term.setCursorPos(28,7)
  85. write("4 - Illumination: ")
  86. write(Illumination)
  87. term.setCursorPos(5,9)
  88. write("5 - Reactor_Access: ")
  89. write(Reactor_Access)
  90. term.setCursorPos(28,9)
  91. write("6 - HazMat_locker: ")
  92. write(HazMat_locker)
  93. term.setCursorPos(3,12)
  94. write("Select a Service From The List Above And Enter")
  95. term.setCursorPos(7,13)
  96. write("Its ID Below Or leave Blank To Log Out")
  97. term.setCursorPos(21,15)
  98. write("Enter ID: ")
  99. sleep(1)
  100. input = read()
  101. term.clear()
  102. term.setCursorPos(1,1)
  103. term.setTextColor(colors.green)
  104. print" ---------------------------------------------- "
  105. print" | |"
  106. print" | |"
  107. print" | |"
  108. print" | |"
  109. print" | |"
  110. print" | |"
  111. print" | |"
  112. print" | |"
  113. print" | |"
  114. print" | |"
  115. print" | |"
  116. print" | |"
  117. print" | |"
  118. print" | |"
  119. print" | |"
  120. print" ---------------------------------------------- "
  121. term.setCursorPos(15,9)
  122. if input == "1" then
  123. if Reactor == "On" then
  124. print"Reactor Initialised"
  125. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.blue))
  126. else
  127. print"Reactor Deactivated"
  128. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.blue))
  129. end
  130. elseif input == "2" then
  131. if Reactor_Containment == "On" then
  132. print" Reactor_Containment Deactivated"
  133. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.black))
  134. else
  135. print" Reactor_Containment Activated"
  136. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.black))
  137. end
  138. elseif input == "3" then
  139. if Flood_Protocol == "On" then
  140. print"Flood_Protocol Deactive"
  141. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.yellow))
  142. else
  143. print"Flood_Protocol Active"
  144. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.yellow))
  145. end
  146. elseif input == "4" then
  147. if Titan_Illumination == "On" then
  148. print" Titan_Illumination deactivated"
  149. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.gray))
  150. else
  151. print" Titan_Illumination Activated"
  152. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.gray))
  153. end
  154. elseif input == "5" then
  155. if Reactor_Access == "On" then
  156. print"Reactor_Access Withdrawn"
  157. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.red))
  158. else
  159. print"Reactor_Access Granted"
  160. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.red))
  161. end
  162. elseif input == "6" then
  163. if HazMat_locker == "On" then
  164. print" HazMat_locker locked"
  165. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.orange))
  166. else
  167. print" HazMat_locker unlocked"
  168. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.orange))
  169. end
  170. else
  171. end -- if y = on/off
  172.  
  173. end -- while y
  174. end -- if Alpha
  175. if x == "Omega" then
  176.  
  177.  
  178.  
  179. while u ~= "exit" do
  180. u=io.read()
  181. if y == "on" then
  182.  
  183. term.clear()
  184. term.setCursorPos(1,1)
  185. term.setTextColor(colors.green)
  186. print" ---------------------------------------------- "
  187. print" | |"
  188. print" | |"
  189. print" | |"
  190. print" | |"
  191. print" | |"
  192. print" | |"
  193. print" | |"
  194. print" | |"
  195. print" | |"
  196. print" | |"
  197. print" | |"
  198. print" | |"
  199. print" | |"
  200. print" | |"
  201. print" | |"
  202. print" ---------------------------------------------- "
  203. term.setCursorPos(19,3)
  204. print"Current Status:"
  205. if colors.test(redstone.getBundledOutput("back"), colors.blue) == false then
  206. Head_blast_doors = "Off"
  207. else
  208. Head_blast_doors = "On"
  209. end
  210. if colors.test(redstone.getBundledOutput("back"), colors.black) == false then
  211. Carapace_access_hatches = "Off"
  212. else
  213. Carapace_access_hatches = "On"
  214. end
  215. if colors.test(redstone.getBundledOutput("back"), colors.yellow) == false then
  216. Carapace_boarding_hatch = "Off"
  217. else
  218. Carapace_boarding_hatch = "On"
  219. end
  220. if colors.test(redstone.getBundledOutput("back"), colors.gray) == false then
  221. Thoracic_Elevator = "Off"
  222. else
  223. Thoracic_Elevator = "On"
  224. end
  225. if colors.test(redstone.getBundledOutput("back"), colors.red) == false then
  226. Point_Defence_system = "Off"
  227. else
  228. Point_Defence_system = "On"
  229. end
  230. term.setCursorPos(5,5)
  231. write("1 - Head_blast_doors: ")
  232. write(Head_blast_doors)
  233. term.setCursorPos(28,5)
  234. write("2 - Carapace_access_hatches: ")
  235. write(Carapace_access_hatches)
  236. term.setCursorPos(5,7)
  237. write("3 - Carapace_boarding_hatch: ")
  238. write(Carapace_boarding_hatch)
  239. term.setCursorPos(28,7)
  240. write("4 - Thoracic_Elevator: ")
  241. write(Thoracic_Elevator)
  242. term.setCursorPos(5,9)
  243. write("5 - Point_Defence_system: ")
  244. write(Point_Defence_system)
  245. term.setCursorPos(3,12)
  246. write("Select a Service From The List Above And Enter")
  247. term.setCursorPos(7,13)
  248. write("Its ID Below Or leave Blank To Log Out")
  249. term.setCursorPos(21,15)
  250. write("Enter ID: ")
  251. sleep(1)
  252. input = read()
  253. term.clear()
  254. term.setCursorPos(1,1)
  255. term.setTextColor(colors.green)
  256. print" ---------------------------------------------- "
  257. print" | |"
  258. print" | |"
  259. print" | |"
  260. print" | |"
  261. print" | |"
  262. print" | |"
  263. print" | |"
  264. print" | |"
  265. print" | |"
  266. print" | |"
  267. print" | |"
  268. print" | |"
  269. print" | |"
  270. print" | |"
  271. print" | |"
  272. print" ---------------------------------------------- "
  273. term.setCursorPos(15,9)
  274. if input == "1" then
  275. if Head_blast_doors == "On" then
  276. print"Head_doors_extended"
  277. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.blue))
  278. else
  279. print"Head_doors_Retracted"
  280. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.blue))
  281. end
  282. elseif input == "2" then
  283. if Carapace_access_hatches == "On" then
  284. print" Carapace_access_hatches Sealed"
  285. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.black))
  286. else
  287. print" Carapace_access_hatches Open"
  288. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.black))
  289. end
  290. elseif input == "3" then
  291. if Carapace_boarding_hatch == "On" then
  292. print"Carapace_boarding_hatch Retracted"
  293. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.yellow))
  294. else
  295. print"Carapace boarding hatch Sealed."
  296. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.yellow))
  297. end
  298. elseif input == "4" then
  299. if Thoracic_Elevator == "On" then
  300. print" Thoracic_Elevator Direction Upper level"
  301. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.gray))
  302. else
  303. print" Thoracic_Elevator Direction Lower level"
  304. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.gray))
  305. end
  306. elseif input == "5" then
  307. if Point_Defence_system == "On" then
  308. print"Point Defence system Deactivated."
  309. rs.setBundledOutput("back", colors.subtract( rs.getBundledOutput( "back" ), colors.red))
  310. else
  311. print"Point_Defence_system Active."
  312. rs.setBundledOutput("back", colors.combine( rs.getBundledOutput( "back" ), colors.red))
  313. end
  314. else
  315. end -- if u = on/off
  316.  
  317. end -- while u
  318.  
  319. end -- if em
  320.  
  321. end -- while z
  322. end
  323.  
  324. end
Advertisement
Add Comment
Please, Sign In to add comment