Posted 12 September 2013 - 11:13 AM
Well I'm sorry I don't know anything on how lua works! D:
But I do have some code I've written down, I'm not sure if it works though :/
From what I've read in other posts and from the wiki I'm 60% sure I'm missing some stuff in this code :(/>
term.clear()
term.setCursorPos(1, 1)
print("Uranium Tech.INC")
write("Enter password to access controls: ")
input = read(“*”)
if password == “DarkDeath” then
print(“Correct Password user, accessing control mainframe”)
else
print(“Incorrect!”)
sleep (2)
os.reboot ()
term.clear()
term.setCursorPos(1,1)
print ("Nuclear Reactor Control Mainframe")
print ()
print ("1. Start Reactor quad core 1 - Press 1")
print ("2. Start Reactor quad core 2 - Press 2")
print ("3. Start Breeder Reactor 1 - Press 3")
print ("4. Start Breeder Reactor 2 - Press 4")
print (“5. Stop Reactor quad core 1 - Press 5”)
print (“6. Stop Reactor quad core 2 - Press 6”)
print (“7. Stop Breeder Reactor 1 - Press 7”)
print (“8. Stop Breeder Reactor 2 - Press 8”)
print ("9. Start and Stop Refueling Process - Press 9”)
print ("10. Re-route Power to the Mass. Fab. Array - Press q”)
print (“11. Re-route Power to the Main line - Press w”)
print ("11. Close/Open Maintenance Blast Doors - Press e”)
print ("12. Start/Stop full auto cycles - Press r”)
print ("13. Activate Self destruct sequence - Press t”)
print ("14. Cancel and Shutdown - Press y”)
e,p = os.pullEvent()
if e == “char” then
if p == "1" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Starting Reactor quad core 1…")
sleep(2)
redstone.setBundledOutput("back", 1)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Reactor quad core 2 Successfully Started")
return
elseif p == "2" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Starting Reactor quad core 2…")
sleep(2)
redstone.setBundledOutput("back", 2)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Reactor quad core 2 Successfully Started")
return
elseif p == "3" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Starting Breeder Reactor 1…")
sleep(2)
redstone.setBundledOutput("back", 4)
sleep(3)
redstone.setBundledOutput("back", 0)
print ()
print (" Breeder Reactor 1 Successfully Started")
return
elseif p == "4" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Starting Breeder Reactor 2…")
sleep(2)
redstone.setBundledOutput("back", 8)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Breeder Reactor 2 Successfully Started")
return
if p == "5" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Stopping Reactor quad core 1…")
sleep(2)
redstone.setBundledOutput("back", 1)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Reactor quad core 2 Successfully Stopped")
return
elseif p == "6" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Stopping Reactor quad core 2…")
sleep(2)
redstone.setBundledOutput("back", 2)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Reactor quad core 2 Successfully Stopped")
return
elseif p == "7" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Stopping Breeder Reactor 1…")
sleep(2)
redstone.setBundledOutput("back", 4)
sleep(3)
redstone.setBundledOutput("back", 0)
print ()
print (" Breeder Reactor 1 Successfully Stopped")
return
elseif p == "8" then
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe…")
sleep(3)
print ()
print ("Loading Subsystems…")
sleep(2)
print()
print ("Stopping Breeder Reactor 2…")
sleep(2)
redstone.setBundledOutput("back", 8)
sleep(2)
redstone.setBundledOutput("back", 0)
print ()
print (" Breeder Reactor 2 Successfully Stopped")
return
elseif p == “9”
term.clear()
term.setCursorPos(1,1)
print ("Starting Refueling Process”)
print ()
sleep (2)
print (“Please standby this process will take 2.5 minutes”)
redstone.setBundledOutput("back", 16)
sleep (150)
redstone.setBundledOutput("back", 0)
print ()
print (“Reactors refueled”)
sleep (2)
return
elseif p == “q”
term.clear()
term.setCursorPos(1,1)
print ("Rerouting Power from main line to Mass Fab. Array…”)
redstone.setBundledOutput("back", 32)
sleep (3)
redstone.setBundledOutput("back", 0)
print ()
print (“Power rerouted”)
sleep (3)
return
elseif p == “w”
term.clear()
term.setCursorPos(1,1)
print ("Rerouting Power back to the main line”)
redstone.setBundledOutput("back", 32)
sleep (3)
redstone.setBundledOutput("back", 0)
print ()
print (“Re-routed power”)
sleep (3)
return
elseif p == “e”
term.clear()
term.setCursorPos(1,1)
print ("Opening, or closing Blast doors”)
redstone.setBundledOutput("back", 64)
sleep (3)
redstone.setBundledOutput(“back”, 0)
print ()
print (“Done :P/>”)
return
elseif p == “r”
term.clear()
term.setCursorPos(1,1)
print ("Starting or stopping fully automatic cycles”)
print ()
redstone.setBundledOutput("back", 128)
sleep (3)
redstone.setBundledOutput(“back”, 0)
print (“Done :P/>”)
return
elseif p == “t”
term.clear()
term.setCursorPos(1,1)
print ("You have 2 minutes to vacate the area!!!”)
sleep (120)
redstone.setBundledOutput("back", 256)
sleep (3)
redstone.setBundledOutput(“back”, 0)
return
elseif p == “y”
term.clear()
term.setCursorPos(1,1)
print ("Shutting down. . .”)
os.shutdown ()