Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Colour assignments:
- --White(1): Open hangar
- --Orange(2): Close hangar
- --Magenta(4): Retract gangplank
- --Lightblue(8): Extend gangplank
- --Yellow(16): Close doors
- --Lime(32): Howler alarm
- --Pink(64): Input lever
- s=0
- while true do
- if (redstone.testBundledInput("top",64)) == true and s==0 then
- print("Hangar doors opening")
- --Sound alarm
- redstone.setBundledOutput("top",32)
- sleep(5)
- redstone.setBundledOutput("top",0)
- --Close doors
- redstone.setBundledOutput("top",16)
- sleep(1)
- --Retract gangplank
- for i = 1,2 do
- redstone.setBundledOutput("top",4+16)
- sleep(0.5)
- redstone.setBundledOutput("top",16)
- sleep(0.5)
- end
- --Open hangar doors
- for i = 1,4 do
- redstone.setBundledOutput("top",1+16)
- sleep(0.5)
- redstone.setBundledOutput("top",16)
- sleep(0.5)
- end
- print("Hangar doors open")
- s=1
- end
- if (redstone.testBundledInput("top",64)) == false and s==1 then
- print("Hangar doors closing")
- --Close hangar doors
- for i = 1,4 do
- redstone.setBundledOutput("top",2+16)
- sleep(0.5)
- redstone.setBundledOutput("top",16)
- sleep(0.5)
- end
- print("Hangar doors closed")
- sleep(10)
- --Extend gangplank
- for i = 1,2 do
- redstone.setBundledOutput("top",8+16)
- sleep(0.5)
- redstone.setBundledOutput("top",16)
- sleep(0.5)
- end
- sleep(1)
- --Open doors
- redstone.setBundledOutput("top",0)
- --Sound clear alarm
- redstone.setBundledOutput("top",32)
- sleep(0.5)
- redstone.setBundledOutput("top",0)
- s=0
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement