Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Galacticraft Rocket Launching System V1
- This program is designed for use in Tekkit (Galacticraft, MineFactory Reloaded*, & Computercraft mods required)
- *or any mod that uses colored channels for redstone wiring (e.g. bundled cables from "ProjectRed - Transmission")
- Wiring Guide:
- (set the air lock controllers to open on redstone signal - Inverted)
- Outputs:
- Air Locks:
- White Channel: Main Air Lock
- Orange: Rocket 1
- Magenta Channel: Rocket 2
- Light Blue Channel: Rocket 3
- Yellow Channel: Rocket 4
- Lime Channel: Rocket 5
- Pink Channel: Rocket 6
- Launch Controllers:
- Gray Channel: Controller 3
- Light Gray Channel: Controller 6
- Important: Please create a program called .config on the computer. Put anything into line 1 of it and save it. This will serve as a storage of the air lock's state. This will get overwritten as the air lock cycles. It defaults to an oxygen sealed state (inner air lock opened, outer air lock sealed)
- ]]--
- timer = function()
- term.setTextColor(colors.yellow)
- x = 30
- while x > 0 do
- term.setCursorPos(1,15)
- write("Launch Completed in: " .. x .. " seconds")
- sleep (0.1)
- x = x - 0.1
- end
- end
- while true do
- i = 2
- rs.setBundledOutput("back", colors.white)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.orange)
- print("Rocket Silo Launch System")
- print("Rocket 1: ")
- print("Rocket 2: ")
- print("Rocket 3: ")
- print("Rocket 4: ")
- print("Rocket 5: ")
- print("Rocket 6: ")
- while i < 8 do
- term.setCursorPos(11, i)
- term.setTextColor(colors.green)
- write("Ready")
- i = i + 1
- end
- term.setTextColor(colors.blue)
- term.setCursorPos(17,4)
- write("- Cargo Rockets Only")
- term.setCursorPos(17,7)
- write("- Cargo Rockets Only")
- term.setCursorPos(1,8)
- term.setTextColor(colors.orange)
- print("Please select which rocket you want to launch (enter silo number):")
- input = read()
- input = tonumber(input)
- if input == nil then
- term.setTextColor(colors.red)
- print("Error: Invalid Character(s)! Try again")
- sleep(2)
- elseif input > 0 and input <= 6 then
- term.setTextColor(colors.yellow)
- print("Launching Rocket " .. input .. "!")
- term.setCursorPos(11, input + 1)
- term.setTextColor(colors.red)
- write("Launching ")
- if input == 1 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.yellow)
- print("Begin Launch Sequence. Please enter the rocket ASAP and begin launch countdown!")
- rs.setBundledOutput("back", colors.orange)
- timer()
- rs.setBundledOutput("back", colors.white)
- elseif input == 2 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.yellow)
- print("Begin Launch Sequence. Please enter the rocket ASAP and begin launch countdown!")
- rs.setBundledOutput("back", colors.magenta)
- timer()
- rs.setBundledOutput("back", colors.white)
- elseif input == 3 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.blue)
- print("Cargo Rocket Auto Launch")
- rs.setBundledOutput("back", colors.lightBlue)
- sleep(3)
- rs.setBundledOutput("back", colors.combine(colors.lightBlue, colors.gray))
- sleep(10)
- rs.setBundledOutput("back", colors.white)
- elseif input == 4 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.yellow)
- print("Begin Launch Sequence. Please enter the rocket ASAP and begin launch countdown!")
- rs.setBundledOutput("back", colors.yellow)
- timer()
- rs.setBundledOutput("back", colors.white)
- elseif input == 5 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.yellow)
- print("Begin Launch Sequence. Please enter the rocket ASAP and begin launch countdown!")
- rs.setBundledOutput("back", colors.lime)
- timer()
- rs.setBundledOutput("back", colors.white)
- elseif input == 6 then
- term.setCursorPos(1,10)
- term.setTextColor(colors.blue)
- print("Cargo Rocket Auto Launch")
- rs.setBundledOutput("back", colors.pink)
- sleep(3)
- rs.setBundledOutput("back", colors.combine(colors.pink, colors.lightGray))
- sleep(10)
- rs.setBundledOutput("back", colors.white)
- end
- else
- term.setTextColor(colors.red)
- print("Invalid Selection! Try again")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement