Craft4Cube

LIFT2

Aug 7th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. max=17
  2. min=1
  3. OG1=17
  4. EG1=11
  5. KG1=7
  6. KG2=1
  7. cur=17
  8. while cur <= min do
  9. redstone.setBundledOutput('back', 1)
  10. redstone.setBundledOutput('back', 0)
  11. os.sleep('0.5')
  12. cur=cur-1
  13. print(cur)
  14. end
  15. cur=0
  16. print('LIFT.READY')
  17.  
  18. while true do
  19. print('LIFT.CHK')
  20. if rs.testBundledInput('left', colours.lightBlue) then
  21. print('LIFT.BLUE')
  22. print('LIFT.GO.OG')
  23. if cur==EG1 then
  24. while cur <= OG1 do
  25. redstone.setBundledOutput('back', 1)
  26. redstone.setBundledOutput('back', 0)
  27. os.sleep('0.5')
  28. cur=cur+1
  29. end
  30. end
  31. if cur==KG1 then
  32. while cur <= OG1 do
  33. redstone.setBundledOutput('back', 1)
  34. redstone.setBundledOutput('back', 0)
  35. os.sleep('0.5')
  36. cur=cur+1
  37. end
  38. end
  39. if cur==KG2 then
  40. while cur <= OG1 do
  41. redstone.setBundledOutput('back', 1)
  42. redstone.setBundledOutput('back', 0)
  43. os.sleep('0.5')
  44. cur=cur+1
  45. end
  46. end
  47. end
  48. if rs.testBundledInput('left', colours.yellow) then
  49. print('LIFT.YELLOW')
  50. print('LIFT.GO.OG')
  51. if cur==OG1 then
  52. while cur <= EG1 do
  53. redstone.setBundledOutput('back', 2)
  54. redstone.setBundledOutput('back', 0)
  55. os.sleep('0.5')
  56. cur=cur-1
  57. end
  58. end
  59. if cur==KG1 then
  60. while cur <= EG1 do
  61. redstone.setBundledOutput('back', 1)
  62. redstone.setBundledOutput('back', 0)
  63. os.sleep('0.5')
  64. cur=cur+1
  65. end
  66. end
  67. if cur==KG2 then
  68. while cur <= EG1 do
  69. redstone.setBundledOutput('back', 1)
  70. redstone.setBundledOutput('back', 0)
  71. os.sleep('0.5')
  72. cur=cur+1
  73. end
  74. end
  75. end
  76. if rs.testBundledInput('left', colours.lime) then
  77. print('LIFT.GREEN')
  78. print('LIFT.GO.OG')
  79. if cur==OG1 then
  80. while cur <= KG1 do
  81. redstone.setBundledOutput('back', 2)
  82. redstone.setBundledOutput('back', 0)
  83. os.sleep('0.5')
  84. cur=cur-1
  85. end
  86. end
  87. if cur==EG1 then
  88. while cur <= KG1 do
  89. redstone.setBundledOutput('back', 2)
  90. redstone.setBundledOutput('back', 0)
  91. os.sleep('0.5')
  92. cur=cur-1
  93. end
  94. end
  95. if cur==KG2 then
  96. while cur <= KG1 do
  97. redstone.setBundledOutput('back', 1)
  98. redstone.setBundledOutput('back', 0)
  99. os.sleep('0.5')
  100. cur=cur+1
  101. end
  102. end
  103. end
  104. if rs.testBundledInput('left', colours.pink) then
  105. print('LIFT.PINK')
  106. print('LIFT.GO.OG')
  107. if cur==OG1 then
  108. while cur <= KG2 do
  109. redstone.setBundledOutput('back', 2)
  110. redstone.setBundledOutput('back', 0)
  111. os.sleep('0.5')
  112. cur=cur-1
  113. end
  114. end
  115. if cur==EG1 then
  116. while cur <= KG2 do
  117. redstone.setBundledOutput('back', 2)
  118. redstone.setBundledOutput('back', 0)
  119. os.sleep('0.5')
  120. cur=cur-1
  121. end
  122. end
  123. if cur==KG1 then
  124. while cur <= KG2 do
  125. redstone.setBundledOutput('back', 2)
  126. redstone.setBundledOutput('back', 0)
  127. os.sleep('0.5')
  128. cur=cur-1
  129. end
  130. end
  131. end
  132. os.sleep(0.5)
  133. end
  134.  
  135.  
  136. function OG()
  137. print('LIFT.GO.OG')
  138. if cur==EG1 then
  139. while cur <= OG1 do
  140. redstone.setBundledOutput('back', 1)
  141. redstone.setBundledOutput('back', 0)
  142. os.sleep('0.5')
  143. cur=cur+1
  144. end
  145. end
  146. if cur==KG1 then
  147. while cur <= OG1 do
  148. redstone.setBundledOutput('back', 1)
  149. redstone.setBundledOutput('back', 0)
  150. os.sleep('0.5')
  151. cur=cur+1
  152. end
  153. end
  154. if cur==KG2 then
  155. while cur <= OG1 do
  156. redstone.setBundledOutput('back', 1)
  157. redstone.setBundledOutput('back', 0)
  158. os.sleep('0.5')
  159. cur=cur+1
  160. end
  161. end
  162. end
  163.  
  164. function EG()
  165. print('LIFT.GO.OG')
  166. if cur==OG1 then
  167. while cur <= EG1 do
  168. redstone.setBundledOutput('back', 2)
  169. redstone.setBundledOutput('back', 0)
  170. os.sleep('0.5')
  171. cur=cur-1
  172. end
  173. end
  174. if cur==KG1 then
  175. while cur <= EG1 do
  176. redstone.setBundledOutput('back', 1)
  177. redstone.setBundledOutput('back', 0)
  178. os.sleep('0.5')
  179. cur=cur+1
  180. end
  181. end
  182. if cur==KG2 then
  183. while cur <= EG1 do
  184. redstone.setBundledOutput('back', 1)
  185. redstone.setBundledOutput('back', 0)
  186. os.sleep('0.5')
  187. cur=cur+1
  188. end
  189. end
  190. end
  191.  
  192. function KG1()
  193. print('LIFT.GO.OG')
  194. if cur==OG1 then
  195. while cur <= KG1 do
  196. redstone.setBundledOutput('back', 2)
  197. redstone.setBundledOutput('back', 0)
  198. os.sleep('0.5')
  199. cur=cur-1
  200. end
  201. end
  202. if cur==EG1 then
  203. while cur <= KG1 do
  204. redstone.setBundledOutput('back', 2)
  205. redstone.setBundledOutput('back', 0)
  206. os.sleep('0.5')
  207. cur=cur-1
  208. end
  209. end
  210. if cur==KG2 then
  211. while cur <= KG1 do
  212. redstone.setBundledOutput('back', 1)
  213. redstone.setBundledOutput('back', 0)
  214. os.sleep('0.5')
  215. cur=cur+1
  216. end
  217. end
  218. end
  219.  
  220. function KG2()
  221. print('LIFT.GO.OG')
  222. if cur==OG1 then
  223. while cur <= KG2 do
  224. redstone.setBundledOutput('back', 2)
  225. redstone.setBundledOutput('back', 0)
  226. os.sleep('0.5')
  227. cur=cur-1
  228. end
  229. end
  230. if cur==EG1 then
  231. while cur <= KG2 do
  232. redstone.setBundledOutput('back', 2)
  233. redstone.setBundledOutput('back', 0)
  234. os.sleep('0.5')
  235. cur=cur-1
  236. end
  237. end
  238. if cur==KG1 then
  239. while cur <= KG2 do
  240. redstone.setBundledOutput('back', 2)
  241. redstone.setBundledOutput('back', 0)
  242. os.sleep('0.5')
  243. cur=cur-1
  244. end
  245. end
  246. end
Advertisement
Add Comment
Please, Sign In to add comment