Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- max=17
- min=1
- OG1=17
- EG1=11
- KG1=7
- KG2=1
- cur=17
- while cur <= min do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- print(cur)
- end
- cur=0
- print('LIFT.READY')
- while true do
- if rs.testBundledInput('left', colours.lightBlue) then
- OG()
- end
- if rs.testBundledInput('left', colours.yellow) then
- EG()
- end
- if rs.testBundledInput('left', colours.green) then
- KG1()
- end
- if rs.testBundledInput('left', colours.magenta) then
- KG2()
- end
- end
- function OG()
- print('LIFT.GO.OG')
- if cur==EG1 then
- while cur <= OG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- if cur==KG1 then
- while cur <= OG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- if cur==KG2 then
- while cur <= OG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- end
- function EG()
- print('LIFT.GO.OG')
- if cur==OG1 then
- while cur <= EG1 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- if cur==KG1 then
- while cur <= EG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- if cur==KG2 then
- while cur <= EG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- end
- function KG1()
- print('LIFT.GO.OG')
- if cur==OG1 then
- while cur <= KG1 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- if cur==EG1 then
- while cur <= KG1 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- if cur==KG2 then
- while cur <= KG1 do
- redstone.setBundledOutput('back', 1)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur+1
- end
- end
- end
- function KG2()
- print('LIFT.GO.OG')
- if cur==OG1 then
- while cur <= KG2 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- if cur==EG1 then
- while cur <= KG2 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- if cur==KG1 then
- while cur <= KG2 do
- redstone.setBundledOutput('back', 2)
- redstone.setBundledOutput('back', 0)
- os.sleep('0.5')
- cur=cur-1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment