Craft4Cube

Ax77

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