Xixili

Purge system (switches 3/3)

Aug 29th, 2015
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. -- ######################
  2. -- ##call this file "switches"
  3. -- ######################
  4.  
  5. os.pullEvent = os.pullEventRaw
  6. local width, height = term.getSize()
  7.  
  8. term.setCursorPos(1, 1)
  9. term.setBackgroundColor(colors.gray)
  10. term.clear()
  11.  
  12. term.setTextColor(colors.white)
  13. term.setBackgroundColor(colors.red)
  14. term.clearLine()
  15.  
  16. term.setCursorPos(1, height)
  17. term.clearLine()
  18.  
  19. local text = "E.D.SYS"
  20. term.setCursorPos(math.floor((width - #text) / 2), 1)
  21. term.write(text)
  22.  
  23. rs.setBundledOutput("left", colours.orange+colors.pink+colors.white)
  24. term.setBackgroundColor(colors.black)
  25. term.setTextColor(colors.white)
  26. term.setCursorPos(5, 3)
  27. term.write(" Hydraulic Fail-Safe ")
  28. term.setCursorPos(5, 4)
  29. term.write(" ")
  30. term.setCursorPos(5, 5)
  31. term.write(" Switch 1 ")
  32. term.setTextColor(colors.lime)
  33. term.setCursorPos(40, 5)
  34. term.write("locked")
  35. term.setTextColor(colors.white)
  36. term.setCursorPos(5, 6)
  37. term.write(" Switch 2 ")
  38. term.setTextColor(colors.lime)
  39. term.setCursorPos(40, 6)
  40. term.write("locked")
  41. term.setCursorPos(5, 7)
  42. term.setTextColor(colors.white)
  43. term.write(" Switch 3 ")
  44. term.setTextColor(colors.lime)
  45. term.setCursorPos(40, 7)
  46. term.write("locked")
  47. term.setTextColor(colors.white)
  48. term.setCursorPos(5, 8)
  49. term.write(" ")
  50. term.setCursorPos(5, 9)
  51. term.write(" ")
  52. term.setCursorPos(5, 10)
  53. term.write(" ")
  54. term.setCursorPos(5, 11)
  55. term.write(" ")
  56. term.setCursorPos(5, 12)
  57. term.write(" ")
  58. term.setCursorPos(5, 13)
  59. term.write(" ")
  60. term.setCursorPos(5, 14)
  61. term.write(" ")
  62. term.setCursorPos(5, 15)
  63. term.write(" ")
  64. term.setCursorPos(5, 16)
  65. term.write(" ")
  66. term.setCursorPos(5, 17)
  67. term.write(" ")
  68.  
  69. os.pullEvent("redstone")
  70. if rs.testBundledInput("left", colours.brown) then
  71. term.setTextColor(colors.red)
  72. term.setCursorPos(38, 5)
  73. term.write("unlocked")
  74. end
  75.  
  76. os.pullEvent("redstone")
  77. if rs.testBundledInput("left", colours.green) then
  78. term.setTextColor(colors.red)
  79. term.setCursorPos(38, 6)
  80. term.write("unlocked")
  81. end
  82.  
  83. os.pullEvent("redstone")
  84. if rs.testBundledInput("left", colours.red) then
  85. term.setTextColor(colors.red)
  86. term.setCursorPos(38, 7)
  87. term.write("unlocked")
  88. end
  89.  
  90. sleep(3)
  91. rs.setBundledOutput("left", colours.black+colours.pink+colours.white)
  92. sleep(5)
  93. rs.setBundledOutput("left", colours.yellow)
  94. sleep(2)
  95. os.reboot(1)
Advertisement
Add Comment
Please, Sign In to add comment