Advertisement
CCninja86

Alarm System and HCP

Jan 31st, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.07 KB | None | 0 0
  1. print ("Please Enter Password")
  2. p = io.read()
  3.  
  4. if p == "49e7FryO" then
  5. term.clear()
  6. term.setCursorPos(1, 1)
  7.  
  8. sleep(0.5)
  9. print ("| Turn On Alarm System |")
  10. print ("| HCP |")
  11.  
  12. mouse, button, X, Y = os.pullEvent("mouse_click")
  13. XY = X ..",".. Y
  14.  
  15. if XY == "1, 1"
  16. or XY == "2. 1"
  17. or XY == "3, 1"
  18. or XY == "4, 1"
  19. or XY == "5, 1"
  20. or XY == "6, 1"
  21. or XY == "7, 1"
  22. or XY == "8, 1"
  23. or XY == "9, 1"
  24. or XY == "10, 1"
  25. or XY == "11, 1"
  26. or XY == "12, 1"
  27. or XY == "13, 1"
  28. or XY == "14, 1"
  29. or XY == "15, 1"
  30. or XY == "16, 1"
  31. or XY == "17, 1"
  32. or XY == "18, 1"
  33. or XY == "19, 1"
  34. or XY == "20, 1"
  35. or XY == "21, 1"
  36. or XY == "22, 1"
  37. or XY == "23, 1"
  38. or XY == "24, 1" then
  39.  
  40. term.clear()
  41. term.setCursorPos(1, 1)
  42. print ("Turning on Alarm System...")
  43. sleep(1)
  44. rs.setOutput("back", true)
  45. os.shutdown()
  46. end
  47.  
  48. if XY == "1, 2"
  49. or XY == "2, 2"
  50. or XY == "3, 2"
  51. or XY == "4, 2"
  52. or XY == "5, 2"
  53. or XY == "6, 2"
  54. or XY == "7, 2" then
  55.  
  56. term.clear()
  57. term.setCursorPos(1, 1)
  58. textutils.slowPrint ("What would you like to do?")
  59.  
  60. local event XY = os.pullEvent("mouse_click")
  61.  
  62. XY = X ..",".. Y
  63.  
  64. sleep(0.5)
  65. print ("")
  66. print ("|Harvest Wheat|")
  67. print ("|Harvest Sugarcane|")
  68. print ("|Open Doors|")
  69. print ("|Turn On Quarry|")
  70. print ("|Turn Off Quarry|")
  71. print ("|Enable Golems|")
  72. print ("|Disable Golems|")
  73. print ("|Turn On Automatic Sugarcane Harvesting|")
  74. print ("|Turn Off Automatic Sugarcane Harvesting|")
  75.  
  76. if XY == "1,3" -- Harvest Wheat
  77. or XY == "2,3"
  78. or XY == "3,3"
  79. or XY == "4,3"
  80. or XY == "5,3"
  81. or XY == "6,3"
  82. or XY == "7,3"
  83. or XY == "8,3"
  84. or XY == "9,3"
  85. or XY == "10,3"
  86. or XY == "11,3"
  87. or XY == "12,3"
  88. or XY == "13,3"
  89. or XY == "14,3"
  90. or XY == "15,3" then
  91.  
  92. term.clear()
  93. term.setCursorPos(1,1)
  94. textutils.slowPrint ("Harvesting Wheat...")
  95. sleep(1)
  96. rs.setOutput("left", true)
  97. sleep(2)
  98. rs.setOutput("left", false)
  99. textutils.slowPrint ("Done!")
  100. end
  101.  
  102. if XY == "1,4" -- Harvest Sugarcane
  103. or XY == "2,4"
  104. or XY == "3,4"
  105. or XY == "4,4"
  106. or XY == "5,4"
  107. or XY == "6,4"
  108. or XY == "7,4"
  109. or XY == "8,4"
  110. or XY == "9,4"
  111. or XY == "10,4"
  112. or XY == "11,4"
  113. or XY == "12,4"
  114. or XY == "13,4"
  115. or XY == "14,4"
  116. or XY == "15,4"
  117. or XY == "16,4"
  118. or XY == "17,4"
  119. or XY == "18,4"
  120. or XY == "19,4" then
  121.  
  122. term.clear()
  123. term.setCursorPos(1,1)
  124. textutils.slowPrint ("Harvesting Sugarcane...")
  125. sleep(1)
  126. rs.setOutput("right", true)
  127. sleep(2)
  128. rs.setOutput("right", false)
  129. textutils.slowPrint ("Done!")
  130. end
  131.  
  132. if XY == "1,5" -- Open Doors
  133. or XY == "2,5"
  134. or XY == "3,5"
  135. or XY == "4,5"
  136. or XY == "5,5"
  137. or XY == "6,5"
  138. or XY == "7,5"
  139. or XY == "8,5"
  140. or XY == "9,5"
  141. or XY == "10,5"
  142. or XY == "11,5"
  143. or XY == "12,5" then
  144.  
  145. term.clear()
  146. term.setCursorPos(1,1)
  147. textutils.slowPrint ("Opening Doors...")
  148. sleep(1)
  149. rs.setOutput("bottom", true)
  150. sleep(2)
  151. rs.setOutput("bottom", false)
  152. textutils.slowPrint ("Done!")
  153. end
  154.  
  155. if XY == "1,6" -- Turn On Quarry
  156. or XY == "2,6"
  157. or XY == "3,6"
  158. or XY == "4,6"
  159. or XY == "5,6"
  160. or XY == "6,6"
  161. or XY == "7,6"
  162. or XY == "8,6"
  163. or XY == "9,6"
  164. or XY == "10,6"
  165. or XY == "11,6"
  166. or XY == "12,6"
  167. or XY == "13,6"
  168. or XY == "14,6"
  169. or XY == "15,6"
  170. or XY == "16,6" then
  171.  
  172. term.clear()
  173. term.setCursorPos(1,1)
  174. textutils.slowPrint ("Turning On Quarry...")
  175. sleep(2)
  176. rs.setBundledOutput("back", 1)
  177. textutils.slowPrint ("Done!")
  178. end
  179.  
  180. if XY == "1,7" -- Turn Off Quarry
  181. or XY == "2,7"
  182. or XY == "3,7"
  183. or XY == "4,7"
  184. or XY == "5,7"
  185. or XY == "6,7"
  186. or XY == "7,7"
  187. or XY == "8,7"
  188. or XY == "9,7"
  189. or XY == "10,7"
  190. or XY == "11,7"
  191. or XY == "12,7"
  192. or XY == "13,7"
  193. or XY == "14,7"
  194. or XY == "15,7"
  195. or XY == "16,7"
  196. or XY == "17,7" then
  197.  
  198. term.clear()
  199. term.setCursorPos(1,1)
  200. textutils.slowPrint ("Turning Off Quarry...")
  201. sleep(2)
  202. rs.setOutput("back", false)
  203. textutils.slowPrint ("Done!")
  204. end
  205.  
  206. if XY == "1,8" -- Enable Golems
  207. or XY == "2,8"
  208. or XY == "3,8"
  209. or XY == "4,8"
  210. or XY == "5,8"
  211. or XY == "6,8"
  212. or XY == "7,8"
  213. or XY == "8,8"
  214. or XY == "9,8"
  215. or XY == "10,8"
  216. or XY == "11,8"
  217. or XY == "12,8"
  218. or XY == "13,8
  219. or XY == "14,8"
  220. or XY == "15,8" then
  221.  
  222. term.clear()
  223. term.setCursorPos(1,1)
  224. textutils.slowPrint ("Enabling Golems...")
  225. sleep(1)
  226. rs.setOutput("top", true)
  227. sleep(1)
  228. rs.setOutput("top", false)
  229. textutils.slowPrint ("Done!")
  230. end
  231.  
  232. if XY == "1,9" -- Disable Golems
  233. or XY == "2,9"
  234. or XY == "3,9"
  235. or XY == "4,9"
  236. or XY == "5,9"
  237. or XY == "6,9"
  238. or XY == "7,9"
  239. or XY == "8,9"
  240. or XY == "9,9"
  241. or XY == "10,9"
  242. or XY == "11,9"
  243. or XY == "12,9"
  244. or XY == "13,9"
  245. or XY == "14,9"
  246. or XY == "15,9"
  247. or XY == "16,9" then
  248.  
  249. term.clear()
  250. term.setCursorPos(1,1)
  251. textutils.slowPrint ("Disabling Golems...")
  252. sleep(1)
  253. rs.setOutput("top", true)
  254. sleep(1)
  255. rs.setOutput("top", false)
  256. textutils.slowPrint ("Done!")
  257. end
  258.  
  259. if XY == "1,10" -- Turn On Automatic Sugarcane Harvesting
  260. or XY == "2,10"
  261. or XY == "3,10"
  262. or XY == "4,10"
  263. or XY == "5,10"
  264. or XY == "6,10"
  265. or XY == "7,10"
  266. or XY == "8,10"
  267. or XY == "9,10"
  268. or XY == "10,10"
  269. or XY == "11,10"
  270. or XY == "12,10"
  271. or XY == "13,10"
  272. or XY == "14,10"
  273. or XY == "15,10"
  274. or XY == "16,10"
  275. or XY == "17,10"
  276. or XY == "18,10"
  277. or XY == "19,10"
  278. or XY == "20,10"
  279. or XY == "21,10"
  280. or XY == "22,10"
  281. or XY == "23,10"
  282. or XY == "24,10"
  283. or XY == "25,10"
  284. or XY == "26,10"
  285. or XY == "27,10"
  286. or XY == "28,10"
  287. or XY == "29,10"
  288. or XY == "30,10"
  289. or XY == "31,10"
  290. or XY == "32,10"
  291. or XY == "33,10"
  292. or XY == "34,10"
  293. or XY == "35,10"
  294. or XY == "36,10"
  295. or XY == "37,10"
  296. or XY == "38,1""
  297. or XY == "39,10"
  298. or XY == "40,10" then
  299.  
  300. textutils.slowPrint ("Turning On Automatic Sugarcane Harvesting...")
  301. sleep(1)
  302. rs.setOutput("right", true)
  303. textutils.slowPrint ("Done!")
  304. end
  305.  
  306. if XY == "1,11" -- Turn Off Automatic Sugarcane Harvesting
  307. or XY == "2,11"
  308. or XY == "3,11"
  309. or XY == "4,11"
  310. or XY == "5,11"
  311. or XY == "6,11"
  312. or XY == "7,11"
  313. or XY == "8,11"
  314. or XY == "9,11"
  315. or XY == "10,11"
  316. or XY == "11,11"
  317. or XY == "12,11"
  318. or XY == "13,11"
  319. or XY == "14,11"
  320. or XY == "15,11"
  321. or XY == "16,11"
  322. or XY == "17,11"
  323. or XY == "18,11"
  324. or XY == "19,11"
  325. or XY == "20,11"
  326. or XY == "21,11"
  327. or XY == "22,11"
  328. or XY == "23,11"
  329. or XY == "24,11"
  330. or XY == "25,11"
  331. or XY == "26,11"
  332. or XY == "27,11"
  333. or XY == "28,11"
  334. or XY == "29,11"
  335. or XY == "30,11"
  336. or XY == "31,11"
  337. or XY == "32,11"
  338. or XY == "33,11"
  339. or XY == "34,11"
  340. or XY == "35,11"
  341. or XY == "36,11"
  342. or XY == "37,11"
  343. or XY == "38,11"
  344. or XY == "39,11"
  345. or XY == "40,11"
  346. or XY == "41,11" then
  347.  
  348. textutils.slowPrint ("Turning Off Automatic Sugarcane Harvesting...")
  349. sleep(1)
  350. rs.setOutput("right", false)
  351. textutils.slowPrint ("Done!")
  352. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement