Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --The time you have before everything blows up, needs to be higher than 15/16 because of the --time it takes for IC2 nukes to blow up after receiving a signal.
- seconds = 60
- --This stuff here makes it hard to execute the program, you need the argument --"safetyprogramcheck" or else it won't run, so you can't just look trough the files on the --computer and run "exterminatus", either you need to run it trough the self-destruct program --or run it as "exterminatus safetyprogramcheck"
- tArgs = { ... }
- if #tArgs>0
- then
- check = tArgs[1]
- else
- check = "rawr"
- end
- if check=="safetyprogramcheck"
- then
- --because it's a countdown it will repeat itself all the time, as you can see below (at the --until) it will continue until only 15 seconds are left (the time for IC2 nukes to detonate)
- repeat
- --This block here makes it look like how it looks, clearing the screen and then using --term.setCursorPos(x,y) to put all the text in the right spot.
- term.clear()
- term.setCursorPos(13,5)
- print("Chicken Farm Self-Destruct")
- term.setCursorPos(24,9)
- print(seconds)
- term.setCursorPos(1,13)
- print("Press the button to the left to deactivate")
- print("This only works before the last 15 seconds")
- --this causes this block of code (from repeat to until) to be done once every second --(sleep(1)), and every second the time left gets one second lower.
- seconds = seconds - 1
- sleep(1)
- --This is the interrupter code. If it gets redstone in the back (when you press the button) --it stops the program by shutting down the computer
- if redstone.getInput("back") == false
- then
- term.setCursorPos(5,16)
- print("Self-Destruct Aborted")
- term.setCursorPos(5,17)
- print("the chickens will live")
- sleep(10)
- os.shutdown()
- end
- until
- seconds == 15
- --this sends a signal to the nukes.
- redstone.setOutput("left", true)
- --Very similar to the previous repeat block. If you can figure out that one, this one --shouldn't be too hard.
- repeat
- term.clear()
- term.setCursorPos(13,5)
- print("Chicken Farm Self-Destruct")
- term.setCursorPos(24,9)
- print(seconds)
- term.setCursorPos(1,13)
- print("15 second mark passed. Explosives activated.")
- print("Goodbye")
- seconds = seconds - 1
- sleep(1)
- until
- seconds == -1
- --This has to do with the "safetycheckprogram" thing I mentioned in the start.
- else
- print("needs to be run trough the self-destruct program")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement