Craft4Cube

fgg

Aug 7th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 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. if rs.testBundledInput('left', colours.lightBlue) then
  20. OG()
  21. end
  22. if rs.testBundledInput('left', colours.yellow) then
  23. EG()
  24. end
  25. if rs.testBundledInput('left', colours.green) then
  26. KG1()
  27. end
  28. if rs.testBundledInput('left', colours.magenta) then
  29. KG2()
  30. end
  31. end
  32.  
  33.  
  34. function OG()
  35. print('LIFT.GO.OG')
  36. if cur==EG1 then
  37. while cur <= OG1 do
  38. redstone.setBundledOutput('back', 1)
  39. redstone.setBundledOutput('back', 0)
  40. os.sleep('0.5')
  41. cur=cur+1
  42. end
  43. end
  44. if cur==KG1 then
  45. while cur <= OG1 do
  46. redstone.setBundledOutput('back', 1)
  47. redstone.setBundledOutput('back', 0)
  48. os.sleep('0.5')
  49. cur=cur+1
  50. end
  51. end
  52. if cur==KG2 then
  53. while cur <= OG1 do
  54. redstone.setBundledOutput('back', 1)
  55. redstone.setBundledOutput('back', 0)
  56. os.sleep('0.5')
  57. cur=cur+1
  58. end
  59. end
  60. end
  61.  
  62. function EG()
  63. print('LIFT.GO.OG')
  64. if cur==OG1 then
  65. while cur <= EG1 do
  66. redstone.setBundledOutput('back', 2)
  67. redstone.setBundledOutput('back', 0)
  68. os.sleep('0.5')
  69. cur=cur-1
  70. end
  71. end
  72. if cur==KG1 then
  73. while cur <= EG1 do
  74. redstone.setBundledOutput('back', 1)
  75. redstone.setBundledOutput('back', 0)
  76. os.sleep('0.5')
  77. cur=cur+1
  78. end
  79. end
  80. if cur==KG2 then
  81. while cur <= EG1 do
  82. redstone.setBundledOutput('back', 1)
  83. redstone.setBundledOutput('back', 0)
  84. os.sleep('0.5')
  85. cur=cur+1
  86. end
  87. end
  88. end
  89.  
  90. function KG1()
  91. print('LIFT.GO.OG')
  92. if cur==OG1 then
  93. while cur <= KG1 do
  94. redstone.setBundledOutput('back', 2)
  95. redstone.setBundledOutput('back', 0)
  96. os.sleep('0.5')
  97. cur=cur-1
  98. end
  99. end
  100. if cur==EG1 then
  101. while cur <= KG1 do
  102. redstone.setBundledOutput('back', 2)
  103. redstone.setBundledOutput('back', 0)
  104. os.sleep('0.5')
  105. cur=cur-1
  106. end
  107. end
  108. if cur==KG2 then
  109. while cur <= KG1 do
  110. redstone.setBundledOutput('back', 1)
  111. redstone.setBundledOutput('back', 0)
  112. os.sleep('0.5')
  113. cur=cur+1
  114. end
  115. end
  116. end
  117.  
  118. function KG2()
  119. print('LIFT.GO.OG')
  120. if cur==OG1 then
  121. while cur <= KG2 do
  122. redstone.setBundledOutput('back', 2)
  123. redstone.setBundledOutput('back', 0)
  124. os.sleep('0.5')
  125. cur=cur-1
  126. end
  127. end
  128. if cur==EG1 then
  129. while cur <= KG2 do
  130. redstone.setBundledOutput('back', 2)
  131. redstone.setBundledOutput('back', 0)
  132. os.sleep('0.5')
  133. cur=cur-1
  134. end
  135. end
  136. if cur==KG1 then
  137. while cur <= KG2 do
  138. redstone.setBundledOutput('back', 2)
  139. redstone.setBundledOutput('back', 0)
  140. os.sleep('0.5')
  141. cur=cur-1
  142. end
  143. end
  144. end
Advertisement
Add Comment
Please, Sign In to add comment