#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?>[\t\v]+(?<GECKScript>[]!#$%&()*+.\/0-9:;<=>A-Z[a-z{|}^-]+))+"
Local $sString = "Scn NVDLC01VaultCodeHolderScript" & @CRLF & _
"" & @CRLF & _
"; Script that handles variables, and events, for Elijah's confrontation at the Vault." & @CRLF & _
"; - Jorge" & @CRLF & _
"" & @CRLF & _
"; Vault Level Variables:" & @CRLF & _
"" & @CRLF & _
"Short bPlayerSafe" & @CRLF & _
"Short bPlayerBlocks" & @CRLF & _
"Short bVaultOpen" & @CRLF & _
"Short bTreasureFound" & @CRLF & _
"Short bSecurityAltInfo" & @CRLF & _
"Short bChristineHelp" & @CRLF & _
"Short bDeanHelp" & @CRLF & _
"" & @CRLF & _
"Int iTurretsDown" & @CRLF & _
"Int iSecurityState" & @CRLF & _
"Int iElevatorState" & @CRLF & _
"Int iMaintenanceState" & @CRLF & _
"" & @CRLF & _
"; Elijah Variables:" & @CRLF & _
"" & @CRLF & _
"Short bElijahContacted" & @CRLF & _
"Short bElijahTaunted" & @CRLF & _
"Short bElijahInVault" & @CRLF & _
"Short bElijahPaths" & @CRLF & _
"Short bElijahTurnsSecurityOn" & @CRLF & _
"Short bElijahEntersVault" & @CRLF & _
"Short bElijahArrivesVault" & @CRLF & _
"Short bElijahOpensVault" & @CRLF & _
"Short bElijahFights" & @CRLF & _
"Short bElijahDead" & @CRLF & _
"Short bElijahTrapped" & @CRLF & _
"Short bElijahTrapsPlayer" & @CRLF & _
"Short bElijahTeamsWithPlayer" & @CRLF & _
"short bPlayerTrapped" & @CRLF & _
"" & @CRLF & _
"Int iElijahState" & @CRLF & _
"Int iChristineStrikes" & @CRLF & _
"" & @CRLF & _
"Float fAngle" & @CRLF & _
"" & @CRLF & _
"; Operational Variables:" & @CRLF & _
"Int iCount" & @CRLF & _
"Float fTimer" & @CRLF & _
"" & @CRLF & _
"; >>>>---------------- Begin Code;" & @CRLF & _
"" & @CRLF & _
"; >>>>----------------" & @CRLF & _
"Begin GameMode" & @CRLF & _
"" & @CRLF & _
" If (bTreasureFound == 1)" & @CRLF & _
" If (bVaultOpen == 1) ; If Players have opened the Vault previously." & @CRLF & _
" If (bElijahContacted == 1) ; If Players have contacted Elijah - start sequence." & @CRLF & _
" If (iElijahState == 0) ; If First Stage of Endgame." & @CRLF & _
" If (bElijahInVault == 0) ; If Elijah not yet teleported to Vault." & @CRLF & _
" NVDLC01ElijahREF.Disable;" & @CRLF & _
" NVDLC01ElijahREF.MoveTo NVDLC01VaultStartMarkerREF;" & @CRLF & _
" SetStage NVDLC01MQ03 48;" & @CRLF & _
" Set bElijahInVault to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Else" & @CRLF & _
" NVDLC01ElijahREF.Enable; ; Enable Elijah once he's been moved to the Vault." & @CRLF & _
" Set iElijahState to 1; ; Ready Elijah for the next stage of events/AI behaviors." & @CRLF & _
" Set bElijahPaths to 1; ; Set variable to be checked by Elijah's AI package." & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iElijahState == 1)" & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijaIntroPathTravel; ; Add AI Package to Elijah to path to Vault." & @CRLF & _
" NVDLC01ElijahREF.SetGhost 1; ; Make Elijah impervious to combat - this resets, and scene jumps to fight, if he's attacked." & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount >= 1)" & @CRLF & _
" If (NVDLC01ElijahREF.GetDetected Player == 1)" & @CRLF & _
" ;ShowWarning "Elijah Detected You!"" & @CRLF & _
" If (bPlayerSafe != 1)" & @CRLF & _
" If (iCount == 1)" & @CRLF & _
" NVDLC01ElijahREF.RemoveScriptPackage NVDLC01VaultElijaIntroPathTravel ;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2)" & @CRLF & _
" If (bElijahEntersVault == 0)" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightOutTravel; ; Add AI Package to Elijah to path to Fight Outside spot." & @CRLF & _
" Else" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightOut2Travel; ; Add AI Package to Elijah to path to Fight Outside spot, but make him run." & @CRLF & _
" Endif" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOnMarker; ; In this case, we immediately close off the retraversal path doors, since Elijah will inevitably trigger the Vault Security against players" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Enable; ; while trapping them inside the Vault Chamber area. This leads, always, to the "Fight Elijah" fall-through state." & @CRLF & _
" VaultPeskyFieldBlocker3REF.Enable; ; These doors, will open again once Elijah dies." & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 10406.0000;" & @CRLF & _
" Set iElijahState to 2; ; Ready Elijah for the next stage of events/AI behaviors (2 = Fight Outside)." & @CRLF & _
" Set bElijahFights to 1;" & @CRLF & _
" Set iCount to 0; ; Reset operational integer." & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah detects players, and they are in a safe zone (opposite side of Vault entrance)," & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable; ; then we trigger the Vault's defenses, and move the script to the same state that happens" & @CRLF & _
" VaultEntryDoor02REF.SetOpenState 0; ; when Elijah has been trapped without noticing players (but we skip the scene where he gets attacked by security)." & @CRLF & _
" VaultEntryDoor01REF.SetOpenState 0;" & @CRLF & _
" VaultSecurityMeasuresMarker.Enable;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" NVDLC01ElijahREF.PlayIdle PipboyManipulate;" & @CRLF & _
" Set iElijahState to 3;" & @CRLF & _
" Set iSecurityState to 1;" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah does not detect players, let him continue to the Vault door." & @CRLF & _
" If (bElijahArrivesVault == 1) ; If Elijah gets to the front of the Door." & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahOpenVaultDoorTravel; ; (TEMP) Add AI Package to Elijah to path to Vault door marker." & @CRLF & _
" Set iElijahState to 3; ; Ready Elijah for stage of events/AI in which he can become trapped." & @CRLF & _
" ;Set bElijahOpensVault to 1; ; Set variable to be checked by Elijah's AI package (to avoid AddScriptPackage calls)." & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Else ; If Elijah has not yet arrived at the door to the Vault." & @CRLF & _
" If (bElijahTaunted == 1 || iSecurityState == 1) ; If Players have consciously provoked Elijah to fight during the intercom scene (that is, he's not going to fight inside right away)." & @CRLF & _
" If (NVDLC01ElijahREF.GetDistance VaultElijaVaultFightOutMarkerREF <= 320) ; If Elijah nears the Fight Outside Marker" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightOutTravel; ; (TEMP) Add AI Package to Elijah to path to Fight Outside spot." & @CRLF & _
" Set iElijahState to 2; ; Ready Elijah for the next stage of events/AI behaviors (2 = Fight Outside)." & @CRLF & _
" Set bElijahFights to 1; ; Set variable to be checked by Elijah's AI package (to avoid AddScriptPackage calls)." & @CRLF & _
" Set iCount to 0; ; Reset operational integer." & @CRLF & _
" Return;" & @CRLF & _
" Else" & @CRLF & _
" If (bPlayerBlocks == 1) ; If players run up the main exit stairs, and Elijah's far from its fighting marker (as checked above, he's not going into chamber)." & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightOutTravel; ; (TEMP) Add AI Package to Elijah to path to Fight Outside spot." & @CRLF & _
" Set iElijahState to 2; ; Ready Elijah for the next stage of events/AI behaviors (2 = Fight Outside)." & @CRLF & _
" Set bElijahFights to 1; ; Set variable to be checked by Elijah's AI package (to avoid AddScriptPackage calls)." & @CRLF & _
" Set iCount to 0; ; Reset operational integer." & @CRLF & _
" Return;" & @CRLF & _
" Endif " & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah was tricked during the intercom conversation;" & @CRLF & _
" If (bPlayerBlocks == 1) ; If Player enters the quick-exit area (stairs to entry pod)." & @CRLF & _
" If (bElijahEntersVault == 0) ; If Elijah's not inside trap area." & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightOutTravel; ; Add AI Package to Elijah to path to Fight Outside spot." & @CRLF & _
" Set bElijahTaunted to 1; ; We artificially set this variable, as if Player had taunted Elijah to fight (or Elijah expected a fight)." & @CRLF & _
" Else ; Otherwise, if Elijah's inside trap area." & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightInsideTravel; ; Add AI Package to Elijah to fight inside the Vault's Chamber (trape area)." & @CRLF & _
" Set bElijahTaunted to 0; ; We set this variable, as if Player had tricked Elijah to talk face to face, even though it was already 0 (precaution... dear friends)." & @CRLF & _
" Endif ; Otherwise, the script at bElijahState 2 will assume that he's not made it inside the Vault Chamber (trap area) yet." & @CRLF & _
" Set iElijahState to 2; ; Ready Elijah for the next stage of events/AI behaviors (2 = Fight Outside)." & @CRLF & _
" Set bElijahFights to 1; ; Set variable to be checked by Elijah's AI package (to avoid AddScriptPackage calls)." & @CRLF & _
" Set iCount to 0; ; Reset operational integer." & @CRLF & _
" Return;" & @CRLF & _
" Endif " & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif " & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iElijahState == 2) ; If Elijah's state is "Alerted to a Trap," or planning to trap Player." & @CRLF & _
" If (NVDLC01ElijahRef.GetDead == 0) ; If Elijah lives during the combat scene." & @CRLF & _
" If (iSecurityState == 0) ; If Vault Security is off." & @CRLF & _
" If (bElijahTurnsSecurityOn == 1) ; If Elijah turns security before going into the trap area." & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed) ; Then we kick-off the scene where he traps Player inside Vault, and fires security." & @CRLF & _
" If (iCount == 0 || iCount == 4) ; The second value of iCount gets set to 4 in the event of players rushing up the pod-stairs before Elijah can detect." & @CRLF & _
" NVDLC01ElijahREF.PlayIdle PipboyManipulate;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 1)" & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOnMarker;" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Enable;" & @CRLF & _
" VaultPeskyFieldBlocker3REF.Enable;" & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 10406.0000;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 3)" & @CRLF & _
" VaultSecurityMeasuresMarker.Enable;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 5)" & @CRLF & _
" VaultFinalTurret01REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret02REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret03REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret04REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret05REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret06REF.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01VaultSecurityFaction PlayerFaction 0 1;" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Set iSecurityState to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah has not turned security at force-field before going into the trap area." & @CRLF & _
" If (bPlayerBlocks == 1) ; If player tries to go up the stairs, while Elijah's is alerted to the trap." & @CRLF & _
" If (bElijahTaunted != 1) ; If Elijah was tricked, before he was alerted" & @CRLF & _
" If (iCount == 0) ; Then this means Elijah went into the Vault proper area (otherwise, state would've been skipped above, in iElijahState == 1)." & @CRLF & _
" NVDLC01ElijahREF.RemoveScriptPackage NVDLC01VaultElijahFightOutTravel; ; We take the AI to travel outside the trap (it's possible, but not necessary, that this was overriden before, in iElijahState == 1)." & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1)" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahFightInsideTravel; ; We give AI to travel inside the trap, to fight (it's possible, but not necessary, that this was given before, in iElijahState == 1)." & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2)" & @CRLF & _
" Set fAngle to (NVDLC01ElijahREF.GetAngle Z + NVDLC01ElijahREF.GetHeadingAngle Player);" & @CRLF & _
" NVDLC01ElijahREF.SetAngle Z fAngle;" & @CRLF & _
" NVDLC01ElijahREF.PlayIdle PipboyManipulate;" & @CRLF & _
" Set bElijahTurnsSecurityOn to 1;" & @CRLF & _
" Set iSecurityState to 5; ; We skip down to segment that handles Elijah's fight, under "improvised" circumstances." & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah was expecting a trap, and player goes up the stairs to the pod." & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable; ; We lock the door, and set the code to run, idly - soon Elijah will reach the gate." & @CRLF & _
" Set iCount to 4; ; And he'll set the security sequence where he traps the player (scripted immediately above)." & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4)" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iSecurityState == 1) ; If Vault Security is on when Elijah gets there - this state also gets set if Elijah triggers trap, and players are not in safe-zone (trapped too)." & @CRLF & _
" If (bElijahTurnsSecurityOn == 1)" & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed);" & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" NVDLC01ElijahREF.PlayIdle PipboyManipulate;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 1)" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Set iSecurityState to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iSecurityState == 2)" & @CRLF & _
" If (iTurretsDown < 9)" & @CRLF & _
" If (bChristineHelp == 0 && iTurretsDown < 6) ; Christine helps out by taking down two turrets (only runs here if Elijah sets trap on player, and less than 3 turrets are down)." & @CRLF & _
" If (NVDLC01ChristineRef.GetDead == 0 && NVDLC01ChristineDialogue.nChristineAttitude > 1)" & @CRLF & _
" VaultChristineVoiceActivatorREF.Say NVDLC01ChristineVaultHelpTopic01 1;" & @CRLF & _
" Set bChristineHelp to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" If (iTurretsDown == 1)" & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" NVDLC01ElijahREF.SayTo Player NVDLC01ElijahVaultSentryDownTopic01 1; ; Elijah's bark about futility of Players' actions, blah blah." & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iTurretsDown == 2)" & @CRLF & _
" If (iCount <= 1)" & @CRLF & _
" NVDLC01ElijahREF.SayTo Player NVDLC01ElijahVaultSentryDownTopic02 1; ; Elijah's bark about getting pissed off." & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iTurretsDown >= 3)" & @CRLF & _
" If (iCount <= 2)" & @CRLF & _
" NVDLC01ElijahREF.SayTo Player NVDLC01ElijahVaultSentryDownTopic03 1; ; Elijah's bark about having to finish this off himself." & @CRLF & _
" VaultSecurityExitDoorsMarker.Disable;" & @CRLF & _
" NVDLC01ElijahRef.MoveTo VaultElijahFightsInsidePortPoint;" & @CRLF & _
" Set iSecurityState to 3;" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Else ; This variable (iTurretsDown) gets set to 9 if players re-program the turrets to attack Elijah." & @CRLF & _
" NVDLC01ElijahREF.SayTo Player NVDLC01ElijahVaultSentryDownTopic03 1;" & @CRLF & _
" ;VaultSecurityExitDoorsMarker.Disable;" & @CRLF & _
" NVDLC01ElijahRef.MoveTo VaultElijahFightsInsidePortPoint;" & @CRLF & _
" Set iSecurityState to 3;" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iSecurityState == 3)" & @CRLF & _
" NVDLC01ElijahRef.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01ElijahFaction PlayerFaction 0 1;" & @CRLF & _
" NVDLC01ElijahRef.StartCombat Player;" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahRushInsideTravel;" & @CRLF & _
" Set iSecurityState to 4;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iSecurityState == 4) ; This is the standard fighting state, after players deal with enough security turrets, if Elijah trapped player" & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed); ; inside the Vault's Chamber area, of if he was trapped inside alongside the player." & @CRLF & _
" If (iCount == 0 && fTimer >= 0.5)" & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOnMarker;" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Enable;" & @CRLF & _
" VaultPeskyFieldBlocker3REF.Enable;" & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 10406.0000;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" If (bDeanHelp == 0) ; Dean helps out by disabling the speakers." & @CRLF & _
" If (NVDLC01DeanRef.GetDead == 0 && NVDLC01DeanDialogue.nDeanAttitude > 1)" & @CRLF & _
" VaultDeanVoiceActivatorREF.Say NVDLC01DeanVaultHelpTopic01 1;" & @CRLF & _
" Set bDeanHelp to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 6)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic01 1;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 12)" & @CRLF & _
" If (bChristineHelp == 0) ; Christine helps out by taking down two turrets (only runs here if 3 turrets were down before Elijah sets trap on player)." & @CRLF & _
" If (iTurretsDown < 6) ; Only destroy turrets if at least one of them remains intact, and won't run if players have turned turrets against Elijah (variable == 9)." & @CRLF & _
" If (NVDLC01ChristineRef.GetDead == 0 && NVDLC01ChristineDialogue.nChristineAttitude > 1)" & @CRLF & _
" VaultChristineVoiceActivatorREF.Say NVDLC01ChristineVaultHelpTopic01 1; ; In her dialogue, a variable gets set to 1 in the VaultTurretCodeBox. The code to kill the turrets runs there." & @CRLF & _
" Set bChristineHelp to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 20)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic02 1;" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 40)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic03 1;" & @CRLF & _
" Set iCount to 4;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4 && fTimer >= 60)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic04 1;" & @CRLF & _
" Set iCount to 5;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 6)" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iSecurityState == 5) ; This case only takes place if players sneak behind Elijah, through the main exit stairs, when he's been duped to head to the" & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed); ; Vault's chamber." & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOnMarker;" & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 10406.0000;" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Enable;" & @CRLF & _
" VaultPeskyFieldBlocker3REF.Enable;" & @CRLF & _
" VaultSecurityMeasuresMarker.Enable;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 2)" & @CRLF & _
" VaultFinalTurret01REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret02REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret03REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret04REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret05REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret06REF.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01VaultSecurityFaction PlayerFaction 0 1;" & @CRLF & _
" If (bDeanHelp == 0) ; Dean helps out by disabling the speakers." & @CRLF & _
" If (NVDLC01DeanRef.GetDead == 0 && NVDLC01DeanDialogue.nDeanAttitude > 1)" & @CRLF & _
" VaultDeanVoiceActivatorREF.Say NVDLC01DeanVaultHelpTopic01 1;" & @CRLF & _
" Set bDeanHelp to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 4)" & @CRLF & _
" NVDLC01ElijahRef.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01ElijahFaction PlayerFaction 0 1;" & @CRLF & _
" NVDLC01ElijahRef.StartCombat Player;" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 6)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic01 1;" & @CRLF & _
" Set iCount to 4;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4 && fTimer >= 12)" & @CRLF & _
" If (bChristineHelp == 0)" & @CRLF & _
" If (iTurretsDown < 6)" & @CRLF & _
" If (NVDLC01ChristineRef.GetDead == 0 && NVDLC01ChristineDialogue.nChristineAttitude > 1)" & @CRLF & _
" VaultChristineVoiceActivatorREF.Say NVDLC01ChristineVaultHelpTopic01 1;" & @CRLF & _
" Set bChristineHelp to 1;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iCount == 4 && fTimer >= 20)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic02 1;" & @CRLF & _
" Set iCount to 5;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 5 && fTimer >= 40)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic03 1;" & @CRLF & _
" Set iCount to 6;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 6 && fTimer >= 60)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultCombatBarkTopic04 1;" & @CRLF & _
" Set iCount to 7;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 7)" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Elijah's dead while the combat scene takes place." & @CRLF & _
" If (bElijahDead == 0)" & @CRLF & _
" VaultFinalTurret01REF.SetGhost 0; ; Make security turrets vulnerable, just in case Elijah dies before they get set to Ghost 0." & @CRLF & _
" VaultFinalTurret02REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret03REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret04REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret05REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret06REF.SetGhost 0;" & @CRLF & _
" Set iCount to 0; ; Reset operational variables to use in scripting for Elijah's death-event." & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Set bElijahDead to 1; ; This variable is important to set to 1 - dialogue will check against this (Veronica)." & @CRLF & _
" Set iElijahState to 4; ; Set script to handle Elijah's death-event next." & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iElijahState == 3) ; Elijah's tricked into opening the Vault, or Elijah discovers the trap before players spring it on him." & @CRLF & _
" If (iSecurityState == 0) ; If Vault Security is off, or Elijah hasn't been alarmed by player actions yet." & @CRLF & _
" If (bElijahTurnsSecurityOn == 1) ; If Elijah is done with using terminal animations" & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed); ; We kick off a timer to handle timing of events where Elijah triggers Vault security." & @CRLF & _
" If (NVDLC01ElijahREF.IsInCombat == 0) ; If Elijah's not in combat" & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" ;NVDLC01ElijahRef.SetGhost 0; ; At this point, Elijah's vulnerable." & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 1)" & @CRLF & _
" VaultSecurityExitDoorsMarker.Enable;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOnMarker;" & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 10406.0000;" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Enable;" & @CRLF & _
" VaultPeskyFieldBlocker3REF.Enable;" & @CRLF & _
" VaultEntryDoor02REF.SetOpenState 0;" & @CRLF & _
" VaultEntryDoor01REF.SetOpenState 0;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 1.5)" & @CRLF & _
" Set fAngle to (NVDLC01ElijahREF.GetAngle Z + NVDLC01ElijahREF.GetHeadingAngle VaultElijaVaultFightOutMarkerREF);" & @CRLF & _
" NVDLC01ElijahREF.SetAngle Z fAngle;" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultTrappedTopic01 1;" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 4.5)" & @CRLF & _
" VaultSecurityMeasuresMarker.Enable;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" Set iCount to 4;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4 && fTimer >= 5)" & @CRLF & _
" Set fAngle to (NVDLC01ElijahREF.GetAngle Z + NVDLC01ElijahREF.GetHeadingAngle VaultFinalSpeaker01REF);" & @CRLF & _
" NVDLC01ElijahREF.SetAngle Z fAngle;" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultTrappedTopic02 1;" & @CRLF & _
" Set iCount to 5;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 5 && fTimer >= 5.5)" & @CRLF & _
" NVDLC01ElijahREF.PlayIdle LooseWildlyAngryShortLength;" & @CRLF & _
" Set iCount to 6;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 6 && fTimer >= 11)" & @CRLF & _
" Set fAngle to (NVDLC01ElijahREF.GetAngle Z + NVDLC01ElijahREF.GetHeadingAngle Player);" & @CRLF & _
" NVDLC01ElijahREF.SetAngle Z fAngle;" & @CRLF & _
" NVDLC01ElijahREF.PlayIdle PipboyManipulate;" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultTrappedTopic03 1;" & @CRLF & _
" VaultFinalTurret01REF.AddScriptPackage NVDLC01VaultTurretFakeAttackElijah;" & @CRLF & _
" VaultFinalTurret02REF.AddScriptPackage NVDLC01VaultTurretFakeAttackElijah;" & @CRLF & _
" VaultFinalTurret03REF.AddScriptPackage NVDLC01VaultTurretFakeAttackElijah;" & @CRLF & _
" VaultFinalTurret06REF.AddScriptPackage NVDLC01VaultTurretFakeAttackElijah;" & @CRLF & _
" Set iCount to 0;" & @CRLF & _
" Set fTimer to 0;" & @CRLF & _
" Set iSecurityState to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Else ; This means that Elijah started combat, which can only happen if his Ghost state is 0, which means he opened the Vault." & @CRLF & _
" If (VaultSecurityMeasuresMarker.GetDisabled == 1) ; If the previous sequence didn't get to this point, then enable the security of the Vault." & @CRLF & _
" VaultSecurityMeasuresMarker.Enable; ; Note: this state is a safeguard against extremely fringe-like cases (detonators, mines, etc, that may hurt Elijah here)." & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" Endif" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultTrappedTopic03 1; ; Elijah kickstarts the event where he's aware of the trap/combat, and he's in the Vault Chamber area." & @CRLF & _
" Set iCount to 0; ; We skip to where we check for player positions (out of trap, or inside trap area), and let it run its expected course (below)." & @CRLF & _
" Set fTimer to 0; ; Again, this is highly unlikely." & @CRLF & _
" Set iSecurityState to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Elseif (iSecurityState == 1) ; Here we check for players' position. If they are safe, then Elijah's trapped. Also, this stage is a fall-through for "trap-discovered!"" & @CRLF & _
" If (bPlayerSafe == 1) || (bElijahTrapped == 1) ; bPlayerSafe is passed by an actor-zone that stands beyond the security force-fields, near entry pod, and retraversal path pod." & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed); ; However, we also check for bElijahTrapped == 1. We want this to continue once it starts, regardless of subsequent player-actions." & @CRLF & _
" If (iCount == 0)" & @CRLF & _
" NVDLC01ElijahRef.SetGhost 0;" & @CRLF & _
" Set bElijahTrapped to 1; ; Set Elijah to be formally "trapped."" & @CRLF & _
" VaultMaintenanceDoorREF.Unlock;" & @CRLF & _
" NVDLC01VaultElevatorREF.Unlock;" & @CRLF & _
" PlaySound NVDLC01AMBVaultEscapeStart;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 6)" & @CRLF & _
" NVDLC01ElijahRef.Say NVDLC01ElijahVaultTrappedTopic04 1;" & @CRLF & _
" NVDLC01ElijahREF.AddScriptPackage NVDLC01VaultElijahTrappedCurseTravel;" & @CRLF & _
" Set NVDLC01Collars to 0; ; We disable the standard collar functions." & @CRLF & _
" Set VaultCollarCodeBox.bCollarOn to 1; ; Elijah's pissed off now - he triggers the player's bomb-collar (this runs in the Vault level only)." & @CRLF & _
" VaultEscapeSoundMarker.Enable;" & @CRLF & _
" VaultEntryDoor02REF.SetOpenState 0;" & @CRLF & _
" VaultEntryDoor01REF.SetOpenState 0;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 6.5)" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 7)" & @CRLF & _
" PlayMusic NVDLC01EndGameEscape;" & @CRLF & _
" NVDLC01ElijahRef.SetGhost 0;" & @CRLF & _
" VaultFinalTurret01REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret02REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret03REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret04REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret05REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret06REF.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01VaultSecurityFaction PlayerFaction 0 1;" & @CRLF & _
" VaultFinalTurret01REF.StartCombat Player;" & @CRLF & _
" VaultFinalTurret02REF.StartCombat Player;" & @CRLF & _
" VaultFinalTurret03REF.StartCombat Player;" & @CRLF & _
" VaultFinalTurret04REF.StartCombat Player;" & @CRLF & _
" VaultFinalTurret05REF.StartCombat Player;" & @CRLF & _
" VaultFinalTurret06REF.StartCombat Player;" & @CRLF & _
" Set iCount to 4;" & @CRLF & _
" Set fTimer to 60.5; ; Players have 60 seconds to get to the elevator before it leaves." & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4)" & @CRLF & _
" If (iElevatorState == 0)" & @CRLF & _
" Set fTimer to (fTimer - GetSecondsPassed);" & @CRLF & _
" If (fTimer <= 0)" & @CRLF & _
" Set iElevatorState to 1; ; Elevator leaves when the timer runs out." & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif " & @CRLF & _
" Endif" & @CRLF & _
" Else ; If Player is not in safe-zone when Elijah triggers the Vault's Security System." & @CRLF & _
" VaultFinalTurret01REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret02REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret03REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret04REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret05REF.SetGhost 0;" & @CRLF & _
" VaultFinalTurret06REF.SetGhost 0;" & @CRLF & _
" NVDLC01ElijahRef.SetGhost 0;" & @CRLF & _
" SetEnemy NVDLC01VaultSecurityFaction PlayerFaction 0 1;" & @CRLF & _
" Set bElijahFights to 1; ; We kick back the script to the fall-through stage (Elijah Fight Scene)." & @CRLF & _
" Set iElijahState to 2;" & @CRLF & _
" Set iSecurityState to 3;" & @CRLF & _
" Endif" & @CRLF & _
" Endif " & @CRLF & _
" Elseif (iElijahState == 4) ; Elijah's dead - end scene, reset variables, do groovy stuff." & @CRLF & _
" Set fTimer to (fTimer + GetSecondsPassed)" & @CRLF & _
" If (iCount == 0 && fTimer >= 1)" & @CRLF & _
" VaultFinalTurret01REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultSecurityMeasuresMarker.Disable;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 0;" & @CRLF & _
" VaultFinalSpeaker01REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker02REF.Activate Player 1;" & @CRLF & _
" VaultFinalSpeaker01REF.SetDestroyed 1;" & @CRLF & _
" VaultFinalSpeaker02REF.SetDestroyed 1;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOffMarker;" & @CRLF & _
" VaultPeskyField03bREF.SetPos Z 7406.0000" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Disable;" & @CRLF & _
" VaultPeskyFieldBlocker3REF.Disable;" & @CRLF & _
" Set iCount to 1;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 1 && fTimer >= 1.4)" & @CRLF & _
" VaultFinalTurret03REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" ;VaultFinalTurret01REF.KillActor Player 0" & @CRLF & _
" VaultFinalTurret01REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 2;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 2 && fTimer >= 2.4)" & @CRLF & _
" VaultFinalTurret02REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultFinalTurret03REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 3;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 3 && fTimer >= 3.4)" & @CRLF & _
" VaultFinalTurret05REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultFinalTurret02REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 4;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 4 && fTimer >= 3.6)" & @CRLF & _
" VaultFinalTurret06REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultFinalTurret05REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 5;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 5 && fTimer >= 3.9)" & @CRLF & _
" VaultFinalTurret04REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultFinalTurret06REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 6;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 6 && fTimer >= 4.8)" & @CRLF & _
" VaultFinalSpeaker01REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" VaultFinalTurret04REF.CIOS NVDLC01KillSpell;" & @CRLF & _
" Set iCount to 7;" & @CRLF & _
" Return;" & @CRLF & _
" Elseif (iCount == 7 && fTimer >= 5.1)" & @CRLF & _
" VaultFinalSpeaker02REF.PlaceAtMe NV40mmGrenadeExplosion;" & @CRLF & _
" ;VaultSecurityExitDoorsMarker.Disable;" & @CRLF & _
" VaultPeskyFieldREF.MoveTo VaultPeskyFieldOffMarker;" & @CRLF & _
" VaultPeskyFieldBlocker2REF.Disable;" & @CRLF & _
" Set NVDLC01Collars to 0; ; We disable the standard collar functions." & @CRLF & _
" Set VaultCollarCodeBox.bCollarOn to 1; ; Elijah dies, and that automatically triggers the player's bomb-collar (this runs in the Vault level only)." & @CRLF & _
" VaultEscapeSoundMarker.Enable;" & @CRLF & _
" VaultMaintenanceDoorREF.Unlock; ; We make sure the doors leading out are unlocked, and some of them are to be closed (freak out time, when collar's ticking)." & @CRLF & _
" NVDLC01VaultElevatorREF.Unlock;" & @CRLF & _
" VaultEntryDoor02REF.SetOpenState 0;" & @CRLF & _
" VaultEntryDoor01REF.SetOpenState 0;" & @CRLF & _
" Set iCount to 8;" & @CRLF & _
" Return;" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
" Endif" & @CRLF & _
"" & @CRLF & _
"End" & @CRLF & _
"; <<<<----------------"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm