Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- function default()
- term.clear()
- term.setCursorPos(7,1)
- term.setTextColor(colors.red)
- term.write("Launch Controls")
- term.setTextColor(colors.white)
- term.setCursorPos(1,3)
- term.write("Silo 1 - Rejuvenation Missile")
- term.setCursorPos(1,4)
- term.write("Silo 2 - Thermobaric Missile")
- term.setCursorPos(1,5)
- term.write("Silo 3 - Incendiary Missile")
- term.setCursorPos(1,6)
- term.write("Silo 4 - Custom Missiles")
- term.setCursorPos(1,8)
- term.setTextColor(colours.red)
- term.write("Enter Silo Number to Launch:")
- term.setTextColor(colours.white)
- term.setCursorPos(1,9)
- local input = read()
- if input == "debug" then
- error()
- else if input == "1" then
- silo1confirm()
- else if input == "2" then
- silo2confirm()
- else if input == "3" then
- silo3confirm()
- else if input == "4" then
- silo4confirm()
- else
- term.setTextColor(colors.red)
- term.write("Invalid Choice")
- term.setTextColor(colors.white)
- sleep(1)
- default()
- end
- end
- end
- end
- end
- end
- function silo1confirm()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Rejuvenation Missiles will restore chunks to ")
- term.setCursorPos(1,2)
- term.write("their original state. Fixing damage from")
- term.setCursorPos(1,3)
- term.write("previous attacks.")
- term.setCursorPos(1,5)
- term.setTextColor(colours.red)
- term.write("**Ensure Target Co-ordinates have been entered!**")
- term.setTextColor(colours.white)
- term.setCursorPos(1,7)
- term.write("Enter Log Entry for Launch:")
- term.setCursorPos(1,8)
- local input1 = read()
- rednet.open("back")
- rednet.send(119, input1)
- silo1launch()
- end
- function silo1launch()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- term.write("Missile Online.")
- sleep(1)
- term.setTextColor(colors.white)
- term.setCursorPos(1,4)
- term.write("Enter Launch Code:")
- term.setCursorPos(1,5)
- local input2 = read("*")
- if input2 == "000000" then
- term.setTextColor(colors.green)
- term.write("Confirmed. Launching Missile 1...")
- term.setTextColor(colors.white)
- rednet.open("back")
- rednet.broadcast("launch1000000")
- sleep(4)
- default()
- else
- term.setTextColor(colors.red)
- term.setCursorPos(1,6)
- term.write("Invalid Code")
- sleep(1)
- term.setCursorPos(1,7)
- term.write("Disarming Missile...")
- term.setTextColor(colors.white)
- sleep(2)
- default()
- end
- end
- function silo2confirm()
- term.clear()
- term.setCursorPos(1,1)
- term.write("The thermobaric missile is an explosive that uses")
- term.setCursorPos(1,2)
- term.write("the power of heat to incinerate an entire area")
- term.setCursorPos(1,4)
- term.write("**Will produce significant block damage!**")
- term.setCursorPos(1,6)
- term.write("Have Target Co-ordinates been set in Silo 2")
- term.setCursorPos(1,7)
- term.write("Launch Controller? (y/n)")
- term.setCursorPos(1,8)
- local input1 = read()
- if input1 == "y" then
- silo2launch()
- else if input1 == "n" then
- term.setTextColor(colors.red)
- term.write("Please set co-ordinates and return.")
- sleep(3)
- term.setTextColor(colors.white)
- default()
- else
- term.setTextColor(colors.red)
- term.write("Invalid Choice")
- term.setTextColor(colors.white)
- sleep(1)
- silo2confirm()
- end
- end
- end
- function silo2launch()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Confirming...")
- sleep(1)
- term.setCursorPos(1,2)
- term.setTextColor(colors.green)
- term.write("Missile Online.")
- sleep(1)
- term.setTextColor(colors.white)
- term.setCursorPos(1,4)
- term.write("Enter Launch Code:")
- term.setCursorPos(1,5)
- local input2 = read("*")
- if input2 == "000000" then
- term.setTextColor(colors.green)
- term.write("Confirmed. Launching Missile 2...")
- term.setTextColor(colors.white)
- rednet.open("back")
- rednet.broadcast("launch2000000")
- sleep(4)
- default()
- else
- term.setTextColor(colors.red)
- term.setCursorPos(1,6)
- term.write("Invalid Code")
- sleep(1)
- term.setCursorPos(1,7)
- term.write("Disarming Missile...")
- term.setTextColor(colors.white)
- sleep(2)
- default()
- end
- end
- function silo3confirm()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Incendiary Missiles light target area on fire.")
- term.setCursorPos(1,2)
- term.write("No block damage will be caused. ")
- term.setCursorPos(1,4)
- term.write("Have Target Co-ordinates been set in Silo 3")
- term.setCursorPos(1,5)
- term.write("Launch Controller? (y/n)")
- term.setCursorPos(1,6)
- local input1 = read()
- if input1 == "y" then
- silo3launch()
- else if input1 == "n" then
- term.setTextColor(colors.red)
- term.write("Please set co-ordinates and return.")
- sleep(3)
- term.setTextColor(colors.white)
- default()
- else
- term.setTextColor(colors.red)
- term.write("Invalid Choice")
- term.setTextColor(colors.white)
- sleep(1)
- silo3confirm()
- end
- end
- end
- function silo3launch()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Confirming...")
- sleep(1)
- term.setCursorPos(1,2)
- term.setTextColor(colors.green)
- term.write("Missile Online.")
- sleep(1)
- term.setTextColor(colors.white)
- term.setCursorPos(1,4)
- term.write("Enter Launch Code:")
- term.setCursorPos(1,5)
- local input2 = read("*")
- if input2 == "000000" then
- term.setTextColor(colors.green)
- term.write("Confirmed. Launching Missile 3...")
- term.setTextColor(colors.white)
- rednet.open("back")
- rednet.broadcast("launch3000000")
- sleep(4)
- default()
- else
- term.setTextColor(colors.red)
- term.setCursorPos(1,6)
- term.write("Invalid Code")
- sleep(1)
- term.setCursorPos(1,7)
- term.write("Disarming Missile...")
- term.setTextColor(colors.white)
- sleep(2)
- default()
- end
- end
- function silo4confirm()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Place any T3 or below missile in silo to launch.")
- term.setCursorPos(1,3)
- term.write("Have Target Co-ordinates been set in Silo 4")
- term.setCursorPos(1,4)
- term.write("Launch Controller? (y/n)")
- term.setCursorPos(1,5)
- local input1 = read()
- if input1 == "y" then
- silo4launch()
- else if input1 == "n" then
- term.setTextColor(colors.red)
- term.write("Please set co-ordinates and return.")
- sleep(3)
- term.setTextColor(colors.white)
- default()
- else
- term.setTextColor(colors.red)
- term.write("Invalid Choice")
- term.setTextColor(colors.white)
- sleep(1)
- silo4confirm()
- end
- end
- end
- function silo4launch()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Confirming...")
- sleep(1)
- term.setCursorPos(1,2)
- term.setTextColor(colors.green)
- term.write("Missile Online.")
- sleep(1)
- term.setTextColor(colors.white)
- term.setCursorPos(1,4)
- term.write("Enter Launch Code:")
- term.setCursorPos(1,5)
- local input2 = read("*")
- if input2 == "000000" then
- term.setTextColor(colors.green)
- term.write("Confirmed. Launching Missile 4...")
- term.setTextColor(colors.white)
- rednet.open("back")
- rednet.broadcast("launch4000000")
- sleep(4)
- default()
- else
- term.setTextColor(colors.red)
- term.setCursorPos(1,6)
- term.write("Invalid Code")
- sleep(1)
- term.setCursorPos(1,7)
- term.write("Disarming Missile...")
- term.setTextColor(colors.white)
- sleep(2)
- default()
- end
- end
- default()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement