Advertisement
samuelask

Hiddengate

Dec 12th, 2024 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.14 KB | None | 0 0
  1. local term = require("term")
  2. local component = require("component")
  3. local modem = component.modem
  4. local reds = component.redstone
  5. local sg = component.stargate
  6. local zpm = component.zpmhub
  7. local sides = require("sides")
  8. local colors = require("colors")
  9. local port = 1234
  10. local asd = 1
  11. local IDC = "1337"
  12. local event = require("event")
  13. local os = require("os")
  14. local computer = require("computer")
  15. local serialization = require("serialization")
  16. local debug_card = component.debug
  17. Bunker = "b1a0fd7e-47c3-43f9-a28a-c2215ac1f24f"
  18. modem.open(123)
  19.  
  20. -- Mapping of color codes to their human-readable names
  21. local color_names = {
  22.     [colors.red] = "red",
  23.     [colors.green] = "green",
  24.     [colors.yellow] = "yellow",
  25.     [colors.blue] = "blue"
  26. }
  27. local available_colors = {colors.red, colors.green, colors.yellow, colors.blue}
  28.  
  29. -- Game settings
  30. local max_levels = 7 -- Total levels in the game
  31. local sequence = {} -- The sequence of colors for the current game
  32. local player_input = {} -- Tracks the player's input
  33. local gamenumber = 0 -- Current level of the game
  34. local is_game_over = false -- Game over flag
  35. local dialoverride = false
  36. manualdial = true
  37.  
  38. -- Function to generate a random color sequence
  39. local function generate_sequence(levels)
  40.     local available_colors = {colors.red, colors.green, colors.yellow, colors.blue}
  41.     local sequence = {}
  42.  
  43.     if not levels or levels <= 0 then
  44.         error("Invalid level count for sequence generation!")
  45.     end
  46.  
  47.     for i = 1, levels do
  48.         local color = available_colors[math.random(#available_colors)]
  49.         if not color then
  50.             error("Failed to pick a random color! Check available_colors.")
  51.         end
  52.         sequence[#sequence + 1] = color
  53.     end
  54.  
  55.     -- Debug: Print the generated sequence
  56.     print("Generated sequence:", serialization.serialize(sequence))
  57.     return sequence
  58. end
  59.  
  60. local function play_sequence(level)
  61.     if not sequence or #sequence == 0 then
  62.         error("Sequence is not initialized!")
  63.     end
  64.     print("Playing color sequence for level:", level)
  65.     for i = 1, level do
  66.         local color = sequence[i]
  67.         if not color then
  68.             error("Color at position " .. i .. " is nil!")
  69.         end
  70.         print("Activating color:", color_names[color] or ("unknown color code: " .. color))
  71.         -- Turn on the current color
  72.         reds.setBundledOutput(sides.south, color, 255)
  73.         os.sleep(0.5)
  74.         -- Turn off the current color
  75.         reds.setBundledOutput(sides.south, color, 0)
  76.         os.sleep(0.5)
  77.     end
  78.     print("Sequence complete!")
  79. end
  80.  
  81. -- Function to reset the game
  82. local function reset_game()
  83.     print("Incorrect input! Resetting game...")
  84.     gamenumber = 0
  85.     sequence = generate_sequence(max_levels) -- Generate a new sequence for the new game
  86.     is_game_over = true -- Indicate that the game should restart
  87. end
  88.  
  89. local function startup_light_sequence()
  90.     local startup_colors = {colors.green, colors.red, colors.yellow, colors.blue}
  91.     for _, color in ipairs(startup_colors) do
  92.         reds.setBundledOutput(sides.south, color, 255) -- Turn on the signal
  93.         os.sleep(1) -- Wait for 1 second
  94.         reds.setBundledOutput(sides.south, color, 0) -- Turn off the signal
  95.         os.sleep(1)
  96.     end
  97. end
  98.  
  99. local function get_player_input(level)
  100.     print("Waiting for player input...")
  101.     player_input = {}
  102.  
  103.     -- Calculate the time limit
  104.     local time_limit = 4 + (level - 1) * 2
  105.     print("Time limit for this level:", time_limit, "seconds")
  106.  
  107.     local remaining_time = time_limit
  108.     local post_input_wait = false -- Tracks whether to limit the wait time to 2 seconds
  109.  
  110.     while remaining_time > 0 do
  111.         -- Check for button presses
  112.         for _, color in ipairs(available_colors) do
  113.             if reds.getBundledInput(sides.south, color) > 0 then
  114.                 -- Register player input
  115.                 player_input[#player_input + 1] = color
  116.                 print("Player pressed:", color_names[color] or "unknown")
  117.  
  118.                 -- Debounce: Wait until the button is released
  119.                 while reds.getBundledInput(sides.south, color) > 0 do
  120.                     os.sleep(0.1)
  121.                 end
  122.  
  123.                 os.sleep(0.1) -- Small delay to prevent accidental double presses
  124.  
  125.                 -- Validate the input immediately
  126.                 local current_index = #player_input
  127.                 if player_input[current_index] ~= sequence[current_index] then
  128.                     print("Incorrect input! Expected:", sequence[current_index], "but got:", player_input[current_index])
  129.                     return false -- Reset the game immediately
  130.                 end
  131.  
  132.                 -- Handle completion of input
  133.                 if #player_input == level then
  134.                     if level == max_levels then
  135.                         print("Player completed the final level! Skipping timer wait.")
  136.                         remaining_time = 0 -- Skip the timer for level 7
  137.                     else
  138.                         print("Player completed input. Waiting a maximum of 2 seconds...")
  139.                         post_input_wait = true
  140.                         remaining_time = math.min(remaining_time, 2) -- Limit remaining time to 2 seconds
  141.                     end
  142.                 end
  143.             end
  144.         end
  145.  
  146.         -- Decrement the remaining time
  147.         os.sleep(1) -- Wait for 1 second
  148.         remaining_time = remaining_time - 1
  149.  
  150.         -- Debugging: Print remaining time
  151.         if not post_input_wait or remaining_time <= 2 then
  152.             print("DEBUG: Remaining time:", remaining_time, "seconds")
  153.         end
  154.     end
  155.  
  156.     -- Timeout: If the loop exits and no button was pressed
  157.     if #player_input < level then
  158.         print("Time's up! Player did not complete the sequence.")
  159.         return false -- Player failed to complete the level
  160.     end
  161.  
  162.     -- Debugging: Confirm player input collection
  163.     print("Collected player input:", serialization.serialize(player_input))
  164.     print("Expected sequence for level:", serialization.serialize({table.unpack(sequence, 1, level)}))
  165.  
  166.     -- Validate final input (redundant, but for safety)
  167.     for i = 1, level do
  168.         print("Comparing player_input[" .. i .. "]:", player_input[i], "with sequence[" .. i .. "]:", sequence[i])
  169.         if player_input[i] ~= sequence[i] then
  170.             print("Incorrect input! Expected:", sequence[i], "but got:", player_input[i])
  171.             return false -- Player input is incorrect
  172.         end
  173.     end
  174.  
  175.     print("Player input is correct for level", level)
  176.     return true -- Player input is correct
  177. end
  178.  
  179. -- Function to flash green, yellow, blue, and red signals
  180. local function flash_effect()
  181.     local flash_colors = {colors.green, colors.yellow, colors.blue, colors.red}
  182.     for i = 1, 5 do
  183.         for _, color in ipairs(flash_colors) do
  184.             reds.setBundledOutput(sides.south, color, 255) -- Turn on the signal
  185.         end
  186.         os.sleep(0.1) -- Short delay for flashing (adjust as needed)
  187.         for _, color in ipairs(flash_colors) do
  188.             reds.setBundledOutput(sides.south, color, 0) -- Turn off the signal
  189.         end
  190.         os.sleep(0.1) -- Short delay between flashes
  191.     end
  192. end
  193.  
  194. local function flash_failure_signal()
  195.     print("Flashing cyan signal to indicate failure...")
  196.     for i = 1, 3 do
  197.         reds.setBundledOutput(sides.south, colors.cyan, 255) -- Turn on the cyan signal
  198.         os.sleep(0.5) -- Wait 0.5 seconds
  199.         reds.setBundledOutput(sides.south, colors.cyan, 0) -- Turn off the cyan signal
  200.         os.sleep(0.5) -- Wait another 0.5 seconds
  201.     end
  202. end
  203.  
  204. local function game()
  205.     print("Starting Simon Says...")
  206.     sequence = generate_sequence(max_levels) -- Generate the full sequence for the game
  207.  
  208.     if not sequence or #sequence == 0 then
  209.         error("Failed to generate a valid sequence! Check generate_sequence function.")
  210.     end
  211.  
  212.     gamenumber = 0 -- Start from level 1
  213.  
  214.     while manualdial do
  215.         if gamenumber == 0 or is_game_over then
  216.             print("Game reset! Starting from level 1.")
  217.            
  218.             -- Play the startup light sequence at level 0
  219.             print("Level 0: Playing startup light sequence...")
  220.             startup_light_sequence()
  221.            
  222.             gamenumber = 0
  223.             is_game_over = false
  224.         end
  225.  
  226.         gamenumber = gamenumber + 1
  227.         if gamenumber > max_levels then
  228.             print("Congratulations! You completed Simon Says!")
  229.  
  230.             -- Flash green, yellow, blue, and red signals
  231.             print("Flashing green, yellow, blue, and red signals...")
  232.             flash_effect()
  233.  
  234.             -- Turn on the purple signal
  235.             print("Activating purple signal...")
  236.             reds.setBundledOutput(sides.south, colors.pink, 255) -- Adjust side if needed
  237.             local result = table.pack(debug_card.runCommand("/scoreboard players add @a[x=15061,y=40,z=12626,dx=6,dy=3,dz=6] FinishedGame 1"))
  238.             if result ~= nil then
  239.                 print(result[1], result[2])
  240.             end
  241.            
  242.             break
  243.         end
  244.  
  245.         print("Level:", gamenumber)
  246.         play_sequence(gamenumber) -- Show the sequence to the player
  247.  
  248.         if not get_player_input(gamenumber) then
  249.             print("Game reset triggered.")
  250.             -- Flash cyan signal before resetting the game
  251.             flash_failure_signal()
  252.             reset_game() -- Reset the game if the player makes a mistake or time runs out
  253.             os.sleep(1) -- Pause before restarting
  254.         else
  255.             print("Correct! Proceeding to level", gamenumber + 1)
  256.         end
  257.     end
  258.    
  259.     if not manualdial then
  260.         reds.setBundledOutput(sides.south, colors.pink, 255)
  261.     end
  262. end
  263. -- Function to handle incoming modem messages
  264. local function handle_bunker_message()
  265.     term.clear(true)
  266.     print("Message received")
  267.     dialoverride = true
  268. end
  269. charged = 0
  270. redstoneyes = 0
  271. simonsaysunlock = 0
  272. simonsaysfinished = 0
  273. address = {"Glyph 34","Glyph 12","Glyph 19","Glyph 33","Glyph 23","Glyph 28","Glyph 16","Glyph 17"}
  274. OmegaAdress = {"Glyph 25","Glyph 10","Glyph 16","Glyph 29","Glyph 23","Glyph 19","Glyph 28","Glyph 17"}
  275. print("Redstone Dialer")
  276. print("--------------------------------------------------------------------------------------------------------------------------------------------------------------")
  277. print()
  278.  
  279. repeat
  280.     coroutine.yield()
  281.     if reds.getBundledInput(sides.south, colors.white) > 0 and reds.getBundledInput(sides.south, colors.brown) > 0 and redstoneyes == 0 then
  282.         print("Unlocked gate")
  283.         redstoneyes = 1
  284.     end
  285.    
  286.     -- Debug shutdown
  287.     if reds.getBundledInput(sides.south, colors.gray) > 0 then
  288.         asd = 2
  289.     end
  290.    
  291.     -- Debug Dial
  292.     if reds.getBundledInput(sides.south, colors.yellow) > 0 then
  293.         debugdial = 1
  294.     end
  295.    
  296.     -- Skip simon says game with computer
  297.     if reds.getBundledInput(sides.south, colors.pink) > 0 then
  298.         reds.setBundledOutput(sides.south, colors.pink, 255)
  299.         manualdial = false
  300.     end
  301.    
  302.     -- Omega Dial
  303.     if reds.getBundledInput(sides.south, colors.black) > 0 then
  304.         handle_bunker_message()
  305.     end
  306.    
  307.     if simonsaysunlock == 1 and simonsaysfinished == 0 and reds.getBundledOutput(sides.south, colors.pink) < 1 then
  308.         -- Run the simon says game
  309.         game()
  310.         simonsaysfinished = 1
  311.     end
  312.    
  313.     if simonsaysunlock == 0 and charged == 0 and reds.getBundledOutput(sides.south, colors.purple) > 0 then
  314.         -- Run the simon says game
  315.         charged = 1
  316.         simonsaysunlock = 1
  317.     end
  318.  
  319.     if reds.getBundledOutput(sides.south, colors.pink) > 0 and simonsaysunlock == 1 then
  320.         -- Skip the simon says game
  321.         simonsaysfinished = 1
  322.         reds.setBundledOutput(sides.south, colors.pink, 255)
  323.     end
  324.    
  325.     if reds.getBundledInput(sides.south, colors.purple) > 0 and reds.getBundledOutput(sides.south, colors.purple) < 1 and charged == 0 then
  326.     zpm.toggleSlots()
  327.     reds.setBundledOutput(sides.south, colors.purple, 255)
  328.     os.sleep(1)
  329.     reds.setBundledOutput(sides.south, colors.purple, 0)
  330.     os.sleep(1)
  331.     reds.setBundledOutput(sides.south, colors.purple, 255)
  332.     os.sleep(1)
  333.     reds.setBundledOutput(sides.south, colors.purple, 0)
  334.     os.sleep(1)
  335.     reds.setBundledOutput(sides.south, colors.purple, 255)
  336.     os.sleep(1)
  337.     reds.setBundledOutput(sides.south, colors.purple, 0)
  338.     os.sleep(1)
  339.     reds.setBundledOutput(sides.south, colors.purple, 255)
  340.     os.sleep(1)
  341.     reds.setBundledOutput(sides.south, colors.purple, 0)
  342.     os.sleep(1)
  343.     reds.setBundledOutput(sides.south, colors.purple, 255)
  344.     os.sleep(1)
  345.     reds.setBundledOutput(sides.south, colors.purple, 0)
  346.     os.sleep(1)
  347.     reds.setBundledOutput(sides.south, colors.purple, 255)
  348.     os.sleep(1)
  349.     reds.setBundledOutput(sides.south, colors.purple, 0)
  350.     os.sleep(1)
  351.     reds.setBundledOutput(sides.south, colors.purple, 255)
  352.     os.sleep(1)
  353.     reds.setBundledOutput(sides.south, colors.purple, 0)
  354.     os.sleep(1)
  355.     reds.setBundledOutput(sides.south, colors.purple, 255)
  356.     os.sleep(1)
  357.     reds.setBundledOutput(sides.south, colors.purple, 0)
  358.     os.sleep(1)
  359.     reds.setBundledOutput(sides.south, colors.purple, 255)
  360.     os.sleep(1)
  361.     reds.setBundledOutput(sides.south, colors.purple, 0)
  362.     os.sleep(1)
  363.     reds.setBundledOutput(sides.south, colors.purple, 255)
  364.     os.sleep(1)
  365.     reds.setBundledOutput(sides.south, colors.purple, 0)
  366.     os.sleep(1)
  367.     reds.setBundledOutput(sides.south, colors.purple, 255)
  368.     os.sleep(1)
  369.     reds.setBundledOutput(sides.south, colors.purple, 0)
  370.     os.sleep(1)
  371.     reds.setBundledOutput(sides.south, colors.purple, 255)
  372.     os.sleep(1)
  373.     reds.setBundledOutput(sides.south, colors.purple, 0)
  374.     os.sleep(1)
  375.     reds.setBundledOutput(sides.south, colors.purple, 255)
  376.     os.sleep(1)
  377.     reds.setBundledOutput(sides.south, colors.purple, 0)
  378.     os.sleep(1)
  379.     reds.setBundledOutput(sides.south, colors.purple, 255)
  380.     os.sleep(1)
  381.     reds.setBundledOutput(sides.south, colors.purple, 0)
  382.     os.sleep(1)
  383.     reds.setBundledOutput(sides.south, colors.purple, 255)
  384.     os.sleep(1)
  385.     reds.setBundledOutput(sides.south, colors.purple, 0)
  386.     os.sleep(1)
  387.     reds.setBundledOutput(sides.south, colors.purple, 255)
  388.     os.sleep(1)
  389.     reds.setBundledOutput(sides.south, colors.purple, 0)
  390.     os.sleep(1)
  391.     reds.setBundledOutput(sides.south, colors.purple, 255)
  392.     os.sleep(1)
  393.     reds.setBundledOutput(sides.south, colors.purple, 0)
  394.     os.sleep(0.7)
  395.     zpm.toggleSlots()
  396.     charged = 1
  397.     reds.setBundledOutput(sides.south, colors.purple, 255)
  398.     os.sleep(1)
  399.     simonsaysunlock = 1
  400.     computer.shutdown(true)
  401.     end
  402.    
  403.     if redstoneyes == 1 or debugdial == 1 or dialoverride and component.stargate.getGateStatus() == "idle" then
  404.             term.clear(true)
  405.             print("Dialing Hidden gate")
  406.             os.sleep(3)
  407.             AddressBuffer = {"Glyph 34","Glyph 12","Glyph 19","Glyph 33","Glyph 23","Glyph 28","Glyph 16","Glyph 17"}
  408.             if dialoverride then
  409.                 address = OmegaAdress
  410.                 AddressBuffer = OmegaAdress
  411.             end
  412.             for i,v in ipairs(address) do
  413.                 print(i,v)
  414.             end
  415.             function dialNext(dialed)
  416.                 glyph = address[dialed + 1]
  417.                     local requirement = sg.getEnergyRequiredToDial(table.unpack(AddressBuffer)) -- Temp Workaround
  418.                     if component.stargate.getGateStatus() == "incoming" then
  419.                         term.clear(true)
  420.                         print("ERROR: Incoming wormhole!")
  421.                         redstoneyes = 0
  422.                         debugdial = 0
  423.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  424.                         os.sleep(1)
  425.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  426.                         os.sleep(1)
  427.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  428.                         os.sleep(1)
  429.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  430.                         os.sleep(1)
  431.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  432.                         os.sleep(1)
  433.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  434.                         os.sleep(1)
  435.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  436.                         os.sleep(1)
  437.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  438.                         os.sleep(1)
  439.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  440.                         os.sleep(1)
  441.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  442.                         os.sleep(1)
  443.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  444.                         os.sleep(1)
  445.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  446.                         computer.shutdown(true)
  447.                     elseif component.stargate.getEnergyRequiredToDial(address) == "address_malformed" then
  448.                         term.clear(true)
  449.                         print("ERROR: Destination Unavailable or does not exist!")
  450.                         redstoneyes = 0
  451.                         debugdial = 0
  452.                         computer.shutdown(true)
  453.                     elseif type(requirement) == "table" and requirement.canOpen == false then
  454.                             local storedEnergy = sg.getEnergyStored()
  455.                             local operatingTicks = (storedEnergy - requirement.open) / requirement.keepAlive
  456.                             local operatingSeconds = math.floor(operatingTicks / 20)
  457.                             reds.setBundledOutput(sides.south, colors.orange, 255)
  458.                             os.sleep(1)
  459.                             reds.setBundledOutput(sides.south, colors.orange, 0)
  460.                             os.sleep(1)
  461.                             reds.setBundledOutput(sides.south, colors.orange, 255)
  462.                             os.sleep(1)
  463.                             reds.setBundledOutput(sides.south, colors.orange, 0)
  464.                             os.sleep(1)
  465.                             reds.setBundledOutput(sides.south, colors.orange, 255)
  466.                             os.sleep(1)
  467.                             reds.setBundledOutput(sides.south, colors.orange, 0)
  468.                             os.sleep(1)
  469.                             reds.setBundledOutput(sides.south, colors.orange, 255)
  470.                             os.sleep(1)
  471.                             reds.setBundledOutput(sides.south, colors.orange, 0)
  472.                             redstoneyes = 0
  473.                             charged = 0
  474.                             debugdial = 0
  475.                             print("NOT ENOUGH POWER TO OPEN ... "..tostring(requirement.open).." RF NEEDED")
  476.                             if dialoverride then
  477.                             sendmessage = "NOT ENOUGH POWER TO OPEN "..tostring(requirement.open).." RF NEEDED"
  478.                             modem.send(Bunker, 123, "error", sendmessage)                          
  479.                             end
  480.                             reds.setBundledOutput(sides.south, colors.purple, 0)
  481.                             computer.shutdown(true)
  482.                 --      if requirement.canOpen == false then
  483.                 --          print("NOT ENOUGH POWER TO OPEN ... "..tostring(requirement.open).." RF NEEDED")
  484.                     elseif simonsaysfinished == 1 or debugdial == 1 or dialoverride then
  485.                             print("Engaging "..glyph.."... ")
  486.                             sg.engageSymbol(glyph)
  487.                     else
  488.                         print("Not completed simon says!")
  489.                         sg.engageGate()
  490.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  491.                         component.computer.beep(150,1)
  492.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  493.                         component.computer.beep(150,1)
  494.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  495.                         component.computer.beep(150,1)
  496.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  497.                         component.computer.beep(150,1)
  498.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  499.                         component.computer.beep(150,1)
  500.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  501.                         component.computer.beep(150,1)
  502.                         reds.setBundledOutput(sides.south, colors.orange, 255)
  503.                         component.computer.beep(150,1)
  504.                         reds.setBundledOutput(sides.south, colors.orange, 0)
  505.                         computer.shutdown(true)
  506.                     end
  507.             end        
  508.             eventID = event.listen("stargate_spin_chevron_engaged", function(evname, address, caller, num, lock, glyph)
  509.                 os.sleep(2)
  510.                 if lock then
  511.                     term.clear(true)
  512.                     print("Engaging...")                       
  513.                     sg.engageGate()
  514.                     if not dialoverride then
  515.                         local result = table.pack(debug_card.runCommand("/scoreboard players add @a[x=15019,y=40,z=12603,dx=57,dy=13,dz=57] PuzzleGateActi 1"))
  516.                         if result ~= nil then
  517.                             print(result[1], result[2])
  518.                         end
  519.                         local result = table.pack(debug_card.runCommand("/effect @a[x=15019,y=40,z=12603,dx=57,dy=13,dz=57] moreplanets:infected_spore_protection 1800"))
  520.                         if result ~= nil then
  521.                             print(result[1], result[2])
  522.                         end
  523.                     elseif dialoverride then
  524.                         local result = table.pack(debug_card.runCommand("/scoreboard players add @a[x=15019,y=40,z=12603,dx=57,dy=13,dz=57] openedpargate 1"))
  525.                         if result ~= nil then
  526.                             print(result[1], result[2])
  527.                         end                    
  528.                     end
  529.                     doing = false
  530.                     eventID = event.listen("stargate_wormhole_stabilized", function(evname, address, caller, isInitiating)
  531.                     if isInitiating then
  532.                         if dialoverride then
  533.                             print("sending code to omega: ", IDC)
  534.                             modem.broadcast(1234, "code", IDC)
  535.                             reds.setBundledOutput(sides.south, colors.black, 255)
  536.                         else
  537.                             print("sending code: ", IDC)
  538.                             sg.sendIrisCode(IDC)
  539.                             reds.setBundledOutput(sides.south, colors.black, 255)
  540.                         end
  541.                     else
  542.                     end
  543.                     end)
  544.                     zpm.toggleSlots()
  545.                     print("30 seconds before wormhole closes")
  546.                     os.sleep(9)
  547.                     zpm.toggleSlots()
  548.                     os.sleep(11)
  549.                     print("10 seconds")
  550.                     os.sleep(5)
  551.                     os.sleep(1) print("5")
  552.                     os.sleep(1) print("4")
  553.                     os.sleep(1) print("3")
  554.                     os.sleep(1) print("2")
  555.                     os.sleep(1) print("1")
  556.                     reds.setBundledOutput(sides.south, colors.purple, 0)
  557.                     reds.setBundledOutput(sides.south, colors.pink, 0)
  558.                     reds.setBundledOutput(sides.south, colors.black, 0)
  559.                     sg.disengageGate()
  560.                     os.sleep(1) print("Stargate Shutdown")
  561.                     redstoneyes = 0
  562.                     charged = 0
  563.                     simonsaysunlock = 0
  564.                     simonsaysfinished = 0
  565.                     debugdial = 0
  566.                     address = {"Glyph 34","Glyph 12","Glyph 19","Glyph 33","Glyph 23","Glyph 28","Glyph 16","Glyph 17"}
  567.                     AddressBuffer = {"Glyph 34","Glyph 12","Glyph 19","Glyph 33","Glyph 23","Glyph 28","Glyph 16","Glyph 17"}
  568.                     dialoverride = false
  569.                     manualdial = true
  570.                     else
  571.                         dialNext(num)
  572.                     end
  573.                 end)
  574.            
  575.             dialNext(0)
  576.             doing = true
  577.             print()
  578.             while doing do os.sleep(0.1) end
  579.     end
  580.    
  581. until asd == 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement