Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Fireworks System V1
- Made by Rolcam
- Dispenser Placement Guide:
- # = Dispenser number
- - = Blocks
- This is the basic layout for the dispensers (Top down/bird's eye view):
- 1---2---3
- ---------
- ---------
- ---------
- 8-------4
- ---------
- ---------
- ---------
- 7---6---5
- Wiring Guide:
- This is designed to be used with rednet (redstone) cables for the redstone channels.
- Use a wrench on the color band to change its channel/color
- Dispenser 1: White color band
- Dispenser 2: Orange color band
- Dispenser 3: Magenta color band
- Dispenser 4: Light Blue color band
- Dispenser 5: Yellow color band
- Dispenser 6: Lime color band
- Dispenser 7: Pink color band
- Dispenser 8: Gray color band
- ]]--
- loop = 1
- -- Set this to the side the rednet cable will connect to the computer
- -- sides: back top left right bottom - keep the "" when changing the side
- side = "back"
- function preLaunch()
- for i = 5, 0, -1 do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("Program: "..input.." selected")
- print("Launching in "..i.." seconds")
- sleep(1)
- end
- end
- while loop == 1 do
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("Please Select Program #: ")
- print("1 - Generic (all 8)")
- print("2 - Half & Half")
- print("3 - Criss Cross (X & +)")
- print("4 - Swirl - CW")
- print("5 - Swirl - CCW")
- print("Exit")
- input = read()
- if input == "1" then
- preLaunch()
- print("Begin firing")
- lTime = 10
- while lTime > 0 do
- rs.setBundledOutput(side, colors.combine(colors.magenta, colors.orange, colors.white, colors.lime, colors.yellow, colors.lightBlue, colors.pink, colors.gray))
- sleep(1)
- lTime = lTime - 1
- rs.setBundledOutput(side, 0)
- end
- elseif input == "2" then
- preLaunch()
- lTime = 10
- while lTime > 0 do
- rs.setBundledOutput(side, colors.combine(colors.white, colors.orange, colors.magenta, colors.lightBlue))
- sleep(1)
- rs.setBundledOutput(side, colors.combine(colors.yellow, colors.lime, colors.pink, colors.gray))
- sleep(1)
- lTime = lTime - 2
- rs.setBundledOutput(side, 0)
- end
- elseif input == "3" then
- preLaunch()
- lTime = 10
- while lTime > 0 do
- rs.setBundledOutput(side, colors.combine(colors.white, colors.magenta, colors.pink, colors.yellow))
- sleep(1)
- rs.setBundledOutput(side, colors.combine(colors.orange, colors.gray, colors.lightBlue, colors.lime))
- sleep(1)
- lTime = lTime - 2
- rs.setBundledOutput(side, 0)
- end
- elseif input == "4" then
- preLaunch()
- lTime = 5
- while lTime > 0 do
- rs.setBundledOutput(side, colors.white)
- sleep(0.11)
- rs.setBundledOutput(side, colors.orange)
- sleep(0.11)
- rs.setBundledOutput(side, colors.magenta)
- sleep(0.11)
- rs.setBundledOutput(side, colors.lightBlue)
- sleep(0.11)
- rs.setBundledOutput(side, colors.yellow)
- sleep(0.11)
- rs.setBundledOutput(side, colors.lime)
- sleep(0.11)
- rs.setBundledOutput(side, colors.pink)
- sleep(0.11)
- rs.setBundledOutput(side, colors.gray)
- sleep(0.22)
- lTime = lTime - 1
- rs.setBundledOutput(side, 0)
- end
- elseif input == "5" then
- preLaunch()
- lTime = 5
- while lTime > 0 do
- rs.setBundledOutput(side, colors.white)
- sleep(0.11)
- rs.setBundledOutput(side, colors.gray)
- sleep(0.11)
- rs.setBundledOutput(side, colors.pink)
- sleep(0.11)
- rs.setBundledOutput(side, colors.lime)
- sleep(0.11)
- rs.setBundledOutput(side, colors.yellow)
- sleep(0.11)
- rs.setBundledOutput(side, colors.lightBlue)
- sleep(0.11)
- rs.setBundledOutput(side, colors.magenta)
- sleep(0.11)
- rs.setBundledOutput(side, colors.orange)
- sleep(0.22)
- lTime = lTime - 1
- rs.setBundledOutput(side, 0)
- end
- elseif input == "Exit" or input == "exit" then
- loop = 0
- else
- term.setTextColor(colors.red)
- print("Invalid Selection")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement