Craft4Cube

dsadasfes

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