Trending Games
Release Countdowns
Florida Man Death Clocks Funko PoP!


08-27 #pvp #Gamerazzi #wowclassic #herod BEST REALMS> reserve NOW



Fallout 3: GOTY Game of the year edition dB





1,257 Results
For SCPT:SCTX

NumberEDIDText
187bEntranceChargeSCRIPTscn 87bEntranceChargeSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutant and start him running mrk87bSMEntranceCharge.enable endif end
287bGalleyRushLeftSCRIPTscn 87bGalleyRushLeftSCRIPT ;this is the trigger on the left side that causes the mutants on the right to rush in ;only do this once short playerTriggered begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutants and open the doors on the right side mrk87bSuperMutantR01.enable door87bSMGalley01Right.setOpenState 1 mrk87bSuperMutantR02.enable door87bSMGalley02Right.setOpenState 1 ;turn off the other one trig87bGalleyRushRight.disable endif end
387bGalleyRushRightSCRIPTscn 87bGalleyRushRightSCRIPT ;this is the trigger on the right side that causes the mutants on the left to rush in short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutants and open the doors on the left side mrk87bSuperMutantL01.enable door87bSMGalley01Left.setOpenState 1 mrk87bSuperMutantL02.enable door87bSMGalley02Left.setOpenState 1 ;turn off the other one trig87bGalleyRushLeft.disable endif end
487bLabScareSCRIPTscn 87bLabScareSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutant and start him running mrk87bSMLabScare.enable endif end
587bRoachRushSCRIPTscn 87bRoachRushSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutant and start him running mrk87bRoachRush01.enable mrk87bRoachRush02.enable mrk87bRoachRush03.enable mrk87bRoachRush04.enable mrk87bRoachRush01.moveTo mrk87bRoachRush01 mrk87bRoachRush02.moveTo mrk87bRoachRush02 mrk87bRoachRush03.moveTo mrk87bRoachRush03 mrk87bRoachRush04.moveTo mrk87bRoachRush04 endif end
6ActivateStartLinkedCombatscn ActivateStartLinkedCombat ref creature begin OnActivate set creature to getLinkedRef creature.startCombat player activate end
7AgathaScriptscn AgathaScript ;This script is used primarily to track a daily response in dialog and death begin OnDeath if ( GetStage MS17 >= 10 ) && ( Player.GetItemCount MS17SoilStrad >= 1 ) SetObjectiveCompleted MS17 20 1 SetObjectiveCompleted MS17 30 1 SetObjectiveCompleted MS17 50 1 SetObjectiveDisplayed MS17 60 1 endif if ( GetStage MS17 < 10 ) SetQuestObject MS17SoilStrad 0 MS17SSCaseRef.SetItemValue 100 endif end
8AhzrukhalSCRIPTSCN AhzrukhalSCRIPT short CharonKilledAhzrukhal BEGIN OnActivate if ( CharonREF.CharonKillAhzrukhalSceneStart == 1 ) && ( GetDead == 0 ) if ( IsActionRef CharonREF == 1 ) activate endif else activate endif END BEGIN OnDeath set DialogueUnderworld.AhzrukhalDead to 1 if ( CharonREF.CharonKillAhzrukhalSceneKill == 1 ) CharonREF.EVP set DialogueUnderworld.CharonKilledAhzrukhal to 1 set CharonREF.CharonKillAhzrukhalSceneStart to -1 UnderworldGhoul06REF.AddScriptPackage FollowersCharonUnderworldGhoul06Watch UnderworldGhoul07REF.AddScriptPackage FollowersCharonUnderworldGhoul07Watch UnderworldGhoul08REF.AddScriptPackage FollowersCharonUnderworldGhoul08Watch UnderworldGhoul09REF.AddScriptPackage FollowersCharonUnderworldGhoul09Watch endif END
9AlienRadioBeaconSCRIPTscn AlienRadioBeaconSCRIPT float timer ; intermittently broadcasting radio beacon begin gamemode if GetDestroyed == 0 if timer > 0 set timer to timer - GetSecondsPassed else AlienRadioBeaconREF.startRadioConversation ;showWarning "Beginning Play" set timer to 10 endif endif end
10AllistairTenpennyScriptscn AllistairTenpennyScript Begin OnDeath set MS12.CountDead to MS12.CountDead + 1 If GetStage MS14 >= 10 && GetStage MS14 < 100 ; if MS14 is running, this completes an objective SetObjectiveCompleted MS14 10 1 SetObjectiveDisplayed MS14 50 1 Set MS14.TenpennyShot to 1 If GetKillingBlowLimb == 1 ; If killed by blow to the head Set MS14.TenpennyHead to 1 EndIf SetObjectiveDisplayed MS14 90 0 ; Shut off objectives if Tenpenny dies before completion SetObjectiveDisplayed MS14 100 0 ElseIf GetStage MS14 < 100 Set MS14.TenpennyDeadEarly to 1 EndIf End
11AmataSCRIPTscn AmataSCRIPT begin OnDeath if getStage MS16 > 10 && getstage MS16 < 100 set MS16.AmataKilled to 1 if getDeadCount Overseer == 0 setStage MS16 160 elseif getDeadCount Vault101Security01 == 0 setStage MS16 162 elseif getDeadCount AllenMack == 0 setStage MS16 164 endif endif ;If player was reporting to her about stopping the Overseer and kills her, fail MS16 if getStage MS16 == 140 setStage MS16 200 endif end
12AndaleResidentSCRIPTSCN AndaleResidentSCRIPT short DoOnce BEGIN OnDeath set DialogueAndale.AndaleDeathCount to ( DialogueAndale.AndaleDeathCount + 1 ) END BEGIN GameMode if DoOnce == 0 if ( IsCombatTarget Player == 1 ) if ( DialogueAndale.AndaleCombat == 0 ) JennyWilsonREF.RemoveFromFaction AndaleResidentFaction JuniorSmithREF.RemoveFromFaction AndaleResidentFaction SetEnemy AndaleResidentFaction PlayerFaction set DialogueAndale.AndaleCombat to 1 set DoOnce to 1 endif endif endif END
13AndyStahlSCRIPTscn AndyStahlSCRIPT BEGIN OnDeath set DialogueMegaton.AndyStahlDead to 1 END
14AntAgonizerScriptscn AntAgonizerScript ;used with MS02 short greetPlayer ;1 = greeted player (used as condition on package, set in MS02 dialog) short sideKick ;1 = player is his sidekick, and he will follow the player to kill his enemy short followingPlayer ;1 = following player, -1 = waiting because player told him to, -2 = he stopped following/waiting because player waited to long, or took him to cells he wasn't going to keep following in float waitUntil ;set in dialog == GetGameDaysPassed + HowEverLongToWait when did the player tell him to wait... used as a condition on wait pack, if he's waiting too long he will go back to his lair Begin GameMode ;If AntAgonizer is fleeing after the battle, and gets away from the player, complete the MS02AntAgonizerEscape package if MS02.battleDone == 1 && MS02.AntAgonizerEscaped == 0 if (getIsCurrentPackage MS02AntAgonizerEscape == 1 || getCurrentAIProcedure == 16) if getDead == 0 if getDistance player >= 2000 set MS02.antAgonizerEscaped to 1 AntAgonizerRef.moveto xMS02AntAgonizerEscapeToHere ;AntAgonizerRef.removeFromFaction MS02TemporaryFriends AntAgonizerRef.setAV Aggression MS02.AntAgonizerAggresion AntAgonizerRef.setAV Confidence MS02.AntAgonizerConfidence AntAgonizerRef.setAV Assistance MS02.AntAgonizerAssistance ;AntAgonizerRef.setAV DamageResist MS02.AntAgonizerDamageResist removeScriptPackage MS02AndAgonizerEscape evp endif endif endif endif if MS02.AntAgonizerRetired !=0 if getDisabled == 0 if getIsCurrentPackage MS02AntAgonizerWanderWasteland == 1 if getInSameCell player == 0 disable endif endif endif endif End Begin OnHit if (AntAgonizerREF.getInCell LairAntAgonizer03) MS02AntAttack1REF.enable MS02AntAttack2REF.enable MS02AntAttack1REF.startcombat player MS02AntAttack2REF.startcombat player endif END Begin OnStartCombat if (AntAgonizerREF.getInCell LairAntAgonizer03) MS02AntAttack1REF.enable MS02AntAttack2REF.enable MS02AntAttack1REF.startcombat player MS02AntAttack2REF.startcombat player endif END Begin OnDeath ;If killed during the mexican standoff at the beginning: if (MS02.BattleDone == 0) MS02BattleAnt1Ref.startcombat player MS02BattleAnt2Ref.startcombat player MS02BattleAnt3Ref.startcombat player MS02BattleAnt4Ref.startcombat player MS02BattleRobot1Ref.addscriptpackage MS02BattleRobotFlee MS02BattleRobot2Ref.addscriptpackage MS02BattleRobotFlee set Ms02.bailedOut to 1 set MS02.battle to 2 set MS02.KilledBefore to 1 endif ;Otherwise if (getStage MS02 > 0) setStage MS02 90 endif if (getObjectiveDisplayed MS02 75 == 1) setObjectiveCompleted MS02 75 1 endif setEnemy MS02BattleAntFaction PlayerFaction if (AntAgonizerREF.IsKiller Player == 1 && AntAgonizerREF.getItemCount MS02SuitAntAgonizer >= 1) player.RemoveFromFaction MS02AntSidekickFaction setEnemy MS02AntFaction PlayerFaction endif End
15AnthonyLingScriptscn AnthonyLingScript Begin OnDeath ;set variables on MS12Script that this resident has been "dealt with" set MS12.AL to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
16AntNectarSCRIPTfxscn AntNectarSCRIPTfx ; the magic effect for the IS mod associated with the ant nectar chem begin ScriptEffectStart iMod AntNectarISFX ; apply ant-o-vision end begin ScriptEffectFinish riMod AntNectarISFX ; and remove it end
17ArkansasScriptscn ArkansasScript Begin onDeath setstage MS13 11 End
18ArlingtonLibraryBathroomScriptscn ArlingtonLibraryBathroomScript short doOnce begin onTriggerEnter player if doOnce != 1 ArlingtonLibraryBathroomFakeForce.placeAtMe FakeForce100r25 set doOnce to 1 endif end
19ArlingtonLibraryBoSScript01scn ArlingtonLibraryBoSScript01 ;starts innitial BoS attack short doOnce begin OnTriggerEnter player if doOnce == 0 set doOnce to 1 ArlingtonLibraryBoS01Trig01REF01.disable ArlingtonLibraryBoS01Trig01REF02.disable ArlingtonLibraryBoS01REF.setav variable01 2 ArlingtonLibraryBoS02REF.setav variable01 2 ArlingtonLibraryBoS01REF.evp ArlingtonLibraryBoS02REF.evp ArlingtonLibraryRaider01REF.setav variable01 1 ArlingtonLibraryRaider02REF.setav variable01 1 ArlingtonLibraryRaider03bREF.setav variable01 1 ArlingtonLibraryRaider01REF.evp ArlingtonLibraryRaider02REF.evp ArlingtonLibraryRaider03bREF.evp endif end
20ArlingtonLibraryBoSScript02scn ArlingtonLibraryBoSScript02 ;if player gets through door first and BoS should walk through, force BoS through door ;otherwise they go into low level processing and may take a while. ;if BoS are dead, spawn in new BoS float moveTimer short runMoveTimer begin onTriggerEnter player disable if ArlingtonLibraryBoS01REF.getDead == 1 if ArlingtonLibraryBoS05REF.getDisabled == 1 || ArlingtonLibraryBoS05REF.getDead == 1 ArlingtonLibraryBoS03REF.enable ArlingtonLibraryBoS03REF.setav variable01 3 ArlingtonLibraryBoS03REF.evp endif endif if ArlingtonLibraryBoS02REF.getDead == 1 if ArlingtonLibraryBoS06REF.getDisabled == 1 || ArlingtonLibraryBoS06REF.getDead == 1 ArlingtonLibraryBoS04REF.enable ArlingtonLibraryBoS04REF.setav variable01 3 ArlingtonLibraryBoS04REF.evp endif endif if ArlingtonLibraryBoS01REF.getAV variable01 == 3 ;BoS should be heading to door now set moveTimer to 1.5 set runMoveTimer to 1 endif end begin gameMode if runMoveTimer == 1 if moveTimer > 0 set moveTimer to moveTimer - getSecondsPassed else if ArlingtonLibraryBoS01REF.getDead == 0 if ArlingtonLibraryBoS01REF.GetInCell ArlingtonLibrary02 == 0 ArlingtonLibraryBoS01REF.moveTo ArlingtonLibraryBoS01Door01Pos endif endif if ArlingtonLibraryBoS02REF.getDead == 0 if ArlingtonLibraryBoS02REF.GetInCell ArlingtonLibrary02 == 0 ArlingtonLibraryBoS02REF.moveTo ArlingtonLibraryBoS02Door01Pos endif endif set runMoveTimer to 0 endif endif end
21ArlingtonLibraryBoSScript03scn ArlingtonLibraryBoSScript03 ;used to trigger raider ambush in ArlingtonLibrary03 float timer short runTimer short stage begin onTriggerEnter disable ArlingtonLibraryPitcher01REF.activate ArlingtonLibraryBoSTrig3REF 1 set timer to 5 set runTimer to 1 set stage to 1 ; update variable01 and evp incase 05 or 06 are enabled at this point ArlingtonLibraryBoS05REF.setav variable01 11 ArlingtonLibraryBoS06REF.setav variable01 11 ArlingtonLibraryBoS05REF.evp ArlingtonLibraryBoS06REF.evp end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed else if stage == 1 ArlingtonLibraryRaider11REF.setAV variable01 1 ArlingtonLibraryRaider11REF.evp set timer to 1.5 set stage to 2 elseif stage == 2 ArlingtonLibraryRaider09REF.setAV variable01 1 ArlingtonLibraryRaider09REF.evp set timer to 2 set stage to 3 elseif stage == 3 ArlingtonLibraryRaider10REF.setAV variable01 1 ArlingtonLibraryRaider10REF.evp set runTimer to 0 endif endif endif end
22ArlingtonLibraryBoSScript04scn ArlingtonLibraryBoSScript04 ;enables last raiders and turrets in ArlingtonLibrary03 short doOnce begin onTriggerEnter if doOnce == 0 set doOnce to 1 ArlingtonLibraryRaider12REF.setav variable01 1 ArlingtonLibraryRaider13REF.setav variable01 1 ArlingtonLibraryRaider12REF.evp ArlingtonLibraryRaider13REF.evp ArlingtonLibraryTurret01.enable ArlingtonLibraryTurret02.enable endif end
23ArlingtonLibraryBoSScript05scn ArlingtonLibraryBoSScript05 ;BoS rushes in towards last raiders and turrets in ArlingtonLibrary03 short doOnce begin onTriggerEnter if doOnce == 0 set doOnce to 1 ArlingtonLibraryBoS07REF.setav variable01 1 ArlingtonLibraryBoS07REF.evp endif end
24ArlingtonLibraryBoSScript06scn ArlingtonLibraryBoSScript06 ;if player gets through door first and BoS should walk through, force BoS through door ;otherwise they go into low level processing and may take a while. float moveTimer short runMoveTimer begin onTriggerEnter player if ArlingtonLibraryBoS01REF.getAV variable01 == 8 || ArlingtonLibraryBoS02REF.getAV variable01 == 8 || ArlingtonLibraryBoS03REF.getAV variable01 == 8 || ArlingtonLibraryBoS04REF.getAV variable01 == 8 disable set moveTimer to 1.5 set runMoveTimer to 1 endif end begin gameMode if runMoveTimer == 1 if moveTimer > 0 set moveTimer to moveTimer - getSecondsPassed else if ArlingtonLibraryBoS01REF.getDead == 0 if ArlingtonLibraryBoS01REF.GetInCell ArlingtonLibrary01 == 0 ArlingtonLibraryBoS01REF.moveTo ArlingtonLibraryBoS01Door02Pos endif elseif ArlingtonLibraryBoS03REF.getDead == 0 if ArlingtonLibraryBoS03REF.GetInCell ArlingtonLibrary01 == 0 ArlingtonLibraryBoS03REF.moveTo ArlingtonLibraryBoS01Door02Pos endif endif if ArlingtonLibraryBoS02REF.getDead == 0 if ArlingtonLibraryBoS02REF.GetInCell ArlingtonLibrary01 == 0 ArlingtonLibraryBoS02REF.moveTo ArlingtonLibraryBoS02Door02Pos endif elseif ArlingtonLibraryBoS04REF.getDead == 0 if ArlingtonLibraryBoS04REF.GetInCell ArlingtonLibrary01 == 0 ArlingtonLibraryBoS04REF.moveTo ArlingtonLibraryBoS02Door02Pos endif endif set runMoveTimer to 0 endif endif end
25ArlingtonLibraryBoSScript07scn ArlingtonLibraryBoSScript07 ;if player gets through door first and BoS should walk through, force BoS through door ;otherwise they go into low level processing and may take a while. ;if BoS are dead, spawn in new BoS float moveTimer short runMoveTimer begin onTriggerEnter player disable if ArlingtonLibraryBoS01REF.getDead == 1 if ArlingtonLibraryBoS03REF.getDisabled == 1 || ArlingtonLibraryBoS03REF.getDead == 1 ArlingtonLibraryBoS05REF.enable endif endif if ArlingtonLibraryBoS02REF.getDead == 1 if ArlingtonLibraryBoS04REF.getDisabled == 1 || ArlingtonLibraryBoS04REF.getDead == 1 ArlingtonLibraryBoS06REF.enable endif endif if ArlingtonLibraryBoS01REF.getAV variable01 == 9 || ArlingtonLibraryBoS02REF.getAV variable01 == 9 || ArlingtonLibraryBoS03REF.getAV variable01 == 9 || ArlingtonLibraryBoS04REF.getAV variable01 == 9 ;BoS should be heading to door now set moveTimer to 1.5 set runMoveTimer to 1 endif end begin gameMode if runMoveTimer == 1 if moveTimer > 0 set moveTimer to moveTimer - getSecondsPassed else if ArlingtonLibraryBoS01REF.getDead == 0 if ArlingtonLibraryBoS01REF.GetInCell ArlingtonLibrary03 == 0 ArlingtonLibraryBoS01REF.moveTo ArlingtonLibraryBoS01Door03Pos endif elseif ArlingtonLibraryBoS03REF.getDead == 0 if ArlingtonLibraryBoS03REF.GetInCell ArlingtonLibrary03 == 0 ArlingtonLibraryBoS03REF.moveTo ArlingtonLibraryBoS01Door03Pos endif endif if ArlingtonLibraryBoS02REF.getDead == 0 if ArlingtonLibraryBoS02REF.GetInCell ArlingtonLibrary03 == 0 ArlingtonLibraryBoS02REF.moveTo ArlingtonLibraryBoS02Door03Pos endif elseif ArlingtonLibraryBoS04REF.getDead == 0 if ArlingtonLibraryBoS04REF.GetInCell ArlingtonLibrary03 == 0 ArlingtonLibraryBoS04REF.moveTo ArlingtonLibraryBoS02Door03Pos endif endif set runMoveTimer to 0 endif endif end
26ArlingtonLibraryBoSScript08scn ArlingtonLibraryBoSScript08 short doOnce begin onTriggerEnter if doOnce == 0 set doOnce to 1 ArlingtonLibraryRaider14REF.setav variable01 1 ArlingtonLibraryRaider14REF.evp endif end
27ArlingtonLibraryRaiderDeathScriptscn ArlingtonLibraryRaiderDeathScript ;This script is used by raiders in arlington library to update the packages on the BoS ref BoSRef; begin onDeath ; set BoSRef to a live BoS, fixes cases where not all raiders may have been killed, ; new BoS spawned in with higher variable01 value but ArlingtonLibraryBoS01REF ; may still be set to a lower variable01 stage. if ArlingtonLibraryBoS01REF.getDead == 0 && ArlingtonLibraryBoS01Ref.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS01REF elseif ArlingtonLibraryBoS02REF.getDead == 0 && ArlingtonLibraryBoS02REF.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS02REF elseif ArlingtonLibraryBoS03REF.getDead == 0 && ArlingtonLibraryBoS03REF.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS03REF elseif ArlingtonLibraryBoS04REF.getDead == 0 && ArlingtonLibraryBoS04REF.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS04REF elseif ArlingtonLibraryBoS05REF.getDead == 0 && ArlingtonLibraryBoS05REF.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS05REF elseif ArlingtonLibraryBoS06REF.getDead == 0 && ArlingtonLibraryBoS06REF.getDisabled == 0 set BoSRef to ArlingtonLibraryBoS06REF endif if BoSRef.getav variable01 < 3 if ArlingtonLibraryRaider03REF.getDead == 1 && ArlingtonLibraryRaider03bREF.getDead == 1 && ArlingtonLibraryRaider04REF.getDead == 1 ;go to start of ArlingtonLibrary02 ArlingtonLibraryBoS01REF.setav variable01 3 ArlingtonLibraryBoS02REF.setav variable01 3 endif elseif BoSRef.getav variable01 < 4 if ArlingtonLibraryRaider05REF.getDead == 1 && ArlingtonLibraryRaider06REF.getDead == 1 ;continue further into ArlingtonLibrary02 ArlingtonLibraryBoS01REF.setav variable01 4 ArlingtonLibraryBoS02REF.setav variable01 4 ArlingtonLibraryBoS03REF.setav variable01 4 ArlingtonLibraryBoS04REF.setav variable01 4 endif elseif BoSRef.getav variable01 < 6 if ArlingtonLibraryRaider07REF.getDead == 1 && ArlingtonLibraryRaider08REF.getDead == 1 ;start walk to exit while looking at hole in ceiling ArlingtonLibraryBoS01REF.setav variable01 6 ArlingtonLibraryBoS02REF.setav variable01 6 ArlingtonLibraryBoS03REF.setav variable01 6 ArlingtonLibraryBoS04REF.setav variable01 6 endif elseif BoSRef.getav variable01 < 12 if ArlingtonLibraryRaider09REF.getDead == 1 && ArlingtonLibraryRaider10REF.getDead == 1 && ArlingtonLibraryRaider11REF.getDead == 1 ;start walk towards stairs ArlingtonLibraryBoS01REF.setav variable01 12 ArlingtonLibraryBoS02REF.setav variable01 12 ArlingtonLibraryBoS03REF.setav variable01 12 ArlingtonLibraryBoS04REF.setav variable01 12 ArlingtonLibraryBoS05REF.setav variable01 12 ArlingtonLibraryBoS06REF.setav variable01 12 endif elseif BoSRef.getav variable01 < 15 if ArlingtonLibraryRaider12REF.getDead == 1 && ArlingtonLibraryRaider13REF.getDead == 1 ;tell BoS to rush in to fight turrets ArlingtonLibraryBoS01REF.setav variable01 15 ArlingtonLibraryBoS02REF.setav variable01 15 ArlingtonLibraryBoS03REF.setav variable01 15 ArlingtonLibraryBoS04REF.setav variable01 15 ArlingtonLibraryBoS05REF.setav variable01 15 ArlingtonLibraryBoS06REF.setav variable01 15 endif elseif BoSRef.getav variable01 < 16 if ArlingtonLibraryTurret01.getDead == 1 && ArlingtonLibraryTurret02.getDead == 1 ;tell BoS to start patrol back to Arlington Library entry way ArlingtonLibraryBoS01REF.setav variable01 16 ArlingtonLibraryBoS02REF.setav variable01 16 ArlingtonLibraryBoS03REF.setav variable01 16 ArlingtonLibraryBoS04REF.setav variable01 16 ArlingtonLibraryBoS05REF.setav variable01 16 ArlingtonLibraryBoS06REF.setav variable01 16 endif endif ArlingtonLibraryBoS01REF.evp ArlingtonLibraryBoS02REF.evp ArlingtonLibraryBoS03REF.evp ArlingtonLibraryBoS04REF.evp ArlingtonLibraryBoS05REF.evp ArlingtonLibraryBoS06REF.evp end
28ArlingtonLibraryTurretScriptscn ArlingtonLibraryTurretScript ref myLink short ONflag short doOnce begin gameMode ; initialize if doOnce == 0 set doOnce to 1 set myLink to getLinkedRef set ONflag to 1 ; this turret is ON by default endif if getAV brainCondition == 0 ; all these checks handle daisy-chain turret systems myLink.damageAV brainCondition 100 endif If getUnconscious == 1 && ONflag == 1 stopCombat myLink.stopCombat myLink.setUnconscious 1 set ONflag to 0 ;tell BoS to start patrol back to Arlington Library entry way if ArlingtonLibraryBoS01REF.getav variable01 < 16 ArlingtonLibraryBoS01REF.setav variable01 16 ArlingtonLibraryBoS02REF.setav variable01 16 ArlingtonLibraryBoS03REF.setav variable01 16 ArlingtonLibraryBoS04REF.setav variable01 16 ArlingtonLibraryBoS05REF.setav variable01 16 ArlingtonLibraryBoS06REF.setav variable01 16 ArlingtonLibraryBoS01REF.evp ArlingtonLibraryBoS02REF.evp ArlingtonLibraryBoS03REF.evp ArlingtonLibraryBoS04REF.evp ArlingtonLibraryBoS05REF.evp ArlingtonLibraryBoS06REF.evp endif endif if getUnconscious == 0 && ONflag == 0 myLink.setUnconscious 0 set ONflag to 1 endif end begin onDeath ;tell BoS to start patrol back to Arlington Library entry way if ArlingtonLibraryBoS01REF.getav variable01 < 16 ArlingtonLibraryBoS01REF.setav variable01 16 ArlingtonLibraryBoS02REF.setav variable01 16 ArlingtonLibraryBoS03REF.setav variable01 16 ArlingtonLibraryBoS04REF.setav variable01 16 ArlingtonLibraryBoS05REF.setav variable01 16 ArlingtonLibraryBoS06REF.setav variable01 16 ArlingtonLibraryBoS01REF.evp ArlingtonLibraryBoS02REF.evp ArlingtonLibraryBoS03REF.evp ArlingtonLibraryBoS04REF.evp ArlingtonLibraryBoS05REF.evp ArlingtonLibraryBoS06REF.evp endif end
29ArmoredVaultSuitMountedSCRIPTscn ArmoredVaultSuitMountedSCRIPT BEGIN OnActivate if IsActionRef player == 1 player.additem MS03VaultSuit101Armored 1 1 disable endif END
30AutomatScript01scn AutomatScript01 short opened begin onActivate if opened == 0 set opened to 1 activate setDestroyed 1 endif end
31AWMBrokenDoorScriptscn AWMBrokenDoorScript ; ;This script is for the broken door in Anchorage War Memorial. ;The player needs a skill of 95% repair to fix it, but if they are led to it through the freeform ;gameplay in the area they will receive a door part that will let them repair it with 35% repair skill. ;============================================== short passSkill ;skill needed to fix the door short isFixed Begin onActivate if (isFixed == 1) activate else if (IsActionRef player == 1) if player.getItemCount AWMFFDoorComponent > 0 ;if the player has the door component, the repair skill should be much less set passSkill to 35 if player.getav repair >= passSkill ;lower repair skill ShowMessage AWMDoorOpenedRepairLowMsg passSkill ;Text Assumes you have the missing part player.removeitem AWMFFDoorComponent 1 set isFixed to 1 ;Now the door is fixed. Don't make the player fix it every activation. activate else ShowMessage DoorOpenFailedRepairMsg passSkill endif else ;doesn't have the part set passSkill to 95 if player.getav repair >= passSkill ;higher repair skill ShowMessage AWMDoorOpenedRepairHighMsg passSkill ;Text Assumes you do not have the missing part set isFixed to 1 ;Now the door is fixed. Don't make the player fix it every activation. activate else if player.getav repair >= 35 ShowMessage DoorOpenFailedRepairHighMsg passSkill else ShowMessage DoorOpenFailedRepairMsg passSkill endif endif endif endif endif End
32AWMFridgeStashScriptscn AWMFridgeStashScript ; ;This script checks to see if the player has a very high perception or has the AWMNoteFFStashLocation note. ;If so, a message will display and more loot will be added to the fridge. ;=============================================================== short PerceptionNeeded ;skill needed to fix the door short doOnce short openAfterButton short button Begin onActivate if (doOnce == 1) activate else if (IsActionRef player == 1) set PerceptionNeeded to 5 if getHasNote AWMNoteFFStashLocation && player.getItemCount AWMStashKey == 0 ;if player has the note but no key ShowMessage AWMStashNoteFridgeMsg set openAfterButton to 1 elseif player.getav Perception >= PerceptionNeeded && player.getItemCount AWMStashKey == 0 ;or if player has high Perception ShowMessage AWMHighPerceptionPassFridgeMsg PerceptionNeeded set openAfterButton to 1 elseif player.getItemCount AWMStashKey > 0 && (getHasNote AWMNoteFFStashLocation || player.getav Perception >= PerceptionNeeded) ShowMessage AWMStashFridgeKeyMsg additem Caps90 2 additem Caps001 200 additem AWMNoteMirelurkRecipe 1 set openAfterButton to 1 set doOnce to 1 else activate endif endif endif End Begin GameMode if openAfterButton == 1 set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff set openAfterButton to 0 activate endif endif End
33BehemothAchievementSCRIPTscn BehemothAchievementSCRIPT ; put this into any behemoth script and increment BehemothsMax global by 1 if you add one short hitBig begin OnDeath set BehemothsKilled to BehemothsKilled + 1 if BehemothsKilled >= BehemothsMax AddAchievement 48 endif end
34BessieLynnScriptscn BessieLynnScript Begin GameMode if IsInCombat == 1 if GetCombatTarget == player RoyPhillipsRef.addToFaction MS12GhoulsHostileFaction 0 BessieLynnRef.addToFaction MS12GhoulsHostileFaction 0 MichaelMastersRef.addToFaction MS12GhoulsHostileFaction 0 endif endif End Begin OnDeath set MS12.countGhoulsDead to MS12.countGhoulsDead + 1 if MS12.countGhoulsDead >= 3 set MS12.allGhoulsDead to 1 setStage MS12 20 endif if GetStage MS12 >= 250 if MS12.GhoulsOk >= 5 ;spawn her vendor key on her corpse addItem BessieLynnVendorKey 1 endif endif End
35BH01QuestScriptscn BH01QuestScript short HaveAGL ;1=Player has found the Agility Bobblehead short HaveBART ;1=Player has found the Barter Bobblehead short HaveBGUN ;1=Player has found the Big Guns Bobblehead short HaveCHA ;1=Player has found the Charisma Bobblehead short HaveEND ;1=Player has found the Endurance Bobblehead short HaveERGW ;1=Player has found the Energy Weapons Bobblehead short HaveEXPL ;1=Player has found the Explosives Bobblehead short HaveINT ;1=Player has found the Intelligence Bobblehead short HaveLOCK ;1=Player has found the Lockpick Bobblehead short HaveLUK ;1=Player has found the Luck Bobblehead short HaveMEDI ;1=Player has found the Medicine Bobblehead short HaveMELE ;1=Player has found the Melee Weapons Bobblehead short HavePER ;1=Player has found the Perception Bobblehead short HaveREPR ;1=Player has found the Repair Bobblehead short HaveSCNC ;1=Player has found the Science Bobblehead short HaveSGUN ;1=Player has found the Small Guns Bobblehead short HaveSNEK ;1=Player has found the Sneak Bobblehead short HaveSPCH ;1=Player has found the Speech Bobblehead short HaveSTR ;1=Player has found the Strength Bobblehead short HaveUARM ;1=Player has found the Unarmed Bobblehead short Bobbles ;x=Total Number of Bobbleheads found short Carrying ;1= Has one or more Bobbles on self
36BigTownResidentSCRIPTscn BigTownResidentSCRIPT short dieRoll Begin GameMode ; simulate Big Town being wiped out by mutants if getStageDone MS01 251 == 1 && getDead == 0 ; dismember? set dieRoll to GetRandomPercent/10 + 1 kill RedREF dieRoll endif ;make him sneak when the player is "teaching" Big Town in MS01 if MS01.sneak == 1 if player.IsSneaking == 1 if GetForceSneak == 0 SetForceSneak 1 endif else if GetForceSneak == 1 SetForceSneak 0 endif endif elseif GetForceSneak == 1 SetForceSneak 0 endif End begin OnDeath set DialogueBigTown.DeadCount to DialogueBigTown.DeadCount + 1 if DialogueBigTown.DeadCount >= BigTownMaxDead setstage MS01 180 endif end
37BigtownSentryScriptscn BigtownSentryScript short greetPlayer ;1 = finished dialog package with player (used as condition) short doWarn ;1 = shout warning short talking ;used as condition for SAY function float warningTimer ;set in results of MS01Sentry topic short startCombatCheck ; set to 1 so StartCombat block only runs once Begin GameMode ; simulate Big Town being wiped out by mutants if getStageDone MS01 251 == 1 if GetDead == 0 kill endif endif if doWarn == 1 && getDead == 0 if talking == 0 if warningTimer > 0 set warningTimer to warningTimer - getSecondsPassed else set talking to 1 say MS01Sentry endif endif endif end Begin OnStartCombat if MS01.mutants == 1 && doWarn == 0 && startCombatCheck == 0 ; he never said his warning set startCombatCheck to 1 stopcombat evp endif End Begin SayToDone set talking to 0 End begin OnDeath set DialogueBigTown.DeadCount to DialogueBigTown.DeadCount + 1 if DialogueBigTown.DeadCount >= BigTownMaxDead ; quest failed, everybody in Big Town is dead setstage MS01 180 endif end
38BillyCreelSCRIPTscn BillyCreelSCRIPT BEGIN OnDeath set DialogueMegaton.BillyCreelDead to 1 END
39BloodyMessScriptEffectSCRIPTscn BloodyMessScriptEffectSCRIPT Begin ScriptEffectStart kill MQ11LdPrimeREF 0 ; tell victim to be gibbed by Prime kill MQ11LdPrimeREF 1 kill MQ11LdPrimeREF 2 ; tell victim to be gibbed by Prime kill MQ11LdPrimeREF 3 ; tell victim to be gibbed by Prime kill MQ11LdPrimeREF 4 ; tell victim to be gibbed by Prime kill MQ11LdPrimeREF 5 ; tell victim to be gibbed by Prime kill MQ11LdPrimeREF 6 ; tell victim to be gibbed by Prime End
40BobbleheadAGLScriptscn BobbleheadAGLScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Agility < 10 ) Player.ModAv Agility 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadAGLBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveAGL to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
41BobbleheadBARTScriptscn BobbleheadBARTScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadBARTBuffMessage ;This is the corner buff message Player.ModAv Barter 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveBART to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
42BobbleheadBGUNScriptscn BobbleheadBGUNScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadBGUNBuffMessage ;This is the corner buff message Player.ModAv Bigguns 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveBGUN to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
43BobbleheadCHAScriptscn BobbleheadCHAScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Charisma < 10 ) Player.ModAv Charisma 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadCHABuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveCHA to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
44BobbleheadDisplayMegatonScriptscn BobbleheadDisplayMegatonScript begin OnActivate if IsActionRef player == 1 if BH01.Carrying == 1 Set BH01.Carrying to 0 if ( BH01.HaveAGL == 1 ) MEGAGLRef.Enable Player.RemoveItem BobbleheadAGL 1 endif if ( BH01.HaveBART == 1 ) MEGBarterRef.Enable Player.RemoveItem BobbleheadBART 1 endif if ( BH01.HaveBGUN == 1 ) MEGBigGunsRef.Enable Player.RemoveItem BobbleheadBGUN 1 endif if ( BH01.HaveCHA == 1 ) MEGCHARef.Enable Player.RemoveItem BobbleheadCHA 1 endif if ( BH01.HaveEND == 1 ) MEGENDRef.Enable Player.RemoveItem BobbleheadEND 1 endif if ( BH01.HaveERGW == 1 ) MEGEnergyWeaponsRef.Enable Player.RemoveItem BobbleheadERGW 1 endif if ( BH01.HaveEXPL == 1 ) MEGExplosivesRef.Enable Player.RemoveItem BobbleheadEXPL 1 endif if ( BH01.HaveINT == 1 ) MEGINTRef.Enable Player.RemoveItem BobbleheadINT 1 endif if ( BH01.HaveLOCK == 1 ) MEGLockpickRef.Enable Player.RemoveItem BobbleheadLOCK 1 endif if ( BH01.HaveLUK == 1 ) MEGLUKRef.Enable Player.RemoveItem BobbleheadLUK 1 endif if ( BH01.HaveMEDI == 1 ) MEGMedicineRef.Enable Player.RemoveItem BobbleheadMEDI 1 endif if ( BH01.HaveMELE == 1 ) MEGMeleeRef.Enable Player.RemoveItem BobbleheadMELE 1 endif if ( BH01.HavePER == 1 ) MEGPERRef.Enable Player.RemoveItem BobbleheadPER 1 endif if ( BH01.HaveREPR == 1 ) MEGRepairRef.Enable Player.RemoveItem BobbleheadREPR 1 endif if ( BH01.HaveSCNC == 1 ) MEGScienceRef.Enable Player.RemoveItem BobbleheadSCNC 1 endif if ( BH01.HaveSGUN == 1 ) MEGSmallGunsRef.Enable Player.RemoveItem BobbleheadSGUN 1 endif if ( BH01.HaveSNEK == 1 ) MEGSneakRef.Enable Player.RemoveItem BobbleheadSNEK 1 endif if ( BH01.HaveSPCH == 1 ) MEGSpeechRef.Enable Player.RemoveItem BobbleheadSPCH 1 endif if ( BH01.HaveSTR == 1 ) MEGSTRRef.Enable Player.RemoveItem BobbleheadSTR 1 endif if ( BH01.HaveUARM == 1 ) MEGUnarmedRef.Enable Player.RemoveItem BobbleheadUARM 1 endif else ShowMessage BobbleheadNone endif endif end
45BobbleheadDisplayTenpennyScriptscn BobbleheadDisplayTenpennyScript begin OnActivate if IsActionRef player == 1 if BH01.Carrying == 1 Set BH01.Carrying to 0 if ( BH01.HaveAGL == 1 ) TENAGLRef.Enable Player.RemoveItem BobbleheadAGL 1 endif if ( BH01.HaveBART == 1 ) TENBarterRef.Enable Player.RemoveItem BobbleheadBART 1 endif if ( BH01.HaveBGUN == 1 ) TENBigGunsRef.Enable Player.RemoveItem BobbleheadBGUN 1 endif if ( BH01.HaveCHA == 1 ) TENCHARef.Enable Player.RemoveItem BobbleheadCHA 1 endif if ( BH01.HaveEND == 1 ) TENENDRef.Enable Player.RemoveItem BobbleheadEND 1 endif if ( BH01.HaveERGW == 1 ) TENEnergyWeaponsRef.Enable Player.RemoveItem BobbleheadERGW 1 endif if ( BH01.HaveEXPL == 1 ) TENExplosivesRef.Enable Player.RemoveItem BobbleheadEXPL 1 endif if ( BH01.HaveINT == 1 ) TENINTRef.Enable Player.RemoveItem BobbleheadINT 1 endif if ( BH01.HaveLOCK == 1 ) TENLockpickRef.Enable Player.RemoveItem BobbleheadLOCK 1 endif if ( BH01.HaveLUK == 1 ) TENLUKRef.Enable Player.RemoveItem BobbleheadLUK 1 endif if ( BH01.HaveMEDI == 1 ) TENMedicineRef.Enable Player.RemoveItem BobbleheadMEDI 1 endif if ( BH01.HaveMELE == 1 ) TENMeleeRef.Enable Player.RemoveItem BobbleheadMELE 1 endif if ( BH01.HavePER == 1 ) TENPERRef.Enable Player.RemoveItem BobbleheadPER 1 endif if ( BH01.HaveREPR == 1 ) TENRepairRef.Enable Player.RemoveItem BobbleheadREPR 1 endif if ( BH01.HaveSCNC == 1 ) TENScienceRef.Enable Player.RemoveItem BobbleheadSCNC 1 endif if ( BH01.HaveSGUN == 1 ) TENSmallGunsRef.Enable Player.RemoveItem BobbleheadSGUN 1 endif if ( BH01.HaveSNEK == 1 ) TENSneakRef.Enable Player.RemoveItem BobbleheadSNEK 1 endif if ( BH01.HaveSPCH == 1 ) TENSpeechRef.Enable Player.RemoveItem BobbleheadSPCH 1 endif if ( BH01.HaveSTR == 1 ) TENSTRRef.Enable Player.RemoveItem BobbleheadSTR 1 endif if ( BH01.HaveUARM == 1 ) TENUnarmedRef.Enable Player.RemoveItem BobbleheadUARM 1 endif else ShowMessage BobbleheadNone endif endif end
46BobbleheadENDScriptscn BobbleheadENDScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Endurance < 10 ) Player.ModAv Endurance 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadENDBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveEND to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
47BobbleheadERGWScriptscn BobbleheadERGWScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadERGWBuffMessage ;This is the corner buff message Player.ModAv EnergyWeapons 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveERGW to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
48BobbleheadEXPLScriptscn BobbleheadEXPLScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadEXPLBuffMessage ;This is the corner buff message Player.ModAv Explosives 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveEXPL to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
49BobbleheadINTScriptscn BobbleheadINTScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Intelligence < 10 ) Player.ModAv Intelligence 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadINTBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveINT to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
50BobbleheadLOCKScriptscn BobbleheadLOCKScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadLOCKBuffMessage ;This is the corner buff message Player.ModAv Lockpick 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveLOCK to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
51BobbleheadLUKScriptscn BobbleheadLUKScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Luck < 10 ) Player.ModAv Luck 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadLUKBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveLUK to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
52BobbleheadMEDIScriptscn BobbleheadMEDIScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff ; Medical bobblehead has 3 different versions (CG03, CG04, MS16) -- player can get only one, others are disabled when you pick one up short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadMEDIBuffMessage ;This is the corner buff message Player.ModAv Medicine 10 ;Mod the perm. pool so it sticks Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveMEDI to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif ; add item to inventory and disable all versions of this one player.additem BobbleheadMEDI 1 1 BobbleheadMedi01REF.disable BobbleheadMedi02REF.disable BobbleheadMedi03REF.disable Set DoOnce to 1 endif endif end
53BobbleheadMELEScriptscn BobbleheadMELEScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadMELEBuffMessage ;This is the corner buff message Player.ModAv MeleeWeapons 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveMELE to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
54BobbleheadPERScriptscn BobbleheadPERScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Perception < 10 ) Player.ModAv Perception 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadPERBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HavePER to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
55BobbleheadPlacedScriptAGLscn BobbleheadPlacedScriptAGL ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadAGLMessage endif end
56BobbleheadPlacedScriptBARTscn BobbleheadPlacedScriptBART ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadBARTMessage endif end
57BobbleheadPlacedScriptBGUNscn BobbleheadPlacedScriptBGUN ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadBGUNMessage endif end
58BobbleheadPlacedScriptCHAscn BobbleheadPlacedScriptCHA ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadCHAMessage endif end
59BobbleheadPlacedScriptENDscn BobbleheadPlacedScriptEND ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadENDMessage endif end
60BobbleheadPlacedScriptERGWscn BobbleheadPlacedScriptERGW ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadERGWMessage endif end
61BobbleheadPlacedScriptEXPLscn BobbleheadPlacedScriptEXPL ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadEXPLMessage endif end
62BobbleheadPlacedScriptINTscn BobbleheadPlacedScriptINT ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadINTMessage endif end
63BobbleheadPlacedScriptLOCKscn BobbleheadPlacedScriptLOCK ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadLOCKMessage endif end
64BobbleheadPlacedScriptLUKscn BobbleheadPlacedScriptLUK ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadLUKMessage endif end
65BobbleheadPlacedScriptMEDIscn BobbleheadPlacedScriptMEDI ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadMEDIMessage endif end
66BobbleheadPlacedScriptMELEscn BobbleheadPlacedScriptMELE ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadMELEMessage endif end
67BobbleheadPlacedScriptPERscn BobbleheadPlacedScriptPER ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadPERMessage endif end
68BobbleheadPlacedScriptREPRscn BobbleheadPlacedScriptREPR ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadREPRMessage endif end
69BobbleheadPlacedScriptSCNCscn BobbleheadPlacedScriptSCNC ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadSCNCMessage endif end
70BobbleheadPlacedScriptSGUNscn BobbleheadPlacedScriptSGUN ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadSGUNMessage endif end
71BobbleheadPlacedScriptSNEKscn BobbleheadPlacedScriptSNEK ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadSNEKMessage endif end
72BobbleheadPlacedScriptSPCHscn BobbleheadPlacedScriptSPCH ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadSPCHMessage endif end
73BobbleheadPlacedScriptSTRscn BobbleheadPlacedScriptSTR ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadSTRMessage endif end
74BobbleheadPlacedScriptUARMscn BobbleheadPlacedScriptUARM ;This is for activation of the Bobbleheads if they are activated in the Display Case ;It simply repeats the motivational message for the Player begin OnActivate if IsActionRef player == 1 ShowMessage BobbleheadUARMMessage endif end
75BobbleheadREPRScriptscn BobbleheadREPRScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadREPRBuffMessage ;This is the corner buff message Player.ModAv Repair 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveREPR to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
76BobbleheadSCNCScriptscn BobbleheadSCNCScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadSCNCBuffMessage ;This is the corner buff message Player.ModAv Science 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveSCNC to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
77BobbleheadSGUNScriptscn BobbleheadSGUNScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadSGUNBuffMessage ;This is the corner buff message Player.ModAv SmallGuns 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveSGUN to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
78BobbleheadSNEKScriptscn BobbleheadSNEKScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadSNEKBuffMessage ;This is the corner buff message Player.ModAv Sneak 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveSNEK to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
79BobbleheadSPCHScriptscn BobbleheadSPCHScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadSPCHBuffMessage ;This is the corner buff message Player.ModAv Speech 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveSPCH to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
80BobbleheadSTRScriptscn BobbleheadSTRScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Strength < 10 ) Player.ModAv Strength 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadSTRBuffMessage ;This is the corner buff message Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveSTR to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
81BobbleheadUARMScriptscn BobbleheadUARMScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce begin OnActivate if IsActionRef player == 1 if ( DoOnce == 0 ) ShowMessage BobbleheadUARMBuffMessage ;This is the corner buff message Player.ModAv Unarmed 10 ;Mod the perm. pool so it sticks Activate ;Allow item pickup Set BH01.Bobbles to ( BH01.Bobbles + 1 ) ;Add 1 to master count Set BH01.Carrying to 1 ;Tell the script the Player has one or more Bobbleheads (for display case) ModPCMiscStat "Bobbleheads Found", 1 Set BH01.HaveUARM to 1 ;Set the variable for Display Case if ( BH01.Bobbles == 10 ) Addachievement 49 elseif ( BH01.Bobbles == 20 ) Addachievement 50 endif Set DoOnce to 1 endif endif end
82BoSBackStoryScriptSCN BoSBackStoryScript short MutantKnown
83BumbleSCRIPTscn BumbleSCRIPT begin ONHIT if (getIsCurrentPackage BumbleFollowPlayerToSlaver == 1) sayto player LLBumbleStopFollowing set DialogueLilLamplight.LamplightSlaver to -1 endif end begin ONSTARTCOMBAT if (getIsCurrentPackage BumbleFollowPlayerToSlaver == 1) sayto player LLBumbleStopFollowing set DialogueLilLamplight.LamplightSlaver to -1 endif end
84ButchScriptscn ButchScript ;Follower Variables short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.ButchHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.ButchHired to 0 ShowMessage FollowerMessageDeadButch endif END
85ButtonGwinnettScriptscn ButtonGwinnettScript short DoOnce begin OnDeath if ( MS15.Shutdown < 1 ) if ( DoOnce == 0 ) set DoOnce to 1 SetQuestObject MS15Ink 0 RewardKarma -100 Set MS15.Solved to 1 if ( GetObjectiveDisplayed MS15 50 == 1 ) SetObjectiveDisplayed MS15 50 0 endif endif endif end begin gamemode if ( MS15.ButtonDestruct == 1 ) PlaceatMe MediumExplosion MS15ButtonRef.Kill MS15ButtonRef 1 MS15ButtonRef.Kill MS15ButtonRef 3 MS15ButtonRef.Kill MS15ButtonRef 5 MS15ButtonRef.Kill MS15ButtonRef 7 MS15ButtonRef.Kill MS15ButtonRef 9 set MS15.ButtonDestruct to 2 endif if ( MS15.Shutdown == 1 ) SetUnconscious 1 Set MS15.Shutdown to 2 endif end
86CapitolBuildingFatmanShoot01SCRIPTscn CapitolBuildingFatmanShoot01SCRIPT ref target short doOnce1 short doOnce2 short stage float timer begin onTriggerEnter player if doOnce1 == 0 set target to getLinkedRef target.disable TalongCompanyFatmanREF.enable 0 CapitolBuildingTalonWave02REF.enable 0 set stage to 1 CapitolBehemothREF.setav Variable05 1 CapitolBehemothREF.evp set doOnce1 to 1 ;Trigger is only set off one time endif end ;begin onTriggerLeave player ; if doOnce2 == 0 ; TalongCompanyFatmanREF.removefromfaction CapitalBuildingTalonFaction ; TalongCompanyFatmanREF.addtofaction TalonCompany 0 ; set doOnce2 to 1 ;Trigger is only set off one time ; endif ;end Begin gameMode if (stage == 1) ; TalongCompanyFatmanREF.startcombat CapitolBehemothREF ; TalongCompanyFatmanREF.useWeapon weapFatman TalonCompanyFatmanShootFromXMarkerRef CapitolBehemothREF 1 0 1 1 set timer to 5 set stage to 2 endif if (stage == 2) if (timer <= 0) TalongCompanyFatmanREF.removefromfaction CapitalBuildingTalonFaction TalongCompanyFatmanREF.addtofaction TalonCompany 0 TalongCompanyFatmanREF.setav Variable01 1 TalongCompanyFatmanREF.evp TalongCompanyFatmanREF.startcombat CapitolBehemothREF set stage to 3 else set timer to (timer - GetSecondsPassed) endif endif End
87CapitolBuildingFatmanShoot02SCRIPTscn CapitolBuildingFatmanShoot02SCRIPT ref target short doOnce1 short doOnce2 short stage float timer begin onTriggerEnter player if doOnce1 == 0 set target to getLinkedRef target.disable TalongCompanyFatmanREF.enable 0 CapitolBuildingTalonWave01REF.enable 0 set stage to 1 CapitolBehemothREF.setav Variable05 1 CapitolBehemothREF.evp set doOnce1 to 1 ;Trigger is only set off one time endif end ;begin onTriggerLeave player ; if doOnce2 == 0 ; TalongCompanyFatmanREF.removefromfaction CapitalBuildingTalonFaction ; TalongCompanyFatmanREF.addtofaction TalonCompany 0 ; set doOnce2 to 1 ;Trigger is only set off one time ; endif ;end Begin gameMode if (stage == 1) TalongCompanyFatmanREF.MoveTo CapitolBuildingFatmanMoveToREF ; TalongCompanyFatmanREF.useWeapon weapFatman TalonCompanyFatmanShootFromXMarkerRef TalonCompanyFatmanShootTargetXMarkerRef 1 0 1 set timer to 5 set stage to 2 endif if (stage == 2) if (timer <= 0) TalongCompanyFatmanREF.removefromfaction CapitalBuildingTalonFaction TalongCompanyFatmanREF.addtofaction TalonCompany 0 TalongCompanyFatmanREF.setav Variable01 1 TalongCompanyFatmanREF.evp TalongCompanyFatmanREF.startcombat CapitolBehemothREF set stage to 3 else set timer to (timer - GetSecondsPassed) endif endif End
88CaravanCrowBrahminSCRIPTscn CaravanCrowBrahminSCRIPT BEGIN OnActivate if IsActionRef player == 1 && player.getItemCount CaravanCrowKey >= 1 LocalInventoryCrowREF.activate player elseif IsActionRef player == 1 activate player endif END
89CaravanCrowSCRIPTscn CaravanCrowSCRIPT BEGIN OnDeath VendorChestCrowREF.removeAllItems LocalInventoryCrowREF VendorChestCrowREF.disable END
90CaravanDocHoffBrahminSCRIPTscn CaravanDocHoffBrahminSCRIPT BEGIN OnActivate if IsActionRef player == 1 && player.getItemCount CaravanDocHoffKey >= 1 LocalInventoryHoffREF.activate player elseif IsActionRef player == 1 activate player endif END
91CaravanDocHoffSCRIPTscn CaravanDocHoffSCRIPT BEGIN OnDeath VendorChestHoffREF.removeAllItems LocalInventoryHoffREF VendorChestHoffREF.disable END
92CaravanHarithBrahminSCRIPTscn CaravanHarithBrahminSCRIPT BEGIN OnActivate if IsActionRef player == 1 && player.getItemCount CaravanHarithKey >= 1 LocalInventoryHarithREF.activate player elseif IsActionRef player == 1 activate player endif END
93CaravanHarithSCRIPTscn CaravanHarithSCRIPT BEGIN OnDeath VendorChestHarithREF.removeAllItems LocalInventoryHarithREF VendorChestHarithREF.disable END
94CaravanWolfgangBrahminSCRIPTscn CaravanWolfgangBrahminSCRIPT BEGIN OnActivate if IsActionRef player == 1 && player.getItemCount CaravanWolfgangKey >= 1 LocalInventoryWolfgangREF.activate player elseif IsActionRef player == 1 activate player endif END
95CaravanWolfgangSCRIPTscn CaravanWolfgangSCRIPT BEGIN OnDeath VendorChestWolfgangREF.removeAllItems LocalInventoryWolfgangREF VendorChestWolfgangREF.disable END
96CarolSCRIPTSCN CarolSCRIPT short Rent short RentDay short RentMonth short Cleanup short RentRoomSetup BEGIN GameMode if ( Rent == 1 ) if ( RentRoomSetup == 0 ) set RentDay to GameDay set RentMonth to GameMonth set RentRoomSetup to 1 UnderworldCarolsPlaceRentDoorREF.unlock UnderworldCarolsPlaceRentBED.SetOwnership else if ( GameDay != RentDay ) set Cleanup to 1 elseif ( GameMonth != RentMonth ) set Cleanup to 1 endif endif if ( Cleanup == 1 ) if ( Player.GetinCell UnderworldCarolsPlace == 0 ) set Cleanup to 2 endif endif if ( Cleanup == 2 ) set Rent to 0 set RentRoomSetup to 0 set RentDay to 0 set RentMonth to 0 set Cleanup to 0 UnderworldCarolsPlaceRentDoorREF.SetOpenState 0 UnderworldCarolsPlaceRentDoorREF.lock 30 UnderworldCarolsPlaceRentBED.SetOwnership Carol endif endif END BEGIN OnDeath set DialogueUnderworld.CarolDead to 1 END
97CG00DadSCRIPTscn CG00DadSCRIPT short doTalk ; set to 1 to start Dad talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin OnActivate ; can't talk to Dad in CG00 end begin gamemode ; set face after player uses race menu if getStage CG00 >= 60 && GetStageDone CG00 65 == 0 setstage CG00 65 endif if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG00DadSpeech 1 set talking to 1 endif endif end begin SayToDone CG00DadSpeech set talking to 0 end
98CG00MomSCRIPTscn CG00MomSCRIPT short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin OnActivate ; can't talk to anybody in CG00 end begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG00MomSpeech 1 set talking to 1 endif endif end begin SayToDone CG00MomSpeech set talking to 0 end
99CG00SCRIPTscn CG00SCRIPT ; timer float timer short runTimer ; set to 1 to start running timer ; choose sex short chooseSex short button begin menumode ; if starting at CG00 if getStage CG00 < 5 setstage CG00 0 endif end begin gamemode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; anywhere we need a timer if getstage CG00 == 5 setstage CG00 6 elseif getstage CG00 == 6 setstage CG00 8 elseif getstage CG00 == 8 setstage CG00 9 elseif getstage CG00 == 9 setstage CG00 10 elseif getStage CG00 == 18 ; choose sex -- for now just use message box setstage CG00 20 set chooseSex to 1 ShowMessage CG00ChooseSexMessage elseif getStage CG00 == 20 setstage CG00 22 elseif getStage CG00 == 38 setstage CG00 40 elseif getStage CG00 == 40 setstage CG00 42 elseif getStage CG00 == 61 setstage CG00 62 elseif getstage CG00 == 90 setstage CG00 100 endif endif endif if chooseSex == 1 set button to GetButtonPressed if button > -1 set chooseSex to 2 if button == 0 player.sexChange male 1 elseif button == 1 player.sexChange female 1 endif endif endif end begin menumode if getstage CG00 == 60 setstage CG00 61 endif end
100CG01DadSCRIPTscn CG01DadSCRIPT short doTalk ; set to 1 to start Dad talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin OnActivate ; can't talk to Dad in CG01 end begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG01DadSpeech 1 set talking to 1 endif endif end begin SayToDone CG01DadSpeech set talking to 0 look player if getStage CG01 == 75 setstage CG01 80 endif end ; move to package ;begin OnPackageDone CG01DadCloseGate ; setstage CG01 16 ;end begin OnPackageDone CG01DadCloseDoor setstage CG01 18 end begin OnPackageDone CG01DadReturn setstage CG01 72 end
101CG01PlaypenGateSCRIPTscn CG01PlaypenGateSCRIPT begin OnActivate if IsActionRef player == 1 && getStage CG01 == 20 setstage CG01 30 endif Activate end
102CG01SCRIPTscn CG01SCRIPT ; timer float timer short runTimer ; set to 1 to start running timer ; grabbing tutorial short grabbed short released begin menumode ; TEMP: if starting at CG01 if getStage CG01 < 5 setstage CG01 0 endif end begin gamemode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; anywhere we need a timer if getstageDone CG01 50 == 1 && getstageDone CG01 70 == 0 setstage CG01 70 endif if getstage CG01 == 90 setstage CG01 100 endif endif endif end
103CG01SpecialBookSCRIPTscn CG01SpecialBookSCRIPT begin OnActivate if getStage CG01 >= 30 && getStageDone CG01 50 == 0 setstage CG01 50 ssbmp 40 endif end
104CG01TeddyBear01SCRIPTscn CG01TeddyBear01SCRIPT short runTimer float timer short grabbed short released begin gamemode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if grabbed == 1 set grabbed to 2 setStage CGTutorial 22 elseif released == 1 set released to 2 setStage CGTutorial 24 endif endif endif end begin OnActivate ; no picking up end begin OnGrab if grabbed == 0 set grabbed to 1 set runTimer to 1 set timer to 1 endif end begin OnRelease if released == 0 set released to 1 set runTimer to 1 set timer to 1 endif end
105CG02AndySCRIPTscn CG02AndySCRIPT begin OnActivate ; can't activate while cutting cake if GetIsCurrentPackage CG02AndyCutCake == 0 Activate endif end
106CG02ButchSCRIPTscn CG02ButchSCRIPT short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking short mockPaul ; set to 1 to conditionalize sequence where Butch and Wally make fun of Paul ; variables to conditionalize Butch's "tunnel snake chat" dialogue packages short TSWally ; set to 1 after Butch talks to Wally once short TSPaul ; set to 1 after Butch talks to Paul once begin OnStartCombat player ; trigger Officer Gomez to respond CG02Vault101Security04REF.evp end begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG02ButchSpeech 1 set talking to 1 endif endif end begin SayToDone CG02ButchSpeech set talking to 0 end
107CG02DadSCRIPTscn CG02DadSCRIPT short doTalk ; set to 1 to start Dad talking short talking ; set to 1 when talking float timer ; used to time delayed talking short reaction ; used for "reaction" dialogue begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else ;if IsTalking == 0 if reaction == 1 SayTo player CG02DadReactionTopic 1 set talking to 1 elseif getStage CG02 >= 80 ; only say it if player is away from Dad if getDistance player > 250 SayTo player CG02DadSpeech 1 set talking to 1 else set timer to 3 endif else SayTo player CG02DadSpeech 1 set talking to 1 endif endif endif end begin SayToDone CG02DadSpeech set talking to 0 end begin SayToDone CG02DadReactionTopic set talking to 0 end ; because Look is cleared after every SayTo (grr): begin SayToDone CG02IntroSurprise look player end begin SayToDone CG02IntroYell look player end begin OnPackageDone CG02DadWaitForPicture set CG02.DadReady to 1 set doTalk to 1 set timer to 5 end
108CG02DinerDoorSCRIPTscn CG02DinerDoorSCRIPT ; door no one can use begin OnActivate if GetIsReference CG02AtriumDoor == 1 && isActionRef CG02OverseerREF == 1 && getStage CG02 < 10 Activate elseif GetIsReference CG02DinerExitREF == 0 || ( GetIsReference CG02DinerExitREF == 1 && getStage CG02 < 40 ) if IsActionRef player == 1 ShowMessage CG02DinerDoorMsg endif else Activate endif end
109CG02DinerIntercomSCRIPTscn CG02DinerIntercomSCRIPT ; don't allow activation of intercom until Jonas is talking through it begin OnActivate if IsActionRef player == 1 if GetStage CG02 >= 35 && GetStage CG02 < 38 Activate else ShowMessage GenericIntercomNoResponseMsg endif else Activate endif end
110CG02JonasSCRIPTscn CG02JonasSCRIPT begin OnPackageDone CG02JonasWaitForPicture set CG02.JonasReady to 1 end begin SayToDone CG02JonasSpeech if getStage CG02 == 90 setstage CG02 95 endif end
111CG02OverseerSCRIPTscn CG02OverseerSCRIPT short doTalk ; set to 1 to start Dad talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG02OverseerSpeech 1 set talking to 1 endif endif end begin SayToDone CG02OverseerSpeech set talking to 0 end
112CG02PartyguestSCRIPTscn CG02PartyguestSCRIPT ; reset failsafe timer any time you talk to anyone at the party ;begin OnActivate ; if IsActionRef player == 1 && GetStage CG02 < 34 ; set CG02.timer to CG02FailsafeTimer ; endif ; Activate ;end
113CG02PaulHannonSCRIPTscn CG02PaulHannonSCRIPT short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG02PaulHannonSpeech 1 set talking to 1 endif endif end begin SayToDone CG02PaulHannonSpeech set talking to 0 end
114CG02PlayerPictureTriggerSCRIPTscn CG02PlayerPictureTriggerSCRIPT int angle begin OnTrigger player if CG02.DadReady == 1 && CG02.JonasReady == 1 set angle to player.getHeadingAngle CG02JonasREF if angle >= -45 && angle <= 45 set CG02.PlayerReady to 1 else set CG02.PlayerReady to 0 endif endif end begin OnTriggerLeave player set CG02.PlayerReady to 0 end
115CG02RadroachSCRIPTscn CG02RadroachSCRIPT ; update CG02 when player kills me begin OnDeath setstage CG02 70 end
116CG02SCRIPTscn CG02SCRIPT ; opening scene short intro ; tracks what part of the intro "cutscene" we're on ; party variables short ButchHasSweetroll ; set to 1 if player gave Butch the sweetroll short ButchMad ; set to 1 if player refused to give Butch the sweetroll short ButchFight ; set to 1 (and higher) if Butch attacks player short BlameButch ; set to 1 if you tattle to Officer Gomez on Butch short sweetrollGrabbed ; set to 1 if player is currently grabbing sweetroll ; Old Lady Palmer variable short PalmerResponse ; 0 = neutral, 1 = nice, 2 = mean short WallyPipboy ; 1 = Wally made fun of Pip-boy short targetCount ; how many targets hit ; taking picture variables short JonasReady short DadReady short PlayerReady ; timer float timer short runTimer ; set to 1 to start running timer ; intercom beep short intercomBeep ; set to 1 to start intercom beeping begin gamemode if getStage CG02 == 80 if JonasReady == 1 && DadReady == 1 && PlayerReady == 1 setstage CG02 90 endif endif if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; anywhere we need a timer if intro > 0 if intro == 1 ; yell surprise CG02AmataREF.SayTo player CG02IntroSurprise CG02BeatriceREF.SayTo player CG02IntroSurprise CG02DadREF.SayTo player CG02IntroSurprise CG02OldLadyPalmerREF.SayTo player CG02IntroSurprise ; CG02Vault101Security04REF.SayTo player CG02IntroSurprise CG02StanleyREF.SayTo player CG02IntroSurprise CG02PaulHannonREF.SayTo player CG02IntroSurprise ; play party sound playSound QSTPartyNoisemaker2D playSound QSTPartyClapping2D ; Dad's line advances to the next stage set runTimer to 0 elseif intro == 2 ; turned lights on too fast CG02Vault101Security04REF.SayTo CG02StanleyREF CG02OfficerGomezSpeech 1 ; advance to next stage handled by dialogue results set runTimer to 0 elseif intro == 3 CG02Vault101Security04REF.Look player ; yell happy birthday CG02AmataREF.SayTo player CG02IntroYell CG02BeatriceREF.SayTo player CG02IntroYell CG02DadREF.SayTo player CG02IntroYell ; CG02OldLadyPalmerREF.SayTo player CG02IntroYell CG02Vault101Security04REF.SayTo player CG02IntroYell CG02StanleyREF.SayTo player CG02IntroYell CG02PaulHannonREF.SayTo player CG02IntroYell ; play clapping sound playSound QSTPartyClapping2D ; Dad's line advances to the next stage set runTimer to 0 elseif intro == 4 ; growing up so fast CG02OldLadyPalmerREF.SayTo player CG02OldLadyPalmerSpeech 1 ; advance to next stage handled by dialogue results set runTimer to 0 elseif intro == 5 ; done with intro setstage CG02 6 set intro to 0 set runTimer to 0 endif endif if intercomBeep == 1 CG02DinerIntercomREF.playSound3D OBJIntercomHail set timer to 3 endif ; move the quest along if player spends too much time without talking to anyone if getstage CG02 >= 10 && getstage CG02 < 34 setstage CG02 35 endif ; after player gets all presents, don't end the scene until Butch talks to player if getStage CG02 == 34 && getStageDone CG02 30 == 1 setstage CG02 35 endif if getstage CG02 == 95 setstage CG02 98 elseif getStage CG02 == 98 setstage CG02 100 endif endif endif end
117CG02SweetrollSCRIPTscn CG02SweetrollSCRIPT begin OnGrab set CG02.sweetrollGrabbed to 1 end begin OnRelease set CG02.sweetrollGrabbed to 0 end begin OnAdd player set CG02.sweetrollGrabbed to 0 end
118CG02TargetSCRIPTscn CG02TargetSCRIPT ; update CG02 when player hits begin OnHitWith if isAnimPlaying == 0 playgroup forward 1 endif if GetQuestRunning CG02 == 1 set CG02.targetCount to CG02.targetCount + 1 setstage CGTutorial 62 ; turn off fire weapon tutorial if CG02.targetCount >= 3 setstage CG02 55 endif endif end
119CG02WallyMackSCRIPTscn CG02WallyMackSCRIPT short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG02WallyMackSpeech 1 set talking to 1 endif endif end begin SayToDone CG02WallyMackSpeech set talking to 0 end
120CG03AmataScriptscn CG03AmataScript short AmataInfo float timer begin gamemode if CG03.HitSnake == 2 && GetStageDone CG03 30 == 0 ; Amata shouts during the fight if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG03AmataFight set timer to 5 endif endif end begin SayToDone CG03AmataTalk set CG03.bullyTalking to 0 end
121CG03ButchScriptscn CG03ButchScript ; Amata teasing scene short amatainfo ; general talking short doTalk ; set to 1 to start Butch talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG03ButchSpeech 1 set talking to 1 endif endif End begin SayToDone CG03ButchSpeech set talking to 0 end Begin OnHit Player ;this sets a variable in CG03Script that tracks the NPC's health if ( CG03.HitSnake == 0 ) set CG03.HitSnake to 1 endif End begin SayToDone CG03BullyTalk set CG03.bullyTalking to 0 end begin SayToDone CG03ButchLeavingTalk set CG03.ButchLeaveTalkTimer to 0 end begin SayToDone CG03WallyLeavingTalk set CG03.WallyLeaveTalkTimer to 0 end
122CG03ClassroomTriggerSCRIPTscn CG03ClassroomTriggerSCRIPT begin OnTriggerEnter player if getStageDone CG03 40 == 0 CG03MrBrotchREF.evp ; make sure in the right package endif ; if fight is going on, end it if CG03.HitSnake == 2 && GetStageDone CG03 30 == 0 set CG03.PlayerQuit to 1 endif end begin OnTrigger player if getStageDone CG03 40 == 1 && getStageDone CG03 50 == 0 ; player is sitting, or has decided to skip the test if player.GetSitting == 3 || getStageDone CG03 45 == 1 setstage CG03 50 endif elseif getStage CG03 == 55 ; start test when either player is sitting, OR player has decided to skip the GOAT if ( getStageDone CG03 50 == 1 && player.GetSitting == 3 ) || getStageDone CG03 45 == 1 ; make sure everyone is sitting if CG03AmataRef.GetSitting == 3 && CG03ButchRef.GetSitting == 3 && CG03PaulHannonRef.GetSitting == 3 && CG03WallyMackREF.GetSitting == 3 && CG03FreddieGomezREF.GetSitting==3 if CG03ChristineKendallREF.GetSitting == 3 && CG03SusieMackREF.GetSitting == 3 setstage CG03 60 endif endif endif elseif getStage CG03 == 90 ; player reenters room after triggering CG04 transition disableplayercontrols endif end
123CG03GoatSlidesSCRIPTscn CG03GoatSlidesSCRIPT short stage begin OnActivate if IsActionRef CG03MrBrotchREF == 1 set stage to stage + 1 if stage == 1 playgroup Forward 1 elseif stage == 2 playgroup Backward 1 elseif stage == 3 playgroup FastForward 1 elseif stage == 4 playgroup FastBackward 1 elseif stage == 5 playgroup Left 1 elseif stage == 6 playgroup Right 1 elseif stage == 7 playgroup FastLeft 1 elseif stage == 8 playgroup FastRight 1 elseif stage == 9 playgroup TurnLeft 1 elseif stage == 10 playgroup Equip 1 endif endif end
124CG03MrBrotchSCRIPTSCN CG03MrBrotchSCRIPT short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG03BrotchSpeech 1 set talking to 1 endif endif End begin SayToDone CG03BrotchSpeech set talking to 0 end
125CG03PaulScriptscn CG03PaulScript short AmataInfo short timeToWalk ; set by Wally's package when he gets in position short backOff ; set by Amata's run package Begin OnHit Player ;this sets a variable in CG03Script that tracks the NPC's health if ( CG03.HitSnake == 0 ) set CG03.HitSnake to 1 endif End begin SayToDone CG03BullyTalk set CG03.bullyTalking to 0 end begin SayToDone CG03ButchLeavingTalk set CG03.ButchLeaveTalkTimer to 0 end begin SayToDone CG03WallyLeavingTalk set CG03.WallyLeaveTalkTimer to 0 end
126CG03Scriptscn CG03Script short dadconvoVAR ; used to track dad dialogue short dadjonasVAR ; used to track Dad/Jonas conversation short stanleyConv ; set to -1 to trigger Stanley conv short JonasConvoVar ;used to track Jonas/Stanley conversation ;******************************************************************************************************************* ; AMATA SCENE: short bullyConv ; used to track Amata/Butch conversation short bullyTalking ; set to 1 while someone's talking short bullyStage ; set to 1 to start looping scene short speakerRAN ;used to pick a random speaker for hallway taunting short LastSpeaker ;used to check against previous speaker so same person doesn't talk twice in a row short targetRAN ;used to pick a target if Amata responds ;speaker variables are ; 1-Butch ; 2-Wally ; 3-Paul ; 4-Amata short target ;set by targetRAN and used to select target ;target variables are ; 1-Butch ; 2-Wally ; 3-Paul short handler ;used to turn on and off conversation float insulttimer ;used to time lines of dialogue float breaktimer ;used to put a break between lines of dialogue short AmataLeaveVAR ;used to make Amata head to class ;the following variables are used if the player elects to fight the Tunnel Snakes short HitButch short HitSnake float ButchHealth float WallyHealth float PaulHealth float PlayerHealth short ButchQuit short PlayerQuit short ButchGreet ;used to track scripted conversations short WallyLeaveConvoVar short ButchLeaveConvoVar float ButchLeaveTalkTimer float WallyLeaveTalkTimer ;set to 1 in dialogue to clear them away from Amata short ButchHome short WallyHome short PaulHome ;set to 1 to initiate conversation if player convinces Wally to initiate exit short WallyTurned ;set to 1 to initiate conversation if player convinces Butch to initiate exit short ButchTurned ; set to 1 if player sides with Snakes short AmataFatVAR ;used to say different audios if player sides with snakes ; outcomes of Amata Scene: short AmataOutcome ; 1 = player convinces Wally to exit ; 2 = player convinces Butch to exit ; 3 = player sides with Snakes ; 4 = player ignores problem ;******************************************************************************************************************* ;******************************************************************************************************************* ; GOAT short question ; what question to show -- set by Mr. Brotch's dialogue short waiting ; set to 1 when messageBox triggered short button ; used for GetButtonPressed ; variables for skill tracking short goatBarter ; skill 1 short goatBigGuns ; skill 2 short goatEnergyWeapons ; skill 3 short goatExplosives ; skill 4 short goatLockpick ; skill 5 short goatMedicine ; skill 6 short goatMeleeWeapons ; skill 7 short goatRepair ; skill 8 short goatScience ; skill 9 short goatSmallGuns ; skill 10 short goatSneak ; skill 11 short goatSpeech ; skill 12 short goatUnarmed ; skill 13 ; variables for calculating tag skills ; skill = number of skill that is currently first: see above ; value = current number of choices for that skill short skillFirst short valueFirst short skillSecond short valueSecond short skillThird short valueThird ;******************************************************************************************************************* ; post GOAT: short turnInCount ; increment by 1 each time a student turns in their test short turnInTestConv ; used to conditionalize test turn in conversations ; ending timer short runTimer float timer Begin GameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; special cases if getStage CG03 == 90 && Player.GetSitting == 0 setstage CG03 100 endif endif endif ;******************************************************************************************************************* ; GOAT if question > 0 ; if player isn't taking GOAT, Mr. Brotch can just ask the next question (maybe after a pause) if getStageDone CG03 45 == 1 ; Mr. Brotch continues set CG03MrBrotchREF.doTalk to 1 set CG03MrBrotchREF.timer to 2 ; are we done? if question >= 15 ; done with test set question to -1 else ; next question set question to 0 endif else if waiting == 0 set waiting to 1 ; trigger messageBox if question == 1 ShowMessage CG03GoatQuestion01 elseif question == 2 ShowMessage CG03GoatQuestion02 elseif question == 3 ShowMessage CG03GoatQuestion03 elseif question == 4 ShowMessage CG03GoatQuestion04 elseif question == 5 ShowMessage CG03GoatQuestion05 elseif question == 6 ShowMessage CG03GoatQuestion06 elseif question == 7 ShowMessage CG03GoatQuestion07 elseif question == 8 ShowMessage CG03GoatQuestion08 elseif question == 9 ShowMessage CG03GoatQuestion09 elseif question == 10 ShowMessage CG03GoatQuestion10 ; etc. endif else ; wait for button set button to GetButtonPressed if button > -1 ; clear waiting var set waiting to 0 ; process question results if question == 1 if button == 0 ; science setstage CG03Test 9 elseif button == 1 ; speech setstage CG03Test 12 elseif button == 2 ; melee setstage CG03Test 7 elseif button == 3 ; sneak setstage CG03Test 11 endif elseif question == 2 if button == 0 ; melee setstage CG03Test 7 elseif button == 1 ; speech setstage CG03Test 12 elseif button == 2 ; medicine setstage CG03Test 6 elseif button == 3 ; science setstage CG03Test 9 endif elseif question == 3 if button == 0 ; speech setstage CG03Test 12 elseif button == 1 ; unarmed setstage CG03Test 13 elseif button == 2 ; sneak setstage CG03Test 11 elseif button == 3 endif elseif question == 4 if button == 0 ; explosives setstage CG03Test 4 elseif button == 1 ; big guns setstage CG03Test 2 elseif button == 2 ; melee setstage CG03Test 7 elseif button == 3 ; unarmed setstage CG03Test 13 endif elseif question == 5 if button == 0 ; small guns setstage CG03Test 10 elseif button == 1 ; barter setstage CG03Test 1 elseif button == 2 ; big guns setstage CG03Test 2 elseif button == 3 ; explosives setstage CG03Test 4 endif elseif question == 6 if button == 0 ; lockpick setstage CG03Test 5 elseif button == 1 ; barter setstage CG03Test 1 ; explosives setstage CG03Test 4 elseif button == 2 ; energy weapons setstage CG03Test 3 elseif button == 3 ; repair setstage CG03Test 8 endif elseif question == 7 if button == 0 ; small guns setstage CG03Test 10 elseif button == 1 ; medicine setstage CG03Test 6 elseif button == 2 ; barter setstage CG03Test 1 elseif button == 3 ; energy weapons setstage CG03Test 3 endif elseif question == 8 if button == 0 ; barter setstage CG03Test 1 elseif button == 1 ; small guns setstage CG03Test 10 elseif button == 2 ; sneak setstage CG03Test 11 elseif button == 3 ; medicine setstage CG03Test 6 endif elseif question == 9 if button == 0 ; repair setstage CG03Test 8 elseif button == 1 ; explosives setstage CG03Test 4 elseif button == 2 ; sneak setstage CG03Test 11 elseif button == 3 ; lockpick setstage CG03Test 5 endif elseif question == 10 ; do nothing endif ; Mr. Brotch continues set CG03MrBrotchREF.doTalk to 1 ; are we done? if question >= 10 ; done with test set question to -1 else ; next question set question to 0 endif endif endif ; /if question > 0 endif ; /if getStageDone 45 == 1 endif ; END GOAT ;******************************************************************************************************************* ;******** Tunnel Snakes scene ************* if bullyStage > 0 && bullyTalking == 0 if bullyStage == 1 ; Wally or Paul set speakerRAN to GetRandomPercent if speakerRAN > 50 CG03WallyMackREF.sayTo CG03AmataRef CG03BullyTalk set LastSpeaker to 2 else CG03PaulHannonREF.sayTo CG03AmataRef CG03BullyTalk set LastSpeaker to 3 endif set bullyTalking to 1 set bullyStage to 2 elseif bullyStage == 2 ; Amata or Wally or Paul set speakerRAN to GetRandomPercent set targetRAN to GetRandomPercent if speakerRAN > 50 ; Amata if targetRAN>= 66 CG03AmataRef.sayTo CG03ButchREF CG03AmataTalk elseif targetRAN >= 33 CG03AmataRef.sayTo CG03PaulHannonREF CG03AmataTalk else CG03AmataRef.sayTo CG03WallyMackREF CG03AmataTalk endif else if lastSpeaker == 3 CG03WallyMackREF.sayTo CG03AmataRef CG03BullyTalk set lastSpeaker to 2 else CG03PaulHannonREF.sayTo CG03AmataRef CG03BullyTalk set lastSpeaker to 3 endif endif set bullyTalking to 1 set bullyStage to 3 ; random timer before Butch speaks set breakTimer to GetRandomPercent/100 + .2 elseif bullyStage == 3 set breakTimer to breakTimer - GetSecondsPassed if breakTimer < 0 set bullyStage to 4 endif elseif bullyStage == 4 ; Butch to Amata CG03ButchREF.sayTo CG03AmataRef CG03BullyTalk set bullyTalking to 1 set bullyStage to 1 endif endif ;this section starts the exit conversation if the player has convinced Butch to quit teasing Amata if ( ButchTurned == 1 ) ; set ButchLeaveTalkTimer to ( ButchLeaveTalkTimer - GetSecondsPassed ) if ( ButchLeaveTalkTimer <= 0 ) if ( ButchLeaveConvoVAR == 0 ) CG03AmataREF.evp ; stop her dialogue package if still in progress CG03ButchREF.SayTo CG03WallyMackREF CG03ButchLeavingTalk set ButchLeaveTalkTimer to 1 set CG03.ButchLeaveConvoVar to 1 elseif ( ButchLeaveConvoVAR == 1 ) CG03PaulHannonREF.SayTo CG03ButchREF CG03ButchLeavingTalk set ButchLeaveTalkTimer to 1 set CG03.ButchLeaveConvoVar to 2 elseif ( ButchLeaveConvoVAR == 2 ) CG03WallyMackREF.SayTo CG03ButchREF CG03ButchLeavingTalk set ButchLeaveTalkTimer to 1 set CG03.ButchLeaveConvoVar to 3 set ButchTurned to -1 SetStage CG03 30 endif endif endif ;this section starts the exit conversation if the player has convinced Wally Mack to quit teasing Amata if ( WallyTurned == 1 ) if ( WallyLeaveTalkTimer <= 0 ) if ( WallyLeaveConvoVAR == 0 ) CG03AmataREF.evp ; stop her dialogue package if still in progress CG03WallyMackREF.SayTo CG03ButchREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 1 elseif ( WallyLeaveConvoVAR == 1 ) CG03ButchREF.SayTo CG03WallyMackREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 2 elseif ( WallyLeaveConvoVAR == 2 ) CG03WallyMackREF.SayTo CG03PaulHannonREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 3 elseif ( WallyLeaveConvoVAR == 3 ) CG03PaulHannonREF.SayTo CG03ButchREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 4 elseif ( WallyLeaveConvoVAR == 4 ) CG03ButchREF.SayTo CG03WallyMackREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 5 elseif ( WallyLeaveConvoVAR == 5 ) CG03ButchREF.SayTo CG03AmataREF CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 6 elseif ( WallyLeaveConvoVAR == 6 ) CG03ButchREF.SayTo Player CG03WallyLeavingTalk set WallyLeaveTalkTimer to 1 set WallyLeaveConvoVAR to 7 set WallyTurned to -1 SetStage CG03 30 endif endif endif ;this section handles if the player decides to engage in combat with the Tunnel Snakes ;this is set by the individual scripts on the NPCs if ( HitSnake == 1 ) && getStageDone CG03 30 == 0 ; remove from player faction so they'll fight player CG03ButchREF.removeFromFaction playerFaction CG03WallyMackREF.removeFromFaction playerFaction CG03PaulHannonREF.removeFromFaction playerFaction ; start combat (also done in Begin block of new package -- seems to be more reliable that way) CG03ButchREF.StartCombat player CG03WallyMackREF.StartCombat player CG03PaulHannonREF.StartCombat player CG03MrBrotchREF.evp ; make sure in the right package set bullyStage to 0 set ButchHealth to ( CG03ButchREF.GetAV Health ) set WallyHealth to ( CG03WallyMackREF.GetAV Health ) set PaulHealth to ( CG03PaulHannonREF.GetAV Health) set PlayerHealth to ( player.GetAV Health) set HitSnake to 2 CG03AmataREF.evp endif if ( HitSnake == 2 ) if ( CG03ButchREF.GetAV Health ) <= ( ButchHealth * .5 ) && ( ButchQuit == 0 ) set ButchQuit to 1 elseif ( CG03WallyMackREF.GetAV Health ) <= ( WallyHealth * .5 ) && ( ButchQuit == 0 ) set ButchQuit to 1 elseif ( CG03PaulHannonREF.GetAV Health ) <= ( PaulHealth * .5 ) && ( ButchQuit == 0 ) set ButchQuit to 1 elseif ( player.GetAV Health ) <= ( PlayerHealth * .5 ) && ( PlayerQuit == 0 ) set PlayerQuit to 1 endif endif ; for now, if you force anybody out of the fight, they all back down if ( ButchQuit == 1 ) set HitSnake to 3 CG03AmataREF.evp CG03ButchREF.StopCombat CG03WallyMackREF.StopCombat CG03PaulHannonREF.StopCombat set ButchGreet to 1 set ButchTurned to 1 set AmataOutcome to 2 ; Butch convinced to leave set ButchQuit to 2 setstage CG03 30 endif if ( PlayerQuit == 1 ) set HitSnake to 3 CG03AmataREF.evp CG03ButchREF.StopCombat Player CG03WallyMackREF.StopCombat Player CG03PaulHannonREF.StopCombat Player set ButchGreet to 1 set ButchTurned to 1 set AmataOutcome to 2 ; Butch convinced to leave set PlayerQuit to 2 setstage CG03 30 endif End
127CG03WallyScriptscn CG03WallyScript short AmataInfo Begin OnHit Player ;this sets a variable in CG03Script that tracks the NPC's health if ( CG03.HitSnake == 0 ) set CG03.HitSnake to 1 endif End begin SayToDone CG03BullyTalk set CG03.bullyTalking to 0 end begin SayToDone CG03ButchLeavingTalk set CG03.ButchLeaveTalkTimer to 0 end begin SayToDone CG03WallyLeavingTalk set CG03.WallyLeaveTalkTimer to 0 end
128CG04AllenMackScriptscn CG04AllenMackScript ; general talking short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo player CG04SecurityBarks 1 set talking to 1 set timer to 1.5 + GetRandomPercent/50 CreateDetectionEvent player 50 endif endif End begin SayToDone CG04SecurityBarks set talking to 0 end
129CG04AmataSCRIPTscn CG04AmataSCRIPT begin SayToDone CG04Interrogation set CG04.talking to 0 end
130CG04ButchDoorTEMPScriptscn CG04ButchDoorTEMPScript ; NOTE -- won't need this script once roaches can't open doors ref actionRef begin OnActivate set actionRef to GetActionRef if actionRef.GetIsID CG04ButchRadroach == 0 Activate endif end
131CG04ButchRadroachSCRIPTscn CG04ButchRadroachSCRIPT begin OnLoad if CG04EllenDeloriaRef.getDead == 0 startCombat CG04EllenDeloriaRef endif setav perception 10 end begin OnDeath ; when all radroaches are dead, player gets bonus karma is Butch's mom is still alive ; if getStageDone CG04 20 == 1 if getDeadCount CG04ButchRadroach >= 3 ; clear Butch/guard conv variable (in case guard needs to talk to Butch afterwards) set CG04.ButchGuardStage to 0 ; if mom isn't dead, set "good karma" stage if CG04EllenDeloriaRef.getDead == 0 setstage CG04 30 endif endif ; endif end
132CG04ButchScriptscn CG04ButchScript ; general talking short doTalk ; set to 1 to start Butch talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin gamemode if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG04ButchSpeech 1 set talking to 1 endif endif End begin SayToDone CG04ButchSpeech set talking to 0 end
133CG04DoorScriptscn CG04DoorScript short dieRoll begin OnLoad set dieRoll to GetRandomPercent ; pick who to say the line end begin OnActivate if IsActionRef player == 1 if dieRoll >= 75 Say CG04DoorYell 0 CG04VoiceNPC01 elseif dieRoll >= 50 Say CG04DoorYell 0 CG04VoiceNPC02 elseif dieRoll >= 25 Say CG04DoorYell 0 CG04VoiceNPC03 else Say CG04DoorYell 0 CG04VoiceNPC04 endif endif Activate end
134CG04EllenDeLoriaSCRIPTscn CG04EllenDeLoriaSCRIPT begin OnDeath ; player has to have talked to Butch to lose karma for her death if getStageDone CG04 20 == 1 setstage CG04 31 endif ; no matter what, make radroaches go after player now setEnemy CG04ButchRadroachFaction playerFaction end ; while she's unconscious, she won't play hit sounds (I don't think) begin OnHit if getunconscious == 1 && getDead == 0 if getrandompercent <= 50 say Hit endif endif end begin OnActivate if IsActionRef player == 1 && GetStageDone CG04 30 == 0 && GetDead == 0 SayTo player Hit else Activate endif end
135CG04GuardStopBoxSCRIPTscn CG04GuardStopBoxSCRIPT ; prevent guards from following you out of the vault ref myTarget begin OnTriggerEnter set myTarget to GetActionRef if myTarget.getInFaction Vault101Faction == 1 myTarget.setav aggression 0 myTarget.stopcombat myTarget.addScriptPackage CG04GuardsFleeEntrance endif end
136CG04MaryHoldenScriptscn CG04MaryHoldenScript ; general talking short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking short runAway ; set to 1 if attacked by player begin OnHitWith weap10mmPistol kill end begin gamemode if GetDisabled == 0 if GetInCell Vault101d == 1 disable endif endif if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else SayTo CG04TomHoldenREF CG04AtriumConv1 1 set talking to 1 endif endif if runAway == 0 if IsCombatTarget player == 1 set runAway to 1 ; make me cowardly, and an enemy of the guards setav confidence 0 stopcombat addToFaction Vault101SecurityEnemyFaction 0 startcombat player endif endif End begin SayToDone CG04AtriumConv1 set talking to 0 end
137CG04OverseerOfficeDoorSCRIPTscn CG04OverseerOfficeDoorSCRIPT begin OnActivate if ( IsActionRef player == 1 ) if ( GetLocked == 0 || player.getItemCount Vault101OverseersKey > 0 ) Activate elseif ( GetIsLockBroken == 1 ) ShowMessage CG04LockedDoorLockBrokenMsg elseif ( player.getitemCount lockpick == 0 ) ShowMessage CG04LockedDoorNoLockpicksMsg ; if ( CG04AmataDresserREF.getItemCount lockpick == 0 ) ; CG04AmataDresserREF.additem lockpick 10 ; endif else Activate endif endif end
138CG04OverseerSCRIPTscn CG04OverseerSCRIPT float timer ; run timer to space out shouts for help short gotWeapon begin SayToDone CG04Interrogation set CG04.talking to 0 end begin OnStartCombat player if getstage CG04 >= 35 && getStage CG04 < 38 setstage CG04 38 endif end begin OnDeath setstage CG04 40 ; Amata reacts if getdistance CG04AmataRef < 1000 CG04AmataRef.Say CG04SecurityBarks endif set CG04.AmataAction to 3 end begin gamemode ; end interrogation if player is detected if getstage CG04 >= 35 && getStage CG04 < 38 if getdetected player > 0 setstage CG04 38 endif endif if CG04.OverseerCallForHelp == 1 && getDead == 0 if timer > 0 set timer to timer - GetSecondsPassed else ; only yell if there's no guard nearby if getDetected player == 1 && player.IsInCombat == 0 && GetIsCurrentPackage CG04OverseerCallForGuards == 1 Say CG04SecurityBarks CreateDetectionEvent player 50 ; so guards can realistically react to call for help endif set timer to ( 5 + GetRandomPercent/30 ) look player endif endif end
139CG04OverseersOfficeTriggerSCRIPTscn CG04OverseersOfficeTriggerSCRIPT ;Script used to advance CG04 when player enters overseer's office begin OnTriggerEnter player if getQuestRunning CG04 == 1 setstage CG04 60 endif end
140CG04RadroachAmbushASCRIPTscn CG04RadroachAmbushASCRIPT begin OnDeath if getDeadCount CG04RadroachAmbushA >= 3 setstage CG04 15 endif end
141CG04RadroachSpawnerSCRIPTscn CG04RadroachSpawnerSCRIPT ref myTarget ref mySelf ; reference variables hold specific markers for this trigger ; this is initialized OnLoad ref marker1 ref marker2 ref marker3 ref marker4 ; used for spawning new roaches ref mySpawn ; what cell do I live in? short myCell ; 0 = A, 1 = B, 2 = C, 3 = D, 4 = E short currCellCount short dieRoll short init begin gamemode if init == 0 set init to 1 ; initializing with linked markers set marker1 to GetLinkedRef set marker2 to marker1.GetLinkedRef set marker3 to marker2.GetLinkedRef set marker4 to marker3.GetLinkedRef if GetInCell Vault101a == 1 set myCell to 0 elseif GetInCell Vault101b == 1 set myCell to 1 elseif GetInCell Vault101d == 1 set myCell to 3 elseif GetInCell Vault101Reactor == 1 set myCell to 4 endif endif end ; tell CG04 whenever the player enters my zone begin OnTriggerEnter player set mySelf to GetSelf set CG04.playerLocation to mySelf end begin OnActivate ; activation message sent by guard scripts to spawn radroaches to attack them set myTarget to getActionRef ; how many roaches to spawn? (1-4) set dieRoll to GetRandomPercent * 4/100 + 1 ; don't spawn if already at cell count if myCell == 0 set currCellCount to CG04.countCellA elseif myCell == 1 set currCellCount to CG04.countCellB elseif myCell == 2 set currCellCount to CG04.countCellC elseif myCell == 3 set currCellCount to CG04.countCellD elseif myCell == 4 set currCellCount to CG04.countCellE endif ; how many can we spawn? if dieRoll + currCellCount >= CG04SpawnMax set dieRoll to CG04SpawnMax - currCellCount endif ; don't spawn past CG04SpawnMaxTotal to prevent too much XP if dieRoll + CG04SpawnCount >= CG04SpawnMaxTotal set dieRoll to CG04SpawnMaxTotal - CG04SpawnCount endif if dieRoll > 0 ; increment spawn count set CG04SpawnCount to CG04SpawnCount + dieRoll endif if dieRoll >= 1 && marker1 != 0 ; spawn a roach and tell it to attack the guard set mySpawn to marker1.placeatme CG04RadroachSpawn mySpawn.startcombat myTarget endif if dieRoll >= 2 && marker2 != 0 ; spawn a roach and tell it to attack the guard set mySpawn to marker2.placeatme CG04RadroachSpawn mySpawn.startcombat myTarget endif if dieRoll >= 3 && marker3 != 0 ; spawn a roach and tell it to attack the guard set mySpawn to marker3.placeatme CG04RadroachSpawn mySpawn.startcombat myTarget endif if dieRoll >= 4 && marker4 != 0 ; spawn a roach and tell it to attack the guard set mySpawn to marker4.placeatme CG04RadroachSpawn mySpawn.startcombat myTarget endif if dieRoll > 0 if myCell == 0 set CG04.countCellA to CG04.countCellA + dieRoll elseif myCell == 1 set CG04.countCellB to CG04.countCellB + dieRoll elseif myCell == 2 set CG04.countCellC to CG04.countCellC + dieRoll elseif myCell == 3 set CG04.countCellD to CG04.countCellD + dieRoll elseif myCell == 4 set CG04.countCellE to CG04.countCellE + dieRoll endif endif end
142CG04RadroachSpawnSCRIPTscn CG04RadroachSpawnSCRIPT short myCell ; 0 = A, 1 = B, 2 = C, 3 = D, 4 = E ; what cell do I live in? begin OnLoad if GetInCell Vault101a == 1 set myCell to 0 elseif GetInCell Vault101b == 1 set myCell to 1 ; elseif GetInCell Vault101c == 1 ; set myCell to 2 elseif GetInCell Vault101d == 1 set myCell to 3 elseif GetInCell Vault101Reactor == 1 set myCell to 4 endif end ; decrement count on death begin OnDeath if myCell == 0 set CG04.countCellA to CG04.countCellA - 1 elseif myCell == 1 set CG04.countCellB to CG04.countCellB - 1 elseif myCell == 2 set CG04.countCellC to CG04.countCellC - 1 elseif myCell == 3 set CG04.countCellD to CG04.countCellD - 1 elseif myCell == 4 set CG04.countCellE to CG04.countCellE - 1 endif end
143CG04RadroachStanleySCRIPTscn CG04RadroachStanleySCRIPT begin OnDeath CG04StanleyREF.evp end
144CG04RadroachStopBoxSCRIPTscn CG04RadroachStopBoxSCRIPT ref myTarget ref mySelf begin OnTriggerEnter set myTarget to GetActionRef ; this is intended to stop radroaches from proceeding any further (or keep the Holdens out of the security area) if myTarget.getInFaction RadRoachFaction == 1 || myTarget.getInFaction CG04HoldenFaction == 1 ; messagebox "Radroach entering stopbox" set mySelf to getSelf myTarget.stopcombat myTarget.setav aggression 0 ; which flee package to give? if GetIsReference CG04RadroachStopBoxCEast myTarget.addScriptPackage CG04RadroachFleeBEast elseif GetIsReference CG04RadroachStopBoxDDiner myTarget.addScriptPackage CG04RadroachFleeDDiner ; ******* Add new stop box references here ************* endif elseif myTarget == player if getInCell Vault101b setstage CG04 35 endif endif end
145CG04ReactorLightScriptscn CG04ReactorLightScript short state ; 0 = flashing, 1 = off begin OnLoad if state == 0 playgroup left 0 endif end begin onActivate if state == 0 set state to 1 playgroup backward 0 else set state to 0 playgroup forward 1 endif end begin gamemode if state == 0 if isAnimPlaying == 0 playgroup left 0 endif endif end
146CG04ReactorSwitchSCRIPTscn CG04ReactorSwitchSCRIPT ref linkedRef begin onActivate if getOpenState == 3 ; closed setstage CG04 110 Activate playgroup Left 0 ; temp until this is a switch ; turn on reactor lights set linkedRef to GetLinkedRef if linkedRef != 0 linkedRef.enable endif set CG04.powerCount to CG04.powerCount + 1 if CG04.powerCount >= 3 setstage CG04 120 endif endif end
147CG04Scriptscn CG04Script ; Amata conversation vars short AskVaultDoor ; set to 1 after player asks about vault door being sealed ; Butch situation vars short ButchFriend ; set to 1 if player helps Butch short ButchEnemy ; set to 1 if player doesn't help Butch ; Butch/Guard conv short ButchGuardStage ; used for scripted conv short GuardHelpButch ; set to 1 for guard to go kill radroaches short GuardToButch ; set to 1 to get guard to go talk to Butch ; Interrogation vars short talking ; set to 1 while someone's talking short InterrogationStage ; set to 1 to start looping scene short conv ; used to create scripted conversations short mackHitCount ; used to script Mack's death ; Overseer conversation vars short OverseerCallForHelp ; set to 1 to get Overseer to shout for help periodically ; Security guard conv short GuardConvStage ; used to conditionalize guard conversations ; Atrium conv short AtriumConvStage ; timer float timer short runTimer ; set to 1 to start running timer ; radroach spawning ref playerLocation ; set by trigger boxes to track player's current location short countCellA short countCellB short countCellC short countCellD short countCellE ; Gloria Mack scene short GloriaMack ; set to 1 when she's been placed ; Gomez has spoken to player short Gomez ; set to 1 when he's been told to forcegreet ; Gomez Hannon conversation short HannonConv ; set to 1 to trigger this conversation ; reactor power short powerCount ; count how many generators player has turned on ; Amata end-state variables short AmataAction ; how did the player act towards Amata during CG04? ; 0 = Player didn't help Amata (didn't do anything to stop the interrogation scene). ; 1 = Player helped, but didn't kill anybody. ; 2 = Player killed Officer Mack, but not the Overseer. ; 3 =Player killed Overseer (Officer Mack's fate is irrelevant). short AmataDialogue ; what tone did the player take in CG04 final dialogue? ; 0 = Player doesn't talk to her ; 1 = Player is nice/apologetic (i.e. if he killed Overseer, he says "I'm sorry I killed him, I didn't have a choice.") ; 2 = Player is neutral. ; 3 = Player is mean ("I'm glad I killed your father. He deserved to die. I hate you too."). short OverseerRadio ; used to run PA broadcast float RadioTimer ; use to time PA broadcasts short autosaveDone ; set to 1 when autosave is done begin gamemode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; anywhere we need a timer if getStage CG04 == 0 setstage CG04 2 elseif getStage CG04 == 2 setstage CG04 3 elseif getStage CG04 == 140 setstage CG04 141 elseif getStage CG04 == 141 setstage CG04 142 elseif getStage CG04 == 150 setstage CG04 200 endif endif endif ; autosave if getStage CG04 >= 4 && autosaveDone == 0 set autosaveDone to 1 autosave endif ; PA system broadcasts if RadioTimer > 0 set RadioTimer to RadioTimer - GetSecondsPassed else set RadioTimer to CG04BroadcastTimer ; play it again X seconds later set OverseerRadio to 0 ; reset condition variable RadioVault101REF.StartRadioConversation CG04EmergencyBroadcast endif ; move Amata to position when player enters Vault101b for the first time if getStageDone CG04 33 == 0 && getStage CG04 < 120 if player.getInCell Vault101b == 1 setstage CG04 33 endif endif ; Give message if the player gets locked out of the Overseer's Terminal if CG04OverseersTerminalREF.getLocked == 2 && getStageDone CGTutorial 110 == 0 setstage CGTutorial 110 endif ; advance quest when the player enters the reactor level ; if getStageDone CG04 80 == 0 ; if player.getInCell Vault101Reactor == 1 ; setstage CG04 80 ; endif ; endif ; advance quest when player gets near the reactor switch ; if getStageDone CG04 80 == 1 && getStageDone CG04 100 == 0 ; if player.getDistance CG04ReactorSwitchREF1 < 800 ; setstage CG04 100 ; endif ; endif ; trigger Amata force-greet when Vault door finishes opening if getStage CG04 == 142 if CG04VaultGearDoorREF.GetOpenState == 1 setstage CG04 144 endif endif ; start MQ01 when player leaves Vault101 if getStage CG04 >= 10 && getStage MQ01 < 10 if player.GetInCell Vault101 == 0 setstage CG04 200 endif endif ;******** Interrogation scene ************* if InterrogationStage > 0 && talking == 0 if InterrogationStage == 1 ; Overseer to Amata CG04OverseerREF.sayTo CG04AmataRef CG04Interrogation set talking to 1 set InterrogationStage to 2 elseif InterrogationStage == 2 ; Amata to Overseer CG04AmataRef.sayTo CG04OverseerREF CG04Interrogation set talking to 1 set InterrogationStage to 3 elseif InterrogationStage == 3 ; Overseer to Amata CG04OverseerREF.sayTo CG04AmataRef CG04Interrogation set talking to 1 set InterrogationStage to 4 elseif InterrogationStage == 4 ; Overseer to Mack CG04OverseerREF.sayTo CG04Vault101Security03REF CG04Interrogation set talking to 1 set InterrogationStage to 5 elseif InterrogationStage == 5 ; Mack to Amata CG04Vault101Security03REF.sayTo CG04AmataREF CG04Interrogation set talking to 1 set InterrogationStage to 6 elseif InterrogationStage == 6 ; Amata screaming CG04AmataRef.say CG04Interrogation set talking to 1 set InterrogationStage to 7 elseif InterrogationStage == 7 ; Overseer to Mack CG04OverseerREF.sayTo CG04Vault101Security03REF CG04Interrogation set talking to 1 set InterrogationStage to 1 endif endif end
148CG04SecretDoorSCRIPTscn CG04SecretDoorSCRIPT begin OnActivate if IsActionRef player == 1 ; messageBox "Pretend you can't activate this door. Pretend it's secret." else Activate endif end
149CG04StanleyAndySCRIPTscn CG04StanleyAndySCRIPT ; make them cowardly if attacked by player short attacked short talking short startTalking begin OnHit player if attacked == 0 set CG04AndyREF.attacked to 1 CG04AndyREF.setav confidence 0 CG04AndyREF.resetai CG04AndyREF.startcombat player set CG04StanleyREF.attacked to 1 CG04StanleyREF.setav confidence 0 CG04StanleyREF.resetai CG04StanleyREF.startcombat player endif end begin gamemode if GetIsID CG04Andy == 1 if IsInCombat == 0 if startTalking == 0 if GetDistance player < 500 set startTalking to 1 endif endif if startTalking == 1 && talking == 0 sayTo player Hello set talking to 1 endif endif endif end begin SayToDone HELLO set talking to 0 end
150CG04sunBlindSCRIPTscn CG04sunBlindSCRIPT ;==========================================================; ; load an image space mod when the player steps out of Vault 101 ; to simulate the impact of sunlight on vault dwelling eyes short doOnce ;==========================================================; begin onTriggerEnter player if doOnce == 0 ; turn on Radio Enclave RadioEnclaveREF.enable ; make sure Springvale eyebot picks up the station SpringvaleEyebotREF.enable ; play special music PlaySound MUSExitTheVault 1 ; eye adjustment imod (if daytime) if gameHour >= 5.4 && gameHour <= 19.2 imod DEMOEyeAdjustISFX endif set doOnce to 1 endif end ;==========================================================;
151CG04TomHoldenScriptscn CG04TomHoldenScript ; general talking short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking short hitCount ; used to kill me short runAway ; set to 1 if attacked by player begin OnHitWith weap10mmPistol set hitCount to hitCount + 1 if hitCount > 1 kill endif end begin gamemode if GetDisabled == 0 if GetInCell Vault101d == 1 disable endif endif if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG04AtriumConv1 1 set talking to 1 endif endif if runAway == 0 if IsCombatTarget player == 1 set runAway to 1 ; make me cowardly, and an enemy of the guards setav confidence 0 stopcombat addToFaction Vault101SecurityEnemyFaction 0 startcombat player endif endif End begin SayToDone CG04AtriumConv1 set talking to 0 end begin OnDeath CG04MaryHoldenREF.evp end
152CG04Vault101ControlPodScriptscn CG04Vault101ControlPodScript short mode ref doorRef begin onActivate ; if the player tries to activate if (IsActionRef player == 1 ) if (mode == 0) ; ;message "This control pod is locked." ; ShowMessage CG04Vault101ControlPodMsg ; elseif ( mode == 1 ) ; unlocked, player can now activate it setstage CG04 140 playgroup Left 0 set mode to 2 endif else if mode == 0 playgroup Forward 0 set mode to 1 endif endif end begin gameMode if (mode == 2) && (isAnimPlaying == 0) set mode to 3 set doorRef to GetLinkedRef doorRef.activate doorRef endif end
153CG04Vault101DoorTerminalSCRIPTscn CG04Vault101DoorTerminalSCRIPT begin OnActivate if getStageDone CG04 120 == 0 ; power is out if IsActionRef player == 1 ;message "The terminal is dark. It appears to have no power." ShowMessage CG04Vault101DoorTerminalMsg endif else Activate endif end
154CG04Vault101SecuritySCRIPTscn CG04Vault101SecuritySCRIPT ref spawnerRef ; temp ref for getting radroach spawner ref mySelf ; used for Richards in Atrium scene ; general talking short doTalk ; set to 1 to start talking short talking ; set to 1 when talking float timer ; used to time delayed talking begin OnHit CG04AmataREF if getIsID CG04Vault101Security03 == 1 set CG04.mackHitCount to CG04.mackHitCount + 1 if CG04.mackHitCount > 1 kill endif endif end begin OnDeath if getIsID CG04Vault101Security03 == 1 if getstage CG04 < 100 CG04OverseerREF.evp CG04AmataREF.evp ; make overseer start calling for help if he isn't already ; unless I'm Officer Mack killed by Amata if getIsID CG04Vault101Security03 == 0 || CG04.mackHitCount == 0 set CG04.OverseerCallForHelp to 1 endif endif ; set Amata action variable if CG04.AmataAction < 2 set CG04.AmataAction to 2 endif endif ; stop Gomez combat against player when I die if CG04Vault101Security04REF.IsCombatTarget player == 1 CG04Vault101Security04REF.stopcombat endif end begin OnStartCombat player ; special case for Officer Mack: if getIsID CG04Vault101Security03 == 1 if getstage CG04 >= 35 && getstage CG04 < 50 setstage CG04 38 endif endif ; normally, send radroach swarm to attack the guard: if CG04.playerLocation != 0 set spawnerRef to CG04.playerLocation set mySelf to GetSelf spawnerRef.activate mySelf 1 endif end begin gamemode ; special case for Officer Mack: if getIsID CG04Vault101Security03 == 1 if getstage CG04 >= 35 && getStage CG04 < 38 if getdetected player > 0 setstage CG04 38 endif endif endif ; special case for Officer Gomez if getIsID CG04Vault101Security04 == 1 && CG04.Gomez == 0 && GetTalkedToPC == 0 if getDetected player == 1 set CG04.Gomez to 1 evp endif endif ; special case for Richards if getIsID CG04Vault101Security05 == 1 if CG04.AtriumConvStage < 99 if GetDead == 1 || ( IsInCombat == 1 && GetCombatTarget == player ) set CG04.AtriumConvStage to 99 endif endif endif if doTalk == 1 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say CG04AtriumConv1 1 set talking to 1 endif endif end begin SayToDone CG04Interrogation set CG04.talking to 0 end begin SayToDone CG04AtriumConv1 set talking to 0 end
155CG04VaultDoorCloseTrigScriptscn CG04VaultDoorCloseTrigScript short doonce ref doorRef begin onTriggerEnter player if doonce == 0 set doorRef to GetLinkedRef if doorRef.IsAnimPlaying == 0 doorRef.activate doorRef player.scaonactor ; clear any combat set doonce to 1 endif endif end
156CGTutorialSCRIPTscn CGTutorialSCRIPT ; variables and script needed for chargen tutorial messages short runTimer float timer float crippleTimer ; separate timer for universal cripple message float healTimer ; timer for repeating heal message float VATSTimer ; timer for repeating VATS message float addictionTimer ; timer for universal addiction message begin gamemode ; no need to do any tutorials if the player is dead... if player.GetDead == 1 return endif if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; pip-boy tutorial -- repeat message until player succeeds if getStageDone CGTutorial 50 == 1 && getStageDone CGTutorial 52 == 0 && getStageDone CG02 35 == 0 showMessage CGTutorialPipboy set timer to 20 endif ; quest target tutorial if getStageDone CGTutorial 54 == 1 && getStageDone CGTutorial 56 == 0 setstage CGTutorial 56 endif ; fire weapon tutorial -- repeat message until player succeeds if getStageDone CGTutorial 60 == 1 && getStageDone CGTutorial 62 == 0 && CG02.targetCount == 0 showMessage CGTutorialFireWeapon showMessage CGTutorialFireWeapon2 if IsXBox == 1 showMessage CGTutorialAccessHelpXBox elseif IsPS3 == 1 showMessage CGTutorialAccessHelpXBox elseif IsWin32 == 1 showMessage CGTutorialAccessHelpPC endif set timer to 20 endif ; VATS tutorial -- repeat message until player succeeds if getStageDone CGTutorial 70 == 1 && getStageDone CGTutorial 72 == 0 && getStage CG02 < 70 showMessage CGTutorialVATS set timer to 20 endif ; sneak tutorial -- repeat message until player succeeds if getStageDone CGTutorial 90 == 1 && getStageDone CGTutorial 92 == 0 && getStage CG04 < 100 showMessage CGTutorialSneak set timer to 20 endif endif endif ; special cases if getStageDone CGTutorial 90 == 1 && getStageDone CGTutorial 92 == 0 && getStage CG04 < 100 if player.IsSneaking == 1 setStage CGTutorial 92 endif endif ; VATS in CG04 if getStage CG04 > 0 && getStageDone CGTutorial 72 == 0 ; repeat when the player is in combat if player.IsInCombat == 1 if VATSTimer > 0 set VATSTimer to VATSTimer - GetSecondsPassed else ; reset timer set VATSTimer to CGVATSTimer ShowMessage CGTutorialVATS endif elseif VATSTimer != 0 ; if not in combat, reset timer set VATSTimer to 0 endif endif ; first time you get hurt, play message immediately if getStageDone CGTutorial 200 == 0 && getStage CG04 > 0 ; healing message if player.getHealthPercentage < .5 setstage CGTutorial 200 endif else if healTimer > 0 set healTimer to healTimer - GetSecondsPassed else ; reset timer set healTimer to CGHealTimer ; continue to play this while in CG if GetStage CG04 < 200 if player.getHealthPercentage < .5 ShowMessage CGTutorialHeal endif endif endif endif ; first time you get crippled, play message immediately if getStageDone CGTutorial 210 == 0 if player.getav PerceptionCondition <= 0 || player.getav EnduranceCondition <= 0 || player.getav LeftAttackCondition <= 0 || player.getav RightAttackCondition <= 0 || player.getav LeftMobilityCondition <= 0 || player.getav RightMobilityCondition <= 0 setstage CGTutorial 210 endif else if crippleTimer > 0 set crippleTimer to crippleTimer - GetSecondsPassed else ; reset timer set crippleTimer to CGCrippleTimer ; crippling message if player.getav PerceptionCondition <= 0 || player.getav EnduranceCondition <= 0 || player.getav LeftAttackCondition <= 0 || player.getav RightAttackCondition <= 0 || player.getav LeftMobilityCondition <= 0 || player.getav RightMobilityCondition <= 0 ShowMessage CGTutorialCripple endif endif endif ; first time you get addicted, give addiction message if getStageDone CGTutorial 216 == 0 ; if player.HasMagicEffect AddictionEFFECT == 1 If GetPCMiscStat "Times Addicted" > 0 setstage CGTutorial 216 endif endif ; first time you uncover 4 locations, give fast travel tutorial if getStageDone CGTutorial 214 == 0 if GetPCMiscStat "Locations Discovered" >= 4 setstage CGTutorial 214 endif endif ; first time you equip poor condition weapon, give repair tutorial if getStageDone CGTutorial 218 == 0 && GetStage CG04 >= 200 if player.GetWeaponHealthPerc < 25 setstage CGTutorial 218 endif endif ; first time you contract radiation sickness, give radiation tutorial if getStageDone CGTutorial 220 == 0 if player.getav RadiationRads >= 200 setstage CGTutorial 220 endif endif end begin menumode 1 ; pip-boy if player.GetDead == 1 return endif if getStageDone CGTutorial 50 == 1 && getStageDone CGTutorial 52 == 0 setstage CGTutorial 52 endif ; first time you enter Pip-Boy while crippled, display crippling help message if getStageDone CGTutorial 212 == 0 if player.getav PerceptionCondition <= 0 || player.getav EnduranceCondition <= 0 || player.getav LeftAttackCondition <= 0 || player.getav RightAttackCondition <= 0 || player.getav LeftMobilityCondition <= 0 || player.getav RightMobilityCondition <= 0 setstage CGTutorial 212 endif endif end begin menumode 1056 ; VATS if player.GetDead == 1 return endif if ( getStageDone CGTutorial 70 == 1 || getStage CG04 > 0 ) && getStageDone CGTutorial 72 == 0 setstage CGTutorial 72 endif end
157CharonSCRIPTSCN CharonSCRIPT short CharonKillAhzrukhalSceneStart short CharonKillAhzrukhalSceneKill short CharonKillAhzrukhalSceneTalkToPlayer short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting float Timer BEGIN OnDeath set DialogueUnderworld.CharonDead to 1 END BEGIN OnActivate if ( CharonKillAhzrukhalSceneStart != 1 ) && ( CharonKillAhzrukhalSceneKill != 1 ) activate endif END BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath set CharonKillAhzrukhalSceneKill to 0 set CharonKillAhzrukhalSceneStart to 0 if ( Followers.CharonHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.CharonHired to 0 ShowMessage FollowerMessageDeadCharon endif END
158ChiefGustavoScriptscn ChiefGustavoScript short GreetPlayer ;0 = not set, 1 = greeted the player, used as condition on package Begin OnDeath set MS12.CountDead to MS12.CountDead + 1 End
159CitadelArmoryIntercomSCRIPTSCN CitadelArmoryIntercomSCRIPT BEGIN OnActivate if ( DialogueCitadel.KnightSergeantDurgaDead == 0 ) setTalkingActivatorActor KnightSergeantDurgaREF activate else say CitIntercomStatic 1 endif END
160CitadelBrotherhoodKnightBaily01SCRIPTSCN CitadelBrotherhoodKnightBaily01SCRIPT short StartTimer float Timer ;BEGIN OnPackageEnd CitInitiatePracticeHandgunB0x24 ; ; if ( GetDistance PaladinGunnyREF <= 420 ) && ( PaladinGunnyREF.GetIsCurrentPackage CitPaladinGladeTrainKnightsRifle9x15 == 1 ) && ( GetRandomPercent <= 50 ) ; addScriptPackage CitInitiatePracticeHandgunTalkGlade0x24 ; elseif ( StartTimer == 0 ) ; set StartTimer to 1 ; set Timer to 3 ; endif ; ;END BEGIN GameMode if ( StartTimer == 1 ) && ( IsInCombat == 0 ) set Timer to Timer - GetSecondsPassed if ( Timer <= 0 ) evp set StartTimer to 0 endif endif END
161CitadelBrotherhoodKnightBaily02SCRIPTSCN CitadelBrotherhoodKnightBaily02SCRIPT short StartTimer float Timer ;BEGIN OnPackageEnd CitInitiatePracticeAssaultRifle0x24 ; ; if ( GetDistance PaladinGunnyREF <= 420 ) && ( PaladinGunnyREF.GetIsCurrentPackage CitPaladinGladeTrainKnightsRifle9x15 == 1 ) && ( GetRandomPercent <= 50 ) ; addScriptPackage CitInitiatePracticeRifleTalkGlade0x24 ; elseif ( StartTimer == 0 ) ; set StartTimer to 1 ; set Timer to 3 ; endif ; ;END BEGIN GameMode if ( StartTimer == 1 ) && ( IsInCombat == 0 ) set Timer to Timer - GetSecondsPassed if ( Timer <= 0 ) evp set StartTimer to 0 endif endif END
162CitadelBrotherhoodKnightBaily03SCRIPTSCN CitadelBrotherhoodKnightBaily03SCRIPT short StartTimer float Timer BEGIN OnPackageEnd CitInitiatePracticeGrenade0x24 if ( GetDistance PaladinGunnyREF <= 420 ) && ( GetRandomPercent <= 50 ) addScriptPackage CitInitiatePracticeGrenadeTalkGlade0x24 endif END BEGIN GameMode if ( GetItemCount WeapGrenadeFrag == 0 ) && ( GetDead == 0 ) additem WeapGrenadeFrag 1 endif if ( StartTimer == 1 ) && ( IsInCombat == 0 ) set Timer to Timer - GetSecondsPassed if ( Timer <= 0 ) evp set StartTimer to 0 endif endif END
163CitadelLookoutBattleSCRIPTscn CitadelLookoutBattleSCRIPT ; at 9, -16, provide a random chance of a BoS lookout sniping some mutants in the area. short rand short doOnce begin onLoad if doOnce == 0 set rand to getRandomPercent if rand >= 75 CitadelLookoutBattleMarker.enable CitadelLookoutREF.startCombat CitadelMutantBossREF ; force combat to kick off set doOnce to 1 endif endif end
164CloverSCRIPTscn CloverSCRIPT ;Follower Variables short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.CloverHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.CloverHired to 0 ShowMessage FollowerMessageDeadClover endif END
165ColinMoriartySCRIPTscn ColinMoriartySCRIPT BEGIN OnDeath set DialogueMegaton.ColinMoriartyDead to 1 if (GetObjectiveDisplayed MQ01 20 == 1 ) SetObjectiveDisplayed MQ01 20 0 endif if (GetObjectiveDisplayed MQ01 25 == 1 ) SetObjectiveDisplayed MQ01 25 0 endif if ( GetStage MQ01 < 40 ) SetObjectiveDisplayed MQ01 30 1 endif END
166ConfessorCromwellSCRIPTscn ConfessorCromwellSCRIPT short StartEveningPrayer short Tick short DoOnce float Timer BEGIN OnLoad set DoOnce to 0 set Tick to 0 END BEGIN GameMode If ( Timer > 0 ) set Timer to ( Timer - GetSecondsPassed ) endif if ( Timer <= 0 ) set DoOnce to 0 set Tick to 0 endif if ( DoOnce == 0 ) && ( GetDead == 0 ) && ( IsInCombat == 0 ) if ( GetDistance Player <= 2000 ) && ( GetDistance MegCromwellPrayBombMarkerRef <= 210 ) set StartEveningPrayer to 1 set Tick to 1 startConversation ConfessorCromwellREF MegCromwellPrayEvening set DoOnce to 1 set Timer to 160 endif endif END BEGIN OnDeath set DialogueMegaton.ConfessorCromwellDead to 1 SettlerWatchCromwell1.Disable SettlerWatchCromwell2.Disable SettlerWatchCromwell3.Disable ObserveBomb1Marker.Enable ObserveBomb2Marker.Enable END
167ControlRumbleScriptscn ControlRumbleScript ;this is a quest script ;===========VARIABLES================================== short debug ;0 = off, 1 = show messages with each stage short initDefaults ;doOnce ;DoOnce Flags short Stage1Fired short Stage2Fired short Stage3Fired short Stage4Fired short Stage5Fired short Stage6Fired short Stage7Fired short Stage8Fired short Stage9Fired short Stage10Fired ;How long each stage lasts: float Stage1FireOnTimerValue float Stage2FireOnTimerValue float Stage3FireOnTimerValue float Stage4FireOnTimerValue float Stage5FireOnTimerValue float Stage6FireOnTimerValue float Stage7FireOnTimerValue float Stage8FireOnTimerValue float Stage9FireOnTimerValue float Stage10FireOnTimerValue ;Strength of left and right rumble float stage1RumbleLeft float stage1RumbleRight float stage2RumbleLeft float stage2RumbleRight float stage3RumbleLeft float stage3RumbleRight float stage4RumbleLeft float stage4RumbleRight float stage5RumbleLeft float stage5RumbleRight float stage6RumbleLeft float stage6RumbleRight float stage7RumbleLeft float stage7RumbleRight float stage8RumbleLeft float stage8RumbleRight float stage9RumbleLeft float stage9RumbleRight float stage10RumbleLeft float stage10RumbleRight ;duration of rumble for each stage ;note: regardless of length they don't stack or overlap with later calls to setRumble regardless of whether the duration has finished or not; each new call to setRumble overrides float Stage1Duration float Stage2Duration float Stage3Duration float Stage4Duration float Stage5Duration float Stage6Duration float Stage7Duration float Stage8Duration float Stage9Duration float Stage10Duration ;timer variables float timerCurrentValue ;timer starts at zero and counts up to timerMaxValue float timerMaxValue ;how long until we completely stop rumble ;turn on rumble variable short RumbleNow ;0 = off, 1 = rumble, -1 done rumbling ;====================GAMEMODE=============== Begin GameMode if initDefaults == 0 setStage ControlRumble 0 set initDefaults to 1 endif if initDefaults == 1 && RumbleNow == 1 if timerCurrentValue < timerMaxValue set timerCurrentValue to timerCurrentValue + getSecondsPassed if Stage1Fired == 0 if timerCurrentValue >= Stage1FireOnTimerValue setRumble stage1RumbleLeft stage1RumbleRight Stage1Duration set stage1Fired to 1 if debug == 1 showwarning "stage 1" endif endif elseif Stage2Fired == 0 if timerCurrentValue >= Stage2FireOnTimerValue setRumble stage2RumbleLeft stage2RumbleRight Stage2Duration set stage2Fired to 1 if debug == 1 showwarning "stage 2" endif endif elseif Stage3Fired == 0 if timerCurrentValue >= Stage3FireOnTimerValue setRumble stage3RumbleLeft stage3RumbleRight Stage3Duration set stage3Fired to 1 if debug == 1 showwarning "stage 3" endif endif elseif Stage4Fired == 0 if timerCurrentValue >= Stage4FireOnTimerValue setRumble stage4RumbleLeft stage4RumbleRight Stage4Duration set stage4Fired to 1 if debug == 1 showwarning "stage 4" endif endif elseif Stage5Fired == 0 if timerCurrentValue >= Stage5FireOnTimerValue setRumble stage5RumbleLeft stage5RumbleRight Stage5Duration set stage5Fired to 1 if debug == 1 showwarning "stage 5" endif endif elseif Stage6Fired == 0 if timerCurrentValue >= Stage6FireOnTimerValue setRumble stage6RumbleLeft stage6RumbleRight Stage6Duration set stage6Fired to 1 if debug == 1 showwarning "stage 6" endif endif elseif Stage7Fired == 0 if timerCurrentValue >= Stage7FireOnTimerValue setRumble stage7RumbleLeft stage7RumbleRight Stage7Duration set stage7Fired to 1 if debug == 1 showwarning "stage 7" endif endif elseif Stage8Fired == 0 if timerCurrentValue >= Stage8FireOnTimerValue setRumble stage8RumbleLeft stage8RumbleRight Stage8Duration set stage8Fired to 1 if debug == 1 showwarning "stage 8" endif endif elseif Stage9Fired == 0 if timerCurrentValue >= Stage9FireOnTimerValue setRumble stage9RumbleLeft stage9RumbleRight Stage9Duration set stage9Fired to 1 if debug == 1 showwarning "stage 9" endif endif elseif Stage10Fired == 0 if timerCurrentValue >= Stage10FireOnTimerValue setRumble stage10RumbleLeft stage10RumbleRight Stage10Duration set stage10Fired to 1 if debug == 1 showwarning "stage 10" endif endif endif elseif timerCurrentValue >= timerMaxValue set RumbleNow to -1 setStage ControlRumble 0 endif endif End
168CrDeathclawEnclaveCageSCRIPTscn CrDeathclawEnclaveCageSCRIPT float timer short doOnce ;**************************************** Begin onPackageEnd DeathclawCAGE01a ;set timer to 20 ;give the Deathclaw enough time to finish his cageExit animation set doOnce to 1 End ;**************************************** Begin onPackageEnd DeathclawCAGE01b ;set timer to 8 ;give the Deathclaw enough time to finish his clawScrape animation set doOnce to 2 End ;**************************************** Begin gameMode if (doOnce == 1) ;if (isLastIdlePlayed DCageExit == 0) if (isIdlePlaying == 0) ;set timer to 20 ;give the Deathclaw enough time to finish his cageExit animation setav variable01 3 evp set doOnce to 3 endif ;if (timer <= 0) ;setav variable01 2 ;evp ;set doOnce to 3 ;else ;set timer to timer - GetSecondsPassed ;endif endif if (doOnce == 2) ;if (isLastIdlePlayed DClawScrape == 0) if (isIdlePlaying == 0) setav variable01 3 evp set doOnce to 3 endif ;if (timer <= 0) ; setav variable01 3 ; evp ; set doOnce to 3 ;else ; set timer to timer - GetSecondsPassed ;endif endif End ;***************
169CrEyebotVertibirdSCRIPTscn CrEyebotVertibirdSCRIPT short summoned ; set to 1 when vertibird summoned ; set to 2 when vertibird created ; set to 3 when vertibird activated (to get linked ref) ref linkedRef ; linked ref is where vertibird will land ref vertibirdRef ; vertibird ref after placed short dieRoll short runTimer float timer short init begin gamemode if init == 0 set init to 1 ; get linked ref set linkedRef to GetLinkedRef ; chance of summoning vertibird ; die roll modified by luck set dieRoll to GetRandomPercent ; better chance with low luck, lower chance with high luck set dieRoll to dieRoll - ( ( player.getav luck ) * 8) + 50 endif if runTimer > 0 if timer > 0 set timer to timer - GetSecondsPassed else set runTimer to 0 if linkedRef != 0 if summoned == 1 set summoned to 2 set runTimer to 1 set timer to 3 ; place vertibird set vertibirdRef to linkedRef.placeAtMe GenericVertibirdEncounter elseif summoned == 2 set summoned to 3 set runTimer to 0 if vertibirdRef != 0 vertibirdRef.activate linkedRef 1 endif endif endif endif endif end ; attacking eyebot might summon vertibird patrol to investigate begin OnHit player if summoned == 0 && dieRoll > 50 if GetStage MQ05 >= 80 && linkedRef != 0 set summoned to 1 set runTimer to 1 set timer to ( GetRandomPercent/2 + 15 ) endif endif end begin OnStartCombat player if summoned == 0 && dieRoll > 50 if GetStage MQ05 >= 80 && linkedRef != 0 set summoned to 1 set runTimer to 1 set timer to ( GetRandomPercent/2 + 15 ) endif endif end
170daisyChainOFFTurretSCRIPTscn daisyChainOFFTurretSCRIPT ref myLink short ONflag short damageBrain short init begin onLoad end begin gameMode if init == 0 set init to 1 set myLink to getLinkedRef setUnconscious 1 set ONflag to 0 ; this turret is OFF by default endif if damageBrain == 0 if getAV brainCondition == 0 ; all these checks handle daisy-chain turret systems set damageBrain to 1 myLink.damageAV brainCondition 100 endif endif if ONflag == 1 If getUnconscious == 1 stopCombat myLink.stopCombat myLink.setUnconscious 1 set ONflag to 0 endif elseif ONflag == 0 if getUnconscious == 0 myLink.setUnconscious 0 set ONflag to 1 endif endif end
171daisyChainturretSCRIPTscn daisyChainturretSCRIPT ref myLink short ONflag short damageBrain short init begin gameMode if init == 0 set init to 1 set myLink to getLinkedRef set ONflag to 1 ; this turret is ON by default setUnconscious 0 ; make sure my consciousness matches my ON state endif if damageBrain == 0 if getAV brainCondition == 0 ; all these checks handle daisy-chain turret systems set damageBrain to 1 myLink.damageAV brainCondition 100 endif endif if ONflag == 1 If getUnconscious == 1 stopCombat myLink.stopCombat myLink.setUnconscious 1 set ONflag to 0 endif elseif ONflag == 0 if getUnconscious == 0 myLink.setUnconscious 0 set ONflag to 1 endif endif end
172DCWallVertibirdStrafe01SCRIPTscn DCWallVertibirdStrafe01SCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation ; It also tells the vertibird when to fire its weapon float timer float fireTimer short doOnce short firingFlag ;0 - not firing 1 - waiting to fire 2 - firing vertibirdgun 3 - firing fatman ref linkedRef ;**************************************** Begin gameMode if linkedRef == 0 set linkedRef to getLinkedRef endif if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 1 set fireTimer to .5 set firingFlag to 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation set doOnce to 3 endif endif if (firingFlag == 1) ;currently waiting for time to pass before vertibird begins shooting if (fireTimer <=0) set firingFlag to 2 set fireTimer to 1 ;vertibird will fire its gun for this much time else set fireTimer to (fireTimer - GetSecondsPassed) endif elseif (firingFlag == 2) ;currently firing vertibird gun if (fireTimer <=0) set firingFlag to 3 linkedRef.fireWeapon vertibirdBombgun set fireTimer to .5 ;will shoot a fatman after .5 seconds else linkedRef.fireWeapon vertibirdgun set fireTimer to (fireTimer - GetSecondsPassed) endif elseif (firingFlag == 3) ;shoot a fatman if (fireTimer <=0) linkedRef.fireWeapon vertibirdBombgun set firingFlag to 0 else set fireTimer to (fireTimer - GetSecondsPassed) endif endif End ;***************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) linkedRef.enable 0 set timer to 1 set doOnce to 1 endif End ;*****************************************
173DCWallVertibirdStrafe02SCRIPTscn DCWallVertibirdStrafe02SCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation ; It also tells the vertibird when to fire its weapon ; This script is the same as strafe01script, but it drops more bombs float timer float fireTimer short doOnce short firingFlag ;0 - not firing 1 - waiting to fire 2 - firing vertibirdgun 3 - firing fatman ref linkedRef ;***************************************** Begin gameMode if linkedRef == 0 set linkedRef to getLinkedRef endif if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 1 set fireTimer to 1 set firingFlag to 1 set timer to 2.5 ;timer now becomes the master timer for the firing block set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation set doOnce to 3 endif if (timer <=0) set firingFlag to 0 else if (firingFlag == 1) if (fireTimer <=0) linkedRef.fireWeapon vertibirdBombgun set fireTimer to .5 set firingFlag to 2 else set fireTimer to (fireTimer - GetSecondsPassed) endif elseif (firingFlag == 2) if (fireTimer <=0) linkedRef.fireWeapon vertibirdBombgun set fireTimer to .5 set firingFlag to 1 else set fireTimer to (fireTimer - GetSecondsPassed) endif endif set timer to (timer - GetSecondsPassed) endif endif End ;***************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) linkedRef.enable 0 set timer to 5 set doOnce to 1 endif End
174DCworld11RobotSCRIPTscn DCworld11RobotSCRIPT ; script runs on a servant robot, can be controlled by the player via a terminal to perform a selection of simple packages short state ; 0 = off ; 1 = walking dog ; 2 = helping in kitchen ; 3 = picking up groceries ; 4 = patrolling homefront ; 5 = tucking in Molly float timer short poemLine ; used to conditionalize line order for the bedtime poem ;========================================================= begin OnLoad if state == 0 setUnconscious 1 else setUnconscious 0 endif end BEGIN GameMode if ( state != 0 ) if ( timer > 0 ) set timer to (timer - getSecondsPassed) else set timer to 35 if ( GetIsCurrentPackage DCworld11RobotDogWalkPKG ) if ( getRandomPercent <= 50 ) sayto deadMuffyREF DC11talkHomeBotWalkDog01 ; this is the topic name containing dog-related infos endif endif elseif ( GetIsCurrentPackage DCworld11RobotKitchen ) if ( getRandomPercent <= 50 ) say DC11talkHomeBotKitchen01 endif elseif ( GetIsCurrentPackage DCworld11RobotPatrol ) if ( getRandomPercent <= 50 ) say DC11talkHomeBotPatrol01 endif endif endif endif END
175DCworld11TownhouseGeneratorSCRIPTscn DCworld11TownhouseGeneratorSCRIPT ; with repair skill, the player can power up a townhouse and subsequently send the house robot out on errands ;===================================================; short state ; 0 = off ; 1 = on short active short button ;===================================================; begin onActivate if IsActionRef player == 1 if state == 0 && active == 0 if player.getAV repair >= 20 ;messageBox "Minor repairs could restore power to this old generator","Attempt Repair [Repair, 20]","Leave it Alone" ShowMessage DCWorld11GeneratorMsg set active to 1 else ;messageBox "[Repair, 20] It would be possible to repair this generator if you were more skilled." ShowMessage DCWorld11GeneratorLowSkillMsg endif endif endif end ;===================================================; begin gameMode if active == 1 set active to 0 if state == 0 set button to getButtonPressed if button == 0 ;message "You repair the generator." ShowMessage DCWorld11GeneratorLowSkillMsg DC11townhouseStateMarker.enable set state to 1 elseif button == 1 ; do nothing endif endif endif end
176DeathclawCageDoorGenericSCRIPTscn DeathclawCageDoorGenericSCRIPT short doOnce ref linkedRef ;set to deathclaw in the cage float timer ;used to keep the deathclaw idling for a couple seconds before starting his cageExit anim short doorOpen ; 1 - door has been opened for the first time ;*************************************** Begin gameMode if doOnce == 0 set doOnce to 1 setStage NQlvl 1 set timer to 2 ;the amount of time the Deathclaw remains in his idle animation before doing his cageExit anim set linkedRef to getLinkedRef set doorOpen to 0 lock NQlvl.DeathclawCageDoorLockLvlReq endif ;if the door is unlocked and it's either closed or closing, then open the doors if ( (getLocked == 0) && (doorOpen == 0) ) if ( (getOpenState == 3) || (getOpenState == 4) ) activate player endif set doorOpen to 1 endif if (doorOpen == 1) if ( timer <= 0 ) linkedRef.setav variable01 1 ;condition used in the deathclaw package to get it out of its cage linkedRef.evp set doorOpen to 2 else set timer to (timer - GetSecondsPassed) endif endif End ;***************************************
177Default1xActivateLinkedRefSCRIPTscn Default1xActivateLinkedRefSCRIPT ; a standard, all-purpose script ref myLink short doOnce begin onTriggerEnter player if doOnce == 0 set myLink to getLinkedRef myLink.activate set doOnce to 1 endif end
178DefaultActLinkWhenActSCRIPTscn DefaultActLinkWhenActSCRIPT ; a standard, all-purpose script ref myLink ref myActor begin onActivate set myLink to getLinkedRef set myActor to getActionRef myLink.activate myActor end
179DefaultDisableFastTravelSCRIPTscn DefaultDisableFastTravelSCRIPT ; used on triggers to mark zones in which fast travel is disallowed begin onTriggerEnter if isActionRef player == 1 EnableFastTravel 0 if NQlvl.fastTravelDisabled == 0 set NQlvl.fastTravelDisabled to 1 endif ;messageBox "fast travel disabled" endif end begin onTriggerLeave if isActionRef player == 1 enableFastTravel 1 if NQlvl.fastTravelDisabled == 1 set NQlvl.fastTravelDisabled to 0 endif ;messageBox"fast travel enabled" endif end
180DefaultDisableLinkOnActivateSCRIPTscn DefaultDisableLinkOnActivateSCRIPT ; basic script that enables linked reference on activate short DoOnce ref myLink begin onActivate if doOnce == 0 set myLink to getLinkedRef myLink.disable set doOnce to 1 endif activate end
181DefaultEnableLink1xSCRIPTscn DefaultEnableLink1xSCRIPT ; basic script that enables linked reference short DoOnce ref myLink begin onTriggerEnter if doOnce == 0 set myLink to getLinkedRef myLink.enable set doOnce to 1 endif end
182DefaultEnableLink1xSCRIPTplayerscn DefaultEnableLink1xSCRIPTplayer ; basic script that enables linked reference short DoOnce ref myLink begin onTriggerEnter player if doOnce == 0 set myLink to getLinkedRef myLink.enable set doOnce to 1 endif end
183DefaultEnableLinkOnActivateSCRIPTscn DefaultEnableLinkOnActivateSCRIPT ; basic script that enables linked reference on activate short DoOnce ref myLink begin onActivate if doOnce == 0 set myLink to getLinkedRef myLink.enable set doOnce to 1 endif activate end
184DefaultPlaygroupForwardOnLoadscn DefaultPlaygroupForwardOnLoad short doOnce begin onLoad playgroup idle 0 playgroup forward 0 end begin gameMode if doOnce == 0 if isAnimplaying forward == 0 set doOnce to 1 playgroup left 0 endif endif end
185DemoCrippleBeGoneEffectScriptscn DemoCrippleBeGoneEffectSCRIPT Begin ScriptEffectStart ;heal all body parts Player.restoreav leftmobilitycondition 100 Player.restoreav rightmobilitycondition 100 Player.restoreav rightattackcondition 100 Player.restoreav leftattackcondition 100 Player.restoreav perceptioncondition 100 Player.restoreav endurancecondition 100 End
186DemoMegatonProtectronScriptscn DemoMegatonProtectronScript short firstSpeechDone ; set to 1 when initial speech is finished ; gate script watches for this to be 1, which triggers it to open short moveNPCs ; set to 1 after moving NPCs at start of combat short talking ; set to 1 while talking, set to 0 in SayToDone callback short playernear short MegRobotIdle short talkdelay float timer Begin OnDeath ; make sure gate opens set firstSpeechDone to 1 End BEGIN OnStartCombat Player ; make sure gate opens set firstSpeechDone to 1 if ( moveNPCs == 0 ) ; don't move dead guys... if LucasSimmsREF.GetDead == 0 LucasSimmsREF.MoveTo FFMegatonMainGateLucasSimmsMARKER LucasSimmsREF.startcombat Player endif if DeputySteelREF.GetDead == 0 DeputySteelREF.MoveTo FFMegatonMainGateDeputySteelMARKER DeputySteelREF.startcombat Player endif StockholmExteriorRef.startcombat Player set moveNPCs to 1 endif END BEGIN GameMode ; do nothing if dead or in combat if GetDead == 1 || IsInCombat == 1 return endif if playerNear > 0 ; playerNear is set by MegatonGateTriggerSCRIPT when player is inside trigger box if IsTalking == 0 if talking == 0 if timer > 0 set timer to ( timer - GetSecondsPassed ) else set talking to 1 if firstSpeechDone == 0 ; ready to say initial greeting to player SayTo Player MegProtectronTalk2 else SayTo Player MegProtectronTalk endif endif endif endif endif End Begin SayToDone MegProtectronTalk ;if delay is set, reset it and timer var so he'll talk again after a few seconds if ( talking == 1 ) set talking to 0 set timer to 5 endif End Begin SayToDone MegProtectronTalk2 set talking to 0 End
187DemoMetroTriggerASCRIPTscn DemoMetroTriggerASCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter player if playerTriggered == 0 set playerTriggered to 1 ; enable muties in next room DemoSuperMutant06REF.enable endif end
188DemoMetroTriggerBSCRIPTscn DemoMetroTriggerBSCRIPT short triggered ; set to 1 when robot triggers begin onTriggerEnter DemoProtectron01REF if triggered== 0 set triggered to 1 set DemoProtectron01REF.active to 2 DemoProtectron01REF.evp endif end
189DemoProtectronPod01Scriptscn DemoProtectronPod01Script float timer short startTimer Begin OnActivate if IsActionRef MetroCenter02ComputerREF == 1 setopenstate 1 ; open it set timer to 2 set startTimer to 1 endif End begin gamemode if startTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ;turn on the Protectron set DemoProtectron01Ref.turnOnTimer to 5 set DemoProtectron01Ref.turnOn to 1 set DemoProtectron01Ref.timer to 1.5 set DemoProtectron01Ref.talk to 1 DemoProtectron01Ref.evp ;pick idle is called on DemoProtectron01Ref script set startTimer to 0 endif endif end
190DemoProtectronScriptscn DemoProtectronScript short active ; set to 1 to turn on and start moving short talk ; set to 1 to start talking float timer ; used for custom dialogue short turnOn float turnOnTimer short ticketCheck ; 1= ready to ask for tickets ; 2 = player has ticket begin onLoad set ticketCheck to 0 setav bloodymess 1 if active == 0 ; make me unconscious so I don't play sounds setUnconscious 1 set talk to 0 endif end begin gamemode if turnOn == 1 if turnOnTimer >= 0 set turnOnTimer to turnOnTimer - GetSecondsPassed else set turnOn to 2 ;get him to move around setUnconscious 0 set active to 1 evp endif endif if talk == 1 && getDead == 0 if timer > 0 set timer to timer - GetSecondsPassed else if GetIsCurrentPackage DemoProtectron01TicketCheck == 1 SayTo player DemoRobotTopicB 1 set timer to 5 else Say DemoRobotTopicA set timer to 7 endif endif endif ; periodically check if player is in combat with anything -- if so, assume protectron goes into "hostile" mode if getav aggression == 0 if player.isInCombat == 1 && getInSameCell player == 1 set active to 1 ; normal patrol setav aggression 1 ; make aggressive endif endif end begin OnPackageStart DemoProtectron01TicketCheck set talk to 1 set timer to 1 end
191DemoRoachesEnablerSCRIPTscn DemoRoachesEnablerSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter player if playerTriggered == 0 set playerTriggered to 1 DemoMetroRoach01REF.enable endif end
192DerekPacionScriptscn DerekPacionScript short talkedAboutSuperheroIdentities ;1 = told the player his suspicions about the supers identities (set and used as condition by MS02 infos)
193DialogMSMiniScriptscn DialogMSMiniScript ;LugNut Encounter Shorts short LugAttack ;1= LugNut is going to attack the Player short DoOnce short LugDone ;1= Puts him in Sandbox ;Murphy Encounter Shorts short MurphyGo ;1= Murphy has greeted the Player short MurphyAttack ;1= Murphy aggros on the Player short Offered ;1= Player declined Offer short GetStuff ;1= Player is gathering for Murphy short DoubleDown ;1= Player is getting double price for Sugar Bombs short GoSell ;1= Sell Sugar Bombs short Number short CashGive short BoostCash short StoredNumber short MakeJet short DoOnce1 ;Ledoux Encounter Shorts short LedouxGo01 ;1= Ledoux has greeted the Player from a distance short LedouxGo02 ;1= Ledoux has greeted the Player closer up short SDOAttack ;1= The SDO attacks short SDODone ;1= Situation resolved peacefully, SDO paths into Wilderness and disables when out of sight short DoOnce2 begin gamemode ;This block handles LugNut's aggro on Player if ( DoOnce == 0 ) if ( LugAttack == 1 ) MS04LugNutRef.SetAV Aggression 2 set DoOnce to 1 endif endif ;This block handles Murphy's aggro on Player if ( DoOnce1 == 0 ) if ( MurphyAttack == 1 ) MS09MurphyRef.SetAV Aggression 2 set DoOnce1 to 1 endif endif ;This block handles the removal of the Samples of Fire Ant Nectar from the Player's inventory as well as tallying the count for Post Quest Collection if ( GoSell == 1 ) ;This flag is set in dialog with Doc Lesko if ( Player.GetItemCount SugarBombs01 >= 1 ) Set Number to ( Player.GetItemCount SugarBombs01 ) ;Set the temporary variable to the number of samples player has Set StoredNumber to ( Number + StoredNumber ) ;Counting totals and adding any odd leftovers to new count Set GoSell to 2 ;Advance the flag endif endif if ( GoSell == 2 ) ;From the above block if ( Player.GetItemCount SugarBombs01 >= 1 ) Player.RemoveItem SugarBombs01 Number ;Remove the number of samples equal to amount tallyed/carried Set CashGive to ( Number * BoostCash ) ;Calculate Cash given Player.AddItem Caps001 CashGive ;Add 40 caps per sample turned in set GoSell to 0 ;Reset the flag set Number to 0 ;Reset the temporary variable set CashGive to 0 endif endif ;This block calculates "DoubleDown" variable which is set in dialog ;If the player completes the Speech Challenge with Murphy, they get double caps per box if ( DoubleDown == 1 ) Set BoostCash to 30 endif ;This block will take the count of Sugar Bombs collected and have him make an Ultrajet. Takes 5 Sugar Bombs to make 1 Ultrajet. if ( StoredNumber >= 8 ) MS09LockerRef.AddItem MS09UltraJet 1 set StoredNumber to ( StoredNumber - 8 ) endif ;This block handles SDO's aggro on Player if ( DoOnce2 == 0 ) if ( SDOAttack == 1 ) MS05DuboisRef.SetAV Aggression 2 MS05LedouxRef.SetAV Aggression 2 MS05GervaisRef.SetAV Aggression 2 set DoOnce2 to 1 endif endif end
194DialogueAndaleSCRIPTSCN DialogueAndaleSCRIPT short PlayerHasBeenInSmithBasement short PlayerHasBeenInWilsonShed short AndaleConfrontation short AndaleCombat short AndaleDeathCount short AndaleCannibalsDead short PlayerHasJoinedCannibals short PlayerLearnedSuspiciousRelations short PlayerHadTalkedToAnyone short PlayerHasTalkedToLindaSmith short PlayerWasRudeToLindaSmith short PlayerHasTalkedToJackSmith short PlayerHasTalkedToOldManHarris short PlayerHasBeenInvitedToDinner short JennySmithDisposition short DoOnce BEGIN GameMode if ( player.GetInCell AndaleTheSmithsBasement == 1 ) if ( PlayerHasBeenInSmithBasement == 0 ) && ( AndaleConfrontation == 0 ) set PlayerHasBeenInSmithBasement to 1 set AndaleConfrontation to 1 AndaleOldManHarrisFrontDoorREF.Lock 255 AndaleOldManHarrisBackDoorREF.Lock 255 JuniorSmithREF.MoveTo AndaleOldManHarrisHouseMARKER JennyWilsonREF.MoveTo AndaleOldManHarrisHouseMARKER if ( JackSmithREF.GetDead == 0 ) JackSmithREF.evp JackSmithREF.MoveTo AndaleConfWilsonJackMarker endif if ( LindaSmithREF.GetDead == 0 ) LindaSmithREF.evp LindaSmithREF.MoveTo AndaleConfWilsonLindaMarker endif if ( BillWilsonREF.GetDead == 0 ) BillWilsonREF.evp BillWilsonREF.MoveTo AndaleConfWilsonBillMarker endif if ( MarthaWilsonREF.GetDead == 0 ) MarthaWilsonREF.evp MarthaWilsonREF.MoveTo AndaleConfWilsonMarthaMarker endif endif endif if ( player.GetInCell AndaleTheWilsonsShed == 1 ) if ( PlayerHasBeenInWilsonShed == 0 ) && ( AndaleConfrontation == 0 ) set PlayerHasBeenInWilsonShed to 1 set AndaleConfrontation to 1 AndaleOldManHarrisFrontDoorREF.Lock 255 AndaleOldManHarrisBackDoorREF.Lock 255 JuniorSmithREF.MoveTo AndaleOldManHarrisHouseMARKER JennyWilsonREF.MoveTo AndaleOldManHarrisHouseMARKER if ( JackSmithREF.GetDead == 0 ) JackSmithREF.evp JackSmithREF.MoveTo AndaleConfWilsonJackMarker endif if ( LindaSmithREF.GetDead == 0 ) LindaSmithREF.evp LindaSmithREF.MoveTo AndaleConfWilsonLindaMarker endif if ( BillWilsonREF.GetDead == 0 ) BillWilsonREF.evp BillWilsonREF.MoveTo AndaleConfWilsonBillMarker endif if ( MarthaWilsonREF.GetDead == 0 ) MarthaWilsonREF.evp MarthaWilsonREF.MoveTo AndaleConfWilsonMarthaMarker endif endif endif if ( DoOnce == 0 ) if ( MarthaWilsonREF.GetDead == 1 ) && ( BillWilsonREF.GetDead == 1 ) && ( LindaSmithREF.GetDead == 1 ) && ( JackSmithREF.GetDead == 1 ) AndaleOldManHarrisFrontDoorREF.Unlock AndaleOldManHarrisBackDoorREF.Unlock set AndaleCannibalsDead to 1 set DoOnce to 1 endif endif END
195DialogueBigtownSCRIPTSCN DialogueBigtownSCRIPT short PlayerAskedRedAboutTimebomb short PlayerHealedTimebomb short PlayerKilledTimebomb short PlayerEarnedFreeHealing short PlayerHasBeenInClinic short PlayerHasAngeredRed short RedEmotionalReaction short BittercupandFlash ;Used to check if Bittercup has mentioned her relationship with Flash short BittercupRel ;Used to check if Bittercup is interested in the player short DeadCount ; counts number of BigTowners killed (not including Shorty, Sticky, and Red)
196DialogueCanterburyCommonsSCRIPTscn DialogueCanterburyCommonsSCRIPT ;Initialize variables for dialogue and conversations ;First Greeting variables short RoeGreeting ;Handles whether Roe greets the player first from the MS02 post-battle greeting or from a normal entry into town. 0 = has not met, 1 = has talked to the player immediately after the battle, but not introduced self fully, 2 = has introduced himself fully ;Matchmaker freeform variables short OverheardDerek ;Does the player know that Derek has a crush on Machete? 0 = no, 1 = yes short OverheardMachete ;Does the player know that Machete has a crush on Derek? 0 = no, 1 = yes short OverheardJoe ;Does the player know that Derek talks with Joe? 0 = no, 1 = yes short Matchmaker ;Has the player set up a match between Derek and Machete? 0 = no, 1 = ready to try, 2 = set up "good", 3 = set up "smooth", 4 = set up "bad" ;Trading freeform variables short TraderBoss ;Has the player united the traders under himself and Roe? 0 = no, 1 = yes ;short WeaponSpec ;Has the player set a specialty for the weapons traders? 0 = no specialty, 1 = melee and hand to hand, 2 = small arms, 3 = heavy weapons and explosives ;short ArmorSpec ;Has the player set a specialty for the armor traders? 0 = no specialty, 1 = clothing, 2 = armor ;short ChemsSpec ;Has the player set a specialty for the chems traders? 0 = no specialty, 1 = food & drink, 2 = medicine, 3 = drugs short WeaponInvest ;Has the player invested in the weapons traders? 0 = no, 1 = once, 2 = twice, 3 = twice and received reward short ArmorInvest ;Has the player invested in the armor dealers? 0 = no, 1 = once, 2 = twice, 3 = twice and received reward short ChemsInvest ;Has the player invested in the chems dealers? 0 = no, 1 = once, 2 = twice, 3 = twice and received reward short JunkInvest ;Has the player invested in the junk dealers? 0 = no, 1 = once, 2 = twice, 3 = twice and received reward
197DialogueCitadelSCRIPTSCN DialogueCitadelSCRIPT short DuskHatesPlayer short DuskImpressedWithPlayer short PlayerApologizedToDusk short PlayerPermittedToTrade short PlayerHasSpokenToGallows short PlayerKnowsAboutGallowsBet short PlayerWonGallowsBet short PlayerLearnedGallowsName short PlayerInterruptedKodiaksStory short ArtemisOutcast short CitadelEnter short SuperMutantBael short RothchildRobot short KnightCaptainDuskDead short KnightCaptainGallowsDead short KnightSergeantDurgaDead short PaladinGladeDead short PaladinKodiakDead short ScribeBowditchDead short ScribeJamesonDead short ScribePeabodyDead short ScribeYearlingDead short StarPaladinCrossDead
198DialogueFamilyScriptscn DialogueFamilyScript ;This script is primarily for use with the Meetings the Family have every night at Midnight ;The blocks below handle the speech that Vance gives float MeetTimer ;Set a small delay so that the speech doesn't start the instant Vance gets to the marker short Ready ;5= The Meeting can begin short Meeting ;1= Kicks off Vance's Package and keeps them in the AI package until his speech is done begin gamemode if ( Player.GetInCell MerestiMetro02 == 1 ) if ( MS09Meet == 1 ) set MeetTimer to 5 set MS09Meet to 2 endif endif if ( MS09Meet == 2 ) && ( MeetTimer > 0 ) Set MeetTimer to MeetTimer - GetSecondsPassed elseif ( MS09Meet == 2 ) && ( MeetTimer <= 0 ) Set MS09VanceSpeechProg to 1 FamVanceRef.Say MS09VanceSpeech 1 Set MS09Meet to 3 endif if ( Player.GetInCell MerestiMetro02 == 0 ) if ( MS09Meet >= 1 ) set MS09Meet to 0 set DialogueTheFamily.Meeting to 0 set DialogueTheFamily.Ready to 0 FamVanceRef.Evp FamHollyRef.Evp FamKarlRef.Evp FamBriannaRef.Evp FamAlanRef.Evp FamJustinRef.Evp set MS09VanceSpeechProg to 0 endif endif end
199DialogueGNRQuestScriptscn DialogueGNRQuestScript ;Almost all of Three Dog's GNR dialog was moved to this "always-running" quest so that the player can do it at any time ;The variables that are required to have the dialog properly work will be stored here short Complete ;1=The radio has been repaired short SecondStage ;1=The quest has hit the "second leg" which locks out some of the initial dialog short QuestDecide ;1=Skip right to quest decide for purposes of dialog
200DialogueLittleLamplightSCRIPTscn DialogueLittleLamplightSCRIPT ;For general, minor script requirements of Little Lamplight town dialogue and FF quests ;debugging use - delete afterwards short ChildAtHeartPerk ;A variable for whether or not the player has the Child At Heart perk, for use until the HasPerk command is implemented short TwinMeeting ;Tracks whether or not the player has talked to Knick Knack or Knock Knock: 0 = talked to neither, 1 = talked to one, 2 = talked to both. short It ;Tracks whether or not the player is "It" when talking with unnamed, playing NPCs: 0 = not it, 1 = it! short BumbleVaultDweller ;Tracks whether or not the player has told Bumble that he is (or was) a Vault Dweller: 0 = not yet, 1 = told. short PrincessNickname ;Tracks whether or not the player has heard the story of Princess's nickname: 0 = no, 1 = knows she gets angry about it, 2 = knows the story behind the nickname, 3 = knows she's got a crush on MacCready, 4 = has made her cry short JosephHistoryCount ;Tracks which line Joseph is at while talking about history, ranging 0 to 4: 0 = has not started, 1 - 4 = completed first (through fourth) line short FungusKnowledge ;Does the player know about the fungus in Little Lamplight? 0 = no, 1 = yes short FungusDeal ;Tracks whether or not the player has made a trading deal with MacCready, and what the deal stands at: 0 = has not started, 1 = threatened, 2 = poor deal, 3 = decent deal, 4 = good deal short SpeechChallengeCheck ;Tracks which speech response of an NPCs is being checked for - defaults at 0 and has one entry for each Speech ChallengeFailure entry an NPC has - set before attempting, and returned to 0 afterwards short NukaItem ;Tracks which item Zip is offering for Nuka Cola today. short ZipFollow ;Tracks whether or not Zip should be following the player and annoying them: 0 = no, 1 = yes short ZipFollowStart ;Set to timepassed when Zip begins following, an dused to determine end of the ZipFollowPlayer package short Tales1 ;Measures what the player has told Knock Knock about the first part of the main quest (pre-Dad's death). 0 = has not told, 1 = tragic tale of missing Dad, 2 = bold adventurer leaving the vault, 3 = grisly demon of the wasteland short Tales2 ;Measures what the player has told Knock Knock about the second part of the main quest (post-Dad's death, pre-Enclave capture). 0 = has not told, 1 = Dad's noble sacrifice, 2 = two-fisted tales of the Brotherhood, 3 = a bloody tale of vengeance against the Enclave short Tales3 ;Measures what the player has told Knock Knock about the third part of the main quest (post-Enclave capture). 0 = has not told, 1 = finishing Dad's legacy, 2 = Hero of the Wastes!, 3 = a terrible choice is in your hands short LamplightSlaver ;Measures the stage of attempting to kidnap a kid from Lamplight. -1 = player attempted and failed (cannot be retried), 0 = not begun, 1 = has agreed to attempt, 2 = Bumble is following the player, 3 = Bumble is leaving with the slaver short ZipTalk ;Has the player spoken with Zip, yet. 0 = no, 1 = yes Begin GameMode ;MQ06 handling -- reset MacCready's forcegreet var if the player has left lamplight if ( MayorMacCreadyRef.forcegreet == 1 ) if ( MayorMacCreadyRef.access == 0 ) if ( Player.GetinCell LL == 0 ) set MayorMacCreadyRef.forcegreet to 0 endif endif endif End
201DialogueOasisScriptscn DialogueOasisScript float BurnTimer short Burned ;This handles the last part of Harold's Burning ;We have to run this part in the Quest Script because scripts on talking activators do not run when they aren't loaded begin gamemode ;Check to see if Player jumped out of the Cell early. If so, advanced passed animation changes if ( MS10Fire == 1 ) if ( Player.GetInWorldSpace OasisHarold == 0 ) if ( MS10.InFlames < 2 ) Set DialogueOasis.BurnTimer to 20 set MS10.InFlames to 2 endif endif endif if ( Player.GetInWorldSpace OasisHarold == 0 ) if ( MS10.InFlames == 2 ) ;the burning anim is done, play the next one in the sequence ; HaroldRef.Playgroup Fastforward 1 set MS10.InFlames to 3 endif endif if ( MS10.InFlames == 3 ) if ( BurnTimer > 0 ) Set BurnTimer to ( BurnTimer - GetSecondsPassed ) if ( Player.GetInWorldSpace OasisHarold == 1 ) if( HaroldRef.isAnimPlaying Fastforward == 0 ) HaroldRef.Playgroup Fastforward 1 endif endif else Set MS10.InFlames to 4 endif endif endif if ( MS10.InFlames == 4 ) ;if player isn't there, go ahead and turn off the fire effect and replace with the burnt version of Harold if ( Player.GetInWorldSpace OasisHarold == 0 ) MS10HaroldFireLoopRef.Disable HaroldFireRef.Disable MS10HaroldBurnedRef.Enable HaroldRef.Disable set MS10.InFlames to 5 endif endif ;If the Player burns Harold, take care of the Heart stuff (in case they adventure in the Caves after) if ( Burned == 0 ) if ( MS10Fire == 1 ) if ( Player.GetInCell OasisCave01 == 1 ) MS10HaroldsHeartRef.Playgroup Forward 1 NPCHaroldHeartbeatLPRef.Disable NPCHaroldHeartbeatChamberLPRef.Disable set MS10HaroldsHeartRef.HeartDone to 2 OasisRootEnableRef.Disable set Burned to 1 endif endif endif end
202DialogueParadiseFallsSCRIPTSCN DialogueParadiseFallsSCRIPT short PlayerPassedCheckpoint short PlayerDeniedEntry short GrouseOfferedPlayerBribe short EulogyDead
203DialogueTenpennyScriptscn DialogueTenpennyScript ;SEE ALSO: ;MS12Script (and quest) ;TenpennyIntercomScript ;TenpennyGateScript short ShakesDiscount ;used as discount on Show Barter menu function in Shakes Dialog, set by hacking the Lounge Terminal ;also used to flavor Shakes Dialog: 0 == default prices, 10 = Holiday Discount, 50 = VIP Discount short allowedIn ;0 = not set, 1 = allowed in -- used in dialog with the intercomm ;short securityCalled ;0 = unset - not called, 1=security should come attack the player, 2 = called recently ;short securityCalledDate ;used to pull the player out of aggro guards faction after a period of time elaspes ;short securityGoTo ;0 = unset, 1= Front Gate , 2 = Allistair Tenpenny -- used on packages to send guards to an area ref guardOpeningGate ;holds the reference of the guard who the player asked to open the gate - cleared when the Gate Opens short penthouseGuard ;0 = unset, 1 = unlock door, 2 = done unlocking door Begin GameMode ; ;make security hostile to the player ; if securityCalled == 1 ; ;put player in faction that TenpennyGuardFaction Always Fights ; if player.getFactionRank TenpennyHostileFaction < 0 ; player.setFactionRank TenpennyHostileFaction 0 ; set securityCalledDate to GameDaysPassed ; set securityCalled to 2 ; ; ChiefGustavoRef.evp ; TenpennyGuardDay1Ref.evp ; TenpennyGuardDay2Ref.evp ; TenpennyGuardDay3Ref.evp ; JoJoRef.evp ; TenpennyGuardDay5Ref.evp ; TenpennyGuardNight1Ref.evp ; TenpennyGuardNight3Ref.evp ; TenpennyGuardNight5Ref.evp ; ; ; endif ; ; elseif securityCalled == 2 ; ;if enough time has passed since the guards were called, make the guards not hostile to the player ; if GameDaysPassed - securityCalledDate > 2 ; set securityCalled to 0 ; player.setFactionRank TenpennyHostileFaction -1 ; ; endif ; ; ; endif ; If AnthonyLingRef.GetDead == 0 ; If AnthonyLingRef.GetDistance NewUrbanApparelMarker > 600 ; Shopkeeper is not in the shop ; If Player.GetDistance NewUrbanApparelMarker > 600 ; Player is not in the shop ; If NewUrbanDoorRef.GetOpenState == 1 ; Door is open ; NewUrbanDoorRef.SetOpenState 0 ; Close the door ; If NewUrbanDoorRef.GetLockLevel > 0 ; NewUrbanDoorRef.Lock ; Lock the door ; EndIf ; EndIf ; EndIf ; Else ; If NewUrbanDoorRef.GetOpenState == 3 ; Door is closed ; If Player.GetInCell Tenpenny01 == 1 ; NewUrbanDoorRef.Unlock ; Unlock the door ; NewUrbanDoorRef.SetOpenState 1 ; Open it ; EndIf ; EndIf ; EndIf ; EndIf End
204DialogueUnderworldSCRIPTSCN DialogueUnderworldSCRIPT short WinthropHasGreetedPlayer short PlayerKnowsAboutCharonsDeal short PlayerHasTalkedToCarol short PlayerRobbedWinthrop short PlayerAcceptedWinthropJob short PlayerDeclinedWinthropJob short PlayerTalkedToCarolAboutGob short PlayerToldCarolAboutGobsDeath short WinthropTradeAmount short CerberusCombat short Willow1 short Willow2 short CharonKilledAhzrukhal short AhzrukhalDead short CarolDead short CerberusDead short CharonDead short DoctorBarrowsDead short EthylDead short GretaDead short MeatDead short MisterCrowleyDead short PatchworkDead short QuinnDead short TulipDead short WinthropDead
205DoctorBanfieldScriptscn DoctorBanfieldScript ;--------------------------COPIED FROM DoctorTemplateSCRIPT--------------------------------------------------------- short DoOnce ;Script blocker short BeginMedicalServicesBAD ;Used for Sawbones float Timer ;Timer used for animation control ;-------------------------------------------------------------------------------------------------------------------------------------------------- BEGIN GameMode ;--------------------------COPIED FROM DoctorTemplateSCRIPT--------------------------------------------------------- ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 1 ) if ( DoOnce== 0 ) disablePlayerControls resetai sayto player MegDocChurchMedicalChatter set Timer to 8 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHeal endif endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 10 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 2 ) if ( DoOnce== 0 ) disablePlayerControls resetai set Timer to 8 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHeal endif endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 20 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif ;-------------------------------------------------------------------------------------------------------------------------------------------------- END Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.DB to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
206DoctorBarrowsScriptscn DoctorBarrowsSCRIPT ;This script handles various issues with Doctor Barrows, the Doc in Underworld ;MS18 handlers included short Go ;When this flag is set to 1, Doc Barrows will ambush player (dialog package) short DoOnce short BeginMedicalServices ;Set to 1 in dialog, starts script below. short BeginAddictionServices ;Set to 1 in dialog, starts script below. ;Set to 1 in dialog, starts script below. short DoOnce1 ;Script blocker float Timer ;Timer used for animation control BEGIN GameMode ;This block handles the first time activation of Reilly in Underworld (sets Doc Barrows to dialog package go state) for MS18 Quest if ( DoOnce == 0 ) if ( MS18.BarrowsActive == 1 ) ;This is set in script on RRReilly when first activated set Go to 1 ;Execute dialog package Evp set DoOnce to 1 endif endif ;This block handles reviving Reilly if the Player convinces the Doctor if ( MS18.DoneWalk == 1 ) ReillyRef.SetUnconscious 0 ReillyRef.SetRestrained 0 Set ReillyRef.WakeComa to 1 Set ReillyRef.Coma to 1 ReillyRef.Evp Set MS18.DocRevive to 2 Evp Set MS18.DoneWalk to 2 endif ;Healing block (as per Erik's model) ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 1 ) if ( DoOnce== 0 ) disablePlayerControls resetai sayto player MegDocChurchMedicalChatter PlayIdle LooseDoctorHeal set Timer to 8 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 3 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 10 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 2 ) if ( DoOnce== 0 ) disablePlayerControls resetai PlayIdle LooseDoctorHeal set Timer to 8 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( IsAnimPlaying == 0 ) PlayIdle LooseDoctorHeal endif if ( Timer <= 3 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 20 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif END BEGIN OnDeath set DialogueUnderworld.DoctorBarrowsDead to 1 END
207DoctorLeskoScriptscn DoctorLeskoScript float Timer ;This script is on Doctor Lesko for handling his Death begin OnDeath if ( GetStage MS04 < 45 ) if ( IsKiller Player == 1 ) SetObjectiveDisplayed MS04 40 0 SetObjectiveDisplayed MS04 42 0 SetObjectiveDisplayed MS04 43 1 endif endif if ( GetStage MS04 == 45 ) if ( IsKiller Player == 1 ) SetObjectiveDisplayed MS04 45 0 endif endif end
208DoctorTemplateSCRIPTscn DoctorTemplateSCRIPT short DoOnce ;Script blocker short BeginMedicalServicesBAD ;Used for Sawbones float Timer ;Timer used for animation control BEGIN GameMode ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 1 ) if ( DoOnce== 0 ) disablePlayerControls sayto player MegDocChurchMedicalChatter set Timer to 8 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHealPlayer endif resetai endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 10 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 2 ) if ( DoOnce== 0 ) disablePlayerControls set Timer to 10 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHealPlayer endif resetai endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 20 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce to 0 endif endif END
209DogmeatSCRIPTscn DogmeatSCRIPT ;Follower Variables short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting ;Dogmeat Variables short Find ;0 = not finding, 1 = searching, 2 = found and should now return short FindAmmo short FindChems short FindWeapons short FindFood BEGIN OnStartCombat Player set Followers.DogmeatHired to 0 set Followers.DogmeatFired to 1 set DogmeatREF.Waiting to 0 DogmeatREF.SetPlayerTeammate 0 DogmeatREF.RemoveFromFaction FollowerFaction END BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.DogmeatHired == 1 || Followers.DogmeatFired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.DogmeatHired to 0 ShowMessage FollowerMessageDeadDogmeat endif END
210DoorActivatedByLinkedRefSCRIPTscn DoorActivatedByLinkedRefSCRIPT ; This script tells the door to only be activated by not the player ref LinkedRef Begin onActivate if linkedRef == 0 set LinkedRef to getLinkedRef endif if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg elseIf (IsActionRef LinkedRef == 1) activate endif End
211DoorCloseLockAvgOnActivatescn DoorCloseLockAvgOnActivate ; ;This script will cause a door to close and lock on activation from a reference other than the player ; ;================================== begin onActivate if isActionRef player == 0 lock 2 setOpenState 0 else activate endif end
212DoorRemoteOpenSCRIPTscn DoorRemoteOpenSCRIPT ; This script tells the door to only be activated by not the player ref activateRef Begin onActivate set activateRef to getActionRef if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg elseif (activateRef.isActor == 1) ;do nothing else activate endif End
213DukovVertibirdFlyoverSCRIPTscn DukovVertibirdFlyoverSCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation ; Once it's done animating it enables a trigger that sends a vertibird landing nearby. float timer short doOnce ref linkedRef ;***************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) set linkedRef to getLinkedRef linkedRef.enable 0 set timer to 1 set doOnce to 1 endif End ;***************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 0 set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation DukovVertibirdLandingREF.enable ;enables a trigger that sends a vertibird landing nearby set doOnce to 3 endif endif End
214Dunwich02MoverTrig01SCRIPTscn Dunwich02MoverTrig01SCRIPT float timer short doOnce Begin onTriggerEnter Player if (doOnce == 0) Dunwich02Mover01REF.placeatme DunwichFakeForceBallSmall 1 set doOnce to 1 set timer to 1 endif End ;************************ Begin gameMode if (doOnce == 1) if (timer < 0) Dunwich02Mover02REF.placeatme DunwichFakeForceBallSmall 1 set doOnce to 2 set timer to .25 else set timer to (timer - GetSecondsPassed) endif endif if (doOnce == 2) if (timer < 0) Dunwich02Mover03REF.placeatme DunwichFakeForceBallMedium 1 set doOnce to 3 set timer to 4 else set timer to (timer - GetSecondsPassed) endif endif if (doOnce == 3) if (timer < 0) Dunwich02Mover04REF.placeatme DunwichFakeForceBallMedium 1 set doOnce to 4 else set timer to (timer - GetSecondsPassed) endif endif End
215Dunwich02PastManPrepTrigSCRIPTscn Dunwich02PastManPrepTrigSCRIPT float timer short doOnce Begin onTriggerEnter Player if (doOnce == 0) Dunwich02PastMan01REF.enable set doOnce to 1 set timer to .5 endif End ;********************************** Begin gameMode if (doOnce == 1) if (timer < 0) Dunwich02PastMan01REF.moveTo Dunwich02PastMan01MarkerREF set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End
216Dunwich03ActivateLinkedRefSCRIPTscn Dunwich03ActivateLinkedRefSCRIPT ; a standard, all-purpose script ref myLink ref mySelf short doOnce begin onTriggerEnter player if doOnce == 0 set myLink to getLinkedRef set mySelf to getSelf myLink.activate player 1 set doOnce to 1 endif end
217DunwichBuilding01NoteActivator01SCRIPTscn DunwichBuilding01NoteActivator01SCRIPT ref target short doOnce Begin onActivate if IsActionRef player == 1 if doOnce == 0 set target to getLinkedRef target.enable set doOnce to 1 ;Trigger is only set off one time endif endif End
218DunwichPastTrigger01SCRIPTscn DunwichPastTrigger01SCRIPT float timer short stage Begin onTriggerEnter Player if (stage == 0) IMOD Dunwich02ISFX set timer to .2 set stage to 1 endif End ;************************************* Begin gameMode if (stage == 1) if (timer < 0) player.moveto DunwichPastMarker01REF player.playSound UIVATSCameraIn Dunwich02PastMan01REF.enable Dunwich02GlowingOne01REF.enable ;Dunwich02GlowingOne01REF.startCombat Player set timer to 1 set stage to 2 else set timer to (timer - GetSecondsPassed) endif endif if (stage == 2) if (timer < 0) player.moveto DunwichPastMarker02REF player.playSound UIVATSCameraOut Dunwich02PastMan01REF.disable set stage to 3 else set timer to (timer - GetSecondsPassed) endif endif End
219EdgarWellingtonIIScriptscn EdgarWellingtonIIScript short shotTimes Begin OnHit MillicentWellingtonRef if MillicentWellingtonRef.killHusband == 1 && shotTimes >=4 kill set MillicentWellingtonRef.KillHusband to 3 ;this gets her walking away again, set MillicentWellingtonRef.deathTimer to 5 ;but when the timer runs out, she returns to shoot his corpse MillicentWellingtonRef.EVP else set shotTimes to shotTimes + 1 endif End Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.EW to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
220EnclaveBroadcastEffectSCRIPTscn EnclaveBroadcastEffectSCRIPT begin ScriptEffectStart if GetDead == 0 SetNPCRadio 1 RadioEnclaveREF endif end begin ScriptEffectFinish SetNPCRadio 0 RadioEnclaveREF end
221EnclaveCamp14VertibirdScriptscn EnclaveCamp14VertibirdScript ; This trigger enables 2 vertibirds to fly over the camp after MQ05 float timer short runTimer short stage begin onTriggerEnter player if (stage == 0) && (getStage MQ05 >= 85) EnclaveCamp14Vertibird01.enable EnclaveCamp14Vertibird02.enable set runTimer to 1 set timer to 1 set stage to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if stage == 1 EnclaveCamp14Vertibird01.playgroup Forward 1 set timer to 2 set stage to 2 elseif stage == 2 EnclaveCamp14Vertibird02.playgroup Forward 1 set stage to 3 elseif stage == 3 if EnclaveCamp14Vertibird01.isAnimPlaying Forward == 0 EnclaveCamp14Vertibird01.disable ;disable the vertibird when it's done playing its forward animation set stage to 4 endif elseif stage == 4 if EnclaveCamp14Vertibird02.isAnimPlaying Forward == 0 EnclaveCamp14Vertibird02.disable ;disable the vertibird when it's done playing its forward animation set runTimer to 0 endif endif endif endif end
222EnclaveCamp19VertibirdScriptscn EnclaveCamp19VertibirdScript ; This trigger enables 2 vertibirds to fly over the satellite float timer short runTimer short stage begin onTriggerEnter player if (stage == 0) && (getStage MQ05 >= 85) if getStage MQ05 >= 85 EnclaveCamp19Vertibird01.enable EnclaveCamp19Vertibird02.enable set runTimer to 1 set timer to 1 set stage to 1 endif endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if stage == 1 EnclaveCamp19Vertibird01.playgroup Forward 1 EnclaveCamp19Vertibird02.playgroup Forward 1 set stage to 2 elseif stage == 2 if EnclaveCamp19Vertibird01.isAnimPlaying Forward == 0 EnclaveCamp19Vertibird01.disable ;disable the vertibird when it's done playing its forward animation EnclaveCamp19Vertibird02.disable ;disable the vertibird when it's done playing its forward animation set runTimer to 0 endif endif endif endif end
223EnclaveCamp22VertibirdScriptscn EnclaveCamp22VertibirdScript ; This trigger enables a vertibird to flyby float timer short runTimer short stage begin onTriggerEnter player if (stage == 0) && (getStage MQ05 >= 85) if getStage MQ05 >= 85 EnclaveCamp22Vertibird01.enable set runTimer to 1 set timer to 1 set stage to 1 endif endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if stage == 1 EnclaveCamp22Vertibird01.playgroup Forward 1 set stage to 2 elseif stage == 2 if EnclaveCamp22Vertibird01.isAnimPlaying Forward == 0 EnclaveCamp22Vertibird01.disable ;disable the vertibird when it's done playing its forward animation set runTimer to 0 endif endif endif endif end
224EnclaveCamp30InitScriptscn EnclaveCamp30InitScript begin onTriggerEnter player if (getStage MQ05 >= 85) EnclaveCamp30VertibirdLandTrigREF.enable EnclaveCamp30Bird.enable EnclaveCamp30Scorp01.enable EnclaveCamp30Scorp02.enable EnclaveCamp30Scorp03.enable endif end
225EnclaveCamp30VertibirdLandScriptscn EnclaveCamp30VertibirdLandScript float timer short runTimer short doOnce float enclaveStamp float birdTakeoffStamp short enclaveFlag short birdTakeoffFlag begin onLoad set timer to 20 set enclaveStamp to timer - 17 set birdTakeoffStamp to timer - 19 end begin onTriggerEnter player if (doOnce == 0) && (getStage MQ05 >= 85) EnclaveCamp30Bird.playGroup forward 0 set runTimer to 1 set doOnce to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed endif if enclaveFlag == 0 if timer <= enclaveStamp if (EnclaveCamp30Bird.getDestroyed == 0) EnclaveCamp30Enclave01.enable EnclaveCamp30Enclave02.enable EnclaveCamp30Enclave03.enable endif set enclaveFlag to 1 endif endif if birdTakeoffFlag == 0 if timer <= birdTakeoffStamp if (EnclaveCamp30Bird.getDestroyed == 0) EnclaveCamp30Bird.playGroup backward 0 endif set birdTakeoffFlag to 1 endif else if EnclaveCamp30Bird.isAnimPlaying Backward == 0 && (EnclaveCamp30Bird.getDestroyed == 0) EnclaveCamp30Bird.disable ;disable the vertibird when it's done playing its backward animation set runTimer to 0 endif endif if (EnclaveCamp30Bird.getDestroyed == 1) set runTimer to 1 endif endif end
226EnclaveCamp31VertibirdLandScriptscn EnclaveCamp31VertibirdLandScript float timer short runTimer short doOnce float birdLandStamp float enclaveStamp float birdTakeoffStamp short birdLandFlag short enclaveFlag short birdTakeoffFlag begin onLoad set timer to 20 set birdLandStamp to timer - 0.1 set enclaveStamp to timer - 17 set birdTakeoffStamp to timer - 19 end begin onTriggerEnter player if (doOnce == 0) && (getStage MQ05 >= 85) EnclaveCamp31Mutant01.enable EnclaveCamp31Mutant02.enable EnclaveCamp31Mutant03.enable EnclaveCamp31Bird.enable 0 set runTimer to 1 set doOnce to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed endif if birdLandFlag == 0 if timer <= birdLandStamp EnclaveCamp31Bird.playGroup forward 0 set birdLandFlag to 1 endif endif if enclaveFlag == 0 if timer <= enclaveStamp EnclaveCamp31Gun01.enable EnclaveCamp31Gun02.enable EnclaveCamp31Gun03.enable set enclaveFlag to 1 endif endif if birdTakeoffFlag == 0 if timer <= birdTakeoffStamp if (EnclaveCamp31Bird.getDestroyed == 0) EnclaveCamp31Bird.playGroup backward 0 endif set birdTakeoffFlag to 1 endif else if EnclaveCamp31Bird.isAnimPlaying Backward == 0 && (EnclaveCamp31Bird.getDestroyed == 0) EnclaveCamp31Bird.disable ;disable the vertibird when it's done playing its backward animation set runTimer to 0 endif endif if (EnclaveCamp31Bird.getDestroyed == 1) set runTimer to 1 endif endif end
227EnclaveCamp32VertibirdLandScriptscn EnclaveCamp32VertibirdLandScript float timer short runTimer short doOnce float birdLandStamp float enclaveStamp float birdTakeoffStamp short birdLandFlag short enclaveFlag short birdTakeoffFlag begin onLoad set timer to 20 set birdLandStamp to timer - 0.1 set enclaveStamp to timer - 17 set birdTakeoffStamp to timer - 19 end begin onTriggerEnter player if (doOnce == 0) && (getStage MQ05 >= 85) EnclaveCamp32Bird.enable set runTimer to 1 set doOnce to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed endif if birdLandFlag == 0 if timer <= birdLandStamp EnclaveCamp32Bird.playGroup forward 0 set birdLandFlag to 1 endif endif if enclaveFlag == 0 if timer <= enclaveStamp if (EnclaveCamp32Bird.getDestroyed == 0) EnclaveCamp32Gun01.enable EnclaveCamp32Gun02.enable endif set enclaveFlag to 1 endif endif if birdTakeoffFlag == 0 if timer <= birdTakeoffStamp if (EnclaveCamp32Bird.getDestroyed == 0) EnclaveCamp32Bird.playGroup backward 0 endif set birdTakeoffFlag to 1 endif else if EnclaveCamp32Bird.isAnimPlaying Backward == 0 && (EnclaveCamp32Bird.getDestroyed == 0) EnclaveCamp32Bird.disable ;disable the vertibird when it's done playing its backward animation set runTimer to 0 endif endif if (EnclaveCamp32Bird.getDestroyed == 1) set runTimer to 1 endif endif end
228EnclaveCamp34VertibirdLandScriptscn EnclaveCamp34VertibirdLandScript float timer short runTimer short doOnce float birdLandStamp float enclaveStamp float birdTakeoffStamp short birdLandFlag short enclaveFlag short birdTakeoffFlag begin onLoad set timer to 21 set birdLandStamp to timer - 1 set enclaveStamp to timer - 18 set birdTakeoffStamp to timer - 20 end begin onTriggerEnter player if (doOnce == 0) && (getStage MQ05 >= 85) EnclaveCamp34Bird.enable set runTimer to 1 set doOnce to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed endif if birdLandFlag == 0 if timer <= birdLandStamp EnclaveCamp34Bird.playGroup forward 0 set birdLandFlag to 1 endif endif if enclaveFlag == 0 if timer <= enclaveStamp if (EnclaveCamp34Bird.getDestroyed == 0) EnclaveCamp34Enclave01.enable EnclaveCamp34Enclave02.enable EnclaveCamp34Enclave03.enable EnclaveCamp34Scorp01.enable EnclaveCamp34Scorp02.enable EnclaveCamp34Scorp03.enable EnclaveCamp34Scorp04.enable endif set enclaveFlag to 1 endif endif if birdTakeoffFlag == 0 if timer <= birdTakeoffStamp if (EnclaveCamp34Bird.getDestroyed == 0) EnclaveCamp34Bird.playGroup backward 0 endif set birdTakeoffFlag to 1 endif else if EnclaveCamp34Bird.isAnimPlaying Backward == 0 && (EnclaveCamp34Bird.getDestroyed == 0) EnclaveCamp34Bird.disable ;disable the vertibird when it's done playing its backward animation set runTimer to 0 endif endif if (EnclaveCamp34Bird.getDestroyed == 1) set runTimer to 1 endif endif end
229EnclaveDeathclawCageOfficerSCRIPTscn EnclaveDeathclawCageOfficerSCRIPT ;this script goes on the deathclaw cage officer ;the officer will run over to the cage and unlock the door if he is in combat with the player or has been hit by the player ref linkedRef ;where you want the officer to stand when he unlocks the door ref deathclawDoor ; the deathclaw door should be the linkedRef of the linkedRef (daisy chain) ref combatRef short doOnce ;********************************* Begin onLoad set doOnce to 0 End ;********************************* Begin onPackageEnd DeathclawCAGEOfficer01a set linkedRef to getLinkedRef set deathclawDoor to linkedRef.getLinkedRef deathclawDoor.unlock setav variable01 2 evp End ;********************************* Begin onHit Player if (doOnce == 0) setav variable01 1 ;condition used for his package to run to the deathclaw cage evp set doOnce to 1 endif End ;********************************* Begin gameMode if (doOnce == 0) if (isInCombat) set combatRef to getCombatTarget if combatRef == player setav variable01 1 ;condition used for his package to run to the deathclaw cage evp set doOnce to 1 endif endif endif End ;*********************************
230EthylSCRIPTSCN EthylSCRIPT BEGIN OnDeath set DialogueUnderworld.EthylDead to 1 END
231EvergreenMillsBehemothDoor02TrigSCRIPTscn EvergreenMillsBehemothDoor02TrigSCRIPT ref actionRef float timer short doOnce ;************************************ Begin onTriggerEnter set actionRef to getActionRef if (actionRef == EvergreenMillsBehemoth01REF) EvergreenMillsFenceGate02REF.setOpenState 1 set timer to 3 set doOnce to 1 endif End ;************************************ Begin gameMode if (doOnce == 1) if (timer <= 0) EvergreenMillsFenceGate02REF.setOpenState 1 set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End
232EvergreenMillsBehemothDoorTrigSCRIPTscn EvergreenMillsBehemothDoorTrigSCRIPT ref actionRef float timer short doOnce ;************************************ Begin onTriggerEnter set actionRef to getActionRef if (actionRef == EvergreenMillsBehemoth01REF) if (EvergreenMillsElectricBoxREF.getDestroyed == 1) EvergreenMillsFenceGate01REF.setOpenState 1 set timer to 3 set doOnce to 1 endif endif End ;************************************ Begin gameMode if (doOnce == 1) if (timer <= 0) EvergreenMillsFenceGate01REF.setOpenState 1 set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End ;************************************
233EvergreenMillsElectricalSwitch01SCRIPTscn EvergreenMillsElectricalSwitch01SCRIPT short doOnce ref actionRef Begin onActivate set actionRef to getActionRef if (actionRef == Player) if (EvergreenMillsElectricBoxREF.getDestroyed == 0) if (EvergreenMillsFenceGate01REF.getOpenState == 0) || (EvergreenMillsFenceGate01REF.getOpenState >= 3) if (doOnce == 0) EvergreenMillsElectricDoorREF.disable set doOnce to 1 elseif (doOnce == 1) EvergreenMillsElectricDoorREF.enable set doOnce to 0 endif endif endif activate endif End
234EvergreenMillsElectricBox01SCRIPTscn EvergreenMillsElectricBox01SCRIPT short doOnce Begin gameMode if (doOnce == 0) if (EvergreenMillsElectricBoxREF.getDestroyed == 1) EvergreenMillsElectricDoorREF.disable set doOnce to 1 endif endif End
235EvergreenMillsFenceGate01SCRIPTscn EvergreenMillsFenceGate01SCRIPT short doOnce short triggered float timer ;************************** Begin onActivate if (EvergreenMillsElectricDoorREF.getDisabled == 0) && ( IsActionRef Player == 1 ) set triggered to 1 else activate endif End ;************************** Begin gameMode if (triggered == 1) ;shock the player after time has passed. if timer > 0 set timer to timer - GetSecondsPassed else player.damageAV health 25 playSound3D TRPToilet imod TrapToiletShockISFX set triggered to 0 set timer to .25 endif endif if (doOnce == 0) if (EvergreenMillsElectricBoxREF.getDestroyed == 1) EvergreenMillsBehemoth01REF.removeFromFaction EvergreenMillsBehemothFaction EvergreenMillsBehemoth01REF.setFactionRank superMutantFaction 4 EvergreenMillsBehemoth01REF.setav variable01 1 EvergreenMillsBehemoth01REF.setav aggression 3 EvergreenMillsBehemoth01REF.evp set doOnce to 1 endif endif End ;************************** ; removed following lines of script from box destroy block ;EvergreenMillsBehemoth01REF.removeFromFaction EvergreenMillsSlaveFaction ;EvergreenMillsBehemoth01REF.removeFromFaction RaiderFaction ;EvergreenMillsBehemoth01REF.removeFromFaction PlayerFaction ;Player.removeFromFaction EvergreenMillsBehemothFaction
236EvergreenMillsRaiderConversationTriggerScriptSCN EvergreenMillsRaiderConversationTriggerScript short DoOnce BEGIN OnTriggerEnter Player if DoOnce == 0 set DoOnce to 1 EvergreenMillsRaiderCampfire01REF.StartConversation EvergreenMillsRaiderCampfire01REF EvergreenCampfireFight01 endif END
237EvergreenMillsSlave01SCRIPTscn EvergreenMillsSlave01SCRIPT short doOnce ;*********************** Begin gameMode if (doOnce ==0) && ( GetDead == 0 ) if (EvergreenMillsSlavePenDoor01REF.getLocked == 0) RewardKarma 10 setav variable01 1 evp removeFromFaction RaiderFaction removeFromFaction EvergreenMillsBehemothFaction set doOnce to 1 endif endif End ;***********************
238EvergreenMillsSlave02SCRIPTscn EvergreenMillsSlave02SCRIPT short doOnce ;*********************** Begin gameMode if (doOnce ==0) if (EvergreenMillsSlavePenDoor02REF.getLocked == 0) setav variable01 1 evp removeFromFaction RaiderFaction removeFromFaction EvergreenMillsBehemothFaction set doOnce to 1 endif endif End ;***********************
239EvergreenMillsSlavePenTriggerSCRIPTscn EvergreenMillsSlavePenTriggerSCRIPT ; This trigger is triggered by the player when he enters the pen short target short doOnce ref linkedRef float timer Begin onTriggerEnter Player if doOnce == 0 EvergreenMillsSlavePenAmbushREF.enable EvergreenMillsSlavePenAmbushREF.additem EvergreenMillsSlaveKey 1 ;EvergreenMillsSlavePenDoor01REF.unlock ;EvergreenMillsSlavePenDoor02REF.unlock set target to 1 ;used as condition for raider package EvergreenMillsSlavePenAmbushREF.evp set timer to 20 set doOnce to 1 ;Trigger is only set off one time endif End ;************************************ Begin gameMode if (doOnce == 1) if (timer <= 0) set linkedRef to getLinkedRef if (linkedRef == EvergreenMillsSlavePenDoor01REF) EvergreenMillsSlavePenDoor01REF.unlock elseif (linkedRef == EvergreenMillsSlavePenDoor02REF) EvergreenMillsSlavePenDoor02REF.unlock endif set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End
240EvergreenMillsSniperSCRIPTSCN EvergreenMillsSniperSCRIPT ref MySelf BEGIN GameMode if ( GetAV Health <= 10 ) && ( GetDead == 0 ) set MySelf to Getself Player.PushActorAway MySelf -20 kill endif END
241FairfaxGasValve01SCRIPTscn FairfaxGasValve01SCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short gasValveRepaired ; 1 = gas valve has been repaired short repairAttempt ; 0 = default 1 = PC wants to try and repair the gas valve short doOnce ; 0 = gas trap has not been enabled yet - we only want the gas trap to appear once 1 = player has already let the gas out short skillNeeded ; repair skill needed to repair the gas valve short button ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin onLoad set skillNeeded to 25 End Begin onActivate if IsActionRef player == 1 if gasValveRepaired== 0 if player.GetAv Repair < skillNeeded ShowMessage GenericGasValveLowSkillMsg skillNeeded endif if player.GetAv Repair >= skillNeeded ShowMessage GenericGasValveSkillMsg set repairAttempt to 1 ; set up to repair endif elseif gasValveRepaired == 1 && doOnce == 0 FairfaxGasTrap01REF.enable set doOnce to 1 endif endif End Begin gameMode if repairAttempt == 1 ; procedure for repairing the gas valve set button to getbuttonpressed if button > -1 set repairAttempt to 0 if button == 0 ShowMessage GenericGasValveRepairMsg set gasValveRepaired to 1 ; gas valve has been repaired elseif button == 1 ; don't do anything endif endif endif End
242FakeForceBallOnTriggerEnterScriptscn FakeForceBallOnTriggerEnterScript short doOnce begin onTriggerEnter if doOnce != 1 placeAtMe FakeForce100r25 set doOnce to 1 endif end
243FallsChurchBoSLeader01SCRIPTscn FallsChurchBoSLeader01SCRIPT short FallsChurchStage ; 0 means mini quest hasn't begun ; 1 means player has spoken with the Paladin and has agreed to help BEGIN OnDeath if ( GetStageDone FreeformDC 19 == 0 ) FF02InititiateREF.Kill endif END
244FallsChurchBoSLostInititateSCRIPTSCN FallsChurchBoSLostInititateSCRIPT Short Rescued BEGIN OnDeath if ( GetStageDone FreeformDC 14 == 1 ) SetStage FreeformDC 15 endif END
245FallsChurchTrigPlayerBox03SCRIPTscn FallsChurchTrigPlayerBox03SCRIPT ;This trigger is in West Falls Church and moves two BoS to positions ready for a FFQuest short doOnce ; set to 1 when player triggers Begin onTriggerEnter Player if (doOnce == 0) if FreeformDC.FallsChurchFromMetro == 0 && FreeformDC.FallsChurchFromNorth == 0 set FreeformDC.FallsChurchFromMetro to 1 ;make sure the player is coming from the metro FallsChurchBoSLeader01REF.enable 0 ; enables the two BoS leaders near the metro station FallsChurchMetroMutant01REF.enable 0 ;enables the two mutants near the metro station FallsChurchBoSLeader01REF.moveto FallsChurchBoS01LeaderMetroStartREF FallsChurchBoSLeader02REF.moveto FallsChurchBoS02LeaderMetroStartREF endif set doOnce to 1 endif End
246FallsChurchTrigPlayerBox04SCRIPTscn FallsChurchTrigPlayerBox04SCRIPT ;This trigger is in East Falls Church and moves two BoS to positions ready for a FFQuest short doOnce ; set to 1 when player triggers Begin onTriggerEnter Player if (doOnce == 0) if (FreeformDC.FallsChurchFromNorth == 0) && (FreeformDC.FallsChurchFromMetro == 0) set FreeformDC.FallsChurchFromNorth to 1 ;player has entered Falls Church from the north FallsChurchBoSLeader01REF.moveto FallsChurchBoS01LeaderLOBEStartREF FallsChurchBoSLeader02REF.moveto FallsChurchBoS02LeaderLOBEStartREF FallsChurchBoSLeader01REF.enable 0 ;enables the two BoS soldiers FallsChurchMetroMutant01REF.enable 0 ;enables the two mutants near the west metro station endif set doOnce to 1 endif End
247FFBaseballSCRIPTscn FFBaseballSCRIPT ref activatron begin onTriggerEnter set activatron to getActionRef if activatron == GrenadeFragProjectile if activatron.isWeaponOut == 1 showwarning "trigenter w/projectile" BatterREF.useWeapon weapBaseballBat BatterMarker activatron 1 placeatMe FakeForceBall1000 set NQlvl.ballHit to 1 batterREF.evp endif endif end begin onHitwith WeapGrenadeFrag showWarning "onHit" end ;ref enteringObject ; ;begin onHitWith ExplodesGasTrapsOnHit; ; ;ExplodesGasTrapsOnHit is a form list that has every type of weapon fire and explosion that could potentially ignite a gas trap on contact. ; ; do 5 ;end ; ; ;begin onTriggerEnter ;; ; set enteringObject to getActionRef ; if (enteringObject.isWeaponInList ExplodesGasTrapsOnTouch) ; if (enteringObject.isWeaponOut == 1) ; do 5 ; endif ; endif ; ; if (enteringObject.HasMagicEffect FlamerMagicEffect == 1) ; do 5 ; endif ; ;end ;
248FFChurchSniperSCRIPTscn FFChurchSniperSCRIPT ; simple script to nudge this guy off his ledge and into loot range when he's killed. begin gameMode if player.getHasNote OasisExileHolotape == 1 if OasisMapMarker.GetMapMarkerVisible == 0 player.showMap OasisMapMarker 0 endif endif end begin onDeath placeatMe fakeForceBall250 end
249FFDCAdamsMorganPreacherSCRIPTSCN FFDCAdamsMorganPreacherSCRIPT short DoOnce short Bomb short Boom short Detonation float Timer float Timer2 ref MySelf BEGIN OnLoad set MySelf to Getself ; if I'm not dead, reset variables if getDead == 0 set DoOnce to 0 setAV Health 10 endif END BEGIN GameMode if ( GetDead == 0 ) && ( Detonation == 0 ) if ( GetDistance Player <= 4000 ) Set Timer2 to ( Timer2 - GetSecondsPassed ) if ( Timer2 <= 0 ) FFDCSewardSquareSpeaker02REF.say FFDCAdamsMorganSermon 0 FFDCAdamsMorganPreacher 1 PlayIdle LooseTalkBHPreachIdleA230 set Timer2 to 17 endif endif endif if ( Bomb == 1 ) && ( Boom <= 10 ) && ( GetDead == 0 ) set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 5.0 ) && ( Boom == 0 ) if ( GetDistance FFCCAdamsMorganCrazedWastelanderREF <= 1000 ) FFCCAdamsMorganCrazedWastelanderREF.setav Health 1 FFCCAdamsMorganCrazedWastelanderREF.PlaceAtMe LargeExplosion kill FFCCAdamsMorganCrazedWastelanderREF 4 kill FFCCAdamsMorganCrazedWastelanderREF 5 kill FFCCAdamsMorganCrazedWastelanderREF 6 kill FFCCAdamsMorganCrazedWastelanderREF 7 kill FFCCAdamsMorganCrazedWastelanderREF 8 kill FFCCAdamsMorganCrazedWastelanderREF 9 FFCCAdamsMorganCrazedWastelanderREF.PlaceAtMe LargeExplosion FFCCAdamsMorganCrazedWastelanderREF.PushActorAway FFCCAdamsMorganCrazedWastelanderREF 30 endif set boom to 1 endif if ( Timer <= 4.0 ) && ( Boom == 1 ) FFDCAdamsMorganPreacherMine01.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine01.disable set Boom to 2 endif if ( Timer <= 3.5 ) && ( Boom == 2 ) FFDCAdamsMorganPreacherMine02.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine02.disable set Boom to 3 endif if ( Timer <= 3.0 ) && ( Boom == 3 ) FFDCAdamsMorganPreacherMine03.PlaceAtMe LargeExplosion FFDCAdamsMorganPreacherMine03.disable set Boom to 4 endif if ( Timer <= 2.5 ) && ( Boom == 4 ) FFDCAdamsMorganPreacherMine04.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine04.disable FFDCAdamsMorganPreacherMine10.PlaceAtMe LargeExplosion FFDCAdamsMorganPreacherMine10.disable set Boom to 5 endif if ( Timer <= 2.0 ) && ( Boom == 5 ) FFDCAdamsMorganPreacherMine05.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine05.disable FFDCAdamsMorganPreacherMine11.PlaceAtMe LargeExplosion FFDCAdamsMorganPreacherMine11.disable set Boom to 6 endif if ( Timer <= 1.5 ) && ( Boom == 6 ) FFDCAdamsMorganPreacherMine06.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine06.disable set Boom to 7 endif if ( Timer <= 1.0 ) && ( Boom == 7 ) FFDCAdamsMorganPreacherMine07.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine07.disable set Boom to 8 endif if ( Timer <= .5 ) && ( Boom == 8 ) FFDCAdamsMorganPreacherMine08.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine08.disable set Boom to 9 endif if ( Timer <= .25 ) && ( Boom == 9 ) FFDCAdamsMorganPreacherMine09.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganPreacherMine09.disable set Boom to 10 endif if ( Timer < 0 ) && ( Boom == 10 ) set MySelf to Getself setGhost 0 FFDCAdamsMorganPreacherMine12.PlaceAtMe LargeExplosion FFDCAdamsMorganPreacherMine12.disable FFDCAdamsMorganFatmanMARKER.PlaceAtMe FatManNukeExplosion FFDCAdamsMorganFatman.disable MySelf.PlaceAtMe FatManNukeExplosion kill MySelf 1 kill MySelf 2 kill MySelf 3 kill MySelf 4 kill MySelf 5 kill MySelf 6 kill MySelf 7 kill MySelf 8 kill MySelf 9 kill MySelf 10 set Boom to -1 set Bomb to -1 endif endif if ( GetDead == 0 ) && ( Detonation == 0 ) if ( GetDetected Player == 1 ) && ( GetDistance Player <= 1900 ) playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick set Timer to 6 set Bomb to 1 setGhost 1 PlayIdle LooseRadioBangOn set Detonation to 1 endif if ( GetDistance FFCCAdamsMorganCrazedWastelanderREF <= 1500 ) playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick playsound3d WPNMineTick set Timer to 6 set Bomb to 1 setGhost 1 PlayIdle LooseRadioBangOn set Detonation to 1 endif endif if GetDead == 0 if ( IsInCombat == 1 ) && ( GetAV Health <= 9 ) set MySelf to Getself Player.PushActorAway MySelf -20 kill endif endif END
250FFEC09TurretScriptscn FFEC09TurretScript BEGIN ONADD Player FFEC09TurretA.addToFaction playerFaction 1 FFEC09TurretA.stopCombat FFEC09TurretB.addToFaction playerFaction 1 FFEC09TurretB.stopCombat FFEC09TurretC.addToFaction playerFaction 1 FFEC09TurretC.stopCombat FFEC09TurretD.addToFaction playerFaction 1 FFEC09TurretD.stopCombat END Begin OnDrop player FFEC09TurretA.removeFromFaction playerFaction FFEC09TurretA.stopCombat FFEC09TurretB.removeFromFaction playerFaction FFEC09TurretB.stopCombat FFEC09TurretC.removeFromFaction playerFaction FFEC09TurretC.stopCombat FFEC09TurretD.removeFromFaction playerFaction FFEC09TurretD.stopCombat End
251FFEDisableMeScriptscn FFEDisableMeScript short loaded begin OnLoad set loaded to loaded + 1 ; if this is the second time I'm being loaded, just disable me if loaded > 1 disable markfordelete endif end
252FFEDoctorSCRIPTscn FFEDoctorSCRIPT short BeginMedicalServices ;Set to 1 in dialog, starts script below. ; replace with getav variable01 == 1 short BeginAddictionServices ;Set to 1 in dialog, starts script below. ; replace with getav variable01 == 2 short DoOnce ;Script blocker float Timer ;Timer used for animation control BEGIN GameMode ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( getav variable01 == 1 ) if ( DoOnce== 0 ) disablePlayerControls evp sayto player MegDocChurchMedicalChatter PlayIdle LooseDoctorHeal set Timer to 8 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 10 enablePlayerControls addScriptPackage DefaultNPCDialogPlayer endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( getav variable01 == 2 ) if ( DoOnce== 0 ) disablePlayerControls evp PlayIdle LooseDoctorHeal set Timer to 8 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( IsAnimPlaying == 0 ) PlayIdle LooseDoctorHeal endif if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 20 enablePlayerControls addScriptPackage DefaultNPCDialogPlayer endif endif ; clear DoOnce when variable has been reset if DoOnce > 0 if getav variable01 == 0 set DoOnce to 0 endif endif END
253FFEnclaveEncampment03Scriptscn FFEnclaveEncampment03SCRIPT begin onTriggerEnter player FFEnclaveEncampment03AmbusherA.enable FFEnclaveEncampment03AmbusherBoss.enable FFEnclaveEncampment03AmbusherC.enable disable end
254FFER02AntSCRIPTscn FFER02AntSCRIPT short startGrow ; set to 1 to start growing float myScale ; current scale float targetScale ; how big do I want to get? begin OnLoad if startGrow == 0 set startGrow to 1 setav aggression 2 set myScale to GetScale set targetScale to myScale * 1.5 endif end begin gamemode if startGrow == 1 if myScale < targetScale set myScale to myScale + .002 setScale myScale else set startGrow to 2 evp endif endif end
255FFER05LootBoxSCRIPTscn FFER05LootBoxSCRIPT short empty ; set to 1 to prevent activation from going to loot box ; any container with this script actually opens FFER05LootBoxREF ; when reloaded after I'm dead, pretend I've already been looted to prevent access to respawning container begin OnLoad if getDead == 1 set empty to 1 endif end begin OnDeath set FFERepeatA.enc5brahminDead to 1 end begin OnActivate ; can only access inventory if dead, and not "empty" if IsActionRef player == 1 && GetDead == 1 && empty == 0 FFER05LootBoxREF.Activate player ; send alarm to get scavenger to react SendAssaultAlarm player WastelandScavengerFaction else Activate endif end
256FFER08PreyScriptscn FFER08PreyScript ref mySelfRef float timer short done begin gamemode if GetDead == 1 ; run timer to move marker after corpse has settled if done == 0 set timer to timer - GetSecondsPassed if timer < 0 set done to 1 set mySelfRef to GetSelf FFER08Marker1.moveto mySelfRef endif endif endif end begin OnDeath set mySelfRef to GetSelf ; move marker to me when I die so hunters can guard it FFER08Marker1.moveto mySelfRef ; tell quest that I'm dead set FFERepeatA.enc8preyDead to 1 ; make me owned by hunters setOwnership WastelandHunterFaction ; run timer set timer to 5 end
257FFER10EyebotScriptscn FFER10EyebotScript ref mySelfRef float timer short done begin gamemode if GetDead == 1 ; run timer to move marker after corpse has settled if done == 0 set timer to timer - GetSecondsPassed if timer < 0 set done to 1 FFER10Marker1.moveto mySelfRef endif endif endif end begin OnDeath set mySelfRef to GetSelf ; move marker to me when I die so hunters can guard it FFER10Marker1.moveto mySelfRef ; tell quest that I'm dead set FFERepeatA.enc10eyebotDead to 1 ; make me owned by scavenger setOwnership WastelandScavengerFaction ; run timer set timer to 5 end
258FFER11EyebotScriptscn FFER11EyebotScript begin OnDeath ; tell quest that I'm dead set FFERepeatA.enc11scene to 1 end
259FFER15LootBoxSCRIPTscn FFER15LootBoxSCRIPT short empty ; set to 1 to prevent activation from going to loot box ; any container with this script actually opens FFER15LootBoxREF ; when reloaded after I'm dead, pretend I've already been looted to prevent access to respawning container begin OnLoad if getDead == 1 set empty to 1 endif end begin OnDeath set FFERepeatA.enc15brahminDead to 1 end begin OnActivate ; can only access inventory if dead, and not "empty" if IsActionRef player == 1 && GetDead == 1 && empty == 0 FFER15LootBoxREF.Activate player ; send alarm to get scavenger to react SendAssaultAlarm player WastelandScavengerFaction else Activate endif end
260FFER53Outcast1SCRIPTscn FFER53Outcast1SCRIPT float timer short doOnce ; run timer to enable deathclaws shortly after I'm created begin OnLoad if doOnce == 0 set doOnce to 1 set timer to 1 endif end begin gamemode if doOnce == 1 if timer > 0 set timer to timer - GetSecondsPassed else set doOnce to 2 set FFERepeatB.enc53createDeathclaws to 1 endif endif end
261FFER57SlaveSCRIPTscn FFER57SlaveSCRIPT ref myself begin OnDeath set FFER57slaveDead to FFER57slaveDead + 1 end begin gamemode if myself == 0 set myself to GetSelf endif ; mark player having "seen" the slaves if FFERepeatB.enc57seenSlaves == 0 if player.getdetected myself == 1 set FFERepeatB.enc57seenSlaves to 1 endif endif end
262FFER59RaiderSCRIPTscn FFER59RaiderSCRIPT begin OnDeath ; decrement variable -- when it hits 0 all are dead set FFERepeatB.enc59RaidersDead to FFERepeatB.enc59RaidersDead - 1 end
263FFER59ScavengerSCRIPTscn FFER59ScavengerSCRIPT begin OnDeath set FFERepeatB.enc59ScavengerDead to 1 end
264FFER62EyebotSCRIPTscn FFER62EyebotSCRIPT short dieRoll short runTimer float timer ; attacking eyebot might summon vertibird patrol to investigate begin OnStartCombat player ; only summon if within distance of patrol marker (otherwise the marker may have been moved to a different encounter location) if GetStage MQ05 >= 80 && GetDistance FFER62Marker2 < 5000 && FFETrigger.vertibirdLand == 1 ; die roll modified by luck set dieRoll to GetRandomPercent ; better chance with low luck, lower chance with high luck set dieRoll to dieRoll - ( ( player.getav luck ) * 10) + 50 if dieRoll > 50 set runTimer to 1 set timer to ( GetRandomPercent + 30 ) endif endif end begin gamemode if runTimer > 0 if timer > 0 set timer to timer - GetSecondsPassed else set FFERepeatB.enc62vertibird to 1 set runTimer to 0 endif endif end
265FFER62VertibirdEncounterSCRIPTscn FFER62VertibirdEncounterSCRIPT short active begin onLoad if active == 0 playgroup forward 0 set active to 1 endif end begin gameMode if active == 1 if isanimplaying forward == 0 if getDestroyed == 0 set FFERepeatB.enc62vertibird to 3 playgroup backward 0 endif set active to 2 endif elseif active == 2 if isanimplaying backward == 0 set active to 3 markfordelete endif endif end
266FFER63PreyScriptscn FFER63PreyScript ref mySelfRef float timer short done begin OnDeath player ; hunters don't "own" this creature if the player kills it return end begin OnDeath set mySelfRef to GetSelf ; move marker to me when I die so hunters can guard it FFER63Marker1.moveto mySelfRef ; tell quest that I'm dead set FFERepeatB.enc63preyDead to 1 ; make me owned by hunters setOwnership WastelandHunterFaction ; run timer set timer to 5 end begin gamemode if GetDead == 1 ; run timer to move marker after corpse has settled if done == 0 set timer to timer - GetSecondsPassed if timer < 0 set done to 1 FFER63Marker1.moveto mySelfRef endif endif endif end
267FFER66UncleLeoSCRIPTscn FFER66UncleLeoSCRIPT int attacked ; set to 1 if player attacks me int visits ; increment each time encounter is run int lesson ; increment each time he says a unique greeting int luckChoice ; 1 = player chose bad luck, 2 = player chose good luck int metFawkes ; 1 = talked to player with Fawkes begin OnHit player set attacked to 1 end
268FFER68SupermutantScriptscn FFER68SupermutantScript begin OnDeath set FFERepeatB.enc68supermutantDead to 1 end begin OnHit player set FFERepeatB.enc68playerHelped to 1 end
269FFER69SlaveScriptscn FFER69SlaveScript begin OnLoad if (GetDistance Player >= 10000) Disable endif End
270FFER71VertibirdEncounterSCRIPTscn FFER71VertibirdEncounterSCRIPT short active begin onLoad if active == 0 playgroup forward 0 set active to 1 endif end begin gameMode if active == 1 if isanimplaying forward == 0 if getDestroyed == 0 set FFERepeatB.enc71status to 2 playgroup backward 0 endif set active to 2 endif elseif active == 2 if isanimplaying backward == 0 set active to 3 markfordelete endif endif end
271FFER73LootBoxSCRIPTscn FFER73LootBoxSCRIPT short empty ; set to 1 to prevent activation from going to loot box ; any container with this script actually opens FFER73LootBoxREF ; when reloaded after I'm dead, pretend I've already been looted to prevent access to respawning container begin OnLoad if getDead == 1 set empty to 1 endif end begin OnDeath set FFERepeatB.enc73brahminDead to 1 end begin OnActivate ; can only access inventory if dead, and not "empty" if IsActionRef player == 1 && GetDead == 1 && empty == 0 FFER73LootBoxREF.Activate player ; send alarm to get scavenger to react SendAssaultAlarm player WastelandScavengerFaction else Activate endif end
272FFERepeatASCRIPTscn FFERepeatASCRIPT ; references to encounter markers ; what these mean vary by the encounter ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ; temp refs used during creation of the encounters ref tempRef1 ref tempRef2 ref tempRef3 ref tempRef4 ref tempRef5 ; special handling ref dismemberRef ; set to have quest script kill and dismember an actor randomly ; these are set by the trigger zone: short doTrigger ; set to 1 to begin process of triggering an encounter short encounterSet ; group encounters that can happen in each location ; used in picking the random encounter short dieRoll ; random die roll ; what encounter are we triggering? short encounterNumber ; this is the stage to trigger ; ; ************repeat encounter variables ********** ; Encounter 1 ; Encounter 2 ; Encounter 5 short enc5brahminDead ; set to 1 if player kills pack brahmin ; Encounter 8 short enc8preyDead ; set to 1 when prey has been killed short enc8preyType ; what kind of prey are the hunters after? ; 0 = ant ; 1 = dog ; 2 = mirelurk ; 3 = mole rat ; 4 = yao guai ; Encounter 10 short enc10eyebotDead ; set to 1 when eyebot has been killed ; Encounter 11 short enc11scene ; set to 1 to end NPC conversation around eyebot ; Encounter 13 short enc13scene ; set to 1 to start NPC conversation ; Encounter 14 short enc14repeat ; set to 1 for repeat encounters with ghouls ; Encounter 15 short enc15brahminDead ; set to 1 when brahmin dies ; Encounter 16 short enc16scene ; set to 1 to start NPCs on normal sandbox ; Encounter 23 short enc23endcombat ; set to 1 when NPC ends combat with molerat ; Encounter 24 short enc24endcombat ; set to 1 when NPC ends combat with molerat ; Encounter 25 short enc25endcombat ; set to 1 when NPC ends combat with molerat ; Encounter 26 short enc26freddie ; set to 1 when dead Freddie placed short enc26pepper ; set to 1 when dead Pepper placed short enc26gomez ; set to 1 when dead Officer Gomez placed short enc26done ; set to 1 to turn off this encounter begin gamemode ; **************************************** ; special handling ; **************************************** ; dismember somebody if dismemberRef != 0 ; randomly roll for part to dismember ; what body part to dismember? (0-10) set dieRoll to GetRandomPercent * 11/100 ; dismember them! dismemberRef.kill dismemberRef dieRoll ; clear variable set dismemberRef to 0 endif ; **************************************** ; Start Encounters ; **************************************** if encounterNumber > 0 ; NOTE: Repeatable encounters increment FFERepeatACount in the trigger script ; -- this allows repeatable quests to be reset even if there are some unused ones (because of conditions) ; get the current encounter markers from FFETrigger quest (set by the trigger zone) set marker1 to FFETrigger.marker1 set marker2 to FFETrigger.marker2 set marker3 to FFETrigger.marker3 set marker4 to FFETrigger.marker4 set marker5 to FFETrigger.marker5 ; fail if these markers don't exist if marker1 == 0 || marker2 == 0 || marker3 == 0 || marker4 == 0 || marker5 == 0 ; clear encounter number set encounterNumber to 0 endif ; ********************************************************************* ; encounter set A -- clustered encounters ; ********************************************************************* if encounterNumber == 1 ; ants versus radScorpion ; move guard marker FFER01Marker1.moveto marker1 ; place radscorpion set tempRef1 to marker1.placeLeveledActorAtMe FFER01Radscorpion ; place 1-4 ants set dieRoll to GetRandomPercent * 4/100 + 1 set tempRef2 to marker2.placeLeveledActorAtMe LvlAnt tempRef2.startcombat tempRef1 if dieRoll >=2 set tempRef2 to marker3.placeLeveledActorAtMe LvlAnt tempRef2.startcombat tempRef1 endif if dieRoll >=3 set tempRef2 to marker4.placeLeveledActorAtMe LvlAnt tempRef2.startcombat tempRef1 endif if dieRoll >=4 set tempRef2 to marker5.placeLeveledActorAtMe LvlAnt tempRef2.startcombat tempRef1 endif elseif encounterNumber == 2 ; ants gather around toxic waste barrel marker1.placeatme BarrelToxicWaste02 FFER02MarkerRef.moveto marker1 ; place 1-3 ants set dieRoll to GetRandomPercent * 3/100 + 1 marker2.placeLeveledActorAtMe FFER02Ant marker3.placeLeveledActorAtMe LvlAnt if dieRoll > 1 marker4.placeLeveledActorAtMe LvlAnt endif if dieRoll > 2 marker5.placeLeveledActorAtMe LvlAnt endif elseif encounterNumber == 3 ; radscorpions kill traveller set tempRef1 to marker1.placeLeveledActorAtMe FFER03NPC1 ; place 1-3 radscorpions set dieRoll to GetRandomPercent * 3/100 + 1 set tempRef2 to marker2.placeLeveledActorAtMe LvlRadScorpion tempRef2.startCombat tempRef1 if dieRoll > 1 set tempRef3 to marker3.placeLeveledActorAtMe LvlRadScorpion tempRef3.startCombat tempRef1 endif if dieRoll > 2 set tempRef4 to marker4.placeLeveledActorAtMe LvlRadScorpion tempRef4.startCombat tempRef1 endif elseif encounterNumber == 4 ; place NPC set dismemberRef to marker1.placeLeveledActorAtMe FFER04NPC1 ; what body part to dismember? (0-13) set dieRoll to GetRandomPercent * 14/100 ; kill him dismemberRef.kill dismemberRef dieRoll ; add food to inventory dismemberRef.additem FFER04FoodList 1 ; move guard marker FFER04Marker1.moveto marker1 ; place from 2-5 roaches set dieRoll to GetRandomPercent * 4/100 + 2 marker2.placeLeveledActorAtMe FFER04Radroach marker3.placeLeveledActorAtMe FFER04Radroach if dieRoll > 2 marker4.placeLeveledActorAtMe FFER04Radroach endif if dieRoll > 3 marker5.placeLeveledActorAtMe FFER04Radroach endif if dieRoll > 4 marker2.placeLeveledActorAtMe FFER04Radroach endif elseif encounterNumber == 5 ; scavenger in his camp ; clear vars set enc5brahminDead to 0 set tempRef1 to marker2.placeLeveledActorAtMe FFER05NPC1 2 ; hard ; reset loot chest inventory FFER05LootBoxREF.ResetInventory ; place pack brahmin set tempRef2 to marker3.placeLeveledActorAtMe FFER05Brahmin ; set ownership tempRef2.SetOwnership WastelandScavengerFaction ; create the camp marker4.placeatme FloorSleepL marker5.placeatme FloorSitMarker marker1.placeatme Barrel02FireAnimStatic256 marker2.placeatme DefaultFireBarrelIdleMarker ; set merchant chest tempRef1.SetMerchantContainer FFER05LootBoxREF ; give me a pet set dieRoll to GetRandomPercent if dieRoll > FFEScavengerDogChance ; pet bear set tempRef3 to marker5.placeLeveledActorAtMe FFER05YaoGuai else ; pet dog set tempRef3 to marker5.placeLeveledActorAtMe FFER05Dog endif ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 6 ; wasteland doctor marker1.placeLeveledActorAtMe FFER06NPC1 2 ; hard elseif encounterNumber == 7 ; pack of dogs guarding a body ; move marker FFER07Marker1.moveto marker1 ; dead guy set tempRef1 to marker1.PlaceLeveledActorAtMe FFER07DeadGuy 0 tempRef1.kill set dismemberRef to tempRef1 ; randomly dismember him for extra yumminess ; dogs -- place 2-5 dogs, some hurt set dieRoll to GetRandomPercent * 4/100 + 2 marker2.placeLeveledActorAtMe FFER07Dog set tempRef1 to marker3.placeLeveledActorAtMe FFER07Dog ; cripple a limb tempRef1.modav rightAttackCondition -100 if dieRoll > 2 set tempRef1 to marker4.placeLeveledActorAtMe FFER07Dog if dieRoll > 4 tempRef1.kill endif endif if dieRoll > 3 set tempRef1 to marker5.placeLeveledActorAtMe FFER07Dog endif if dieRoll > 4 set tempRef1 to marker5.placeLeveledActorAtMe FFER07Dog ; cripple a limb tempRef1.modav rightAttackCondition -100 endif elseif encounterNumber == 8 || encounterNumber == 9 ; hunters ; clear vars set enc8preyDead to 0 set enc8preyType to -1 ; move marker FFER08Marker1.moveto marker1 ; prey set tempRef1 to marker1.PlaceLeveledActorAtMe FFER08Prey 0 ; prey type? if tempRef1.GetInFaction antFaction == 1 set enc8preyType to 0 elseif tempRef1.GetInFaction dogFaction == 1 set enc8preyType to 1 elseif tempRef1.GetInFaction mirelurkFaction == 1 set enc8preyType to 2 elseif tempRef1.GetInFaction moleratFaction == 1 set enc8preyType to 3 elseif tempRef1.GetInFaction yaoGuaiFaction == 1 set enc8preyType to 4 endif ; hunters -- place 1-3 hunters, remove prey type of meat from them so they'll find properly set dieRoll to GetRandomPercent * 3/100 + 1 set tempRef2 to marker2.placeLeveledActorAtMe FFER08Hunter if enc8preyType == 0 tempRef2.removeItem antMeat 20 elseif enc8preyType == 1 tempRef2.removeItem dogMeat 20 elseif enc8preyType == 2 tempRef2.removeItem mirelurkMeat 20 elseif enc8preyType == 3 tempRef2.removeItem moleratMeat 20 elseif enc8preyType == 4 tempRef2.removeItem yaoGuaiMeat 20 endif if dieRoll > 1 set tempRef2 to marker3.placeLeveledActorAtMe FFER08Hunter if enc8preyType == 0 tempRef2.removeItem antMeat 20 elseif enc8preyType == 1 tempRef2.removeItem dogMeat 20 elseif enc8preyType == 2 tempRef2.removeItem mirelurkMeat 20 elseif enc8preyType == 3 tempRef2.removeItem moleratMeat 20 elseif enc8preyType == 4 tempRef2.removeItem yaoGuaiMeat 20 endif endif if dieRoll > 2 set tempRef2 to marker4.placeLeveledActorAtMe FFER08Hunter if enc8preyType == 0 tempRef2.removeItem antMeat 20 elseif enc8preyType == 1 tempRef2.removeItem dogMeat 20 elseif enc8preyType == 2 tempRef2.removeItem mirelurkMeat 20 elseif enc8preyType == 3 tempRef2.removeItem moleratMeat 20 elseif enc8preyType == 4 tempRef2.removeItem yaoGuaiMeat 20 endif endif elseif encounterNumber == 10 ; Enclave eyebot being salvaged by scavenger ; clear vars set enc10eyebotDead to 0 ; move marker FFER10Marker1.moveto marker1 ; create robot set tempRef1 to marker1.placeLeveledActorAtMe FFER10Robot 0 tempRef1.addToFaction WastelandScavengerEnemyFaction 0 ; make him an enemy of the scavenger ; create scavenger marker2.placeLeveledActorAtMe FFER10NPC1 0 ; give me a pet set dieRoll to GetRandomPercent if dieRoll > FFEScavengerDogChance ; pet bear set tempRef3 to marker5.placeLeveledActorAtMe FFER10YaoGuai else ; pet dog set tempRef3 to marker5.placeLeveledActorAtMe FFER10Dog endif ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 11 ; people listening to eyebot ; reset variable set enc11scene to 0 set tempRef1 to marker1.placeLeveledActorAtMe FFER11Eyebot 0 ; move marker FFER11Marker1.moveto marker1 ; place NPCs set tempRef2 to marker2.placeLeveledActorAtMe FFER11Settler 0 set tempRef3 to marker3.placeLeveledActorAtMe FFER11Settler 0 ; make them look at eyebot tempRef2.look tempRef1 tempRef3.look tempRef1 elseif encounterNumber == 12 ; dead guy ; roll against luck to find fatman set dieRoll to GetRandomPercent/10 + 1 if dieRoll < player.getav luck set dismemberRef to marker1.placeatme FFER12NPCFatman else set dismemberRef to marker1.placeatme FFER12NPCNormal endif dismemberRef.kill marker1.placeatme FakeForceBall1000 ; to give a havok push to the body to toss it around elseif encounterNumber == 13 ; minefield ; place mines: 3-5 set dieRoll to GetRandomPercent * 3/100 + 3 marker1.placeatme MineFragProjectile marker4.placeatme MineFragProjectile marker5.placeatme MineFragProjectile if dieRoll > 3 marker2.placeatme MineFragProjectile endif if dieRoll > 4 marker3.placeatme MineFragProjectile endif elseif encounterNumber == 14 ; MS12 Post Quest: Angry Ghouls ; move marker FFER14Marker1.moveto marker1 ; place sit/sleep markers marker5.placeatme FloorSitMarker ; place ghouls: 2-4 set dieRoll to GetRandomPercent * 3/100 + 2 set tempref1 to marker2.placeLeveledActorAtMe FFER14Ghoul marker3.placeLeveledActorAtMe FFER14Ghoul if dieRoll > 2 marker3.placeLeveledActorAtMe FFER14Ghoul endif if dieRoll > 3 marker4.placeLeveledActorAtMe FFER14Ghoul endif ; give ghouls notes depending on variables in MS12 if MS12.allGhoulsDead == 0 tempref1.additem MS12RandomQuestNoteA 1 elseif MS12.allGhoulsDead == 1 tempref1.additem MS12RandomQuestNoteB 1 endif elseif encounterNumber == 15 ; MS05 -- Nuka Quantum merchant + brahmin (maybe) ; clear vars set enc15brahminDead to 0 set tempRef1 to marker2.placeLeveledActorAtMe FFER15NPC1 2 ; hard ; add nuka quantum to inventory tempRef1.additem MS05NukaColaQtm 1 ; place pack brahmin -- 50% chance if GetRandomPercent >= 50 set tempRef2 to marker3.placeLeveledActorAtMe FFER15Brahmin ; reset loot chest inventory FFER15LootBoxREF.ResetInventory ; set ownership tempRef2.SetOwnership WastelandScavengerFaction ; set merchant chest tempRef1.SetMerchantContainer FFER15LootBoxREF endif ; create the camp FFER15Marker1.moveto marker1 ; central package marker FFER15Marker2.moveto marker3 ; brahim marker marker4.placeatme FloorSleepL marker5.placeatme FloorSitMarker ; give me a pet set dieRoll to GetRandomPercent if dieRoll > FFEScavengerDogChance ; pet bear set tempRef3 to marker5.placeLeveledActorAtMe FFER15YaoGuai else ; pet dog set tempRef3 to marker5.placeLeveledActorAtMe FFER15Dog endif ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 16 ; MS10 Quest Encounter: Oasis Pilgrims set enc16scene to 0 ; move marker FFER16Marker1.moveto marker1 ; place leveled wastelanders: 2-4 set dieRoll to GetRandomPercent * 3/100 + 2 marker2.placeLeveledActorAtMe FFER16PilgrimTalker marker3.placeLeveledActorAtMe FFER16Pilgrim if dieRoll > 2 marker4.placeLeveledActorAtMe FFER16Pilgrim endif if dieRoll > 3 marker5.placeLeveledActorAtMe FFER16Pilgrim endif ; place sit/sleep markers marker2.placeatme FloorSitMarker marker3.placeatme FloorSitMarker marker4.placeatme DefaultSmokingIdleMarker elseif encounterNumber == 17 ; MS13 Post Quest: Hitmen attack player for being a Slaver ; place marker FFER17Marker1.moveto marker1 ; place hitmen: 2-4 set dieRoll to GetRandomPercent * 3/100 + 2 set tempRef1 to marker2.placeLeveledActorAtMe FFER17Hitman set tempRef2 to marker3.placeLeveledActorAtMe FFER17Hitman tempRef1.additem FFER17Note 1 tempRef2.additem FFER17Note 1 if dieRoll > 2 set tempRef3 to marker4.placeLeveledActorAtMe FFER17Hitman tempRef3.additem FFER17Note 1 endif if dieRoll > 3 set tempRef3 to marker5.placeLeveledActorAtMe FFER17Hitman tempRef3.additem FFER17Note 1 endif elseif encounterNumber == 18 ; MS13 Post Quest: Slavers attack the player for being better than them ; make them neutral again SetEnemy playerFaction FFER18SlaverFaction 1 1 ; place marker FFER18Marker1.moveto marker1 ; place slavers: 2-5 set dieRoll to GetRandomPercent * 4/100 + 2 marker2.placeLeveledActorAtMe FFER18SlaverGreet marker3.placeLeveledActorAtMe FFER18Slaver if dieRoll > 2 marker4.placeLeveledActorAtMe FFER18Slaver endif if dieRoll > 3 marker5.placeLeveledActorAtMe FFER18Slaver endif if dieRoll > 4 marker1.placeLeveledActorAtMe FFER18Slaver endif elseif encounterNumber == 19 ; supermutants with captives FFER19Marker1.moveto marker1 ; place 1-3 captives set dieRoll to GetRandomPercent * 3/100 + 1 ; place captives and markers marker1.placeatme FFCaptiveMarker marker1.placeLeveledActorAtMe FFER19SupermutantCaptive if dieRoll > 1 marker2.placeatme FFCaptiveMarker marker2.placeLeveledActorAtMe FFER19SupermutantCaptive endif if dieRoll > 2 marker3.placeatme FFCaptiveMarker marker3.placeLeveledActorAtMe FFER19SupermutantCaptive endif ; place 2-4 supermutant guards set dieRoll to GetRandomPercent * 3/100 + 2 marker4.placeLeveledActorAtMe FFER19Supermutant marker4.placeLeveledActorAtMe FFER19Supermutant if dieRoll > 2 marker5.placeLeveledActorAtMe FFER19Supermutant endif if dieRoll > 3 marker5.placeLeveledActorAtMe FFER19Supermutant endif elseif encounterNumber == 20 ; camped ghouls FFER20Marker1.moveto marker1 marker1.placeatme Barrel02FireAnimStatic256 ; place 2-4 ghouls set dieRoll to GetRandomPercent * 3/100 + 2 marker2.placeLeveledActorAtMe FFER20Ghoul marker3.placeLeveledActorAtMe FFER20Ghoul if dieRoll > 2 marker4.placeLeveledActorAtMe FFER20Ghoul endif if dieRoll > 3 marker5.placeLeveledActorAtMe FFER20Ghoul endif marker2.placeatme DefaultFireBarrelIdleMarker marker3.placeatme FloorSitMarker marker4.placeatme DefaultSmokingIdleMarker marker5.placeatme FloorSitMarker elseif encounterNumber == 21 ; chem vendor in his camp set tempRef1 to marker2.placeLeveledActorAtMe FFER21NPC1 0 ; easy ; create the camp marker4.placeatme FloorSleepL marker5.placeatme FloorSitMarker marker1.placeatme Barrel02FireAnimStatic256 marker2.placeatme DefaultFireBarrelIdleMarker marker3.placeatme DefaultSmokingIdleMarker elseif encounterNumber == 22 ; molerats attack wastelander set tempRef1 to marker1.placeLeveledActorAtMe FFER22NPC1 ; place 2-5 molerats set dieRoll to GetRandomPercent * 4/100 + 2 set tempRef2 to marker2.placeLeveledActorAtMe CrMoleRat tempRef2.startCombat tempRef1 set tempRef2 to marker5.placeLeveledActorAtMe CrMoleRat tempRef2.startCombat tempRef1 if dieRoll > 2 set tempRef3 to marker3.placeLeveledActorAtMe CrMoleRat tempRef3.startCombat tempRef1 endif if dieRoll > 3 set tempRef4 to marker3.placeLeveledActorAtMe CrMoleRat tempRef4.startCombat tempRef1 endif if dieRoll > 4 set tempRef5 to marker4.placeLeveledActorAtMe CrMoleRat tempRef5.startCombat tempRef1 endif elseif encounterNumber == 23 ; MS03 -- bad survival guide ; molerat attacks poorly equipped wastelander ; clear var set enc23endcombat to 0 ; place wastelander set tempRef1 to marker1.placeLeveledActorAtMe FFER23NPC1 ; damage his health set dieRoll to tempRef1.getav health set dieRoll to dieRoll/2 tempRef1.damageav health dieRoll ; place a molerat set tempRef2 to marker2.placeLeveledActorAtMe CrMoleRat tempRef2.startCombat tempRef1 elseif encounterNumber == 24 ; MS03 -- medium survival guide ; molerat attacks moderately equipped wastelander ; clear var set enc24endcombat to 0 ; place wastelander set tempRef1 to marker1.placeLeveledActorAtMe FFER24NPC1 ; place a molerat set tempRef2 to marker2.placeLeveledActorAtMe CrMoleRat ; damage its health set dieRoll to tempRef2.getav health set dieRoll to dieRoll * .50 tempRef2.damageav health dieRoll tempRef2.startCombat tempRef1 elseif encounterNumber == 25 ; MS03 -- good survival guide ; mirelurk attacks well-equipped wastelander ; clear var set enc25endcombat to 0 FFER25Marker1.moveto marker1 ; place wastelander set tempRef1 to marker1.placeLeveledActorAtMe FFER25NPC1 ; place a mirelurk set tempRef2 to marker2.placeLeveledActorAtMe CrMirelurk1 ; damage its health set dieRoll to tempRef2.getav health set dieRoll to dieRoll * .75 tempRef2.damageav health dieRoll tempRef2.startCombat tempRef1 elseif encounterNumber == 26 ; MS16 -- dead vault 101 residents set dismemberRef to 0 ; place the named NPCs first, if they're not already dead if enc26freddie == 0 set enc26freddie to 1 if FreddieGomezREF.getDead == 0 set dismemberRef to FreddieGomezREF FreddieGomezREF.enable FreddieGomezREF.moveto marker1 endif elseif enc26pepper == 0 set enc26pepper to 1 if PepperGomezREF.getDead == 0 set dismemberRef to PepperGomezREF PepperGomezREF.enable PepperGomezREF.moveto marker1 endif elseif enc26gomez == 0 set enc26gomez to 1 if Vault101Security04REF.getDead == 0 set dismemberRef to Vault101Security04REF Vault101Security04REF.enable Vault101Security04REF.moveto marker1 endif endif if dismemberRef != 0 dismemberRef.kill if GetRandomPercent >= 50 dismemberRef.additem WaterPurified 1 endif endif if GetRandomPercent >= 50 marker2.placeLeveledActorAtMe LvlWastelandAll 1 endif if enc26gomez == 1 && enc26pepper == 1 && enc26freddie == 1 set enc26done to 1 endif elseif encounterNumber == 27 ; hit squad FFER27Marker1.moveto marker1 if player.Getav Karma <= KarmaEvil ; regulators marker1.placeLeveledActorAtMe FFER27RegulatorLeader 2 marker2.placeLeveledActorAtMe FFER27Regulator01 1 marker3.placeLeveledActorAtMe FFER27Regulator02 1 elseif player.GetAV Karma >= KarmaGood ; talon co marker1.placeLeveledActorAtMe FFER27TalonLeader 2 marker2.placeLeveledActorAtMe FFER27Talon01 1 marker3.placeLeveledActorAtMe FFER27Talon02 1 endif ; etc. endif ; clear encounter number set encounterNumber to 0 endif end
273FFERepeatBSCRIPTscn FFERepeatBSCRIPT ; references to encounter markers ; what these mean vary by the encounter ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ref marker6 ref marker7 ; temp refs used during creation of the encounters ref tempRef1 ref tempRef2 ref tempRef3 ref tempRef4 ref tempRef5 float tempVar1 ; special handling ref dismemberRef ; set to have quest script kill and dismember an actor randomly ; these are set by the trigger zone: short doTrigger ; set to 1 to begin process of triggering an encounter short encounterSet ; group encounters that can happen in each location ; used in picking the random encounter short dieRoll ; random die roll ; what encounter are we triggering? short encounterNumber ; this is the stage to trigger ; ; ************repeat encounter variables ********** ; Encounter 53 short enc53doneFlee ; set to 1 when scout finishes fleeing (clear each time triggered) short enc53createDeathclaws ; set to 1 when time to create deathclaws, 2 when done ; Encounter 57 short enc57seenSlaves ; set to 1 if player has "seen" the escaped slaves short enc57slaveCount ; how many slaves have escaped? short enc57slaveDead ; how many slaves have been killed? short enc57turnedInSlaves ; set to 1 if player tells slavers where slaves are ; Encounter 59 short enc59ScavengerDead ; set to 1 when scavenger is dead (to stop raiders from running) short enc59RaidersDead ; set to 1 when all raiders are dead (to get scavenger to patrol) ; Encounter 62 short enc62vertibird ; set to 1 to summon vertibird, 2 = vertibird landing, 3 = dropping off soldiers, 4 = done ; Encounter 63 short enc63preyDead ; set to 1 when prey killed by hunters short enc63preyType ; see FFERepeatA encounter 8 for list ; Encounter 68 short enc68supermutantDead ; set to 1 when supermutant is dead short enc68playerHelped ; set to 1 if player helps kill supermutant ; set to 2 when player gets rewarded by wastelanders ; Encounter 69 short enc69helped ; set to 1 when player gives slaves directions ; Encounter 71 short enc71status ; set to 1 when encounter starts, set to 2 when ready to drop off, set to 3 after dropping off ; Encounter 73 short enc73brahminDead ; set to 1 when brahmin dies begin gamemode ; **************************************** ; special handling ; **************************************** ; dismember somebody if dismemberRef != 0 ; randomly roll for part to dismember ; what body part to dismember? (0-10) set dieRoll to GetRandomPercent * 11/100 ; dismember them! dismemberRef.kill dismemberRef dieRoll ; clear variable set dismemberRef to 0 endif if enc53createDeathclaws == 1 set enc53createDeathclaws to 2 ; create deathclaws set tempRef2 to marker2.placeLeveledActorAtMe FFER53DeathClaw set tempVar1 to ( tempRef2.getav health * .25 ) ; hurt leg tempRef2.damageav health tempVar1 tempRef2.damageav leftmobilitycondition 100 tempRef2.startCombat tempRef1 if dieRoll >= 75 ; hurt set tempRef3 to marker3.placeLeveledActorAtMe FFER53DeathClaw set tempVar1 to ( tempRef3.getav health * .65 ) tempRef3.damageav health tempVar1 tempRef3.startCombat tempRef1 endif endif if enc62vertibird > 0 if enc62vertibird == 1 set enc62vertibird to 2 FFER62Marker2.placeAtMe FFER62VertibirdEncounter elseif enc62vertibird == 3 set enc62vertibird to 4 ; place enclave troopers at markers FFER62MarkerA.placeLeveledActorAtMe FFER62EnclaveGun FFER62MarkerB.placeLeveledActorAtMe FFER62EnclaveGun endif endif if enc71status == 2 set enc71status to 3 ; place enclave troopers at markers FFER71MarkerA.placeLeveledActorAtMe FFER71EnclaveGun FFER71MarkerB.placeLeveledActorAtMe FFER71EnclaveGun endif ; **************************************** ; Start Encounters ; **************************************** if encounterNumber > 0 ; NOTE: Repeatable encounters increment FFERepeatBCount in the trigger script ; -- this allows repeatable quests to be reset even if there are some unused ones (because of conditions) ; get the current encounter markers from FFETrigger quest (set by the trigger zone) set marker1 to FFETrigger.marker1 set marker2 to FFETrigger.marker2 set marker3 to FFETrigger.marker3 set marker4 to FFETrigger.marker4 set marker5 to FFETrigger.marker5 set marker6 to FFETrigger.marker6 set marker7 to FFETrigger.marker7 ; fail if these markers don't exist if marker1 == 0 || marker2 == 0 || marker3 == 0 || marker4 == 0 || marker5 == 0 || marker6 == 0 || marker7 == 0 ; clear encounter number set encounterNumber to 0 endif ; ********************************************************************* ; encounter set B -- wide distance encounters ; ********************************************************************* if encounterNumber == 51 ; Unique Outcast patrol ; move NPCs, if they're still alive if FFER51NPC01Ref.GetDead == 0 FFER51NPC01Ref.moveto marker1 endif if FFER51NPC02Ref.GetDead == 0 FFER51NPC02Ref.moveto marker2 endif if FFER51NPC03Ref.GetDead == 0 FFER51NPC03Ref.moveto marker3 endif elseif encounterNumber == 52 ; Raiders vs. Outcast patrol ; move patrol markers FFER52Marker1.moveto marker7 ; middle FFER52Marker2.moveto marker1 ; FFER52Marker3.moveto marker4 ; ; Outcast patrol ; place 3 outcast set dieRoll to GetRandomPercent marker1.placeLeveledActorAtMe FFER52Outcast1 1 marker2.placeLeveledActorAtMe FFER52Outcast3 1 if dieRoll < 25 marker3.placeLeveledActorAtMe FFER52Outcast2 2 ; make him tougher else marker3.placeLeveledActorAtMe FFER52OutcastRobot1 1 endif ; raider patrol ; place 3-5 raiders set dieRoll to GetRandomPercent * 3/100 + 3 marker4.placeLeveledActorAtMe FFER52Raider1 0 marker5.placeLeveledActorAtMe FFER52Raider2 1 marker6.placeLeveledActorAtMe FFER52Raider3 2 if dieRoll > 3 marker6.placeLeveledActorAtMe FFER52Raider4 0 endif if dieRoll > 4 marker6.placeLeveledActorAtMe FFER52Raider1 2 endif elseif encounterNumber == 53 ; reset variables set enc53doneFlee to 0 set enc53createDeathclaws to 0 ; patrol moving towards scout's location FFER53PatrolMarker.moveto marker1 ; post-battle patrol route FFER52Marker2.moveto marker7 ; FFER52Marker3.moveto marker4 ; ; place flee marker in the middle FFER53FleeMarker.moveto marker7 ; scout and enemies set tempRef1 to marker1.placeLeveledActorAtMe FFER53Outcast1 2 ; place 1-2 deathclaws set dieRoll to GetRandomPercent set dieRoll to dieRoll - ( ( player.getav luck ) * 5) ; NOTE: deathclaws are created on a timer (see special handling section above) run on FFER53Outcast1SCRIPT ; patrol is on opposite side set tempRef5 to marker4.placeLeveledActorAtMe FFER53Outcast2 1 marker5.placeLeveledActorAtMe FFER53Outcast3 1 if dieRoll >= 75 marker6.placeLeveledActorAtMe FFER53Outcast2 1 endif elseif encounterNumber == 54 ; Tinker Joe -- unique NPC ; move patrol markers FFER54PatrolMarker.moveto marker1 ; start FFER54PatrolMarker2.moveto marker7 ; middle FFER54PatrolMarker3.moveto marker4 ; end ; move actors, if they're still alive if FFER54NPC1REF.GetDead == 0 FFER54NPC1REF.moveto marker1 endif if FFER54Robot1Ref.GetDead == 0 FFER54Robot1Ref.moveto marker2 endif if FFER54Robot2Ref.GetDead == 0 FFER54Robot2Ref.moveto marker3 endif if RL3REF.GetDead == 0 && RL3REF.HasBeenHired == 0 RL3REF.moveto marker3 endif elseif encounterNumber == 55 ; Slavers ; move patrol markers FFER55Marker1.moveto marker4 ; far side FFER55Marker2.moveto marker1 ; FFER55Marker3.moveto marker2 ; ; Slaver party ; place 1-3 slavers set dieRoll to GetRandomPercent * 3/100 + 1 marker2.placeLeveledActorAtMe FFER55Slaver 3 if dieRoll > 1 marker2.placeLeveledActorAtMe FFER55Slaver 1 endif if dieRoll > 2 marker3.placeLeveledActorAtMe FFER55Slaver 0 endif ; place 1-4 slaves set dieRoll to GetRandomPercent * 4/100 + 1 ; slaves set tempRef1 to marker2.placeLeveledActorAtMe FFER55Slave if dieRoll > 1 set tempRef1 to marker3.placeLeveledActorAtMe FFER55Slave endif if dieRoll > 2 set tempRef1 to marker3.placeLeveledActorAtMe FFER55Slave endif if dieRoll > 3 set tempRef1 to marker2.placeLeveledActorAtMe FFER55Slave endif elseif encounterNumber == 56 ; Slaves fleeing from slavers ; move patrol markers FFER56Marker1.moveto marker7 ; middle FFER56Marker2.moveto marker1 ; FFER56Marker3.moveto marker4 ; ; Slaver party ; place 1-3 slavers set dieRoll to GetRandomPercent * 3/100 + 1 set tempRef1 to marker1.placeLeveledActorAtMe FFER56Slaver 2 if dieRoll > 1 marker2.placeLeveledActorAtMe FFER56Slaver 1 endif if dieRoll > 2 marker3.placeLeveledActorAtMe FFER56Slaver 0 endif ; place 2-4 slaves set dieRoll to GetRandomPercent * 4/100 + 1 ; slaves set tempRef2 to marker3.placeLeveledActorAtMe FFER56Slave marker3.placeLeveledActorAtMe FFER56Slave if dieRoll > 2 marker3.placeLeveledActorAtMe FFER56Slave endif if dieRoll > 3 marker3.placeLeveledActorAtMe FFER56Slave endif ; make sure they fight tempRef1.startCombat tempRef2 elseif encounterNumber == 57 ; Slaves escaped from slavers ; clear variables set enc57seenSlaves to 0 set FFER57slaveCount to 0 set FFER57slaveDead to 0 set enc57turnedInSlaves to 0 ; move patrol markers FFER57Marker1.moveto marker7 ; middle FFER57Marker2.moveto marker1 ; FFER57Marker3.moveto marker4 ; ; Slaver party ; place 2-3 slavers set dieRoll to GetRandomPercent * 3/100 + 1 marker1.placeLeveledActorAtMe FFER57Slaver 2 marker2.placeLeveledActorAtMe FFER57Slaver 1 if dieRoll > 2 marker3.placeLeveledActorAtMe FFER57Slaver 0 endif ; place 2-4 slaves set dieRoll to GetRandomPercent * 4/100 + 1 set FFER57slaveCount to dieRoll ; slaves marker4.placeLeveledActorAtMe FFER57Slave marker5.placeLeveledActorAtMe FFER57Slave if dieRoll > 2 marker6.placeLeveledActorAtMe FFER57Slave endif if dieRoll > 3 marker6.placeLeveledActorAtMe FFER57Slave endif elseif encounterNumber == 58 ; Technology scavenger looking for a car ; move marker FFER58Marker1.moveto marker1 ; ; place car there set tempRef1 to marker1.placeAtMe Car10 ; place scavenger marker4.placeLeveledActorAtMe FFER58NPC1 2 ; give me a pet set dieRoll to GetRandomPercent if dieRoll > FFEScavengerDogChance ; pet bear set tempRef3 to marker5.placeLeveledActorAtMe FFER58YaoGuai else ; pet dog set tempRef3 to marker5.placeLeveledActorAtMe FFER58Dog endif ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 59 ; Raiders attacking a scavenger, with a robot buddy set enc59ScavengerDead to 0 set enc59RaidersDead to 10 ; move markers FFER59Marker1.moveto marker1 ; raiders side FFER59Marker2.moveto marker7 ; middle FFER59Marker3.moveto marker4 ; scavenger side ; place scavenger marker4.placeLeveledActorAtMe FFER59Scavenger 2 ; hard ; what kind of robot does he have? set dieRoll to GetRandomPercent * 4/100 ; levelMod 0-3 marker5.placeLeveledActorAtMe FFER59Robot dieRoll ; place raiders ; put some easy ones right next to the scavenger marker6.placeLeveledActorAtMe FFER59RaiderGun 0 marker6.placeLeveledActorAtMe FFER59RaiderMelee 0 ; place a group of raiders that are coming to help their friend set dieRoll to GetRandomPercent * 4/100 + 1 marker1.placeLeveledActorAtMe FFER59RaiderGun 1 marker2.placeLeveledActorAtMe FFER59RaiderMelee 0 if dieRoll > 2 marker3.placeLeveledActorAtMe FFER59RaiderMelee 0 endif if dieRoll > 3 marker3.placeLeveledActorAtMe FFER59RaiderSpecial 1 endif ; set raider count (so we know when all are dead) set enc59RaidersDead to dieRoll + 2 elseif encounterNumber == 60 ; Raiders attacking some wasteland settlers who are fleeing ; move markers FFER59Marker1.moveto marker7 ; middle FFER59Marker2.moveto marker1 ; everyone starts here FFER59Marker3.moveto marker4 ; settlers flee to here ; place 3-5 settlers set dieRoll to GetRandomPercent * 3/100 + 3 marker1.placeLeveledActorAtMe FFER60Settler 0 marker2.placeLeveledActorAtMe FFER60Settler 0 marker3.placeLeveledActorAtMe FFER60Settler 0 if dieRoll > 3 marker2.placeLeveledActorAtMe FFER60Settler 0 endif if dieRoll > 4 marker3.placeLeveledActorAtMe FFER60Settler 1 endif ; place 3-6 raiders set dieRoll to GetRandomPercent * 4/100 + 1 marker1.placeLeveledActorAtMe FFER60Raider 2 marker1.placeLeveledActorAtMe FFER60Raider 1 marker2.placeLeveledActorAtMe FFER60Raider 0 if dieRoll > 1 marker3.placeLeveledActorAtMe FFER60Raider 0 endif if dieRoll > 2 marker5.placeLeveledActorAtMe FFER60Raider 1 endif if dieRoll > 3 marker6.placeLeveledActorAtMe FFER60Raider 1 endif elseif encounterNumber == 61 ; patrolling pack of dogs ; move patrol markers FFER61Marker1.moveto marker1 ; start FFER61Marker2.moveto marker7 ; middle FFER61Marker3.moveto marker4 ; end ; dogs -- place 2-5 dogs set dieRoll to GetRandomPercent * 4/100 + 2 marker1.placeLeveledActorAtMe FFER61Dog marker2.placeLeveledActorAtMe FFER61Dog if dieRoll > 2 marker3.placeLeveledActorAtMe FFER61Dog endif if dieRoll > 3 marker2.placeLeveledActorAtMe FFER61Dog endif if dieRoll > 4 marker1.placeLeveledActorAtMe FFER61Dog endif elseif encounterNumber == 62 ; patrolling enclave eyebot ; move patrol markers FFER62Marker1.moveto marker1 ; start FFER62Marker2.moveto marker7 ; middle FFER62Marker3.moveto marker4 ; end FFER62MarkerA.moveto marker7 0 -75 0 FFER62MarkerB.moveto marker7 0 75 0 ; place enclave eyebot set dieRoll to getRandomPercent if dieRoll > 50 set tempRef1 to marker1.placeLeveledActorAtMe FFER62Eyebot else set tempRef1 to marker4.placeLeveledActorAtMe FFER62Eyebot endif elseif encounterNumber == 63 ; hunters looking for prey ; clear vars set enc63preyDead to 0 set enc63preyType to -1 ; move markers FFER63Marker1.moveto marker4 ; start FFER63Marker2.moveto marker7 ; middle FFER63Marker3.moveto marker1 ; end ; prey set tempRef1 to marker1.PlaceLeveledActorAtMe FFER63Prey 0 ; prey type? if tempRef1.GetInFaction antFaction == 1 set enc63preyType to 0 elseif tempRef1.GetInFaction dogFaction == 1 set enc63preyType to 1 elseif tempRef1.GetInFaction mirelurkFaction == 1 set enc63preyType to 2 elseif tempRef1.GetInFaction moleratFaction == 1 set enc63preyType to 3 elseif tempRef1.GetInFaction yaoGuaiFaction == 1 set enc63preyType to 4 endif ; hunters -- place 1-3 hunters set dieRoll to GetRandomPercent * 3/100 + 1 marker4.placeLeveledActorAtMe FFER63Hunter if dieRoll > 1 marker5.placeLeveledActorAtMe FFER63Hunter endif if dieRoll > 2 marker6.placeLeveledActorAtMe FFER63Hunter endif elseif encounterNumber == 64 ; Talon Company patrol ; move markers FFER64Marker1.moveto marker1 ; start FFER64Marker2.moveto marker7 ; middle FFER64Marker3.moveto marker4 ; end ; place 3-5 mercs set dieRoll to GetRandomPercent * 3/100 + 3 marker1.placeLeveledActorAtMe FFER64Talon1 2 ; hard marker2.placeLeveledActorAtMe FFER64Talon1 1 ; medium marker3.placeLeveledActorAtMe FFER64Talon1 0 ; easy if dieRoll > 3 marker3.placeLeveledActorAtMe FFER64Talon1 0 ; easy endif if dieRoll > 4 marker2.placeLeveledActorAtMe FFER64Talon1 0 ; easy endif elseif encounterNumber == 65 ; Enclave patrol ; move markers FFER65Marker1.moveto marker4 ; start FFER65Marker2.moveto marker7 ; middle FFER65Marker3.moveto marker1 ; end ; place 3 enclave guys marker4.placeLeveledActorAtMe FFER65EnclaveGun marker5.placeLeveledActorAtMe FFER65EnclaveGun set dieRoll to GetRandomPercent + 25 set dieRoll to dieRoll - ( ( player.getav luck ) * 5) if dieRoll > 66 ; deathclaw marker6.placeLeveledActorAtMe FFER65EnclaveDeathclaw elseif dieRoll > 33 ; special marker6.placeLeveledActorAtMe FFER65EnclaveSpecial else ; easy gun guy marker6.placeLeveledActorAtMe FFER65EnclaveGun 0 endif elseif encounterNumber == 66 ; Uncle Leo ; move markers FFER66Marker1.moveto marker1 ; start FFER66Marker2.moveto marker7 ; middle FFER66Marker3.moveto marker4 ; end ; move uncle leo FFER66UncleLeoREF.moveto marker1 ; increment variable set FFER66UncleLeoREF.visits to FFER66UncleLeoREF.visits + 1 elseif encounterNumber == 67 ; Enclave patrol vs. Outcast patrol ; move markers FFER67Marker1.moveto marker1 ; start FFER67Marker2.moveto marker7 ; middle FFER67Marker3.moveto marker4 ; end ; place 3 enclave guys marker4.placeLeveledActorAtMe FFER67EnclaveGun marker5.placeLeveledActorAtMe FFER67EnclaveGun set dieRoll to GetRandomPercent set dieRoll to dieRoll - ( ( player.getav luck ) * 5) if dieRoll > 66 ; deathclaw marker6.placeLeveledActorAtMe FFER67EnclaveDeathclaw elseif dieRoll > 33 ; special marker6.placeLeveledActorAtMe FFER67EnclaveSpecial else ; easy gun guy marker6.placeLeveledActorAtMe FFER67EnclaveGun 0 endif ; Outcast patrol ; place 2-3 outcast set dieRoll to GetRandomPercent marker1.placeLeveledActorAtMe FFER67Outcast1 1 marker2.placeLeveledActorAtMe FFER67Outcast3 1 if dieRoll < 25 marker3.placeLeveledActorAtMe FFER67Outcast2 2 ; make him tougher endif elseif encounterNumber == 68 ; Super Mutant attacks Wastelanders set enc68supermutantDead to 0 set enc68playerHelped to 0 ; move markers FFER68Marker1.moveto marker1 ; start FFER68Marker2.moveto marker7 ; middle FFER68Marker3.moveto marker4 ; end set dieRoll to GetRandomPercent set dieRoll to dieRoll - ( ( player.getav luck ) * 5) if dieRoll > 66 ; super mutant gun marker1.placeLeveledActorAtMe FFER68SupermutantMelee elseif dieRoll > 33 ; super mutant melee marker1.placeLeveledActorAtMe FFER68SupermutantGun else ; centaur marker1.placeLeveledActorAtMe FFER68Centaur endif ; Wastelanders ; place 2-3 wastelanders set dieRoll to GetRandomPercent marker1.placeLeveledActorAtMe FFER68Wastelander marker2.placeLeveledActorAtMe FFER68Wastelander if dieRoll < 25 marker3.placeLeveledActorAtMe FFER68Wastelander 2 ; make him tougher endif elseif encounterNumber == 69 ; MS06 Post Quest: Escaped Slave Looking for Temple of the Union set enc69helped to 0 ; move markers FFER69Marker1.moveto marker1 ; start FFER69Marker2.moveto marker7 ; middle FFER69Marker3.moveto marker4 ; end ; place 2-4 NPCs set dieRoll to GetRandomPercent * 3/100 + 2 marker1.placeLeveledActorAtMe FFER69Slave marker2.placeLeveledActorAtMe FFER69Slave if dieRoll > 2 marker3.placeLeveledActorAtMe FFER69Slave endif if dieRoll > 3 marker3.placeLeveledActorAtMe FFER69Slave endif elseif encounterNumber == 70 ; MS02 Post Quest - AntAgonizer attacking wastelanders ; move markers FFER70Marker1.moveto marker1 ; start FFER70Marker2.moveto marker7 ; middle FFER70Marker3.moveto marker4 ; end ; Move AntAgonizer and make him patrol wasteland ; make sure AntAgonizer has correct AI settings: AntAgonizerRef.setAV aggression MS02.AntAgonizerAggresion AntAgonizerRef.setAV confidence MS02.AntAgonizerConfidence AntAgonizerRef.setAV assistance MS02.AntAgonizerAssistance AntAgonizerRef.moveto marker6 AntAgonizerRef.addscriptpackage FFER70Patrol ; Spawn Giant Ants with AntAgonizer marker4.placeLeveledActorAtMe FFER70Ant marker5.placeLeveledActorAtMe FFER70Ant marker6.placeLeveledActorAtMe FFER70Ant ; Wastelanders ; place 2-3 wastelanders set dieRoll to GetRandomPercent marker1.placeLeveledActorAtMe FFER70Wastelander marker2.placeLeveledActorAtMe FFER70Wastelander if dieRoll < 25 marker3.placeLeveledActorAtMe FFER70Wastelander 2 ; make him tougher endif ; place one afraid wastelander near ants marker4.placeLeveledActorAtMe FFER70WastelanderCoward elseif encounterNumber == 71 ; Enclave patrol dropped off by vertibird ; clear vars set enc71status to 0 ; move markers FFER71Marker1.moveto marker1 ; start FFER71Marker2.moveto marker7 ; middle FFER71Marker3.moveto marker4 ; end FFER71MarkerA.moveto marker7 0 -75 0 FFER71MarkerB.moveto marker7 0 75 0 ; place vertibird marker7.placeatme FFER71VertibirdEncounter elseif encounterNumber == 72 ; Enclave patrol vs. Talon Company ; move markers FFER72Marker1.moveto marker1 ; start FFER72Marker2.moveto marker7 ; middle FFER72Marker3.moveto marker4 ; end ; place Enclave marker1.placeLeveledActorAtMe FFER72EnclaveGun marker2.placeLeveledActorAtMe FFER72EnclaveGun marker3.placeLeveledActorAtMe FFER72EnclaveSpecial marker3.placeLeveledActorAtMe FFER72Talon ; place Talon marker4.placeLeveledActorAtMe FFER72Talon marker5.placeLeveledActorAtMe FFER72Talon marker6.placeLeveledActorAtMe FFER72Talon elseif encounterNumber == 73 ; scavenger on patrol, with Brahmin ; clear vars set enc73brahminDead to 0 ; move markers FFER73Marker1.moveto marker1 ; start FFER73Marker2.moveto marker7 ; middle FFER73Marker3.moveto marker4 ; end ; place scavenger and brahmin set tempRef1 to marker1.placeLeveledActorAtMe FFER73NPC1 2 ; reset loot chest inventory FFER73LootBoxREF.ResetInventory ; place pack brahmin set tempRef2 to marker2.placeLeveledActorAtMe FFER73Brahmin ; set ownership tempRef2.SetOwnership WastelandScavengerFaction ; set merchant chest tempRef1.SetMerchantContainer FFER73LootBoxREF ; give me a pet set dieRoll to GetRandomPercent if dieRoll > FFEScavengerDogChance ; pet bear set tempRef3 to marker3.placeLeveledActorAtMe FFER73YaoGuai else ; pet dog set tempRef3 to marker3.placeLeveledActorAtMe FFER73Dog endif ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 74 ; fire ants ; move markers FFER74Marker1.moveto marker1 ; start FFER74Marker2.moveto marker7 ; middle FFER74Marker3.moveto marker4 ; end marker1.placeLeveledActorAtMe FFER74FireAntWorker marker2.placeLeveledActorAtMe FFER74FireAntWorker set dieRoll to GetRandomPercent if dieRoll >= 50 marker3.placeLeveledActorAtMe FFER74FireAntSoldier else marker3.placeLeveledActorAtMe FFER74FireAntWorker marker3.placeLeveledActorAtMe FFER74FireAntWorker endif elseif encounterNumber == 75 ; cannibals -- repeat ; reset variable set FFEUniqueB.enc52preyDead to 0 ; if all are dead, don't do anything if FFEU51Hunter1REF.getDead == 0 || FFEU51Hunter2REF.getDead == 0 || FFEU51Hunter3REF.getDead == 0 ; move markers FFEU51Marker1.moveto marker1 ; start FFEU51Marker2.moveto marker7 ; middle FFEU51Marker3.moveto marker4 ; end ; make cannibals enemy of Wastelander faction (in case they run into random ones) setEnemy FFEU51CannibalFaction WastelanderFaction 1 0 ; move NPCs if FFEU51Hunter1REF.getDead == 0 FFEU51Hunter1REF.moveto marker1 endif if FFEU51Hunter2REF.getDead == 0 FFEU51Hunter2REF.moveto marker2 endif if FFEU51Hunter3REF.getDead == 0 FFEU51Hunter3REF.moveto marker3 endif ; place "prey" set tempRef1 to marker3.placeLeveledActorAtMe FFEU52Prey endif elseif encounterNumber == 76 ; Talon Company patrol ; move markers FFER72Marker1.moveto marker1 ; start FFER72Marker2.moveto marker7 ; middle FFER72Marker3.moveto marker4 ; end ; place Talon marker1.placeLeveledActorAtMe FFER72Talon marker2.placeLeveledActorAtMe FFER72Talon if player.getLevel >= 8 marker3.placeLeveledActorAtMe FFER72Talon endif if player.getLevel >= 12 marker3.placeLeveledActorAtMe FFER72Talon endif if player.getLevel >= 16 marker2.placeLeveledActorAtMe FFER72Talon endif ; NOTE: 77 is a repeat of 71 elseif encounterNumber == 78 ; brahmin herd ; move markers FFER78Marker1.moveto marker1 ; start FFER78Marker2.moveto marker7 ; middle FFER78Marker3.moveto marker4 ; end ; 2-5 brahmin marker1.placeLeveledActorAtMe FFER78Brahmin marker2.placeLeveledActorAtMe FFER78Brahmin set dieRoll to GetRandomPercent * 4/100 + 2 if dieRoll > 2 marker3.placeLeveledActorAtMe FFER78Brahmin endif if dieRoll > 3 marker2.placeLeveledActorAtMe FFER78Brahmin endif if dieRoll > 4 marker4.placeLeveledActorAtMe FFER78Brahmin endif elseif encounterNumber == 79 ; hit squad ; move markers FFER79Marker1.moveto marker1 ; start FFER79Marker2.moveto marker7 ; middle FFER79Marker3.moveto marker4 ; end if player.Getav Karma <= KarmaEvil ; regulators marker1.placeLeveledActorAtMe FFER79RegulatorLeader 2 marker2.placeLeveledActorAtMe FFER79Regulator01 1 marker3.placeLeveledActorAtMe FFER79Regulator02 1 elseif player.GetAV Karma >= KarmaGood ; talon co marker1.placeLeveledActorAtMe FFER79TalonLeader 2 marker2.placeLeveledActorAtMe FFER79Talon01 1 marker3.placeLeveledActorAtMe FFER79Talon02 1 endif elseif encounterNumber == 80 ; Outcast patrol ; move patrol markers FFER80Marker1.moveto marker7 ; middle FFER80Marker2.moveto marker1 ; FFER80Marker3.moveto marker4 ; ; Outcast patrol ; place 2 outcast and a robot marker1.placeLeveledActorAtMe FFER80Outcast1 1 marker2.placeLeveledActorAtMe FFER80Outcast1 2 marker3.placeLeveledActorAtMe FFER80OutcastRobot1 1 ; etc. endif ; clear encounter number set encounterNumber to 0 endif end
274FFETriggerQuestSCRIPTscn FFETriggerQuestSCRIPT ; This script is a central holding spot for the active encounter ; -- trigger zone sets these to its markers when activated ; -- quest scripts pull data from here when they start processing the encounter ; references to encounter markers ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ref marker6 ref marker7 short vertibirdLand ; set to 1 if encounter allows vertibird landing short debug ; set to 1 for debug messages short manual ; set to 1 for manual encounters (trigger zones will initialize variables but not place encounters)
275FFETriggerScriptscn FFETriggerScript short triggered ; trigger only operates once short chance ; used for calculations short dieRoll ; used for die rolls short uniqueEncounter ; set to 1 if we're looking for a unique encounter; 0 = repeatable short startRolling ; set to 1 to trigger looping die rolls for unique encounters (until a new one is picked) short encounterRoll ; used for encounter die rolls ; reference variables hold specific markers for this trigger ; this is initialized OnLoad ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ref marker6 ref marker7 ; initialized on load based on GetIsID check short encounterSet ; 0 = set A ; 1 = set B short childTrigger ; set to 1 if this trigger is linked to another one ; in this case, this trigger doesn't do anything but activate its parent begin onTriggerEnter player ; initializing with linked markers set marker1 to GetLinkedRef ; if I'm linked to another trigger zone, don't initialize the rest of it if marker1.getIsID FFETriggerA == 1 || marker1.getIsID FFETriggerB == 1 || marker1.getIsID FFETriggerBNoVertibird == 1 set childTrigger to 1 else set marker2 to marker1.GetLinkedRef set marker3 to marker2.GetLinkedRef set marker4 to marker3.GetLinkedRef set marker5 to marker4.GetLinkedRef set marker6 to marker5.GetLinkedRef set marker7 to marker6.GetLinkedRef endif ; what kind of trigger am I? if getIsID FFETriggerB == 1 || getIsID FFETriggerBNoVertibird == 1 set encounterSet to 1 endif if triggered == 1 return endif ; if I'm a "child trigger", just act as if my parent was triggered if childTrigger == 1 marker1.enterTrigger player return endif ; otherwise, ; randomly pick whether to trigger an encounter at all if GetRandomPercent <= FFEncounterChance ; initialize trigger quest reference variables with my markers set FFETrigger.marker1 to marker1 set FFETrigger.marker2 to marker2 set FFETrigger.marker3 to marker3 set FFETrigger.marker4 to marker4 set FFETrigger.marker5 to marker5 set FFETrigger.marker6 to marker6 set FFETrigger.marker7 to marker7 ; fail if these markers don't exist if marker1 == 0 || marker2 == 0 || marker3 == 0 || marker4 == 0 || marker5 == 0 set triggered to 1 return endif ; only "default" B triggers allow vertibird landing if encounterSet == 1 && getIsID FFETriggerB == 1 set FFETrigger.vertibirdLand to 1 else set FFETrigger.vertibirdLand to 0 endif ; if in FFEEncounterWorld, just set up quest variables if getInWorldspace FFEncounterWorld == 1 || FFETrigger.manual == 1 if getInWorldspace FFEncounterWorld == 1 || FFETrigger.debug == 1 ShowMessage FFEDebugMsgInit endif set triggered to 1 return endif ; unique or repeatable encounter? ; 1. figure out chance of repeatable encounter set chance to FFERepeatChance ; base value for a repeatable encounter ; increase chance as unique encounters are used up if encounterSet == 0 set chance to chance + 50 * ( FFEUniqueACount / FFEUniqueAMax ) elseif encounterSet == 1 set chance to chance + 50 * ( FFEUniqueBCount / FFEUniqueBMax ) endif if FFETrigger.debug == 1 ShowMessage FFEDebugMsgChance chance endif ; 2. roll for unique vs repeatable set dieRoll to GetRandomPercent if dieRoll <= chance ; repeatable if FFETrigger.debug == 1 ShowMessage FFEDebugMsgRepeatRoll dieRoll endif set uniqueEncounter to 0 else ; unique if FFETrigger.debug == 1 ShowMessage FFEDebugMsgUniqueRoll dieRoll endif set uniqueEncounter to 1 endif ; tell script to start rolling for encounters set startRolling to 1 set encounterRoll to 0 set triggered to 1 ; mark as triggered -- trigger zone only generates an encounter once endif end begin gamemode ; "looping" die rolls for encounters if startRolling > 0 ; are we in the middle or rolling, or just starting? if encounterRoll == 0 ; roll a starting roll if encounterSet == 0 if uniqueEncounter == 1 set encounterRoll to GetRandomPercent * FFEUniqueAMax / 100 + 1 else set encounterRoll to GetRandomPercent * FFERepeatAMax / 100 + 1 endif elseif encounterSet == 1 if uniqueEncounter == 1 set encounterRoll to GetRandomPercent * FFEUniqueBMax / 100 + 51 else set encounterRoll to GetRandomPercent * FFERepeatBMax / 100 + 51 endif endif else ; increment to next encounter number set encounterRoll to encounterRoll + 1 ; if we've rolled over, go back to beginning if encounterSet == 0 if uniqueEncounter == 1 if encounterRoll > FFEUniqueAMax set startRolling to startRolling + 1 set encounterRoll to 1 ; starting point for set A endif else if encounterRoll > FFERepeatAMax set startRolling to startRolling + 1 set encounterRoll to 1 ; starting point for set A endif endif elseif encounterSet == 1 if uniqueEncounter == 1 if encounterRoll > ( FFEUniqueBMax + 51 ) set startRolling to startRolling + 1 set encounterRoll to 51 ; starting point for set B endif else if encounterRoll > ( FFERepeatBMax + 51 ) set startRolling to startRolling + 1 set encounterRoll to 51 ; starting point for set B endif endif endif endif ; did we find an unused encounter? if uniqueEncounter == 1 if ( encounterSet == 0 && getStageDone FFEUniqueA encounterRoll == 0 ) || ( encounterSet == 1 && getStageDone FFEUniqueB encounterRoll == 0 ) ; yes if FFETrigger.debug == 1 ShowMessage FFEDebugMsgUniqueEncounterRoll encounterRoll endif setstage FFEUniqueCond encounterRoll if ( encounterSet == 0 && getStageDone FFEUniqueA encounterRoll == 0 ) || ( encounterSet == 1 && getStageDone FFEUniqueB encounterRoll == 0 ) ; if the encounter didn't actually happen (due to conditions), keep rolling if FFETrigger.debug == 1 ShowMessage FFEDebugMsgInvalid endif else ; encounter happened -- done! set startRolling to 0 endif else ; no -- keep rolling, unless... ; if we've already been once through the whole list, we'd better stop (no valid encounters available) if ( encounterSet == 0 && startRolling > FFEUniqueAMax ) || ( encounterSet == 1 && startRolling > FFEUniqueBMax ) set startRolling to 0 ; reset trigger so encounter location can be used again set triggered to 0 if FFETrigger.debug == 1 ShowMessage FFEDebugMsgNoEncounters endif endif endif else if ( encounterSet == 0 && getStageDone FFERepeatA encounterRoll == 0 ) || ( encounterSet == 1 && getStageDone FFERepeatB encounterRoll == 0 ) ; yes if FFETrigger.debug == 1 ShowMessage FFEDebugMsgRepeatEncounterRoll encounterRoll endif setstage FFERepeatCond encounterRoll ; if the encounter didn't actually happen (due to conditions), keep rolling if ( encounterSet == 0 && getStageDone FFERepeatA encounterRoll == 0 ) || ( encounterSet == 1 && getStageDone FFERepeatB encounterRoll == 0 ) if FFETrigger.debug == 1 ShowMessage FFEDebugMsgInvalid endif ; increment encounter count -- we do this here for repeatable quests because we don't care if we miss a few on each pass through ; (and we want to make sure we don't wait to restart the cycle for encounters which don't pass the conditions) if encounterSet == 0 set FFERepeatACount to FFERepeatACount + 1 elseif encounterSet == 1 set FFERepeatBCount to FFERepeatBCount + 1 endif ; keep rolling, unless... ; if we've already been once through the whole list, we'd better stop (no valid encounters available) if ( encounterSet == 0 && startRolling > FFERepeatAMax ) || ( encounterSet == 1 && startRolling > FFERepeatBMax ) set startRolling to 0 ; reset trigger so encounter location can be used again set triggered to 0 if FFETrigger.debug == 1 ShowMessage FFEDebugMsgNoEncounters endif endif else ; encounter happened -- done! set startRolling to 0 endif else ; if we've already done ALL the repeatable encounters in this set, reset the quest and repeat if ( encounterSet == 0 && FFERepeatACount >= FFERepeatAMax ) if FFETrigger.debug == 1 ShowMessage FFEDebugMsgRepeatFinishA encounterRoll endif set FFERepeatACount to 0 ResetQuest FFERepeatA setstage FFERepeatCond encounterRoll set startRolling to 0 elseif ( encounterSet == 1 && FFERepeatBCount >= FFERepeatBMax ) if FFETrigger.debug == 1 ShowMessage FFEDebugMsgRepeatFinishB encounterRoll endif set FFERepeatBCount to 0 ResetQuest FFERepeatB setstage FFERepeatCond encounterRoll set startRolling to 0 else ; no -- keep rolling endif endif if startRolling == 0 ; we found an encounter ; increment encounter count -- we do this here for repeatable quests because we don't care if we miss a few on each pass through ; (and we want to make sure we don't wait to restart the cycle for encounters which don't pass the conditions) if encounterSet == 0 set FFERepeatACount to FFERepeatACount + 1 elseif encounterSet == 1 set FFERepeatBCount to FFERepeatBCount + 1 endif endif endif endif end
276FFEU02DeathclawSCRIPTscn FFEU02DeathclawSCRIPT begin OnHit player set FFEUniqueA.enc2playerHelp to 1 setfactionreaction FFEU02SettlerFaction playerfaction 100 end
277FFEU03NPCAScriptscn FFEU03NPCAScript begin OnDeath if FFEU03NPC1Ref.getDead == 1 && FFEU03NPC1Ref.getDead == 1 set FFEUniqueA.enc3FightDone to 1 endif end
278FFEU03NPCBScriptscn FFEU03NPCBScript begin OnDeath if FFEU03NPC3Ref.getDead == 1 && FFEU03NPC4Ref.getDead == 1 set FFEUniqueA.enc3FightDone to 1 endif end
279FFEU05RadscorpionSCRIPTscn FFEU05RadscorpionSCRIPT begin OnHit player set FFEUniqueA.enc5playerHelp to 1 setfactionreaction FFEU05Faction playerfaction 100 setAlly FFEU05Faction playerfaction end
280FFEU07RadioBeaconSCRIPTscn FFEU07RadioBeaconSCRIPT float timer ; intermittently broadcasting radio beacon begin gamemode if GetDestroyed == 0 if timer > 0 set timer to timer - GetSecondsPassed else FFEU07RadioBeaconREF.startRadioConversation set timer to 10 endif endif end
281FFEU08FallingObjectSCRIPTscn FFEU08FallingObjectSCRIPT float timer short runTimer short doOnce begin gamemode if doOnce == 0 placeatme FFEU08SmokeTrail set doOnce to 1 endif if getDisabled == 0 && doOnce == 1 set doOnce to 2 set runTimer to 1 set timer to .1 ; place everything FFEU08Marker2.placeatme AmmoAlienPowerCell 6 FFEU08Marker3.placeatme AmmoAlienPowerCell 6 FFEU08Marker4.placeatme AmmoAlienPowerCell 6 FFEU08Marker5.placeatme AmmoAlienPowerCell 6 FFEU08Marker2.placeatme WeapUniqueFirelance endif if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else set runTimer to 2 damageObject 50 endif endif end
282FFEU08SmokeTrailScriptscn FFEU08SmokeTrailScript Short DoOnce Begin OnLoad Set DoOnce to 0 playgroup forward 0 End Begin GameMode if DoOnce == 0 If isAnimPlaying Forward == 0 ; smoke trail finished FFEU08FallingObjectREF.enable ; Placeatme LargeExplosion Set DoOnce to 2 endif EndIf If DoOnce == 2 Disable set DoOnce to 3 endif if DoOnce == 3 MarkForDelete endif End
283FFEU09NPCScriptscn FFEU09NPCScript begin OnLoad if getAV Variable01 == 0 ; force NPC to equip shotgun without ammo until after he speaks to you or goes into combat equipitem WeapShotgunSawedOff 1 endif end begin OnStartCombat equipitem WeapShotgunSawedOff 0 ; no longer forced to have it equipped end
284FFEU10Robot1SCRIPTSCN FFEU10Robot1SCRIPT short RobotFixed ; 0 = nothing ; 1 = fixed ; 2 = broken (smashed) ; 3 = broken (hidden) short RobotAvailable ; obsolete short Button short PlayerMayAttempt BEGIN OnActivate if ( isActionRef player == 1 ) && ( RobotFixed == 0 ) if ( player.GetAv Repair < 40 ) ShowMessage FFEU10RobotLowSkillMsg elseif ( player.GetAv Repair >= 40 ) set PlayerMayAttempt to 1 ShowMessage FFEU10RobotFixMsg endif else activate endif END BEGIN GameMode if ( RobotFixed == 0 ) set Button to GetButtonPressed if ( Button > 0 ) if ( Button == 1 ) && ( PlayerMayAttempt == 0 ) ShowMessage FFEU10RobotDestroyMsg FFEU10Robot1REF.kill set RobotFixed to 2 set FFEUniqueA.enc10help to 1 endif if ( Button == 1 ) && ( PlayerMayAttempt == 1 ) ShowMessage FFEU10RobotRepairedMsg set RobotFixed to 1 set FFEUniqueA.enc10help to 1 endif if ( Button == 2 ) && ( PlayerMayAttempt == 1 ) ShowMessage FFEU10RobotDestroyHighSkillMsg FFEU10Robot1REF.kill set RobotFixed to 3 set FFEUniqueA.enc10help to 1 endif endif endif END
285FFEU12ScavengerSCRIPTscn FFEU12ScavengerSCRIPT begin OnLoad ; clear variable to reenable quest-related dialogue setav variable01 0 end
286FFEU13ChildScriptscn FFEU13ChildScript begin OnLoad if (GetTalkedToPC == 1) Disable endif End
287FFEU18Raider1SCRIPTscn FFEU18Raider1SCRIPT ; this script controls the raider initiation scene short runScene ; set to 1 to start, set to 2 to finish short stage ; tracks whose turn it is to beat on raider5 begin OnLoad if runScene == 0 set runScene to 1 set stage to 1 evp FFEU18Raider1REF.evp FFEU18Raider2REF.evp FFEU18Raider3REF.evp FFEU18Raider4REF.evp endif end begin OnStartCombat ; end scene if combat takes place if runScene < 2 set runScene to 2 FFEU18Raider1REF.evp FFEU18Raider2REF.evp FFEU18Raider3REF.evp FFEU18Raider4REF.evp endif end
288FFEU20ScavengerSCRIPTscn FFEU20ScavengerSCRIPT ; run a timer then die float timer int runTimer begin OnActivate if runTimer == 0 ; don't activate him while he's dying Activate endif end begin gamemode if runTimer > 0 if timer > 0 set timer to timer - GetSecondsPassed else if runTimer == 1 set runTimer to 2 Say Hit playidle LooseMtHtHeadA set timer to 1.5 elseif runTimer == 2 kill set runTimer to 0 endif endif endif end
289FFEU21EnclaveSCRIPTscn FFEU21EnclaveSCRIPT begin OnStartCombat SetEnemy FFEU21EnclaveFaction Vault101Faction SetEnemy FFEU21EnclaveFaction PlayerFaction end
290FFEU255DogmeatTriggerSCRIPTscn FFEU255DogmeatTriggerSCRIPT float tempFloat1 begin OnTriggerEnter player ; place dead owner set FFEU255NPC1Ref.dismember to 1 ; head blown away ; Dogmeat encounter DogmeatREF.enable set FFEUniqueA.enc255deadCount to 3 FFEU255Raider3REF.damageav leftmobilitycondition 100 set tempFloat1 to ( FFEU255Raider3REF.getav health ) * .75 FFEU255Raider3REF.damageav health tempFloat1 DogmeatREF.startCombat FFEU255Raider3REF ; disable me and all the rest of the triggers so this only happens once FFEU255DogmeatTriggerREF.disable end
291FFEU255RaiderSCRIPTscn FFEU255RaiderSCRIPT BEGIN OnDeath set FFEUniqueA.enc255deadCount to FFEUniqueA.enc255deadCount - 1 if FFEUniqueA.enc255deadCount <= 0 set FFEUniqueA.enc255deadCount to -1 ;SetEssential FFEU255Dogmeat 0 DogmeatREF.evp endif END
292FFEU52PreyScriptscn FFEU52PreyScript ref mySelfRef float timer short done short enemy ; set to 2 when made enemy of cannibals begin OnLoad if enemy == 0 set enemy to 1 set timer to 8 endif end begin gamemode if GetDead == 0 if enemy == 1 set timer to timer - GetSecondsPassed if timer < 0 set mySelfRef to GetSelf ; make enemy of cannibals so they'll start attacking set enemy to 2 addToFaction FFEU52PreyFaction 1 FFEU51Hunter1REF.startcombat mySelfRef FFEU51Hunter2REF.startcombat mySelfRef FFEU51Hunter3REF.startcombat mySelfRef endif endif else ; run timer to move marker after corpse has settled if done == 0 set timer to timer - GetSecondsPassed if timer < 0 set mySelfRef to GetSelf set done to 1 FFEU51Marker1.moveto mySelfRef endif endif endif end begin OnDeath set mySelfRef to GetSelf ; move marker to me when I die so hunters can guard it FFEU51Marker1.moveto mySelfRef ; tell quest that I'm dead set FFEUniqueB.enc52preyDead to 1 ; make me owned by hunters setOwnership FFEU51CannibalFaction ; run timer set timer to 5 end
293FFEU53PreySCRIPTscn FFEU53PreySCRIPT short startShooting short hitCount float timer begin OnDeath set FFEUniqueB.enc53preyDead to 1 FFEU53SniperREF.evp setEnemy FFEU53SniperFaction playerFaction end begin OnHit FFEU53SniperREF set hitCount to hitCount + 1 if hitCount > 1 kill FFEU53SniperREF 1 endif end begin gamemode if startShooting == 0 set timer to timer + GetSecondsPassed if getDistance FFEU53SniperREF > 1000 || timer > 5 setenemy FFEU53SniperFaction FFEU53SniperPreyFaction FFEU53SniperREF.startcombat FFEU53Prey1REF FFEU53Prey1REF.startcombat FFEU53SniperREF set startShooting to 1 endif endif end
294FFEU56SupermutantScriptscn FFEU56SupermutantScript begin OnHit player if getDead == 0 set FFEUniqueB.enc56playerHelped to 1 endif end
295FFEUniqueAQuestSCRIPTscn FFEUniqueAQuestSCRIPT ; references to encounter markers ; what these mean vary by the encounter ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ; temp refs used during creation of the encounters ref tempRef1 ref tempRef2 ref tempRef3 ref tempRef4 ref tempRef5 ; used in picking the random encounter short dieRoll ; random die roll float tempFloat1 ; temp variable ; what encounter are we triggering? short encounterNumber ; this is the stage to trigger ; ; ************unique encounter variables ********** ; Encounter 1 short gaveWater ; set to 1 if player gives water ; Encounter 2 short enc2playerHelp ; set to 1 if player damages deathclaw at all ; Encounter 3 short enc3Scene ; set to 1 to start scene short enc3Resolution ; 1 = share water ; 2 = fight each other ; 3 = fight player short enc3Share ; set to 1 if they are sharing water with player short enc3FightDone ; set to 1 after one side is dead ; Encounter 4 ; Encounter 5 short enc5playerHelp ; set to 1 if player helps kill radscorpion ; Encounter 6 ; Encounter 10 short enc10giveMoney ; set to 1 if mechanic agrees to pay payer; set to 2 after paid. short enc10startPatrol ; set to 1 to get mechanic and robot to start patrolling short enc10mechanicMad ; set to 1 if mechanic is mad at player short enc10help ; set to 1 if agree to help fix robot ;Encounter 17 short enc17SydneyGreet ;set to 1 to get sydney to forcegreet the player ;Encounter 19 short enc19scene ; set to 1 to start NPC conversation ;Encounter 20 short enc20hasNote ; set to 1 after player picks up note ;Encounter 21 short enc21scene ; used to conditionalize dialogue short enc21enclaveEnableDay ; used to time enabling of enclave camp at Vault 101 ; Encounter 255 - dogmeat short enc255deadCount ; when this goes to 0 all raiders have been killed, set to -1 when encounter is over begin gamemode ;***************************************** ; special handling ;***************************************** if enc20hasNote == 0 && getStageDone FFEUniqueA 20 == 1 if GetHasNote FFEU20Note == 1 set enc20hasNote to 1 ShowMap OasisMapMarker endif endif if enc21enclaveEnableDay > 0 if GameDaysPassed > enc21enclaveEnableDay && player.GetDistance FFEU21Vault101EnclaveMarker > 10000 set enc21enclaveEnableDay to 0 FFEU21Vault101EnclaveMarker.enable endif endif ; **************************************** ; start encounter ; **************************************** if encounterNumber > 0 ; special handling: ; increment encounter count set FFEUniqueACount to FFEUniqueACount + 1 ; get the current encounter markers from FFETrigger quest (set by the trigger zone) set marker1 to FFETrigger.marker1 set marker2 to FFETrigger.marker2 set marker3 to FFETrigger.marker3 set marker4 to FFETrigger.marker4 set marker5 to FFETrigger.marker5 ; fail if these markers don't exist if marker1 == 0 || marker2 == 0 || marker3 == 0 || marker4 == 0 || marker5 == 0 ; clear encounter number set encounterNumber to 0 endif ; ********************************************************************* ; encounter set A -- clustered encounters ; ********************************************************************* if encounterNumber == 1 ; man dying of thirst FFEU01Marker1.moveto marker1 marker1.placeatme FloorSitMarker FFEU01NPC1Ref.moveto marker1 set dieRoll to FFEU01NPC1Ref.getav health set dieRoll to dieRoll/2 FFEU01NPC1Ref.damageav health dieRoll elseif encounterNumber == 2 ; settlers versus deathclaw FFEU02Marker1.moveto marker1 FFEU02NPC1Ref.additem WithAmmoHuntingRifleNPC 1 FFEU02NPC1Ref.moveto marker2 FFEU02NPC2Ref.moveto marker3 FFEU02NPC3Ref.moveto marker4 set tempRef1 to marker1.placeLeveledActorAtMe FFEU02DeathClaw tempRef1.damageav LeftMobilityCondition 100 tempRef1.damageav RightMobilityCondition 80 tempRef1.damageav PerceptionCondition 100 tempRef1.damageav health 190 set dieRoll to tempRef1.getav health set dieRoll to dieRoll * .6 * ( player.getav luck ) * .1 tempRef1.damageav health dieRoll marker2.placeatme FloorSitMarker marker3.placeatme DefaultSmokingIdleMarker marker4.placeatme FloorSleepL elseif encounterNumber == 3 set enc3Scene to 1 FFEU03Marker1.moveto marker1 FFEU03ContainerRef.moveto marker1 FFEU03NPC1Ref.moveto marker2 FFEU03NPC2Ref.moveto marker3 FFEU03NPC3Ref.moveto marker4 FFEU03NPC4Ref.moveto marker5 elseif encounterNumber == 4 ; move marker FFEU04Marker1.moveto marker4 ; dead body FFEU04NPC1Ref.moveto marker2 ; FFEU04NPC1Ref.kill marker2.placeatme FakeForceBall1000 ; to give a havok push to the body to toss it around ; wounded deathclaw set tempRef1 to marker4.placeLeveledActorAtMe FFEU04DeathClaw set dieRoll to tempRef1.getav health set dieRoll to dieRoll * .8 tempRef1.damageav health dieRoll tempRef1.damageav LeftAttackCondition 50 tempRef1.damageav RightAttackCondition 30 tempRef1.damageav RightMobilityCondition 100 tempRef1.damageav LeftMobilityCondition 65 tempRef1.damageav PerceptionCondition 80 tempRef1.damageav EnduranceCondition 40 elseif encounterNumber == 5 ; settlers want to get to hydrant FFEU05HydrantREF.moveto marker1 FFEU05NPC01Ref.moveto marker2 FFEU05NPC02Ref.moveto marker3 FFEU05RadscorpionREF.moveto marker4 marker2.placeatme FloorSitMarker marker3.placeatme DefaultSmokingIdleMarker marker4.placeatme FloorSleepL marker5.placeatme FloorSleepL elseif encounterNumber == 6 ; move marker FFEU06Marker1.moveto marker4 ; move NPC FFEU06NPC1REF.moveto marker4 elseif encounterNumber == 7 ; Chinese soldier with radio beacon FFEU07CorpseREF.moveto marker1 ; FFEU07CorpseREF.kill marker1.placeatme FakeForceBall250 ; to give a little havok push to the body to settle it FFEU07RadioBeaconREF.moveto marker4 0 0 -100 ; under the ground -- pretending the beacon is on the body elseif encounterNumber == 8 ; falling exploding UFO? FFEU08Marker1.moveto marker1 0 0 2500 ; where explosion happens FFEU08Marker2.moveto marker2 0 0 2520 ; where ammo/blaster are placed FFEU08Marker3.moveto marker3 0 0 2520 ; where ammo/blaster are placed FFEU08Marker4.moveto marker4 0 0 2520 ; where ammo/blaster are placed FFEU08Marker5.moveto marker5 0 0 2520 ; where ammo/blaster are placed FFEU08FallingObjectREF.moveto marker1 0 0 2500 elseif encounterNumber == 9 ; raider trying to mug player ; place marker FFEU09Marker1.moveto marker1 ; place raider FFEU09NPCREF.moveto marker1 elseif encounterNumber == 10 ; robots that talk to each other ; place marker FFEU10Marker1.moveto marker1 ; place robot FFEU10Robot1REF.moveto marker2 ; place mechanic FFEU10NPC1REF.moveto marker5 elseif encounterNumber == 11 ; Scavenger on his way to loot Bigtown ; place marker FFEU11Marker1.moveto marker1 ; place scavenger FFEU11ScavengerREF.moveto marker1 ; give me a pet set tempRef3 to marker5.placeLeveledActorAtMe FFEU11YaoGuai ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 12 ; Scavenger on his way to sell guns and ammo to Bigtown ; place marker FFEU12Marker1.moveto marker1 ; place scavenger FFEU12ScavengerREF.moveto marker1 ; give me a pet set tempRef3 to marker5.placeLeveledActorAtMe FFEU12YaoGuai ; set ownership so pet reacts properly tempRef3.SetOwnership WastelandScavengerFaction elseif encounterNumber == 13 ; MS02 Post Quest: child asks player for signature ; place marker FFEU13Marker1.moveto marker1 ; place child FFEU13ChildREF.moveto marker1 ; make child wait for player then forcegreet FFEU13ChildREF.addscriptpackage FFEU13Dialogue elseif encounterNumber == 14 ; MS11 Post Quest: Burke's hitman attack the player ; place marker FFEU14Marker1.moveto marker1 ; place hitmen set tempRef1 to marker2.placeLeveledActorAtMe FFEU14Hitman 2 set tempRef2 to marker3.placeLeveledActorAtMe FFEU14Hitman 1 set tempRef3 to marker4.placeLeveledActorAtMe FFEU14Hitman 0 ; place note on one of the hitmen tempRef1.additem FFEU14Note 1 elseif encounterNumber == 15 ; MS11 Post Quest: Megaton Settlers attack the player ; place marker FFEU15Marker1.moveto marker1 ; place hitmen set tempRef1 to marker2.placeLeveledActorAtMe FFEU15Hitman 2 set tempRef2 to marker3.placeLeveledActorAtMe FFEU15Hitman 1 set tempRef3 to marker4.placeLeveledActorAtMe FFEU15Hitman 0 elseif encounterNumber == 16 ; Dead guy with treasure note set tempRef1 to marker1.placeLeveledActorAtMe FFEU16NPC1 tempRef1.kill FFEU16Marker1.moveto marker1 ; vicious dog guarding body, dead friends nearby marker3.placeLeveledActorAtMe FFEU16Dog set tempRef1 to marker2.placeLeveledActorAtMe FFEU16Dog tempRef1.kill set tempRef1 to marker4.placeLeveledActorAtMe FFEU16Dog tempRef1.kill elseif encounterNumber == 17 ; MS15 Post Quest: Sydney attacks the player ; place marker FFEU17Marker1.moveto marker1 ;place Sydney and Cohort MS15SydneyRef.moveto marker1 marker2.placeLeveledActorAtMe FFEU17Hitman ; enable Sydney and assign her to FFEU17SydneyFaction MS15SydneyRef.enable MS15SydneyRef.AddToFaction FFEU17SydneyFaction 0 ;Get Sydney to forcegreet the player set enc17SydneyGreet to 1 elseif encounterNumber == 18 ; Raider initiation rite ; place markers FFEU18Marker1.moveto marker1 FFEU18Marker2.moveto marker2 FFEU18Marker3.moveto marker3 FFEU18Marker4.moveto marker4 FFEU18Marker5.moveto marker5 ; place raiders FFEU18Raider1REF.moveto marker1 FFEU18Raider2REF.moveto marker2 FFEU18Raider3REF.moveto marker3 FFEU18Raider4REF.moveto marker4 FFEU18Raider5REF.moveto marker5 elseif encounterNumber == 19 ; people trying to disarm mine set enc19scene to 1 ; place mines FFEU19MineMarker1.moveto marker4 ; set tempRef1 to marker1.placeatme MineFragProjectile set tempRef2 to marker4.placeatme MineFragProjectile 2 set tempRef3 to marker5.placeatme MineFragProjectile 2 ; move marker FFEU19Marker1.moveto marker1 ; place NPCs FFEU19NPC1REF.moveto marker2 FFEU19NPC2REF.moveto marker3 ; make them look at mine ; FFEU19NPC1REF.look tempRef1 ; FFEU19NPC2REF.look tempRef1 elseif encounterNumber == 20 ; MS10 Quest Encounter: Oasis Merchant ; move marker FFEU20Marker1.moveto marker1 FFEU20Marker2.moveto marker2 FFEU20Marker3.moveto marker3 FFEU20Marker4.moveto marker4 FFEU20Marker5.moveto marker5 ; move merchant FFEU20ScavengerREF.moveto marker1 elseif encounterNumber == 21 ; MS16 Quest Encounter: Amata and Enclave ; move markers FFEU21Marker1.moveto marker1 FFEU21Marker2.moveto marker2 FFEU21Marker3.moveto marker3 FFEU21Marker4.moveto marker4 FFEU21Marker5.moveto marker5 ; move Amata AmataREF.enable AmataREF.moveto marker1 AmataREF.setav confidence 0 ; make cowardly so she'll run SetEssential Amata 0 ; move Enclave soldiers FFEU21EnclaveOfficerREF.moveto marker2 FFEU21EnclaveSoldierREF1.moveto marker3 FFEU21EnclaveSoldierREF2.moveto marker4 ; make them temporarily friendly to Amata SetAlly FFEU21EnclaveFaction Vault101Faction 1 1 endif ; clear encounter number set encounterNumber to 0 endif end
296FFEUniqueBQuestSCRIPTscn FFEUniqueBQuestSCRIPT ; references to encounter markers ; what these mean vary by the encounter ref marker1 ref marker2 ref marker3 ref marker4 ref marker5 ref marker6 ref marker7 ; temp refs used during creation of the encounters ref tempRef1 ref tempRef2 ref tempRef3 ref tempRef4 ref tempRef5 ; used in picking the random encounter short dieRoll ; random die roll ; what encounter are we triggering? short encounterNumber ; this is the stage to trigger ; ; ************unique encounter variables ********** ; Encounter 52 short enc52preyDead ; set to 1 when cannibal "prey" is dead ; Encounter 53 short enc53preyDead ; set to 1 when sniper prey is dead ; Encounter 54 short enc54trapSprung ; set to 1 when trap is exploded, 2 when ambush is over ; Encounter 56 short enc56doneFlee ; set to 1 when Donovan finishes fleeing short enc56talkedToPC ; set to 1 when Donovan talks to PC short enc56playerHelped ; set to 1 if player hits any of the supermutants short enc56startTimer ; set to 1 runs timer to create supermutants float enc56timer ; timer ; Encounter 57 short enc57talkedToPC ; set to 1 when Susie talks to PC begin gamemode ;***************************************** ; special cases ;***************************************** if enc56startTimer == 1 if enc56timer > 0 set enc56timer to enc56timer - GetSecondsPassed else set enc56startTimer to 0 set tempRef1 to marker2.placeLeveledActorAtMe FFEU56SupermutantGun set tempRef2 to marker3.placeLeveledActorAtMe FFEU56SupermutantGun set tempRef3 to marker3.placeLeveledActorAtMe FFEU56SupermutantMelee tempRef1.startCombat DonovanREF tempRef2.startCombat DonovanREF tempRef3.startCombat DonovanREF endif endif ; **************************************** ; start encounter ; **************************************** if encounterNumber > 0 ; increment encounter count set FFEUniqueBCount to FFEUniqueBCount + 1 ; get the current encounter markers from FFETrigger quest (set by the trigger zone) set marker1 to FFETrigger.marker1 set marker2 to FFETrigger.marker2 set marker3 to FFETrigger.marker3 set marker4 to FFETrigger.marker4 set marker5 to FFETrigger.marker5 set marker6 to FFETrigger.marker6 set marker7 to FFETrigger.marker7 ; fail if these markers don't exist if marker1 == 0 || marker2 == 0 || marker3 == 0 || marker4 == 0 || marker5 == 0 || marker6 == 0 || marker7 == 0 ; clear encounter number set encounterNumber to 0 endif ; ********************************************************************* ; encounter set B -- wide distance encounters ; ********************************************************************* if encounterNumber == 51 ; cannibals selling meat ; move markers FFEU51Marker1.moveto marker1 ; start FFEU51Marker2.moveto marker7 ; middle FFEU51Marker3.moveto marker4 ; end ; cannibals -- place 3 cannibals FFEU51Hunter1REF.moveto marker1 FFEU51Hunter2REF.moveto marker2 FFEU51Hunter3REF.moveto marker3 elseif encounterNumber == 52 ; cannibals part 2 ; if all are dead, don't do anything if FFEU51Hunter1REF.getDead == 0 || FFEU51Hunter2REF.getDead == 0 || FFEU51Hunter3REF.getDead == 0 ; move markers FFEU51Marker1.moveto marker1 ; start FFEU51Marker2.moveto marker7 ; middle FFEU51Marker3.moveto marker4 ; end ; make cannibals enemy of Wastelander faction (in case they run into random ones) setEnemy FFEU51CannibalFaction WastelanderFaction 1 0 ; move NPCs if FFEU51Hunter1REF.getDead == 0 FFEU51Hunter1REF.moveto marker1 endif if FFEU51Hunter2REF.getDead == 0 FFEU51Hunter2REF.moveto marker2 endif if FFEU51Hunter3REF.getDead == 0 FFEU51Hunter3REF.moveto marker3 endif ; place "prey" set tempRef1 to marker3.placeLeveledActorAtMe FFEU52Prey endif elseif encounterNumber == 53 ; sniper ; move markers FFEU53Marker1.moveto marker1 ; start FFEU53Marker2.moveto marker7 ; middle FFEU53Marker3.moveto marker4 ; end ; move NPCs FFEU53SniperREF.moveto marker1 FFEU53SniperREF.setav perception 9 ; place "prey" FFEU53Prey1REF.moveto marker1 elseif encounterNumber == 54 ; human bomb and raider ambush ; move markers FFEU54Marker1.moveto marker1 ; start FFEU54Marker2.moveto marker7 ; middle FFEU54Marker3.moveto marker4 ; end ; move NPCs FFEU54HumanBombREF.moveto marker1 marker1.placeLeveledActorAtMe FFEU54Raider1 marker2.placeLeveledActorAtMe FFEU54Raider2 marker3.placeLeveledActorAtMe FFEU54Raider3 elseif encounterNumber == 55 ; guy fleeing from Grayditch ; move markers FFEU55Marker1.moveto marker1 ; start FFEU55Marker2.moveto marker7 ; middle FFEU55Marker3.moveto marker4 ; end ; move NPC FFEU55NPCREF.moveto marker1 elseif encounterNumber == 56 ; MS18 post quest: Donovan fleeing from super mutants FFEU56Marker1.moveto marker1 ; start FFEU56Marker2.moveto marker7 ; middle FFEU56Marker3.moveto marker4 ; end ; move NPC DonovanREF.moveto marker1 DonovanREF.resethealth ; heal him up DonovanREF.additem ammoFatMan 1 ; give him fat man shell ; create supermutants ; run timer to delay them so Donovan gets a head start set enc56startTimer to 1 set enc56timer to 3 ; 3 seconds head start elseif encounterNumber == 57 ; MS16 post quest: Susie Mack FFEU57Marker1.moveto marker1 ; start FFEU57Marker2.moveto marker7 ; middle FFEU57Marker3.moveto marker4 ; end ; move NPC SusieMackREF.enable SusieMackREF.moveto marker1 SusieMackREF.resethealth ; heal him up SusieMackREF.additem FFEU57SusieEquipment 1 ; give her security armor etc. elseif encounterNumber == 58 ; mad brahmin herd ; move markers FFEU58Marker1.moveto marker1 ; start FFEU58Marker2.moveto marker7 ; middle FFEU58Marker3.moveto marker4 ; end ; 2-5 brahmin marker1.placeLeveledActorAtMe FFEU58Brahmin marker2.placeLeveledActorAtMe FFEU58Brahmin ; bad luck you get more brahmin set dieRoll to GetRandomPercent set dieRoll to dieRoll - ( ( player.getav luck ) * 5) if dieRoll > 25 marker3.placeLeveledActorAtMe FFEU58Brahmin endif if dieRoll > 50 marker2.placeLeveledActorAtMe FFEU58Brahmin endif if dieRoll > 75 marker4.placeLeveledActorAtMe FFEU58Brahmin endif ; etc. endif ; clear encounter number set encounterNumber to 0 endif end
297FFHitSquadDCRegulatorControlSCRIPTSCN FFHitSquadDCRegulatorControlSCRIPT short DoOnce short PlayerKarma ref MyParent BEGIN OnLoad set PlayerKarma to ( Player.GetAV Karma ) set MyParent to GetParentREF if ( DoOnce == 0 ) if ( PlayerKarma <= KarmaEvil ) && ( Player.GetLevel >= 6 ) && ( Player.HasPerk Lawbringer == 0 ) if ( GetDistance Player <= 4000 ) MyParent.Enable set DoOnce to 1 endif endif endif END
298FFHitSquadDCTalonCompanyControlSCRIPTSCN FFHitSquadDCTalonCompanyControlSCRIPT short DoOnce short PlayerKarma ref MyParent BEGIN OnLoad set PlayerKarma to ( Player.GetAV Karma ) set MyParent to GetParentREF if ( DoOnce == 0 ) if ( PlayerKarma >= KarmaGood ) && ( Player.GetLevel >= 6 )&& ( Player.HasPerk ContractKiller == 0 ) if ( GetDistance Player <= 4000 ) MyParent.Enable set DoOnce to 1 endif endif endif END
299FFHitSquadQuestSCRIPTSCN FFHitSquadQuestSCRIPT short TalonGreeted short RegulatorGreeted
300FFOutcastsSCRIPTscn FFOutcastsSCRIPT ;Set Quest Variables short OverheardOutcasts ;Has the player heard anything about the Outcasts? 0 = no, 1 = yes. short SurpriseRaider ;Did Defender Morgan protect the player from the surprise Raider? 0 = no, 1 = yes short OutcastWelcome ;Has the player been welcomed to talk with the Outcasts? 0 = no, 1 = yes short OutcastJob ;Has the player heard about the Outcast job, yet? 0 = no, 1 = heard about it, 2 = agreed to it. short CasdinCall ;Has Casdin been called to the front to talk to the PC? 0 = no, 1 = yes short CasdinAnger ;Has the player angered Casdin by turning down the second task? 0 = no, 1 = yes short TechValue ;The value of the most recently returned piece of technology, ranging from 1 to 10. See chart on wiki for per-item values. short OutcastTrust ;Value raises from 0 with each item returned. When it reaches 50+, the player is allied with the Outcasts. short GreetOnce ;Has Morgan greeted the player after the raider attack yet? BEGIN GameMode if player.getInCell FortIndependence01 || player.getInCell FortIndependence02 if player.getFactionRelation ProtectorCasdinREF == 0 || ProtectorCasdinREF.getDead == 1 setEnemy playerFaction BrotherhoodOutcastFaction endif endif END
301FFOutcastsSurpriseRaiderSCRIPTscn FFOutcastsSurpriseRaiderSCRIPT short doOnce BEGIN onDeath if (getDeadCount DefenderMorgan == 0) if (FFOutcastsSurpriseRaiderREF.getDead == 1 && FFOutcastsSurpriseRaider2REF.getDead == 1 && doOnce == 0) DefenderMorganREF.addscriptpackage DefenderMorganTalkToPlayer set doOnce to 1 endif endif END
302FFRadioCache05RaiderScriptscn FFRadioCache05RaiderScript short dieRoll short doOnce begin OnTriggerEnter player if doOnce == 0 set dieRoll to GetRandomPercent if dieRoll >= 50 FFRadioCache05Raider01.enable FFRadioCache05Raider02.enable set doOnce to 1 endif endif end
303FFRadioSignalSCRIPTscn FFRadioSignalSCRIPT short doOnce short switchActive short runSoundTimer float soundDelayTimer ref switch ref radio ref radioNoPower ref quest ref signal short init ; set to 1 when onLoad block has run -- otherwise the rest of the script will not run for safety begin onLoad set init to 1 ; initialized -- safe to run rest of script if getIsID FFRadioSignal01Switch01 || getIsID FFHamRadio01 set switch to FFRadioSignal01Switch01 set radio to FFHamRadio01 set radioNoPower to FFHamRadioNoPower01 set quest to FFRadioSignals01 set signal to FFRadioSignal01REF elseif getIsID FFRadioSignal02Switch01 || getIsID FFHamRadio02 set switch to FFRadioSignal02Switch01 set radio to FFHamRadio02 set radioNoPower to FFHamRadioNoPower02 set quest to FFRadioSignals02 set signal to FFRadioSignal02REF elseif getIsID FFRadioSignal03Switch01 || getIsID FFHamRadio03 set switch to FFRadioSignal03Switch01 set radio to FFHamRadio03 set radioNoPower to FFHamRadioNoPower03 set quest to FFRadioSignals03 set signal to FFRadioSignal03REF elseif getIsID FFRadioSignal04Switch01 || getIsID FFHamRadio04 set switch to FFRadioSignal04Switch01 set radio to FFHamRadio04 set radioNoPower to FFHamRadioNoPower04 set quest to FFRadioSignals04 set signal to FFRadioSignal04REF elseif getIsID FFRadioSignal05Switch01 || getIsID FFHamRadio05 set switch to FFRadioSignal05Switch01 set radio to FFHamRadio05 set radioNoPower to FFHamRadioNoPower05 set quest to FFRadioSignals05 set signal to FFRadioSignal05REF elseif getIsID FFRadioSignal06Switch01 || getIsID FFHamRadio06 set switch to FFRadioSignal06Switch01 set radio to FFHamRadio06 set radioNoPower to FFHamRadioNoPower06 set quest to FFRadioSignals06 set signal to FFRadioSignal06REF elseif getIsID FFRadioSignal07Switch01 || getIsID FFHamRadio07 set switch to FFRadioSignal07Switch01 set radio to FFHamRadio07 set radioNoPower to FFHamRadioNoPower07 set quest to FFRadioSignals07 set signal to FFRadioSignal07REF elseif getIsID FFRadioSignal08Switch01 || getIsID FFHamRadio08 set switch to FFRadioSignal08Switch01 set radio to FFHamRadio08 set radioNoPower to FFHamRadioNoPower08 set quest to FFRadioSignals08 set signal to FFRadioSignal08REF elseif getIsID FFRadioSignal09Switch01 || getIsID FFHamRadio09 set switch to FFRadioSignal09Switch01 set radio to FFHamRadio09 set radioNoPower to FFHamRadioNoPower09 set quest to FFRadioSignals09 set signal to FFRadioSignal09REF endif if getIsID radio == 1 && doOnce == 0 setOpenState 1 ; switch ham radio model to "on" position radioNoPower.setOpenState 1 ; switch radio model that is enabled before the power is restored to "on" position set doOnce to 1 endif set soundDelayTimer to 0.85 end begin onActivate ; if I haven't been initialized, not safe to run my script if init == 0 return endif if getIsID switch == 1 ; activate block for power switch in tower if getStage quest == 0 ; if the main switch has never been activated radioNoPower.disable ; disable radio model enabled before power is on, which enables the real radio setOpenState 1 ; start switch anim to catch later. set switchActive to 1 set runSoundTimer to 1 ; queue radio power up sound setStage quest 1 ; quest has run endif endif if getIsID radio == 1 ; activate block for broadcasting HAM if isAnimPlaying == 0 if getQuestRunning quest == 1 ; only works if quest is active stopQuest quest ; turn off the signal (for good) signal.disable elseif getStage quest == 1 ; if the main switch has been activated startQuest quest signal.enable endif activate endif endif end begin gameMode ; if I haven't been initialized, not safe to run my script if init == 0 return endif if runSoundTimer == 1 if soundDelayTimer > 0 set soundDelayTimer to soundDelayTimer - getSecondsPassed else set runSoundTimer to 0 playSound OBJRadioTowerActivate ; play radio power up sound endif endif if switchActive == 1 ; flagged from acti. block if getOpenState == 1 ; wait until I'm open startQuest quest ; then start up the radio station signal.enable set switchActive to 0 ; flag me off endif endif end
304FFRaiderCamp01SCRIPTscn FFRaiderCamp01SCRIPT ;; ;; This script handles raider spawnnings ; ;=============================; short Active ; simple flag to fire off gameMode block stuff float randVal ; used to generated % chance on subsequent spawns ; global vars in NQlvlSCRIPT: ; NQlvl.Rcamp01 ; state tracker ; NQlvl.Rcamp01day ; day last spawned tracker ;=============================; begin onTriggerEnter player if active == 0 if NQlvl.Rcamp01 == 0 ; first time visited set active to 1 ; do my spawn stuff elseif NQlvl.Rcamp01 == 1 ; has been visited before if gameDaysPassed > (NQlvl.Rcamp01day + 7) ; haven't spawned in the last week. ; 42% chance to respawn set randVal to (getRandomPercent) if randVal >= 42 set active to 1 ; do my spawn stuff endif endif endif endif end ;=============================; begin gameMode if active == 1 ; doing spawn stuff RCamper01a.enable ; spawn group marker enable Rcamp01Raider01.evp ; wake 'em up Rcamp01Raider02.evp Rcamp01Raider03.evp set active to 0 ; un-flag to avoid loop set NQlvl.Rcamp01day to gameDaysPassed ; store this day as respawn if NQlvl.Rcamp01 == 0 set NQlvl.Rcamp01 to 1 elseif NQlvl.Rcamp01 == 1 ; how to handle this? endif endif end
305FFRaiderCamp05IntScriptscn FFRaiderCamp05IntScript short dieRoll short doOnce begin onTriggerEnter player if doOnce == 0 set dieRoll to GetRandomPercent if dieRoll >= 50 FFRaiderCamp05EnableTrig.enable set doOnce to 1 endif endif end
306FFRaiderCamp13Scriptscn FFRaiderCamp13Script short dieRoll short doOnce begin OnTriggerEnter player if doOnce == 0 set dieRoll to GetRandomPercent if dieRoll >= 50 FFRaiderCamp13Raider01.enable FFRaiderCamp13Raider02.enable FFRaiderCamp13Raider03.enable set doOnce to 1 endif endif end
307FFRaiderCamp17GunScriptscn FFRaiderCamp17GunScript short doOnce Begin onTriggerEnter Player if doOnce == 0 FFRaiderCamp17Gun01.enable FFRaiderCamp17Gun02.enable FFRaiderCamp17Gun03.enable FFRaiderCamp17Mutant01.enable FFRaiderCamp17Mutant02.enable set doOnce to 1 endif End
308FFRaiderCamp17MeleeScriptscn FFRaiderCamp17MeleeScript begin onDeath if FFRaiderCamp17Melee01.getDead == 1 && FFRaiderCamp17Melee02.getDead == 1 && FFRaiderCamp17Melee03.getDead == 1 FFRaiderCamp17GunTrigREF.enable endif end
309FFSuperMutantCamp01SCRIPTscn FFSuperMutantCamp01SCRIPT ; when the player investigates this camp, ; the behemoth mentioned in a note is spawned and heads towards the trigger location short doOnce begin onTriggerEnter player if doOnce == 0 FFMutantCampBehemoth.enable FFMutantCampBehemoth.moveto FFMutantCampBehemoth FFMutantCampBehemoth.evp set doOnce to 1 endif end
310FFSupermutantCampGraveSCRIPTscn FFSupermutantCampGraveSCRIPT begin onActivate if getisID FFMutantCampGrave01 set NQlvl.foundGrave01 to 1 elseif getisID FFMutantCampGrave03 set NQlvl.foundGrave03 to 1 FFMutantCampGrave04REF.enable elseif getisID FFMutantCampGrave04 FFSupermutantCamp01Marker.enable endif activate end
311FFSupermutantCaptiveSCRIPTSCN FFSupermutantCaptiveSCRIPT Short Freed Short ThankedPlayer Short Button Short DoOnce Float Timer BEGIN OnLoad if ( Freed == 1 ) disable else ( Freed == 0 ) RemoveFromFaction WastelandFreedCaptiveFACTION ; ignore crime so that I won't respond to friendly fire IgnoreCrime 1 ; reset restrained state so I can get back into position after load set DoOnce to 0 setRestrained 0 endif END BEGIN OnActivate if ( GetDead == 0 ) if ( freed == 0 ) if ( IsActionRef player == 1 ) if ( Player.IsInCombat == 0 ) if ( GetIsSex Male == 1 ) ShowMessage FFESupermutantCaptiveMessageBoxM elseif ( GetIsSex Female == 1 ) ShowMessage FFESupermutantCaptiveMessageBoxF endif else ShowMessage FFSupermutantCaptiveNoActivateMessage endif endif endif elseIf ( GetDead == 1 ) Activate endif END BEGIN GameMode ; restrain me once I'm in position if ( DoOnce == 0 ) if ( GetSitting == 3 ) set DoOnce to 1 setRestrained 1 endif endif if ( freed == 0 ) set button to GetButtonPressed if ( button == 1 ) SetRestrained 0 ModPCMiscStat "Captives Rescued" 1 RemoveFromFaction WastelandCaptiveFaction AddToFaction WastelanderFaction 1 AddToFaction WastelandFreedCaptiveFaction 1 setav Variable02 1 addscriptpackage FFSupermutantCaptiveGreetPlayer set Freed to 1 ; stop ignoring crime ignoreCrime 0 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 0 ) set Timer to 10 if ( GetRandomPercent <= 50 ) say FFSMCaptiveYellForHelp endif endif endif END
312FollowersCharonContractSCRIPTSCN FollowersCharonContractSCRIPT BEGIN OnAdd player if ( Followers.PlayerOwnsContract == 0 ) set Followers.PlayerOwnsContract to 1 endif END
313FollowersCharonShotgunEffectSCRIPTscn FollowersCharonShotgunEffectSCRIPT ref Target BEGIN ScriptEffectStart if ( CharonREF.CharonKillAhzrukhalSceneKill == 1 ) set Target to GetSelf CharonREF.pushActorAway Target 7 killActor target 1 killActor target 2 killActor target 3 killActor target 4 endif END
314FollowersHireFawkesEnclaveSoldiersSCRIPTSCN FollowersHireFawkesEnclaveSoldiersSCRIPT ref MySelf short HitCount BEGIN OnLoad if ( GetRandomPercent <= 75 ) DamageAV LeftMobilityCondition 1000 endif END BEGIN OnHit MQ08FawkesREF set HitCount to ( HitCount + 1 ) END BEGIN OnDeath set FollowersHireFawkes.EnclaveSoldierDown to ( FollowersHireFawkes.EnclaveSoldierDown + 1 ) END BEGIN OnActivate if ( GetDead == 1 ) activate endif END BEGIN GameMode if ( GetDead == 0 ) if ( GetDistance FollwersHireFawkesSoldiersRunToMARKER <= 210 ) PlaceAtme LargeExplosion kill endif if ( HitCount >= 2 ) set Myself to GetSelf MQ08FawkesREF.PushActorAway Myself 10 Myself.kill endif endif END
315FollowersHireFawkesSCRIPTSCN FollowersHireFawkesSCRIPT short FawkesWaitRREntrance short EnclaveSoldierDown
316FollowersHireFawkesTrigger01SCRIPTSCN FollowersHireFawkesTrigger01SCRIPT BEGIN OnTriggerEnter if ( IsActionREF FollowersHireFawkesEnclaveSoldiers01REF == 1 ) set FollowersHireFawkes.EnclaveSoldierDown to ( FollowersHireFawkes.EnclaveSoldierDown + 1 ) endif if ( IsActionREF FollowersHireFawkesEnclaveSoldiers02REF == 1 ) set FollowersHireFawkes.EnclaveSoldierDown to ( FollowersHireFawkes.EnclaveSoldierDown + 1 ) endif if ( IsActionREF FollowersHireFawkesEnclaveSoldiers03REF == 1 ) set FollowersHireFawkes.EnclaveSoldierDown to ( FollowersHireFawkes.EnclaveSoldierDown + 1 ) endif END
317FollowersHireRL3SCRIPTscn FollowersHireRL3SCRIPT short RL3Sold ;Used to track whether or not RL3 has been sold yet.
318FollowersJerichoQuestSCRIPTSCN FollowersJerichoQuestSCRIPT short PlayerKnowsJerichoPast short PlayerTurnedDownJericho short JerichoAcceptedOffer short JerichoTurnedDownOffer short JerichoMadeOffer short JerichoHired short JerichoFired
319FollowersQuestSCRIPTSCN FollowersQuestSCRIPT short PlayerHasFollower float FollowerWaitingLeaveDay float DogmeatWaitingLeaveDay ;***Charon Variables*** short PlayerOwnsContract ;Set by buying the contract from Ahzrukhal or by killing him. short CharonHired ;Set to 1 when the player hires Charon after obtaining his contract. short CharonFired ;Player has dismissed Charon ;***Fawkes Variables*** short FawkesHired short FawkesFired ;***Jericho Variables*** short JerichoConvince short JerichoHired short JerichoFired ;***Star Paladin Cross Variables*** short CrossDismissedPlayer short StarPaladinCrossHasBeenHired short StarPaladinCrossHired short StarPaladinCrossFired ;***Butch Variables*** short ButchHired short ButchFired ;***RL3 Variables*** short RL3Hired short RL3Fired ;***Clover Variables*** short CloverHired short CloverFired ;***Dogmeat Variables*** short DogmeatHired short DogmeatFired BEGIN GameMode if ( DogmeatHired == 1 ) if ( DogmeatREF.Waiting == 1 ) && ( DogmeatREF.GetInCell MegatonPlayerHouse == 0 ) && ( DogmeatREF.GetInCell Tenpenny03Player == 0 ) if ( DogmeatWaitingLeaveDay <= GameDaysPassed ) if ( DogmeatREF.GetInSameCell Player == 0 ) set Followers.DogmeatHired to 0 set Followers.DogmeatFired to 1 set DogmeatREF.Waiting to 0 DogmeatREF.SetPlayerTeammate 0 DogmeatREF.RemoveFromFaction FollowerFaction DogmeatREF.evp ShowMessage FollowerMessageLeaveDogmeat DogmeatREF.MoveTo EvacuationMarker set DogmeatWaitingLeaveDay to 0 endif endif endif endif if ( PlayerHasFollower == 1 ) if ( ButchREF.Waiting == 1 ) && ( ButchREF.GetInCell MegatonPlayerHouse == 0 ) && ( ButchREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( ButchREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.ButchHired to 0 set Followers.ButchFired to 1 set ButchREF.Waiting to 0 set ButchREF.IsFollowingDefault to 1 set ButchREF.IsFollowingLong to 0 set ButchREF.IsFollowingShort to 0 ButchREF.SetCombatStyle FollowersCombatStyleRanged set ButchREF.CombatStyleRanged to 1 set ButchREF.CombatStyleMelee to 0 ButchREF.SetPlayerTeammate 0 ButchREF.RemoveFromFaction FollowerFaction ButchREF.evp ShowMessage FollowerMessageLeaveButch ButchREF.MoveTo MuddyRudderMarker set FollowerWaitingLeaveDay to 0 endif endif endif if ( CharonREF.Waiting == 1 ) && ( CharonREF.GetInCell MegatonPlayerHouse == 0 ) && ( CharonREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( CharonREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.CharonHired to 0 set Followers.CharonFired to 1 set CharonREF.Waiting to 0 set CharonREF.IsFollowingDefault to 1 set CharonREF.IsFollowingLong to 0 set CharonREF.IsFollowingShort to 0 CharonREF.SetCombatStyle FollowersCombatStyleRanged set CharonREF.CombatStyleRanged to 1 set CharonREF.CombatStyleMelee to 0 CharonREF.SetFactionRank TeammateFaction -1 CharonREF.RemoveFromFaction FollowerFaction CharonREF.SetPlayerTeammate 0 CharonREF.evp ShowMessage FollowerMessageLeaveCharon CharonREF.MoveTo UnderworldNinthCircleMARKER set FollowerWaitingLeaveDay to 0 endif endif endif if ( CloverREF.Waiting == 1 ) && ( CloverREF.GetInCell MegatonPlayerHouse == 0 ) && ( CloverREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( CloverREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.CloverHired to 0 set Followers.CloverFired to 1 set CloverREF.Waiting to 0 set CloverREF.IsFollowingDefault to 1 set CloverREF.IsFollowingLong to 0 set CloverREF.IsFollowingShort to 0 CloverREF.SetCombatStyle FollowersCombatStyleRanged set CloverREF.CombatStyleRanged to 1 set CloverREF.CombatStyleMelee to 0 CloverREF.SetPlayerTeammate 0 CloverREF.RemoveFromFaction FollowerFaction CloverREF.evp ShowMessage FollowerMessageLeaveClover CloverREF.MoveTo ParadiseFallsEulogysPadMARKER set FollowerWaitingLeaveDay to 0 endif endif endif if ( JerichoREF.Waiting == 1 ) && ( JerichoREF.GetInCell MegatonPlayerHouse == 0 ) && ( JerichoREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( JerichoREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.JerichoHired to 0 set Followers.JerichoFired to 1 set JerichoREF.Waiting to 0 set JerichoREF.IsFollowingDefault to 1 set JerichoREF.IsFollowingLong to 0 set JerichoREF.IsFollowingShort to 0 JerichoREF.SetCombatStyle FollowersCombatStyleRanged set JerichoREF.CombatStyleRanged to 1 set JerichoREF.CombatStyleMelee to 0 JerichoREF.SetPlayerTeammate 0 JerichoREF.SetFactionRank TeammateFaction -1 JerichoREF.RemoveFromFaction FollowerFaction JerichoREF.evp ShowMessage FollowerMessageLeaveJericho JerichoREF.MoveTo MegatonOutsideMarker set FollowerWaitingLeaveDay to 0 endif endif endif if ( MQ08FawkesREF.Waiting == 1 ) && ( MQ08FawkesREF.GetInCell MegatonPlayerHouse == 0 ) && ( MQ08FawkesREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( MQ08FawkesREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.FawkesHired to 0 set Followers.FawkesFired to 1 set MQ08FawkesREF.Waiting to 0 set MQ08FawkesREF.IsFollowingDefault to 1 set MQ08FawkesREF.IsFollowingLong to 0 set MQ08FawkesREF.IsFollowingShort to 0 MQ08FawkesREF.SetCombatStyle FollowersCombatStyleRanged set MQ08FawkesREF.CombatStyleRanged to 1 set MQ08FawkesREF.CombatStyleMelee to 0 MQ08FawkesREF.SetPlayerTeammate 0 MQ08FawkesREF.RemoveFromFaction FollowerFaction MQ08FawkesREF.evp ShowMessage FollowerMessageLeaveFawkes MQ08FawkesREF.MoveTo FawkesMuseumWaitMarker set FollowerWaitingLeaveDay to 0 endif endif endif if ( RL3REF.Waiting == 1 ) && ( RL3REF.GetInCell MegatonPlayerHouse == 0 ) && ( RL3REF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( RL3REF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.RL3Hired to 0 set Followers.RL3Fired to 1 set RL3REF.Waiting to 0 set RL3REF.IsFollowingDefault to 1 set RL3REF.IsFollowingLong to 0 set RL3REF.IsFollowingShort to 0 RL3REF.SetCombatStyle FollowersCombatStyleRanged set RL3REF.CombatStyleRanged to 1 set RL3REF.CombatStyleMelee to 0 RL3REF.SetPlayerTeammate 0 RL3REF.RemoveFromFaction FollowerFaction RL3REF.evp ShowMessage FollowerMessageLeaveRL3 RL3REF.MoveTo CCBazaarMarker set FollowerWaitingLeaveDay to 0 endif endif endif if ( StarPaladinCrossREF.Waiting == 1 ) && ( StarPaladinCrossREF.GetInCell MegatonPlayerHouse == 0 ) && ( StarPaladinCrossREF.GetInCell Tenpenny03Player == 0 ) if ( FollowerWaitingLeaveDay <= GameDaysPassed ) if ( StarPaladinCrossREF.GetInSameCell Player == 0 ) set Followers.PlayerHasFollower to 0 set Followers.StarPaladinCrossHired to 0 set Followers.StarPaladinCrossFired to 1 set StarPaladinCrossREF.Waiting to 0 set StarPaladinCrossREF.IsFollowingDefault to 1 set StarPaladinCrossREF.IsFollowingLong to 0 set StarPaladinCrossREF.IsFollowingShort to 0 StarPaladinCrossREF.SetCombatStyle FollowersCombatStyleMelee set StarPaladinCrossREF.CombatStyleRanged to 1 set StarPaladinCrossREF.CombatStyleMelee to 0 StarPaladinCrossREF.SetPlayerTeammate 0 StarPaladinCrossREF.RemoveFromFaction FollowerFaction StarPaladinCrossREF.evp ShowMessage FollowerMessageLeaveStarPaladinCross StarPaladinCrossREF.MoveTo CitScribeMarker04 set FollowerWaitingLeaveDay to 0 endif endif endif endif END
320Forge01EmergencyPulseControlSCRIPTscn Forge01EmergencyPulseControlSCRIPT ; This script will wait for a command from the emergency terminal in Forge01 ; Once fired, an large pulse effect will occur, severely crippling/killing any robot/turret in the vicinity short stage float timer ref myActionRef ;********************************************** Begin onActivate set myActionRef to getActionRef if (myActionRef == ForgeSecurityTerminal03REF) if stage == 0 Forge01Klaxon01REF.playgroup Left 1 Forge01Klaxon02REF.playgroup Left 1 Forge01KlaxonGlow01REF.playgroup Left 1 Forge01KlaxonGlow02REF.playgroup Left 1 Forge01KlaxonSound01REF.enable Forge01SectorAEmergencyArc01REF.enable Forge01ElectricArcLight01REF.enable set timer to 3 set stage to 1 endif endif End ;********************************************** Begin gameMode if (stage == 1) if (timer <= 0) Forge01SectorAEmergencyArc02REF.enable set timer to 1 set stage to 2 else set timer to timer - GetSecondsPassed endif elseif (stage == 2) if (timer <=0) Forge01KlaxonSound01REF.disable Player.PlaySound FXForge01EmpPreBlast set timer to 1 set stage to 3 else set timer to timer - GetSecondsPassed endif elseif (stage == 3) if (timer <=0) Forge01SectorAEmergencyPulseREF.placeatme Forge01PulseExplosion01 1 Player.PlaySound FXExplosionGrenadeEMPHigh Player.PlaySound FXFireGasLow Forge01SectorAEmergencyArc01REF.disable Forge01SectorAEmergencyArc02REF.disable Forge01ElectricArcLight01REF.disable Forge01Klaxon01REF.playgroup Backward 1 Forge01Klaxon02REF.playgroup Backward 1 Forge01KlaxonGlow01REF.playgroup Backward 1 Forge01KlaxonGlow02REF.playgroup Backward 1 set stage to 4 else set timer to timer - GetSecondsPassed endif endif End ;**********************************************
321Forge03ElevatorTriggerSCRIPTscn Forge03ElevatorTriggerSCRIPT ; This trigger is triggered by the player only and disables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 ElevatorForge01to03REF.unlock set doOnce to 1 ;Trigger is only set off one time endif End
322ForgeActorFatigue02TriggerSCRIPTscn ForgeActorFatigue02TriggerSCRIPT ; This trigger is triggered by an Actor and is a safeguard in case the protectron's fatigue never got reset. ref actionRef ;******************************************** Begin onTriggerEnter set actionRef to getActionRef if (actionRef == ForgeProtectronTravel01REF) || (actionRef == ForgeProtectronTravel02REF) actionRef.restoreav fatigue 100000 endif End ;********************************************
323ForgeActorFatigueTriggerSCRIPTscn ForgeActorFatigueTriggerSCRIPT ; This trigger is triggered by an Actor and drains their fatigue causing them to "fall" ref actionRef ;******************************************** Begin onTriggerEnter set actionRef to getActionRef if (actionRef == ForgeProtectronTravel01REF) actionRef.setav variable01 3 actionRef.damageav fatigue 10000 actionRef.evp endif if (actionRef == ForgeProtectronTravel02REF) actionRef.setav variable01 3 actionRef.damageav fatigue 10000 actionRef.evp endif End ;******************************************** Begin onTriggerLeave set actionRef to getActionRef if (actionRef == ForgeProtectronTravel01REF) || (actionRef == ForgeProtectronTravel02REF) actionRef.restoreav fatigue 100000 endif End
324ForgeGenericProtectronSCRIPTscn ForgeGenericProtectronSCRIPT ;*************************************** Begin onLoad if getav variable01 == 0 ; I'm currently "off" ; make me unconscious so I don't play sounds setUnconscious 1 endif End ;*************************************** Begin OnActivate if isActionRef player == 0 if getav variable01 == 0 ; I'm currently "off" setav variable01 1 ; turn on setUnconscious 0 ; not unconscious any more Activate ; tell pod to open else setav variable01 0 ; turn off evp endif endif End ;*************************************** Begin OnPackageEnd Forge01Protectron02Travel setav variable01 0 End ;*************************************** Begin OnPackageEnd Forge01Protectron01Travel setav variable01 0 End ;*************************************** Begin OnPackageEnd ForgeDefaultPatrolCasual setav variable01 3 End ;*************************************** Begin OnPackageEnd ForgeProtectronTurnOn setav variable01 2 End ;*************************************** Begin OnPackageEnd ProtectronNotActive if getav variable01 == 0 Activate ; to get pod to close behind me ; make me unconscious setUnconscious 1 endif End
325ForgeProtectronPod01Scriptscn ForgeProtectronPod01Script ref linkedRef float timer short doOnce ;********************************************* Begin OnActivate set linkedRef to getLinkedRef if (isActionRef player == 0) if (doOnce == 0) setopenstate 1 linkedRef.enable set timer to 1.5 set doOnce to 1 elseif (doOnce == 3) linkedRef.enable set timer to 5 set doOnce to 1 endif endif End ;********************************************* Begin gameMode if (doOnce == 1) if (timer <= 0) ForgePodCollision01REF.disable ForgePodMover01REF.placeatme DunwichFakeForceBallSmall 1 set timer to 5 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 2) if (timer <= 0) set linkedRef to getLinkedRef linkedRef.disable set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif End
326ForgeProtectronPod03Scriptscn ForgeProtectronPod03Script ref linkedRef float timer short doOnce ;********************************************* Begin OnActivate set linkedRef to getLinkedRef if (isActionRef player == 0) if (doOnce == 0) linkedRef.enable set timer to 5 set doOnce to 1 endif endif End ;********************************************* Begin gameMode if (doOnce == 1) if (timer <= 0) set linkedRef to getLinkedRef linkedRef.disable set doOnce to 0 else set timer to timer - GetSecondsPassed endif endif End
327ForgeProtectronPod04Scriptscn ForgeProtectronPod04Script ref linkedRef float timer short doOnce ;********************************************* Begin OnActivate set linkedRef to getLinkedRef if (isActionRef player == 0) if (doOnce == 0) setopenstate 1 linkedRef.enable set timer to 1.5 set doOnce to 1 elseif (doOnce == 3) linkedRef.enable set timer to 5 set doOnce to 1 endif endif End ;********************************************* Begin gameMode if (doOnce == 1) if (timer <= 0) ForgePodCollision02REF.disable ForgePodMover02REF.placeatme DunwichFakeForceBallSmall 1 set timer to 5 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 2) if (timer <= 0) set linkedRef to getLinkedRef linkedRef.disable set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif End
328ForgeProtectronPod05Scriptscn ForgeProtectronPod05Script ref linkedRef float timer short doOnce Begin OnActivate set linkedRef to getLinkedRef if (isActionRef player == 0) if (doOnce == 0) setopenstate 1 linkedRef.enable set timer to 1.5 set doOnce to 1 elseif (doOnce == 3) linkedRef.enable set timer to 5 set doOnce to 1 endif endif End ;********************************************* Begin gameMode if (doOnce == 1) if (timer <= 0) ForgePodCollision03REF.disable ForgePodMover03REF.placeatme DunwichFakeForceBallSmall 1 set timer to 5 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 2) if (timer <= 0) set linkedRef to getLinkedRef linkedRef.disable set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif End
329ForgeRepairMainDoorSCRIPTscn ForgeRepairMainDoorSCRIPT ; checks the state of the door and either opens or closes it ref myLink short doOnce ;************************************************ Begin onTriggerEnter set myLink to getLinkedRef if myLink.getOpenState == 3 ; door is closed, so activate it to open myLink.setOpenState 1 ;open door endif End ;************************************************ Begin onTriggerLeave set myLink to getLinkedRef if myLink.getOpenState == 1 ; door is open, so activate it to close myLink.setOpenState 0 ;close door endif End
330fortBJabscoAmbushEndSCRIPTscn fortBJabscoAmbushEndSCRIPT BEGIN onTriggerEnter Player IF fortBJabscoStartAmbush.getDisabled != 1&& fortBJabscoAmbushSwitch.getDisabled != 1 fortBJabscoAmbushSwitch.disable ENDIF END
331fortBJabscoEquipSCRIPTscn fortBJabscoEquipSCRIPT short doOnce BEGIN onTriggerEnter SupremeOverlordJabscoREF IF doOnce == 0 supremeOverlordJabscoREF.addItem WeapUniqueKnifeCombat 1 supremeOverlordJabscoREF.equipItem WeapUniqueKnifeCombat 1 set doOnce to 1 ENDIF END
332fortBJabscosGutsyscn fortBJabscosGutsy BEGIN onLoad IF getDead == 0 setUnconscious 1 ENDIF END BEGIN gameMode IF fortBGutsyTurnOn.getDisabled != 1 setUnconscious 0 ENDIF END
333Fortc02LockedDoorSCRIPTscn Fortc02LockedDoorSCRIPT ; Don't pass a '1' parameter in your terminal's activate script ; This script will not allow NPCs to use the door. ; It's intended for sneaky/hacky players to be able to use the door for gameplay purposes ;********************** Begin onLoad lock 255 ;in case someone forgets to lock the terminal in the editor End ;********************** Begin onActivate if (IsActionRef player == 1) if (player.GetItemCount MS14TedsKey == 1) unlock endif activate endif End
334FortCArmorTerminalSCRIPTscn FortCArmorTerminalSCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short stasisDisabled short hasDownloaded
335FortCBunkerLaunchScriptscn FortCBunkerLaunchScript short isLaunch ; 0 - Means launch sequence is not running, 1 - Means launch sequence is happening. short soundStage float launchTimer ; This is how long the launch sequence happens. ;*************************** Begin onLoad set launchTimer to 13 End ;*************************** Begin gameMode if isLaunch == 1 if (soundStage == 1) FortCWarningLight01REF.playgroup left 1 FortCWarningLight02REF.playgroup left 1 FortCWarningLight03REF.playgroup left 1 FortCWarningLight04REF.playgroup left 1 FortCWarningLight05REF.playgroup left 1 ; FortCLaunchSoundMarkerREF.playsound FXExplosionNukeBigDemo FortCLaunchSoundMarkerREF.playsound QSTSiloLaunch FortCLaunchFallingRocks01REF.enable IMOD FortCLaunch01 set launchTimer to 4 set soundstage to 2 endif ; if (soundStage == 11) ; if (launchTimer < 0) ; FortCLaunchSoundMarkerREF.playsound QSTSiloCrash ; set launchTimer to 5 ; set soundstage to 2 ; else ; set launchTimer to (launchTimer - GetSecondsPassed) ; endif ; endif if (soundStage == 2) if (launchTimer < 0) FortCKlaxonAlarm02REF.enable FortCSparks01REF.enable FortCLaunchComputerExplosionREF.placeatme FortCLaunchComputerExplosion 1 set launchTimer to 3 set soundstage to 3 else set launchTimer to (launchTimer - GetSecondsPassed) endif endif if (soundStage == 3) if (launchTimer < 0) ; FortCLaunchSoundMarkerREF.playsound FXExplosionArtilleryFar FortCLaunchSoundMarkerREF.playsound QSTSiloCrash set launchTimer to 2 set soundstage to 4 else set launchTimer to (launchTimer - GetSecondsPassed) endif endif if (soundStage == 4) if (launchTimer < 0) IMOD FortCLaunch02 ; FortCLaunchSoundMarkerREF.playsound FXExplosionNukeSmall3D FortCBunkerDoor01REF.unlock FortCBunkerDoor02REF.unlock set launchTimer to 5 set soundstage to 5 else set launchTimer to (launchTimer - GetSecondsPassed) endif endif if (soundStage == 5) if (launchTimer < 0) FortCWarningLight01REF.playgroup backward 1 FortCWarningLight02REF.playgroup backward 1 FortCWarningLight03REF.playgroup backward 1 FortCWarningLight04REF.playgroup backward 1 FortCWarningLight05REF.playgroup backward 1 FortCBunkerNormalLightsREF.enable FortCBunkerNormalRedLightsREF.disable FortCBunkerDoor01REF.SetOpenState 1 FortCBunkerDoor02REF.SetOpenState 1 FortCKlaxonAlarm01REF.disable FortCKlaxonAlarm02REF.disable FortCSparks01REF.disable FortCLaunchFallingRocks01REF.disable set soundStage to 0 set isLaunch to 2 else set launchTimer to (launchTimer - GetSecondsPassed) endif endif endif End ;***************************
336FortCTurretHurterSCRIPTscn FortCTurretHurterSCRIPT ; quick script on a dummy object to frenzy its linked REF ref myLink begin onLoad set myLink to getLinkedRef myLink.damageAV brainCondition 100 end
337FortIndependence02AutoDoorSCRIPTscn FortIndependence02AutoDoorSCRIPT float timer ;********************** Begin onLoad ; make sure door always starts closed SetOpenState 0 End ;********************** Begin onActivate if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg else ; if I'm currently closed or closing, open and set timer if ((GetOpenState >= 3) || (GetOpenState == 0)) set timer to 5 SetOpenState 1 elseif (GetOpenState == 1) setOpenState 0 endif endif End ;********************** Begin gameMode if GetOpenState == 1 if (timer <= 0) ; close me after timer expires setOpenState 0 else set timer to (timer - GetSecondsPassed) endif endif End
338FranklinTenPercentEnableTriggerSCRIPTscn FranklinTenPercentEnableTriggerSCRIPT ;This determines if the player is level 9 or higher in the onLoad block. ;When triggered, it will enable its linked ref. ; ;------------------------------------------------------------------------------------------- ref myLink short doOnce begin onLoad set myLink to getLinkedRef if player.getLevel > 8 mylink.enable endif end begin onTriggerEnter player if doOnce == 0 ;move guys in place instead of enabling them on trigger tro avoid hitching. FranklinRaider01Ref.moveTo FranklinRaider01Marker FranklinRaider02Ref.moveTo FranklinRaider02Marker FranklinRaider03Ref.moveTo FranklinRaider03Marker FranklinRaider04Ref.moveTo FranklinRaider04Marker FranklinGhoul01Ref.moveTo FranklinGhoul01Marker FranklinGhoul02Ref.moveTo FranklinGhoul02Marker FranklinGhoul03Ref.moveTo FranklinGhoul03Marker FranklinGhoul04Ref.moveTo FranklinGhoul04Marker set doOnce to 1 endif end
339FreeformCitadelQuestSCRIPTSCN FreeformCitadelQuestSCRIPT short GallowsMadeOffer short SawbonesRepaired short SawbonesDamagedPlayer short PlayerDiscoveredSawbones short PrimeVoiceTest ;WarringtonStationMapMarkerREF ;YaoGuaiDenMapMarkerREF ;DukovMapMarker ;SpringvaleMapMarker ;Vault108MapMarkerREF ;RivetCityMapMarker ;FriendshipHeightsMapMarkerREF ;GrayditchMapMarkerREF ;MariposaStationMapMarkerREF ;RedRacerFactoryMapMarkerREF ;SuperDuperMartMapMarkerREF ;BethesdaRuinsMapMarker ;WheatonArmoryMapMarkerREF ;CorvegaFactoryMapMarkerREF ;CanterburyCommonsMapMarkerREF ;ParadiseFallsMapMarker ;RavenRockMapMarkerREF ;MerestiStationMapMarkerREF ;GermantownPoliceHQMapMarkerREF ;FortConstantineMapMarker
340FreeformDCBrotherhoodDogtagSCRIPTSCN FreeformDCBrotherhoodDogtagSCRIPT BEGIN OnAdd player if ( FreeformDC.PlayerFoundDogtag == 0 ) set FreeformDC.PlayerFoundDogtag to 1 endif END
341FreeformMegatonQuestSCRIPTSCN FreeformMegatonQuestSCRIPT ;***Variables for "Treatment"*** short PartsPurchaseReward short PartsXPReward short PlayerRewardAmount short PlayerXPRewardAmount short PlayerPartsCount short WalterAskedPlayerForHelp short PlayerAcceptedOffer short PipesRepairedCount short AllPipesRepaired short WalterWillBuyParts BEGIN GameMode if ( PipesRepairedCount >= 3 ) set AllPipesRepaired to 1 set PipesRepairedCount to -1 endif END
342FreeformTenpennyAnthonyTrunkScriptscn FreeformTenpennyAnthonyTrunkScript short doOnce Begin GameMode if doOnce == 0 if getItemCount caps001 != 300 set FreeformTenpenny.AnthonyLeave to 1 set doOnce to 1 endif endif End
343FreeformTenpennyLydiaTrunkScriptscn FreeformTenpennyLydiaTrunkScript short doOnce Begin GameMode if doOnce == 0 if getItemCount caps001 != 200 set FreeformTenpenny.LydiaLeave to 1 set doOnce to 1 endif endif End
344FreeformTenpennyQuestScriptscn FreeformTenpennyQuestScript ;see also LydiaMontenegroVendorContainerScript short LydiaLeave ;1 = player opened her vendor container, 2 = she is wandering the wasteland short AnthonyLeave short ArgyleFound
345FriendshipAngryGhoulScriptscn FriendshipAngryGhoulScript begin onTriggerEnter player Friendship02GhoulA.StartCombat FriendshipAmbushMutant Friendship02GhoulB.StartCombat FriendshipAmbushMutant Friendship02GhoulC.StartCombat FriendshipAmbushMutant end
346FXArtilleryStrikeScriptscn FXArtilleryStrikeScript Short DoOnce Begin OnLoad Set DoOnce to 0 playgroup forward 0 End Begin GameMode if DoOnce == 0 If isAnimPlaying Forward == 0 Placeatme LargeExplosion Set DoOnce to 2 endif EndIf If DoOnce == 2 Disable set DoOnce to 3 endif if DoOnce == 3 MarkForDelete endif End
347FXComputerSparksScriptscn FXComputerSparksScript Float Timer Begin OnLoad Playsound OBJComputerTerminalArc Set timer to 1.5 End Begin GameMode if timer > 0 set timer to timer - getsecondspassed else disable markfordelete endif End
348FXSprayJetAnimSCRIPTscn FXSprayJetAnimSCRIPT ;To make me work: Activate once to turn on, again to start turn off, a third time to turn off sound and disable. ;Works best with activators that have a delay worked into the activate parent. See FriendshipMetroUtility for an example ;=================================== short state ;0 = off and disabled, 1 = on, enabled and animating, 2 = disable myself, 3 = activation no longer does anything ref mySelf begin onActivate set mySelf to getSelf if state == 0 ; mySelf.enable playgroup forward 1 ;start animation set state to 1 elseif state == 1 playgroup backward 1 ;stop animation set state to 2 ; elseif state == 2 ; mySelf.disable ;turns off sound. ; set state to 3 endif end
349GameTerminalSCRIPTscn GameTerminalSCRIPT ; clears game variable everytime the terminal is accessed to keep this clean and replayable begin onActivate if IsActionRef player == 1 set NQlvl.gameVar01 to 0 set NQlvl.gameVar02 to 0 set NQlvl.gameVar02a to 0 set NQlvl.gameVar02b to 0 set NQlvl.gameVar03 to 0 set NQlvl.gameVar04 to 0 set NQlvl.gameVar05 to 0 set NQlvl.gameVar06 to 0 set NQlvl.gameVar07 to 0 set NQlvl.gameVar08 to 0 set NQlvl.gameVar09 to 0 set NQlvl.gameVar10 to 0 set NQlvl.gameVarExE2 to 0 set NQlvl.gameVarExE to 0 set NQlvl.gameVarExW to 0 set NQlvl.gameVarExS to 0 activate endif end
350GenericActivateOnLoadScriptscn GenericActivateOnLoadScript begin onLoad activate end
351GenericActivateOnTriggerScriptscn GenericActivateOnTriggerScript short doOnce ref myself begin onTriggerEnter player if doOnce != 1 set myself to getself activate myself set doOnce to 1 endif end
352GenericBipedHeadArmsDismembermentSCRIPTscn GenericBipedHeadArmsDismembermentSCRIPT ; This trigger has a script that will dismember the right leg and right arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 1 ;dismember Head linkedRef.killactor linkedRef 3 ;dismember Left Arm linkedRef.killactor linkedRef 5 ;dismember Right Arm set doOnce to 1 ;Trigger is only set off one time endif End
353GenericBipedHeadArmsLegsDismembermentSCRIPTscn GenericBipedHeadArmsLegsDismembermentSCRIPT ; This trigger has a script that will dismember the right leg and right arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 1 ;dismember Head linkedRef.killactor linkedRef 3 ;dismember Left Arm linkedRef.killactor linkedRef 7 ;dismember Left Leg linkedRef.killactor linkedRef 10 ;dismember Right Leg linkedRef.killactor linkedRef 5 ;dismember Right Arm set doOnce to 1 ;Trigger is only set off one time endif End
354GenericBipedHeadDismembermentSCRIPTscn GenericBipedHeadDismembermentSCRIPT ; This trigger has a script that will dismember the head of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 1 ;dismember Head set doOnce to 1 ;Trigger is only set off one time endif End
355GenericBipedHeadLegsDismembermentSCRIPTscn GenericBipedHeadLegsDismembermentSCRIPT ; This trigger has a script that will dismember the right leg and right arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 1 ;dismember Head linkedRef.killactor linkedRef 7 ;dismember Left Leg linkedRef.killactor linkedRef 10 ;dismember Right Leg set doOnce to 1 ;Trigger is only set off one time endif End
356GenericBipedLeftArmDismembermentSCRIPTscn GenericBipedLeftArmDismembermentSCRIPT ; This trigger has a script that will dismember the left arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 3 ;dismember Left Arm set doOnce to 1 ;Trigger is only set off one time endif End
357GenericBipedLeftLegDismembermentSCRIPTscn GenericBipedLeftLegDismembermentSCRIPT ; This trigger has a script that will dismember the head of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 7 ;dismember Left Leg set doOnce to 1 ;Trigger is only set off one time endif End
358GenericBipedLeftLegLeftArmDismembermentSCRIPTscn GenericBipedLeftLegLeftArmDismembermentSCRIPT ; This trigger has a script that will dismember the left leg and left arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 7 ;dismember Left Leg linkedRef.killactor linkedRef 3 ;dismember LeftArm set doOnce to 1 ;Trigger is only set off one time endif End
359GenericBipedRandomMultiDismembermentOnActivateSCRIPTscn GenericBipedRandomMultiDismembermentOnActivateSCRIPT ; This trigger has a script that runs a 50% chance of dismembering each body part of its linkedRef ref linkedRef short doOnce short n Begin onActivate if doOnce == 0 set linkedRef to getLinkedRef set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 1 ;dismember Head endif set n to getRandomPercent if n < 50 linkedRef.killactor linkedRef 3 ;dismember Left Arm endif set n to getRandomPercent if n < 50 linkedRef.killactor linkedRef 7 ;dismember Left Leg endif set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 10 ;dismember Right Leg endif set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 5 ;dismember Right Arm endif set doOnce to 1 ;Trigger is only set off one time endif End
360GenericBipedRandomMultiDismembermentSCRIPTscn GenericBipedRandomMultiDismembermentSCRIPT ; This trigger has a script that runs a 50% chance of dismembering each body part of its linkedRef ref linkedRef short doOnce short n Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef ; if no linked ref, do it to myself if linkedRef == 0 set linkedRef to GetSelf endif set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 1 ;dismember Head endif set n to getRandomPercent if n < 50 linkedRef.killactor linkedRef 3 ;dismember Left Arm endif set n to getRandomPercent if n < 50 linkedRef.killactor linkedRef 7 ;dismember Left Leg endif set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 10 ;dismember Right Leg endif set n to getRandomPercent if n > 50 linkedRef.killactor linkedRef 5 ;dismember Right Arm endif set doOnce to 1 ;Trigger is only set off one time endif End
361GenericBipedRightArmDismembermentSCRIPTscn GenericBipedRightArmDismembermentSCRIPT ; This trigger has a script that will dismember the head of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 5 ;dismember Right Arm set doOnce to 1 ;Trigger is only set off one time endif End
362GenericBipedRightLegDismembermentSCRIPTscn GenericBipedRightLegDismembermentSCRIPT ; This trigger has a script that will dismember the head of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 10 ;dismember Right Leg set doOnce to 1 ;Trigger is only set off one time endif End
363GenericBipedRightLegRightArmDismembermentSCRIPTscn GenericBipedRightLegRightArmDismembermentSCRIPT ; This trigger has a script that will dismember the right leg and right arm of its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef linkedRef.killactor linkedRef 10 ;dismember Right Leg linkedRef.killactor linkedRef 5 ;dismember Right Arm set doOnce to 1 ;Trigger is only set off one time endif End
364GenericControlPodScriptscn GenericControlPodScript ;See V112 for generic setup. short mode ref myLink begin onActivate if IsActionRef player == 1 set myLink to getLinkedRef ;the linked ref should be the door. if ((myLink.getOpenState == 3) || (myLink.getOpenState == 1)) && mode != 2 ;door closed or open playgroup Forward 0 ;pull handle out set mode to 2 activate myLink ;activate all the things that this is an activate parent of - klaxon light and activator. endif endif end begin gameMode if (mode == 2) if (isAnimPlaying == 0) set myLink to getLinkedRef ;the linked ref should be the door. playgroup Left 1 ;pull handle down set mode to 3 myLink.activate player endif endif end
365GenericDebugEffectSCRIPTscn GenericDebugEffectSCRIPT float count ; effect's job is to simply report when the effect starts and ends begin ScriptEffectStart showwarning "Debug Effect: START" end begin ScriptEffectUpdate set count to ScriptEffectElapsedSeconds + ( getav variable01) setav variable01 count end begin ScriptEffectFinish showwarning "Debug Effect: END" end
366GenericDisableOnNextLoadSCRIPTscn GenericDisableOnNextLoadSCRIPT ; this script disables and marks for deletion after the second load short loadCount begin OnLoad set loadCount to loadCount + 1 if loadCount > 1 disable markfordelete endif end
367GenericDoorOpenedElsewhereSCRIPTscn GenericDoorOpenedElsewhereSCRIPT ; Don't pass a '1' parameter in your terminal's activate script ; This script will not allow NPCs to use the door. ; It's intended for sneaky/hacky players to be able to use the door for gameplay purposes ;********************** Begin onLoad lock 255 ;in case someone forgets to lock the door in the editor End ;********************** Begin onActivate if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg else Activate endif End
368GenericKillSCRIPTscn GenericKillSCRIPT ; This script will kill its linkedRef ref linkedRef short doOnce Begin onLoad if doOnce == 0 set linkedRef to getLinkedRef if linkedRef == 0 set linkedRef to GetSelf endif linkedRef.kill set doOnce to 1 ;Trigger is only set off one time endif End
369GenericProtectronSCRIPTscn GenericProtectronSCRIPT short talk ; set to 1 to start talking short talking ;set while talking float timer ; used for custom dialogue short robotID ; 0 = GenericFactoryProtectron ; 1 = GenericMetroProtectron ; 2 = genericMilitaryMrGutsy ; 3 = genericOfficeProtectron ; 4 = genericPodProtectron ; 5 = genericUtilityProtectron ; 6 = GenericVaultProtectron begin onLoad ; what kind of robot am I? (determines what topics I use) if GetIsID GenericFactoryProtectron == 1 set robotID to 0 elseif GetInFaction MetroRobotFaction == 1 set robotID to 1 elseif GetIsID genericMilitaryMrGutsy == 1 set robotID to 2 elseif GetIsID genericOfficeProtectron == 1 set robotID to 3 elseif GetIsID genericPodProtectron == 1 set robotID to 4 elseif GetIsID genericUtilityProtectron == 1 set robotID to 5 elseif GetIsID GenericVaultProtectron == 1 set robotID to 6 endif if getav variable01 == 0 ; I'm currently "off" set talk to 0 ; make me unconscious so I don't play sounds setUnconscious 1 else setav variable01 4 ; reset "variable" used for ticket check behavior endif end begin OnActivate if isActionRef player == 0 if getav variable01 == 0 ; I'm currently "off" set timer to 5 set talk to 1 setav variable01 1 ; turn on setUnconscious 0 ; not unconscious any more Activate ; tell pod to open else setav variable01 0 ; turn off set talk to 0 evp endif else Activate endif end begin gamemode if talk == 1 && getDead == 0 && talking == 0 if timer > 0 set timer to timer - GetSecondsPassed else if GetIsCurrentPackage ProtectronTicketCheck == 1 if robotID == 0 SayTo player FactoryRobotIDCheck 1 elseif robotID == 1 SayTo player MetroRobotTicketCheck 1 elseif robotID == 2 SayTo player MilitaryRobotIDCheck 1 elseif robotID == 3 SayTo player OfficeRobotIDCheck 1 elseif robotID == 4 SayTo player UtilityRobotIDCheck 1 elseif robotID == 5 SayTo player UtilityRobotIDCheck 1 elseif robotID == 6 SayTo player VaultRobotIDCheck 1 endif set talking to 1 set timer to 3 ; put space in between lines else if (getav variable01 == 3) set talk to 0 endif set talking to 1 if robotID == 0 SayTo player FactoryRobotTalk elseif robotID == 1 Say MetroRobotTalk elseif robotID == 2 Say MilitaryRobotTalk elseif robotID == 3 Say OfficeRobotTalk elseif robotID == 4 Say UtilityRobotTalk elseif robotID == 5 Say UtilityRobotTalk elseif robotID == 6 Say VaultRobotTalk endif ; finish "turn on talk" set timer to 1 endif endif endif end begin OnPackageEnd ProtectronNotActive if getav variable01 == 0 Activate ; to get pod to close behind me ; make me unconscious setUnconscious 1 endif end begin OnPackageStart ProtectronTicketCheck ; turn on talking when ticket check starts set talk to 1 end begin OnPackageChange ProtectronTicketCheck ; turn off talking when ticket check is done set talk to 0 end begin SayToDone set talking to 0 end
370GenericSwitchActivateLinkedRefSCRIPTscn GenericSwitchActivateLinkedRefSCRIPT ; This script activates itself and also its LinkedRef when activated ref LinkedRef ref Self Begin onActivate set LinkedRef to getLinkedRef set Self to getSelf activate LinkedRef.activate Self End
371GenericTravelOnActivateScriptscn GenericTravelOnActivateScript ; ;This is to be used on creatures with the GenericTravelOnActivate package ;===================================== begin OnActivate setav variable01 1 ;this variable begins the GenericTravelOnActivate package evp activate end
372GenericUnlockLinkedRefOnTriggerscn GenericUnlockLinkedRefOnTrigger ref MyLink begin OnTriggerEnter player set myLink to getLinkedRef MyLink.Unlock end
373GenericVertibirdEncounterOnHitSCRIPTscn GenericVertibirdEncounterOnHitSCRIPT Begin onHitWith GenericVertibirdHitWithWeaponsList do 100 End
374GenericVertibirdEncounterSCRIPTscn GenericVertibirdEncounterSCRIPT short active ref landingMarker begin onLoad if active == 0 playgroup forward 0 set active to 1 endif end begin OnActivate if IsActionRef player == 0 ; assume this is my reference marker set landingMarker to GetActionRef ; move soldier drop-off markers FFEDropOffMarkerA.moveto landingMarker 0 -75 0 FFEDropOffMarkerB.moveto landingMarker 0 75 0 endif end begin gameMode if active == 1 if isanimplaying forward == 0 ; landed -- drop off troopers if we have a landing marker if getDestroyed == 0 if landingMarker != 0 ; make sure nothing else has moved the drop off markers -- if so just use the landing marker if FFEDropOffMarkerA.GetDistance landingMarker < 100 FFEDropOffMarkerA.placeLeveledActorAtMe LvlEnclaveVertibirdPatrol else landingMarker.placeLeveledActorAtMe LvlEnclaveVertibirdPatrol endif if FFEDropOffMarkerB.GetDistance landingMarker < 100 FFEDropOffMarkerB.placeLeveledActorAtMe LvlEnclaveVertibirdPatrol else landingMarker.placeLeveledActorAtMe LvlEnclaveVertibirdPatrol endif endif playgroup backward 0 endif set active to 2 endif elseif active == 2 if isanimplaying backward == 0 set active to 3 markfordelete endif endif end
375GenericVertibirdFlyoverSCRIPTscn GenericVertibirdFlyoverSCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation float timer short doOnce ref linkedRef ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) set linkedRef to getLinkedRef linkedRef.enable 0 set timer to 1 set doOnce to 1 endif End ;***************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation set doOnce to 3 endif endif End
376GenericVertibirdLandingControlSCRIPTscn GenericVertibirdLandingControlSCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation float timer short doOnce ref linkedRef ref vertibirdLinkedRef short init Begin onHitWith GenericVertibirdHitWithWeaponsList linkedRef.do 100 End ;**************************************** Begin onActivate set doOnce to 1 End ;**************************************** Begin gameMode if init == 0 set init to 1 set linkedRef to getLinkedRef set vertibirdLinkedRef to linkedRef.getLinkedRef endif if (doOnce == 1) linkedRef.enable 0 set timer to 1 set doOnce to 2 elseif (doOnce == 2) if (timer <= 0) if ( linkedRef.HasLoaded3D != 0 ) linkedRef.playgroup Forward 0 set doOnce to 3 endif else set timer to timer - GetSecondsPassed endif elseif (doOnce == 3) if (linkedRef.isAnimPlaying Forward == 0) set timer to 3 ; 3 seconds while vertibird is on ground before it enables its xmarker set doOnce to 4 endif elseif (doOnce == 4) if (timer <= 0) if (linkedRef.getDestroyed == 0) vertibirdLinkedRef.enable ;enables an xmarker whose children are the enclave lists set timer to 2 ; 2 seconds before vertibird will take off set doOnce to 5 else set doOnce to 7 endif else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 5) if (timer <=0) if (linkedRef.getDestroyed == 0) linkedRef.playgroup backward 0 set doOnce to 6 else set doOnce to 7 endif else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 6) if (linkedRef.isAnimPlaying Backward == 0) && (getDestroyed == 0) linkedRef.disable ;disable the vertibird when it's done playing its backward animation set doOnce to 7 endif endif End
377GenericVertibirdLandingSCRIPTscn GenericVertibirdLandingSCRIPT ; This trigger just sets a variable flag on the control script if conditions are met. ; Used for the GenericVertibirdLandingControlSCRIPT ref linkedRef short doOnce short init ;**************************************** Begin onLoad if (init == 0) set linkedRef to getLinkedRef set init to 1 endif End ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) if (getStage MQ05 >= 85) set linkedRef to getLinkedRef linkedRef.activate linkedRef 1 set doOnce to 1 endif endif End ;*****************************************
378GeorgetownWildWestExplosionSCRIPTscn GeorgetownWildWestExplosionSCRIPT ref myLink short doOnce begin gameMode if doOnce == 0 ; init thing set myLink to getLinkedRef set doOnce to 1 endif if doOnce == 1 if (myLink.getDead == 1) set doOnce to 2 endif endif end begin onTrigger if doOnce == 2 ; my ref is dead placeatme FakeForce100r1000 ; create a push force from origin endif end begin onTriggerLeave if getActionRef == myLink set doOnce to 3 ; quit when my reference is ejected from the trigger endif end
379germPoliceHQ01SideDoorUnlockSCRIPTscn germPoliceHQ01SideDoorUnlockSCRIPT begin onTriggerEnter Player ;spawn the SuperMutant and start him running ; ?? germPoliceHQ01SideDoor.unlock end
380GermPoliceHQMasterScriptscn germPoliceHQMasterScript float timer short init BEGIN gameMode if germPoliceHQAlarmREF.getDisabled != 1 ; Has the timer been set up already? if init == 0 ;set the timer value, count down 25 seconds set timer to 25 set init to 1 germPoliceHQAlarmSound.enable ;The timer was set up already, lets count down! else ; We still have some time left... if timer > 0 set timer to timer - getSecondsPassed else germPoliceHQAlarmREF.disable GermPoliceHQ01AlarmLight.disable germPoliceHQAlarmSound.disable set init to 0 playSound QST911AlarmFinish endif endIf endIf END
381GlowingOneGlowSpellScriptscn GlowingOneGlowSpellScript Begin ScriptEffectStart pms GlowingOneFXShader End
382GNRBehemothTriggerSCRIPTscn GNRBehemothTriggerSCRIPT ; This trigger enables the MQ01Behemoth if the player comes to GNR after skipping the MQ01 version of the GNR battle short doOnce Begin onTriggerEnter Player if doOnce == 0 set doOnce to 1 ;Trigger is only set off one time if MQ01BehemothREF.getDead == 0 ; if I'm not dead, enable me and let me do my thing setstage MQ01 104 setstage MQ01 105 ; blow up buses GNRbus01.damageObject 2500 GNRbus02.damageObject 2500 endif endif End
383GNRBroadcastEffectSCRIPTscn GNRBroadcastEffectSCRIPT begin ScriptEffectStart if GetDead == 0 && getstagedone MQ02 50 == 1 SetNPCRadio 1 RadioGalaxyNewsRef02 elseif GetDead == 0 && getstagedone MQ02 50 == 0 SetNPCRadio 1 RadioGalaxyNewsRef01 endif end begin ScriptEffectFinish if getstagedone MQ02 50 == 1 SetNPCRadio 0 RadioGalaxyNewsRef02 elseif getstagedone MQ02 50 == 0 SetNPCRadio 0 RadioGalaxyNewsRef01 endif end
384GNRDoorIntercomSCRIPTscn GNRDoorIntercomSCRIPT begin OnActivate ; intercom stops working if everyone inside is dead if KnightDillonRef.GetDead == 0 || KnightFinleyRef.GetDead == 0 || KnightWilksRef.GetDead == 0 Activate elseif isActionRef player == 1 ShowMessage GenericIntercomNoResponseMsg endif end
385GNREntranceDoor01DEMOScriptscn GNREntranceDoor01DEMOScript begin OnActivate if isActionRef player == 1 setstage MS11 50 endif Activate end
386GobSCRIPTSCN GobSCRIPT short Tick short RadioConversation ; 0 = never had radio conversation ; 1 = having radio conversation ; 2 = Gob banging on radio ; -1 = done short dead float Timer BEGIN OnDeath set DialogueMegaton.GobDead to 1 set dead to 1 END BEGIN GameMode ;Triggers Gob's comment about the radio if RadioConversation == 0 if player.GetDistance GobRef <= 450 set RadioConversation to 1 endif endif ; turn off Gob's comment about radio if radioConversation >= 1 if getinsamecell player == 0 set RadioConversation to -1 endif endif ; run if ( Dead == 0 ) && ( IsInCombat == 0 ) && ( NovaREF.IsInCombat == 0 ) if ( RadioConversation == 1 && MoriartysRadioREF.GetOpenState == 1 ) if ( GetTalkedToPC == 0 ) if ( Timer <= 0 ) if ( Tick == 0 ) GobRef.Look MoriartysRadioREF NovaRef.Look GobRef set Tick to 1 elseif ( Tick == 1 ) GobRef.Say MegGobRadioTalk set Timer to 1 set Tick to 2 elseif ( Tick == 2 ) && ( NovaREF.Rent != 1 ) NovaRef.SayTo GobREF MegNovaRadioTalk set Timer to 1 set Tick to 3 elseif ( Tick == 3 ) ;GobRef.StopLook set Tick to 4 elseif ( Tick >= 4 ) && ( Tick <= 8 ) ;here, Gob will pull from a random list of things to say to the radio NovaRef.StopLook ; mark conversation as complete if ( Tick == 6 ) JerichoREF. Say MegBarRadioChatter elseif ( Tick == 7 ) WalterREF. Say MegBarRadioChatter elseif ( Tick == 8 ) && ( NovaREF.Rent != 1 ) NovaREF. Say MegBarRadioChatter endif if timer <= 8 set DialogueMegaton.MegRadioSignal to 1 GobREF.Say MegGobRadioTalk set Tick to ( Tick +1 ) set Timer to 1 elseif timer <= 0 set Timer to ( Timer - GetSecondsPassed ) endif ; elseif ( Tick == 9 ) ; GobRef.StopLook ; set RadioConversation to -1 ; GobREF.Say MegGobRadioTalk ; set Tick to ( Tick +1 ) ; evp elseif Tick == 9 GobRef.StopLook set RadioConversation to -1 If Player.GetInCell MegatonMoriartysSaloon == 1 If ColinMoriartyRef.GetInCell MegatonMoriartysSaloon == 0 ColinMoriartyRef.MoveTo EnterMoriartysMarker EndIf ColinMoriartyRef.AddScriptPackage MegMoriartyFindGob EndIf set Tick to ( Tick +1 ) endif endif endif endif endif END begin SayToDone MegGobRadioTalk set Timer to 0 end
387GretaSCRIPTSCN GretaSCRIPT BEGIN OnStartCombat Player if ( GetInCell MuseumAmericanEntrance == 1 ) Player.StopCombatAlarmOnActor endif END BEGIN OnDeath set DialogueUnderworld.GretaDead to 1 setstage FollowersHireCharon 15 if ( GetInCell MuseumAmericanEntrance == 1 ) Player.StopCombatAlarmOnActor endif END
388HardenSimmsScriptscn HardenSimmsScript short forcegreetPlayer Begin GameMode if getDisabled == 1 setStage MSObjectives 11 endif End Begin OnDeath setStage MSObjectives 11 End
389HaroldScriptscn HaroldScript short HaroldLocked ;1= Player entered the Hostile faction and has been Locked from Harold's dialog short Named ;1= Harold has revealed his "real" name to Player short Talking short HeStarted ;1= Harold's initial animations start on load short HaroldGreets ;x= Handles a forcegreet by Harold on the Player right after the teleport ;The OnLoad block starts Harold's animation idle begin OnLoad if ( HeStarted == 0 ) Playgroup Forward 1 set HeStarted to 1 endif end begin OnActivate if IsActionRef player == 1 ;if player can't see Harold's face don't let him activate him if ( MS10.InFlames == 0 ) if ( HaroldTalkTriggerRef.PlayerInTrigger == 1 ) Activate elseif ( Talking == 0 ) Say MS10HaroldCantSee endif elseif ( MS10.InFlames > 0 ) && ( Named == 0 ) ShowMessage MS10HaroldBurnsMessagePre elseif ( MS10.InFlames > 0 ) && ( Named > 0 ) ShowMessage MS10HaroldBurnsMessage endif endif end ;Harold was struck with a fire-causing weapon (See MS10SetHaroldOnFireWeaponsList Form List) begin OnHitWith MS10SetHaroldOnFireWeaponsList if ( MS10.InFlames == 0 ) SetQuestDelay MS10 .1 Set MS10.OasisHostile to 1 Playsound FXFireGasHigh Playsound FXFireGasLow ; Playsound FXFireHaroldLP (this is the loop that will continue as he burns) MS10HaroldFireLoopRef.Enable Playsound VOCHaroldScream3D Playsound VOCHaroldScream2D Set MS10Fire to 1 Playgroup Left 1 HaroldFireRef.Enable RewardKarma -200 Set MS10.InFlames to 1 endif end begin gamemode ;Once the player has learned Harold's name, his mouse over name becomes "Harold" if ( Named == 1 ) SetActorFullName NamedActorHarold Set named to 2 endif ;These are the fire animation sequences for burning Harold if ( MS10.InFlames == 1 ) if ( HaroldRef.isAnimPlaying Left == 0 ) ;the intitial set on fire anim is done, play the next one in the sequence HaroldRef.Playgroup Right 1 Set DialogueOasis.BurnTimer to 20 OasisDoorFromHaroldToOasis.Unlock set MS10.InFlames to 2 endif elseif ( MS10.InFlames == 2 ) ;the burning anim is done, play the next one in the sequence if ( HaroldRef.isAnimPlaying Right == 0 ) HaroldRef.Playgroup Fastforward 1 set MS10.InFlames to 3 endif endif end
390HaroldTalkTriggerScriptscn HaroldTalkTriggerScript short playerInTrigger Begin OnTriggerEnter Player set playerInTrigger to 1 End Begin OnTriggerLeave Player set playerInTrigger to 0 End
391HazmatMutantTravelerScriptscn HazmatMutantTravelerScript short doOnce begin onTriggerEnter player if doOnce == 0 set doOnce to 1 HazmatMutantTraveler1.setav variable01 1 HazmatMutantTraveler1.evp endif end
392HD00InfirmaryScriptscn HD00InfirmaryScript short Done short Button short GoHeal ;Globals used here begin OnActivate if IsActionRef player == 1 ShowMessage HD00InfirmaryMessage set GoHeal to 1 endif end begin gamemode ;This section of the gamemode block handles all of the button presses on the Laboratory kit set Button to GetButtonPressed if ( Button == 0 ) && ( GoHeal == 1 ) Player.RestoreAV Health 1000000 Showmessage HD00InfirmaryHealMessage Set GoHeal to 0 elseif ( Button == 1 ) && ( GoHeal == 1 ) Player.RestoreAV perceptioncondition 100 Player.RestoreAV endurancecondition 100 Player.RestoreAV leftattackcondition 100 Player.RestoreAV leftmobilitycondition 100 Player.RestoreAV rightattackcondition 100 Player.RestoreAV rightmobilitycondition 100 Showmessage HD00InfirmaryLimbsMessage Set GoHeal to 0 elseif ( Button == 2 ) && ( GoHeal == 1 ) player.RestoreAV RadiationRads 1000000 Showmessage HD00InfirmaryRadsMessage Set GoHeal to 0 elseif ( Button == 3 ) && ( GoHeal == 1 ) ;Do nothing Set GoHeal to 0 endif end
393HD00LabScriptscn HD00LabScript short Done short Button short HDLab0 1= The laboratory is now "brewing" a drug float HDLabTime0 x.x= Float for how much time has passed short ProcessButton ;Globals used here begin OnActivate if IsActionRef player == 1 if ( HDLab0 == 0 ) set ProcessButton to 1 ShowMessage HD00LabMessage elseif ( HDLab0 == 1 ) ShowMessage HD00LabMessage01 elseif ( HDLab0 == 2 ) Set HDLab0 to 0 ShowMessage HD00LabMessage02 Player.AddItem LootChemsAll100 1 endif endif end begin gamemode ;This section of the gamemode block handles all of the button presses on the Laboratory kit set Button to GetButtonPressed if Button > -1 if ProcessButton == 1 if ( Button == 0 ) Set HDLab0 to 1 Set HDLabTime0 to GameDaysPassed elseif ( Button == 1 ) Player.RemoveSpell WithdrawalQuantumNukacola Player.RemoveSpell WithdrawalAlcohol Player.RemoveSpell WithdrawalBuffout Player.RemoveSpell WithdrawalJet Player.RemoveSpell WithdrawalMentats Player.RemoveSpell WithdrawalMorphine Player.RemoveSpell WithdrawalPsycho ShowMessage HDLabDetoxify elseif ( Button == 2 ) endif endif ; clear button variable set ProcessButton to 0 endif if ( HDLab0 == 1 ) if ( GameDaysPassed - HDLabTime0 >= 1 ) Set HDLab0 to 2 endif endif end
394HD00RobotQuestScriptscn HD00RobotQuestScript short Water ;1= The Robot needs to recharge it's condensation collectors short WaterGiven ;x= How many (from 1-5) waters have been given to the player short Joke short AlreadyPlayed ;x= The jukebox song has already played, so don't play it twice in a row float WaterTime ;x= How much time has passed since 5th water given float JokeTime ;x= Measures 1 day passed since last joke told begin gamemode ;Handling of the Water Given if ( WaterGiven == 5 ) if ( Water == 0 ) Set WaterTime to GameDaysPassed Set Water to 1 endif endif if Water == 1 if ( GameDaysPassed - WaterTime >= 7 ) Set Water to 0 Set WaterGiven to 0 endif endif ;Handling of the Jokes told if ( Joke == 1 ) Set JokeTime to GameDaysPassed set Joke to 2 endif if ( Joke == 2 ) if ( GameDaysPassed - JokeTime >= 1 ) Set Joke to 0 endif endif end
395HD01HouseItemPurchaseScriptscn HD01HouseItemPurchaseScript ;This small script will reduce the value of the "receipts" to 0 as soon as the Player owns it so you can't sell it back begin OnAdd Player SetItemValue 0 end
396HD01HouseItemPurchaseThemesScriptscn HD01HouseItemPurchaseThemesScript ;This small script will reduce the value of the themes "receipts" to 0 as soon as the Player owns it so you can't sell it back begin OnAdd Player SetItemValue 0 end begin OnAdd MD01MerchThemeRef SetItemValue 1000 end begin OnAdd MD02MerchThemeRef SetItemValue 1000 end
397HD01NukaVendingMachineScriptscn HD01NukaVendingMachineScript ;This script is designed to handle the Nuka-Cola Machine that the Player buys for his house ;The Player can add Nuka-Colas to the machine and have them changed to Ice-Cold Nuka-Colas ;He can then dispense them as he wants to take some or drink them short Button short NukasOnMe short GoNuka begin OnActivate if ( IsActionRef Player == 1 ) if ( Player.GetItemCount NukaCola >= 1 ) ShowMessage HD00NukaMachineWith set GoNuka to 2 elseif ( Player.GetItemCount NukaCola < 1 ) ShowMessage HD00NukaMachineWithout set GoNuka to 1 endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( GoNuka >= 1 ) Activate set GoNuka to 0 elseif ( Button == 1 ) && ( GoNuka == 2 ) set NukasOnMe to ( Player.GetItemCount NukaCola ) Player.RemoveItem NukaCola NukasOnMe HD01NukaMachineRef.AddItem MS05IceNukaCola NukasOnMe set NukasOnMe to 0 set GoNuka to 0 elseif ( Button == 1 ) && ( GoNuka == 1 ) ;Do Nothing set GoNuka to 0 elseif ( Button == 2 ) && ( GoNuka == 2 ) ;Do Nothing set GoNuka to 0 endif end
398HD01QuestScriptscn HD01QuestScript short MerchSetup short Doonce short Doonce1 short Doonce2 short Doonce3 short Doonce4 short Doonce5 short Doonce6 short Doonce7 short Doonce8 short Doonce9 short Doonce10 short Doonce11 short ThemeClean short RoomClear short LabGo begin gamemode ;Merch Container Stuff if ( MerchSetup == 0 ) if ( GetQuestRunning HD01 == 1 ) MD01MerchThemeRef.Enable MD01MerchRef.Enable MD01MerchThemeRef.SetOwnership MoiraBrown MD01MerchRef.SetOwnership MoiraBrown set MerchSetup to 1 endif endif end begin menumode ;These are the variable triggers that are set when a voucher is acquired if ( Player.GetItemCount HD00BoSTheme == 1 ) && ( Doonce == 0 ) HD01VaultTheme01.Enable SetCellImageSpace MegatonPlayerHouse VaultImageSpace01 Set RoomClear to 1 set Doonce to 1 endif if ( Player.GetItemCount HD00ExplorerTheme == 1 ) && ( Doonce2 == 0 ) HD01ExplorerTheme.Enable SetCellImageSpace MegatonPlayerHouse LamplightInterior Set RoomClear to 1 set Doonce2 to 1 endif if ( Player.GetItemCount HD00PreWarTheme == 1 ) && ( Doonce3 == 0 ) HD01PreWarTheme.Enable SetCellImageSpace MegatonPlayerHouse TenpennyImageSpace Set RoomClear to 1 set Doonce3 to 1 endif if ( Player.GetItemCount HD00RaiderTheme == 1 ) && ( Doonce4 == 0 ) HD01RaiderTheme.Enable SetCellImageSpace MegatonPlayerHouse UrbanImageSpace01 Set RoomClear to 1 set Doonce4 to 1 endif if ( Player.GetItemCount HD00ScienceTheme == 1 ) && ( Doonce5 == 0 ) HD01ScienceTheme.Enable SetCellImageSpace MegatonPlayerHouse NeoClassDefaultImageSpace Set RoomClear to 1 set Doonce5 to 1 endif if ( Player.GetItemCount HD00Infirmary == 1 ) && ( Doonce6 == 0 ) HD01Infirmary.Enable set HDHealth to 1 ;Global for Butler's dialogue set Doonce6 to 1 endif if ( Player.GetItemCount HD00Jukebox == 1 ) && ( Doonce7 == 0 ) HD01Jukebox.Enable set Doonce7 to 1 endif if ( Player.GetItemCount HD00Lab == 1 ) && ( Doonce8 == 0 ) HD01Lab.Enable set HDLab to 1 set Doonce8 to 1 endif if ( Player.GetItemCount HD00NukaCola == 1 ) && ( Doonce9 == 0 ) HD01NukaCola.Enable set HDNuka to 1 set Doonce9 to 1 endif if ( Player.GetItemCount HD00Workbench == 1 ) && ( Doonce10 == 0 ) HD01Workbench.Enable set HDWorkbench to 1 set Doonce10 to 1 endif if ( Player.GetItemCount HD00LoveTheme == 1 ) && ( DoOnce11 == 0 ) HD01LoveTheme.Enable SetCellImageSpace MegatonPlayerHouse LoveHouseTheme Set RoomClear to 1 set DoOnce11 to 1 endif if ( ThemeClean == 1 ) SetCellImageSpace MegatonPlayerHouse ShackInterior01 HD01VaultTheme01.Disable HD01ExplorerTheme.Disable HD01PreWarTheme.Disable HD01RaiderTheme.Disable HD01ScienceTheme.Disable HD01LoveTheme.Disable set DoOnce to 0 set DoOnce2 to 0 set DoOnce3 to 0 set DoOnce4 to 0 set DoOnce5 to 0 set DoOnce11 to 0 set RoomClear to 0 set ThemeClean to 0 endif end
399HD02NukaVendingMachineScriptscn HD02NukaVendingMachineScript ;This script is designed to handle the Nuka-Cola Machine that the Player buys for his house ;The Player can add Nuka-Colas to the machine and have them changed to Ice-Cold Nuka-Colas ;He can then dispense them as he wants to take some or drink them short Button short NukasOnMe short GoNuka begin OnActivate if ( IsActionRef Player == 1 ) if ( Player.GetItemCount NukaCola >= 1 ) ShowMessage HD00NukaMachineWith set GoNuka to 2 elseif ( Player.GetItemCount NukaCola < 1 ) ShowMessage HD00NukaMachineWithout set GoNuka to 1 endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( GoNuka >= 1 ) Activate set GoNuka to 0 elseif ( Button == 1 ) && ( GoNuka == 2 ) set NukasOnMe to ( Player.GetItemCount NukaCola ) Player.RemoveItem NukaCola NukasOnMe HD02NukaMachineRef.AddItem MS05IceNukaCola NukasOnMe set NukasOnMe to 0 set GoNuka to 0 elseif ( Button == 1 ) && ( GoNuka == 1 ) ;Do Nothing set GoNuka to 0 elseif ( Button == 2 ) && ( GoNuka == 2 ) ;Do Nothing set GoNuka to 0 endif end
400HD02QuestScriptscn HD02QuestScript short MerchSetup short Doonce short Doonce1 short Doonce2 short Doonce3 short Doonce4 short Doonce5 short Doonce6 short Doonce7 short Doonce8 short Doonce9 short Doonce10 short DoOnce11 short ThemeClean short RoomClear begin gamemode ;Merch Container Stuff if ( MerchSetup == 0 ) if ( GetQuestRunning HD02 == 1 ) MD02MerchThemeRef.Enable MD02MerchRef.Enable LydiaMontenegroRef.SetFactionRank HD00TenpennyHouseVendor 0 MichaelMastersRef.SetFactionRank HD00TenpennyHouseVendor 0 MD02MerchThemeRef.SetOwnership HD00TenpennyHouseVendor MD02MerchRef.SetOwnership HD00TenpennyHouseVendor set MerchSetup to 1 endif endif end begin menumode ;These are the variable triggers that are set when a voucher is acquired if ( Player.GetItemCount HD00BoSTheme == 1 ) && ( Doonce == 0 ) HD02VaultTheme.Enable SetCellImageSpace Tenpenny03Player VaultImageSpace01 MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce to 1 endif if ( Player.GetItemCount HD00ExplorerTheme == 1 ) && ( Doonce2 == 0 ) HD02ExplorerTheme.Enable SetCellImageSpace Tenpenny03Player LamplightInterior MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce2 to 1 endif if ( Player.GetItemCount HD00PreWarTheme == 1 ) && ( Doonce3 == 0 ) HD02PreWarTheme.Enable SetCellImageSpace Tenpenny03Player TenpennyImageSpace MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce3 to 1 endif if ( Player.GetItemCount HD00RaiderTheme == 1 ) && ( Doonce4 == 0 ) HD02RaiderTheme.Enable SetCellImageSpace Tenpenny03Player UrbanImageSpace01 MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce4 to 1 endif if ( Player.GetItemCount HD00ScienceTheme == 1 ) && ( Doonce5 == 0 ) HD02ScienceTheme.Enable SetCellImageSpace Tenpenny03Player NeoClassDefaultImageSpace MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce5 to 1 endif if ( Player.GetItemCount HD00Infirmary == 1 ) && ( Doonce6 == 0 ) HD02Infirmary.Enable set HDHealth to 1 ;Global for Butler's dialogue set Doonce6 to 1 endif if ( Player.GetItemCount HD00Jukebox == 1 ) && ( Doonce7 == 0 ) HD02Jukebox.Enable set Doonce7 to 1 endif if ( Player.GetItemCount HD00Lab == 1 ) && ( Doonce8 == 0 ) HD02Lab.Enable set HDLab to 1 set Doonce8 to 1 endif if ( Player.GetItemCount HD00NukaCola == 1 ) && ( Doonce9 == 0 ) HD02NukaCola.Enable set HDNuka to 1 set Doonce9 to 1 endif if ( Player.GetItemCount HD00Workbench == 1 ) && ( Doonce10 == 0 ) HD02Workbench.Enable set HDWorkbench to 1 set Doonce10 to 1 endif if ( Player.GetItemCount HD00LoveTheme == 1 ) && ( Doonce11 == 0 ) HD02LoveTheme.Enable SetCellImageSpace Tenpenny03Player LoveHouseTheme MD02MerchThemeRef.Disable set RoomClear to 1 set Doonce11 to 1 endif if ( ThemeClean == 1 ) SetCellImageSpace Tenpenny03Player TenpennyImageSpace HD02VaultTheme.Disable HD02ExplorerTheme.Disable HD02PreWarTheme.Disable HD02RaiderTheme.Disable HD02ScienceTheme.Disable HD02LoveTheme.Disable set DoOnce to 0 set DoOnce2 to 0 set DoOnce3 to 0 set DoOnce4 to 0 set DoOnce5 to 0 set DoOnce11 to 0 set RoomClear to 0 MD02MerchThemeRef.Enable set ThemeClean to 0 endif end
401HerbertDashwoodScriptscn HerbertDashwoodScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.HD to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
402HubrisComics02DoorUnlockTrigSCRIPTscn HubrisComics02DoorUnlockTrigSCRIPT Begin onTriggerEnter Player Hubris03GeneratorRoomDoor01REF.unlock End
403IntroTriggerSCRIPTscn IntroTriggerSCRIPT short triggered float timer begin OnTriggerEnter if IsActionRef player == 1 if triggered == 0 set triggered to 1 set timer to 10 endif endif end begin gamemode if triggered == 1 if timer > 0 set timer to timer - GetSecondsPassed else ; set variable and trigger BOS guy set triggered to 2 ; message "Trigger BOS guy" ;IntroDude.evp endif endif end
404IrvingChengScriptscn IrvingChengScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.IC to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
405JennyStahlSCRIPTscn JennyStahlSCRIPT BEGIN OnDeath set DialogueMegaton.JennyStahlDead to 1 ;if Leo is dead spawn the Brass Lantern vendor key if LeoStahlRef.getDead == 1 additem StahlVendorKey 1 endif END
406JerichoSCRIPTscn JerichoSCRIPT short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting short DoOnce BEGIN GameMode ;***DEMO*** ;When player gets close, send Jericho to talk to Jenny if ( DoOnce == 0 ) if ( GetDistance Player <= 1400 ) set DoOnce to 1 evp endif endif END BEGIN OnDeath set DialogueMegaton.JerichoDead to 1 END BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.JerichoHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.JerichoHired to 0 ShowMessage FollowerMessageDeadJericho endif END
407JohnnyWesSCRIPTscn JohnnyWesSCRIPT short shootingStage short startTimer float timer ;*************************************************** Begin onLoad JohnnyWesREF.setav perception 10 End ;*************************************************** Begin GameMode if (shootingStage == 1) ;shoot the player JohnnyWesREF.useWeapon weapMinigun JohnnyWesREF player 30 0 0 0 0 set shootingStage to 0 elseif (shootingStage == 2) ;set timer and go to the next stage (generator) set timer to 6 set shootingStage to 3 set startTimer to 1 elseif (shootingStage == 3) ;shoot the generator if (startTimer == 1) JohnnyWesREF.useWeapon weapMinigun JohnnyWesREF JohnnyWesTarget01REF 40 0 0 0 0 endif elseif (shootingStage == 4) ;set timer and go to the next stage (fire extinguisher) set timer to 4 set shootingStage to 5 set startTimer to 1 elseif (shootingStage == 5) ;shoot the fire extinguisher if (startTimer == 1) JohnnyWesREF.useWeapon weapMinigun JohnnyWesREF JohnnyWesTarget02REF 20 0 0 0 0 endif elseif (shootingStage == 6) ;set timer and go to the next stage (bridge 1) set timer to 4 set shootingStage to 7 set startTimer to 1 elseif (shootingStage == 7) ;shoot at bridge 1 if (startTimer == 1) JohnnyWesREF.useWeapon weapMinigun JohnnyWesREF JohnnyWesTarget03REF 50 0 0 0 0 endif elseif (shootingStage == 8) ;set timer and go to the next stage (bridge 1) set timer to 4 set shootingStage to 9 set startTimer to 1 elseif (shootingStage == 9) ;shoot at bridge 1 if (startTimer == 1) JohnnyWesREF.useWeapon weapMinigun JohnnyWesREF JohnnyWesTarget04REF 50 0 0 0 0 endif endif if (startTimer == 1) if (timer < 0) set startTimer to 0 else set timer to (timer - GetSecondsPassed) endif endif End
408JosephSCRIPTscn JosephSCRIPT short StartHistory short Tick short DoOnce short SayOnce float Timer BEGIN OnLoad set Timer to 15 set SayOnce to 0 END BEGIN GameMode ; if ( MQ06.DBComputerOn == 1 ) ; if ( GetDistance MQ06BackDoorTerminalRef < 150 ) ; set MQ06.DBComputerOn to 2 ; endif ; Endif ; if DoOnce == 0 ; if (StartHistory == 1) && (Tick == 0) ; addscriptPackage JosephLLHistory ; set Tick to 1 ; set DoOnce to 1 ; set StartHistory to 0 ; startConversation JosephREF LLJosephHistory1 ; endif ; endif if (isincombat == 0) if (GetIsCurrentPackage JosephTeachingPackage7x6 == 1) || (GetIsCurrentPackage JosephDefaultTeachingPackage == 1) if (getDistance SammyREF < 700) || (getDistance PennyREF < 700) || (getDistance BumbleREF < 700) Set Timer to Timer - getsecondspassed if (istalking == 0) && (timer <= 0) && (SayOnce == 0) say LLTeachingTalk Set SayOnce to 1 Set Timer to 15 endif endif endif endif if (GetIsCurrentPackage JosephLLHistory == 1) if (isincombat || getInSameCell player == 0) RemoveScriptPackage JosephLLHistory set DialogueLilLamplight.JosephHistoryCount to 0 endif ;if (DialogueLilLamplight.JosephHistoryCount >= 10) ; RemoveScriptPackage JosephLLHistory ; set DialogueLilLamplight.JosephHistoryCount to 0 ;endif endif END
409KlaxonLightScriptscn KlaxonLightScript short state ; 0 = off, 1 = flashing begin OnLoad if state == 1 playgroup left 0 endif end begin onActivate if state == 1 set state to 0 playgroup backward 0 else set state to 1 playgroup forward 1 endif end begin gamemode if state == 1 if isAnimPlaying == 0 playgroup left 0 endif endif end
410KnightCaptainDuskSCRIPTSCN KnightCaptainDuskSCRIPT short StartTimer float Timer BEGIN OnPackageEnd CitKnightCaptainDuskPracticeRifleBASE if ( StartTimer == 0 ) set StartTimer to 1 set Timer to 3 endif END BEGIN GameMode if ( StartTimer == 1 ) set Timer to Timer - GetSecondsPassed if ( Timer <= 0 ) evp set StartTimer to 0 endif endif END
411LamplightBackGateSCRIPTscn LamplightBackGateSCRIPT BEGIN OnActivate if (isActionRef Player == 0) activate endif END
412LDFFOverpassBattleEnableSCRIPTscn LDFFOverpassBattleEnableSCRIPT short doOnce ref linkedRef ;**************************************** Begin onLoad if (doOnce == 0) if (getStage MQ05 >= 85 && getStage MS06 >= 100) set linkedRef to getLinkedRef linkedRef.enable set doOnce to 1 endif endif End
413LDScientistBomb01SCRIPTscn LDScientistBomb01SCRIPT short isSequence ; 0 - Means sequence is not running, 1 - Means sequence is happening. short soundStage short doOnce ref myLink float Timer ; This is how long each sequence happens. ;*************************** Begin onLoad set Timer to 1 End ;*************************** Begin onTriggerEnter if (isActionRef player == 1) if (doOnce == 0) set isSequence to 1 set soundStage to 1 set doOnce to 1 endif endif end ;*************************** Begin gameMode if isSequence == 1 if (soundStage == 1) set myLink to getLinkedRef myLink.enable set Timer to 1.5 set soundstage to 2 endif if (soundStage == 2) if (Timer < 0) LDFakeExplosion02REF.placeatme LDScientistExplosion 1 set soundStage to 0 set isSequence to 0 else set Timer to (Timer - GetSecondsPassed) endif endif endif End ;*************************** ;Begin onTriggerEnter ; if isActionRef player == 1 ; if doOnce == 0 ; set Timer to 1 ; set myLink to getLinkedRef ; myLink.enable ; if (Timer < 0) ; LDFakeExplosion02REF.placeatme GrenadeFragExplosion 1 ; set doOnce to 1 ; endif ; set Timer to (Timer - GetSecondsPassed) ; endif ; endif ;end
414LDWonderMeatMakerSCRIPTscn LDWonderMeatMakerSCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short hasItems short button short checkButtons ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin onActivate if IsActionRef player == 1 if (player.GetItemCount MoleRatMeat > 0) && (player.GetItemCount WonderGlue > 0) set hasItems to 1 else set hasItems to 0 endif set checkButtons to 1 ShowMessage LDWonderMeatMakerFirstMsg endif End ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin gameMode if (checkButtons == 1) set button to getbuttonpressed if button > -1 if button == 0 if hasItems == 1 ShowMessage LDWonderMeatMakerSuccessMsg player.additem MoleRatWonderMeat 1 player.removeitem MoleRatMeat 1 player.removeitem WonderGlue 1 elseif (hasItems == 0) ShowMessage LDWonderMeatMakerFailMsg endif elseif button == 1 ;don't do anything endif set checkButtons to 0 endif endif End ;---------------------------------------------------------------------------------------------------------------------------------------------
415LEnfantEnclaveDropScriptscn LEnfantEnclaveDropScript float timer short runTimer short doOnce float birdLandStamp float enclaveStamp float birdTakeoffStamp short birdLandFlag short enclaveFlag short birdTakeoffFlag begin onLoad set timer to 21.5 set birdLandStamp to timer - 1 set enclaveStamp to timer - 17.5 set birdTakeoffStamp to timer - 20.5 end begin onTriggerEnter player if doOnce == 0 && getStage MQ05 >= 85 LEnfantVertibird.enable set runTimer to 1 set doOnce to 1 endif end begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed endif if birdLandFlag == 0 if timer <= birdLandStamp LEnfantVertibird.playGroup forward 1 set birdLandFlag to 1 endif endif if enclaveFlag == 0 if timer <= enclaveStamp LEnfantEnclave01.enable LEnfantEnclave02.enable LEnfantEnclave03.enable set enclaveFlag to 1 endif endif if birdTakeoffFlag == 0 if timer <= birdTakeoffStamp LEnfantVertibird.playGroup backward 1 set birdTakeoffFlag to 1 endif else if LEnfantVertibird.isAnimPlaying Backward == 0 LEnfantVertibird.disable ;disable the vertibird when it's done playing its backward animation set runTimer to 0 endif endif endif end
416LenfantMutantMoveScriptscn LenfantMutantMoveScript ref myLink short doOnce begin OnTriggerEnter Player if doOnce == 0 set myLink to getLinkedRef set doOnce to 1 myLink.setav Variable07 1 endif end
417LeoStahlSCRIPTscn LeoStahlSCRIPT BEGIN OnDeath set DialogueMegaton.LeoStahlDead to 1 ;if Jenny is dead spawn the Brass Lantern vendor key if JennyStahlRef.getDead == 1 additem StahlVendorKey 1 endif END
418LucySCRIPTscn LucySCRIPT short BeginMedicalServices ;Set to 1 in dialog, starts script below. short BeginAddictionServices ;Set to 1 in dialog, starts script below. short DoOnce ;Script blocker float Timer ;Timer used for animation control BEGIN GameMode ;When set to 1, plays medical animations for five seconds then restarts conversation with the player if ( BeginMedicalServices == 1 ) if ( DoOnce== 0 ) disablePlayerControls evp sayto player LLLucyMedicalChatter PlayIdle LooseDoctorHealPlayer set Timer to 6 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) setstage Doctors 10 enablePlayerControls addScriptPackage DefaultNPCDialogPlayer endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( BeginAddictionServices == 1 ) if ( DoOnce== 0 ) disablePlayerControls evp PlayIdle LooseDoctorHeal set Timer to 10 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( IsAnimPlaying == 0 ) PlayIdle LooseDoctorHeal endif if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) setstage Doctors 20 enablePlayerControls addScriptPackage DefaultNPCDialogPlayer endif endif END
419LucyWestSCRIPTscn LucyWestSCRIPT BEGIN OnDeath set DialogueMegaton.LucyWestDead to 1 END
420LydiaMontenegroScriptscn LydiaMontenegroScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.LM to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
421MamaDolceDoorTrigScriptscn MamaDolceDoorTrigScript begin onTriggerEnter Player disable ;kill this trigger if MamaDolcesGhoulDoorOpener.isInCombat == 0 MamaDolcesGhoulDoorOpener.setav variable01 1 MamaDolcesGhoulDoorOpener.evp endif end
422MamaDolceExtGuardScriptscn MamaDolceExtGuardScript ;starts the exterior ghouls guarding begin onTriggerEnter Player MamaDolcePatrolExt1.setav variable01 1 MamaDolcePatrolExt2.setav variable01 1 MamaDolcePatrolExt3.setav variable01 1 MamaDolcePatrolExt1.evp MamaDolcePatrolExt2.evp MamaDolcePatrolExt3.evp end
423MamaDolceExtPatrolScriptscn MamaDolceExtPatrolScript ;starts the exterior ghouls patroling begin onTriggerEnter Player MamaDolcePatrolExt1.setav variable01 0 MamaDolcePatrolExt2.setav variable01 0 MamaDolcePatrolExt3.setav variable01 0 MamaDolcePatrolExt1.evp MamaDolcePatrolExt2.evp MamaDolcePatrolExt3.evp end
424ManyaSCRIPTscn ManyaSCRIPT BEGIN OnDeath set DialogueMegaton.ManyaDead to 1 END
425MargaretPrimroseScriptscn MargaretPrimroseScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.MP to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
426MeatSCRIPTSCN MeatSCRIPT BEGIN OnDeath set DialogueUnderworld.MeatDead to 1 END
427MechanistScriptscn MechanistScript ;used with MS02 short greetPlayer ;1 = greeted player (used as condition on package, set in MS02 dialog) short sideKick ;1 = player is his sidekick, and he will follow the player to kill his enemy short followingPlayer ;1 = following player, -1 waiting float waitUntil ;set in dialog == GetGameDaysPassed + HowEverLongToWait when did the player tell him to wait... used as a condition on wait pack, if he's waiting too long he will go back to his lair Begin GameMode ;If Mechanist is fleeing after the battle, and gets away from the player, complete the MS02MechanistEscape package if MS02.battleDone == 1 && MS02.mechanistEscaped == 0 if (getIsCurrentPackage MS02MechanistEscape == 1 || getCurrentAIProcedure == 16) if getDead == 0 if getDistance player >= 2000 set MS02.mechanistEscaped to 1 MechanistRef.moveTo xMS02MechanistEscapeToHere ;MechanistRef.removeFromFaction MS02TemporaryFriends MechanistRef.setAV Aggression MS02.MechanistAggresion MechanistRef.setAV Confidence MS02.MechanistConfidence MechanistRef.setAV Assistance MS02.MechanistAssistance ;MechanistREF.setAV DamageResist MS02.MechanistDamageResist removeScriptPackage MS02MechanistEscape evp endif endif endif endif if MS02.MechanistRetired !=0 || MS02.MechanistLeave != 0 if getIsCurrentPackage MS02MechanistWanderWasteland == 1 if getDisabled == 0 if getDistance player >= 4000 disable endif endif endif endif End Begin OnDeath ;If killed during the mexican standoff at the beginning: if (MS02.BattleDone == 0) MS02BattleRobot1Ref.startcombat player MS02BattleRobot2Ref.startcombat player MS02BattleAnt1Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt2Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt3Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt4Ref.addscriptpackage MS02BattleAntFlee set Ms02.bailedOut to 1 set MS02.battle to 2 set MS02.KilledBefore to 1 endif ;Otherwise if (getStage MS02 > 0) setStage MS02 95 endif if (GetObjectiveDisplayed MS02 70 == 1) SetObjectiveCompleted MS02 70 1 endif if (MechanistREF.IsKiller Player == 1 && MechanistREF.getItemCount MS02SuitMechanist >= 1) player.RemoveFromFaction MS02RobotSidekickFaction setEnemy MS02RobotFaction PlayerFaction setEnemy MS02BattleRobotFaction PlayerFaction endif End
428MegatonClinicPatientSCRIPTSCN MegatonClinicPatientSCRIPT BEGIN OnLoad enable SetUnconscious 1 setav health 10 if ( GetRandomPercent <= 33 ) disable endif END BEGIN OnActivate if ( GetDead == 1 ) || ( Player.IsSneaking == 1 ) activate endif END
429MegatonDialogueScriptSCN MegatonDialogueScript short DoOnce ;***NPC Reaction Variables*** ;These variables are set when various events play out in town short AndyChallengePassed ;Set to 1 when the player has passed Andy Stahl's speech challenge short DocChurchToldPlayer short ChurchDoctrineLearned ;Set to 1 when the player learns about the Church fro Confessor Cromwell short LeoDrugProblemKnown ;Set to 1 when the player learns about Leo Stahl's drug problem short LeoChemVendorActive ;Set to 1 when the player blackmails Leo Stahl to be a Chem dealer short LeoDrugProblemCured ;Set to 1 when the player convinces Leo to give up Chems short GobMean ;Set to 1 if the player is rude to Gob in his initial greeting short GobFriendly ;Set to 1 if the player is polite to Gob in his initial greeting short GobExplainedGhouls short PlayerTalkedToGob ;Set to 1 when the player speaks to Gob short JennyDad ;Set to 1 after the player asks Jenny Stahl about Dad short JerichoFriend ;Set to 1 when the player passes Jericho's speech challenge short JerichoBribed ;Set to 1 when the player buys Jericho a drink short DocChurchFriend ;Set to 1 when the player convinces Doc Church to give up information short MegRadioSignal ;Set to 1 after the scene between Gob and Nova in Moriarty's Saloon short LucasFriend ;LucasFriend 1=Friend, LucasFriend 2=Enemy, LucasFriend 3=Neutral short PlayerToldAboutMoira Short VisitClinic ; Set to 1 when entering clinic for first time. Set to 2 when leaving for first time. ;***Unknown Variables*** ;These weren't put in by me and I'm not 100% sure what they do - EJC short LucasGreet short LucasConvince short Perk ;***NPC Death Variables ;These variables are set to 1 when the associated NPC is killed short AndyStahlDead short BillyCreelDead short ColinMoriartyDead short ConfessorCromwellDead short DocChurchDead short GobDead short JerichoDead short JennyStahlDead short LeoStahlDead short LucasSimmsDead short LucyWestDead short ManyaDead short MoiraDead short MotherMayaDead short NathanDead short NovaDead short StockholmDead short WalterDead ;***Church Donation Variables*** ;Variables to store amount donated to the church for Karma boost short PlayerMadeDonation ;Set to 1 when the player makes a donation, used to activate script below short CurrentAmountDonated ;***Confessor Cromwell Prayer Variables*** ;These variables control Cromwell's prayer, Set in ConfessorCromwellSCRIPT short CromwellMorningPrayer ;Set to 1 at the start of the prayer, reset daily short CromwellEveningPrayer ;Set to 1 at the start of the prayer, reset daily ;***Misc Variables*** ;These variables to not fall into the categories above short MegDailyVariableReset ;Set to 1 to reset the daily variables, set to 0 at 1:00 BEGIN GameMode ;***Daily Reset*** ;This section resets any variables that require resetting each day if ( GetCurrentTime < 1 ) if ( MegDailyVariableReset == 0 ) set MegDailyVariableReset to 1 ;Variable to be reset go here set CromwellMorningPrayer to 0 set CromwellEveningPrayer to 0 set ConfessorCromwellREF.DoOnce to 0 endif elseif MegDailyVariableReset == 1 if ( GetCurrentTime > 1 ) set MegDailyVariableReset to 0 endif endif ;===This section controls ownership of Leo Stahl's containers, allowing him to sell items from one at a time.=== ; if ( Player.GetInCell Megaton == 1 ) ; if ( LeoStahlREF.GetInCell MegatonWaterProcessingPlant == 1 ) ; ;VendorMegatonLeoDrugsREF.SetOwnership LeoStahl ; else ; ;VendorMegatonLeoDrugsREF.ClearOwnership ; endif ; ; if ( LeoStahlREF.GetInCell MegatonTheBrassLantern == 1 ) ; ;VendorMegatonBrassLanternREF.SetOwnership LeoStahl ; else ; ;VendorMegatonBrassLanternREF.ClearOwnership ; endif ; endif if ( GobsSaloonSignREF.GetDisabled == 1 ) if ( ColinMoriartyDead == 1 ) if ( Player.GetInCell Megaton == 1 ) && ( Player.IsInInterior == 1 ) GobsSaloonSignREF.enable endif endif endif If VisitClinic == 0 If Player.GetInCell MegatonClinic == 1 Set VisitClinic to 1 Endif ElseIf VisitClinic == 1 If Player.GetInCell MegatonClinic == 0 Set VisitClinic to 2 Endif EndIf END
430MegatonFFLeakingPipeSCRIPTSCN MegatonFFLeakingPipeSCRIPT ref Leak short Button short Fixed BEGIN OnLoad if ( FreeformMegaton.WalterAskedPlayerForHelp <= 0 ) setDestroyed 1 elseif ( FreeformMegaton.WalterAskedPlayerForHelp == 1 ) setDestroyed 0 endif END BEGIN OnActivate if IsActionRef player == 1 && Fixed == 0 ShowMessage MegatonFFLeakyPipeActiveMessage endif END BEGIN GameMode if ( Fixed == 0 ) set Button to GetButtonPressed if ( Button == 1 ) set Fixed to 1 set FreeformMegaton.PipesRepairedCount to ( FreeformMegaton.PipesRepairedCount + 1 ) showmessage MegatonFFLeakyPipeFixedMessage set Leak to GetLinkedRef Leak.Disable endif endif END
431MegatonGate01Scriptscn MegatonGate01Script short OpenNow short opened short StayOpen BEGIN OnLoad if ( Opened >= 1 ) set StayOpen to 1 endif END BEGIN GameMode if ( OpenNow == 1 ) if opened == 0 set opened to 1 playgroup Forward 5 endif endif ; Check if the gates are done opening, play 2nd "Left" idle state if opened == 1 && isAnimPlaying == 0 playgroup Left 5 set opened to 2 endif if ( StayOpen == 1 ) playgroup Left 5 set StayOpen to 0 endif END
432MegatonGateTriggerSCRIPTscn MegatonGateTriggerSCRIPT ; script to set variable when player is near megaton gate (for deputy weld dialogue) Begin onTriggerEnter Player if ( MegatonGateHouseREF.OpenNow == 0 ) set MegatonGateHouseREF.OpenNow to 1 endif set MegatonGateProtectronREF.playerNear to 1 End Begin onTriggerLeave Player set MegatonGateProtectronREF.playerNear to 0 End
433MegatonGenericAddBrassLanternPasswordscn MegatonGenericAddBrassLanternPassword begin OnActivate if IsActionRef player == 1 AddNote "MegatonGenericBrassLanternPassword" Disable endif end
434MegatonMoriartysFrontDoorSCRIPTSCN MegatonMoriartysFrontDoorSCRIPT BEGIN OnActivate if ( IsActionRef Player == 1 ) if ( GetCurrentTime >= 18 ) && ( GetCurrentTime <= 23 ) MegatonMoriartysCustomer01REF.enable MegatonMoriartysCustomer02REF.enable MegatonMoriartysCustomer03REF.enable activate elseif ( GetCurrentTime >= 0 ) && ( GetCurrentTime <= 3 ) MegatonMoriartysCustomer01REF.enable MegatonMoriartysCustomer02REF.enable MegatonMoriartysCustomer03REF.disable activate else MegatonMoriartysCustomer01REF.enable MegatonMoriartysCustomer02REF.disable MegatonMoriartysCustomer03REF.disable activate endif else activate endif END
435MegatonSettlerSCRIPTscn MegatonSettlerSCRIPT short GiveGift
436MegBrassLanternFrontDoorSCRIPTSCN MegBrassLanternFrontDoorSCRIPT BEGIN OnActivate if ( IsActionRef Player == 1 ) if ( GetCurrentTime >= 12 ) && ( GetCurrentTime <= 22 ) MegatonBrassLanternCustomer01REF.enable MegatonBrassLanternCustomer02REF.enable activate else MegatonBrassLanternCustomer01REF.disable MegatonBrassLanternCustomer02REF.disable activate endif else activate endif END
437MegChurchFrontDoorSCRIPTSCN MegChurchFrontDoorSCRIPT BEGIN OnActivate if ( IsActionRef Player == 1 ) if ( GetCurrentTime >= 6 ) && ( GetCurrentTime <= 18 ) MegatonChildOfAtom03REF.enable MegatonChildOfAtom04REF.enable activate else MegatonChildOfAtom03REF.disable MegatonChildOfAtom04REF.disable activate endif else activate endif END
438MetLightSwitchSCRIPTscn MetLightSwitchSCRIPT ref myLink short state ; 0 == off ; 1 == on short active short animating ;====================================================; begin onActivate if isActionRef player == 1 ; do nothing else set active to 1 endif end ;====================================================; begin gameMode if active == 1 if animating == 0 if state == 0 playgroup forward 1 set animating to 1 else playgroup backward 1 set animating to 1 endif elseif animating == 1 if isAnimPlaying == 1 ; do nothing else set myLink to getLinkedRef if state == 0 myLink.enable set state to 1 set active to 0 set animating to 0 elseif state == 1 myLink.disable set state to 0 set active to 0 set animating to 0 endif endif endif endif end ;====================================================;
439MichaelHawthorneScriptscn MichaelHawthorneScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.MH to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
440MichaelMastersScriptscn MichaelMastersScript short warnPlayer ;variable set by WaringtonStationGuardTriggerScript and used in dialog and packages to warn player when he enters the ghoul section of Warringtonstation short talking float sayTimer Begin GameMode if getTalkedToPC == 0 && warnPlayer == 1 if talking == 0 if sayTimer > 0 set sayTimer to sayTimer - getSecondsPassed else set talking to 1 set sayTimer to 25 say MichaelMastersWarnPlayer endif endif endif if IsInCombat == 1 if GetCombatTarget == player RoyPhillipsRef.addToFaction MS12GhoulsHostileFaction 0 BessieLynnRef.addToFaction MS12GhoulsHostileFaction 0 MichaelMastersRef.addToFaction MS12GhoulsHostileFaction 0 endif endif End Begin OnDeath set MS12.countGhoulsDead to MS12.countGhoulsDead + 1 if MS12.countGhoulsDead >= 3 set MS12.allGhoulsDead to 1 setStage MS12 20 endif if GetStage MS12 >= 250 if MS12.GhoulsOk >= 5 ;spawn his vendor key on his corpse addItem MichaelMastersVendorKey 1 endif endif End Begin SayToDone set talking to 0 set sayTimer to 3 End
441MinefieldSniperCar01ShotSCRIPTscn MinefieldSniperCar01ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MineFieldCar01REF 2 1 1 1 0 ArkansasRef.startcombat player endif end
442MinefieldSniperCar02ShotSCRIPTscn MinefieldSniperCar02ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MineFieldCar02REF 4 1 1 1 0 ArkansasRef.startcombat player endif end
443MinefieldSniperCar03ShotSCRIPTscn MinefieldSniperCar03ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MineFieldCar03REF 2 1 1 1 0 ArkansasRef.startcombat player endif end
444MinefieldSniperMine03ShotSCRIPTscn MinefieldSniperMine03ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MinefieldMine03REF 1 1 1 1 0 endif end
445MinefieldSniperMine04ShotSCRIPTscn MinefieldSniperMine04ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MinefieldMine04REF 1 1 1 1 0 endif end
446MinefieldSniperTire01ShotSCRIPTscn MinefieldSniperTire01ShotSCRIPT begin onTriggerEnter player if ArkansasRef.GetIsCurrentPackage MS13TravelToParadiseFalls == 0 ArkansasRef.useWeapon weapSniperRifle ArkansasShootWestREF MinefieldTire01REF 2 1 1 1 0 endif end
447MisterBurkeScriptscn MisterBurkeScript short Greet ;flag on force greet package short GreetRoof ; flag on hello on roof -- set to 1 when done saying hello Begin OnDeath setStage MSObjectives 11 ;evp Simms if he is on a package to deal with Burke if LucasSimmsRef.getIsCurrentPackage MS11EscortBurke LucasSimmsRef.evp elseif LucasSimmsRef.getIsCurrentPackage MS11SimmsBattle LucasSimmsRef.evp endif setQuestDelay MS11Fin 0 End
448MotherMayaSCRIPTscn MotherMayaSCRIPT BEGIN OnDeath set DialogueMegaton.MotherMayaDead to 1 END
449MQ01AmbushMutantSCRIPTscn MQ01AmbushMutantSCRIPT ; scripted mutant who runs up to checkpoint and has his head blown off by Colvin short turnOn ; set to 1 to turn on his AI and start him running towards checkpoint float timer ; times shooting scene short talking ; used to space out yelling begin OnHit MQ01ColvinRef if turnOn > 0 ; messagebox "Ambush: Hit" kill MQ01ColvinRef ; anything that hits him blows his head off endif end ; advance the scene if it is waiting on my death begin OnDeath MQ01ColvinREF.stoplook if getStageDone MQ01 71 == 1 setstage MQ01 72 ; else ; setstage MQ01 70 ; failsafe to get the checkpoint scene moving endif end begin gamemode if turnOn > 0 if talking == 0 && GetDead == 0 sayTo MQ01ColvinREF Attack set talking to 1 endif if timer > 0 set timer to timer - getSecondsPassed else if turnOn == 2 && GetDead == 0 ; failsafe in case Colvin misses the shot ; messagebox "Ambush failsafe" kill MQ01ColvinRef ; anything that hits him blows his head off set turnOn to 0 endif endif endif end begin SayToDone Attack set talking to 0 end begin OnPackageDone MQ01AmbushMutantToColvin ; if he somehow finishes his package (player waits), make him hostile to BOS setav aggression 4 end
450MQ01BehemothSCRIPTscn MQ01BehemothSCRIPT ; This script handles the boss battle at the end of MQ01 ; featuring a supermutant Behemoth. We're going to: ; + special handle moving buses out of his way ; + special handle his faction ; + stage his entrance depending on circumstances when queued by MQ01ld stage 105 ; + Advance the quest on his death ;VARS=====================================; float timer ; to delay start of action until I've had time to enable short entryStage ; 1 = start idling ; 2 = explode buses ; 3 = start combat short nukeCount ; how many times have I been hit by a fatman? (used to conditionalize dialogue) ;=========================================; ;=========================================; begin onHitWith WeapFatMan set nukeCount to nukeCount + 1 end ;=========================================; begin gameMode if getDisabled == 1 return endif ; delay anything happening until timer has expired if getstage MQ01LD == 105 if timer > 0 set timer to timer - GetSecondsPassed else if entryStage == 0 if IsIdlePlaying == 0 playIdle BMTStretch endif ; move on to next stage after short delay set entryStage to 1 set timer to .2 elseif entryStage == 1 ; start Reddin's death timer set MQ01ReddinRef.die to 1 set MQ01ReddinRef.timer to 1 ; blow up buses GNRbus01.damageObject 2500 GNRbus02.damageObject 2500 ; bit of a delay before everybody starts fighting set entryStage to 2 set timer to 3.5 elseif entryStage == 2 ; make everybody fight setFactionRank superMutantFaction 5 setAV aggression 2 MQ01GNRBoS01.startCombat MQ01BehemothREF MQ01GNRBoS02.startCombat MQ01BehemothREF MQ01GNRBoS03.startCombat MQ01BehemothREF MQ01GNRBoS04.startCombat MQ01BehemothREF ; all done set entryStage to 3 setstage MQ01 106 endif endif endif end ;=========================================; begin onDeath setStage MQ01LD 110 ; copied from BehemothAchievementSCRIPT set BehemothsKilled to BehemothsKilled + 1 if BehemothsKilled >= BehemothsMax AddAchievement 48 endif end
451MQ01BehemothWeaponSCRIPTscn MQ01BehemothWeaponSCRIPT ref Target BEGIN ScriptEffectStart set Target to GetSelf if target != player MQ01BehemothREF.pushActorAway Target 10 endif END
452MQ01cityAmbushFailsafeSCRIPTscn MQ01cityAmbushFailsafeSCRIPT ; This trigger lives in DCworld01 and is used to ; make sure Brotherhood joins battle before player sees them begin onTriggerEnter player if getstage MQ01LD < 50 if GetStage MQ05 < 80 ; MQ01 is disabled at this stage setstage MQ01LD 50 endif endif end
453MQ01cityAmbushSCRIPTscn MQ01cityAmbushSCRIPT ; This trigger lives in DCworld01 and is used to ; trigger a staged battle between Lyon's Pride and mutants ; NPC pacakges are conditionalized by this quest stage (50) short triggerStage ; 0 = untriggered, 1 = running timer, 2 = done float timer begin onTriggerEnter player if GetStage MQ05 < 80 ; MQ01 is disabled at this stage if triggerStage == 0 ;later, add conditions for pre-quest ;actually, that may be handled by an enable parent... setstage MQ01LD 45 set triggerStage to 1 set timer to 5 endif endif end begin gamemode ; run timer to give mutants time to attack player before Brotherhood shows up if triggerStage == 1 if timer > 0 set timer to timer - GetSecondsPassed else if GetStage MQ05 < 80 ; MQ01 is disabled at this stage setStage MQ01LD 50 endif set triggerStage to 2 endif endif end
454MQ01cityMutant0102SCRIPTscn MQ01cityMutant0102SCRIPT ; This Script resides on combat mutants in the DCworld01 area during MQ01 ; The first body count applies to mutants in the basement area (ChevyChaseOrigin) ; While the second applies to mutants in the school. The MQ01ld quest vars ; control flow and handling. begin onDeath if getStageDone MQ01LD 55 == 0 set MQ01LD.bodyCount01 to (MQ01LD.bodyCount01 + 1) if MQ01LD.bodyCount01 >= 2 setstage MQ01LD 55 endif elseif getStageDone MQ01LD 90 == 0 set MQ01LD.bodyCount02 to (MQ01LD.bodyCount02 + 1) if MQ01LD.bodyCount02 >= 6 setstage MQ01LD 90 endif endif end
455MQ01CorpseWithFatmanSCRIPTscn MQ01CorpseWithFatmanSCRIPT short doOnce begin gamemode if doOnce == 0 if getItemCount WeapFatman == 0 set doOnce to 1 set MQ01.gotFatman to 1 ; complete objective if currently displayed if GetObjectiveDisplayed MQ01 60 == 1 SetObjectiveCompleted MQ01 60 1 ; if behemoth still alive, give new objective if MQ01BehemothREF.getDead == 0 setObjectiveDisplayed MQ01 65 1 endif endif endif endif end
456MQ01GNNExplosions01SCRIPTscn MQ01GNNExplosions01SCRIPT ; This trigger is doing heavy lifting ; a. Add factions to all the GNR battle NPCs to begin combat ; b. Increment MQ01LD stage to move Lyons' Pride to the GNR battle ; c. Initiate a little cinematic pair of explosions ;============================= short doOnce ;============================= ;============================= begin onTriggerEnter player if doOnce != 1 if GetStage MQ05 < 80 ; MQ01 is disabled at this stage ; Increment Stage to move NPCs into position setStage MQ01LD 92 ; failsafe -- skip schoolhouse planning scene setstage MQ01 82 ; and prevent myself from re-triggering set doOnce to 1 endif endif end
457MQ01GNRmutantSCRIPTscn MQ01GNRmutantSCRIPT ; When I die, increment quest var and check against itself to see if we're all dead begin onDeath set MQ01LD.GNRbodyCount to (MQ01LD.GNRbodyCount + 1) if MQ01LD.GNRbodyCount >= 4 ; when all of us are dead: setstage MQ01 100 ; hand control to MQ01 for the pre Behemoth Battle scene endif end
458MQ01LDscriptscn MQ01LDscript short bodyCount01 ; tracks when mutant 01 & 02 are both dead in basement battle short bodyCount02 ; tracks when schoolhouse mutants are all dead short GNRbodyCount ; tracks mutant deaths at the GNR battle short bossSetupFlag ; we'll flip this on in a stage result (105) to keep our gameMode block ; from doing a more expensive check ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;begin gameMode ; if bossSetupFlag == 1 ; if player.getDistance MQ01GNRarenaTestMarker <= 2048 ; is the player in the arena? ; if GNRExplodingVehicle.getav health > 0 && GNRExplodingVehicle02.getav health >0 ; ;do stuff in this case ; endif ; endif ; endif ;end
459MQ01LDStageTrig65SCRIPTscn MQ01LDStageTrig65SCRIPT short playerTriggered ; set to 1 when player triggers short sarahTriggered ; set to 1 when Sarah triggers ; Script shared between Kurt and Joel used to trigger a cinemat of Colvin ; faking combat at the checkpoint based on proximity to the player ; as well as Sarah (MQ01SarahREF) NPC begin onTriggerEnter if GetStage MQ05 < 80 ; MQ01 is disabled at this stage if isActionRef player == 1 && playerTriggered == 0 set playerTriggered to 1 ; trigger Colvin shooting mutant scene set MQ01AmbushMutantREF.turnOn to 1 set MQ01AmbushMutantREF.timer to 6 ; MQ01AmbushMutantREF.setActorsAI 1 MQ01AmbushMutantREF.evp MQ01ColvinREF.look MQ01AmbushMutantREF ; set stage 60 in case player ran past Sarah setstage MQ01 60 endif if getstage MQ01 >= 60 if isActionRef MQ01SarahRef == 1 && sarahTriggered == 0 ; messagebox "Sarah triggering checkpoint trigger box" set sarahTriggered to 1 endif if getStageDone MQ01LD 65 == 0 if playerTriggered == 1 && sarahTriggered == 1 setStage MQ01LD 65 MQ01ColvinREF.evp ; adding this line to get Colvin to stop shooting on cue (joel b) endif endif endif endif end
460MQ01LDStageTrig71SCRIPTscn MQ01LDStageTrig71SCRIPT ; simple stage trigger - passes school mutant packages for combat ; triggered by proxTrig on player or any Lyon's Pride NPC ref trigActor short shoot begin OnTriggerEnter MQ01AmbushMutantREF if shoot == 0 set shoot to 1 MQ01ColvinRef.UseWeapon WeapLaserRifle MQ01ColvinRef MQ01AmbushMutantREF 1 0 0 1 set MQ01AmbushMutantREF.turnOn to 2 set MQ01AmbushMutantREF.timer to .5 endif end begin onTriggerEnter if GetStage MQ05 < 80 ; MQ01 is disabled at this stage if getStageDone MQ01LD 71 == 0 set trigActor to getActionRef if isActionREF player ==1 || trigActor.getInFaction LyonsPrideFaction == 1 setStage MQ01LD 71 endif endif endif end
461MQ01LDStageTrig75SCRIPTscn MQ01LDStageTrig75SCRIPT ; simple script/trigger to set stage 75 in MQ01LD ; based on proxTrig to player of Lyon's Pride NPCs short doOnce ref trigActor begin onTriggerEnter set trigActor to getActionRef if getStageDone MQ01LD 75 == 0 && DoOnce != 1 if GetStage MQ05 < 80 ; MQ01 is disabled at this stage if isActionREF player ==1 || trigActor.getInFaction LyonsPrideFaction == 1 setStage MQ01ld 75 set doOnce to 1 endif endif endif end
462MQ01PaladinColvinScriptscn MQ01PaladinColvinScript ; when done talking, set MQ01 variable to tell anyone else they can talk now begin SayToDone MQ01LyonsPrideColvin set MQ01.talking to 0 end ; advance scene when Colvin reaches location begin OnPackageDone MQ01ColvinAdvanceFromCheckpoint setstage MQ01 75 end ; advance scene when Colvin reaches location begin OnPackageDone MQ01GoToSchoolhouseColvin2 setstage MQ01 84 end
463MQ01PaladinVargasScriptscn MQ01PaladinVargasScript short MQ11VargasTravel ;var used to track location and update packages at start of MQ11 ; see MQ01Script for explanation of variables begin gamemode ;----------MQ11 Scripting------------- ;update MQ11VargasTravel when he reaches the Bailey if ( GetStage MQ11 == 30 ) if ( MQ11VargasTravel == 0 ) if ( GetDistance MQ11SarahBaileyMarker < 512 ) Set MQ11VargasTravel to 1 EVP endif endif endif ;update MQ11.LDSequenceStart when he's near to Prime's starting location if ( GetStage MQ11 == 30 ) if ( MQ11.LDSequenceStart == 0 ) if ( GetDistance MQ11LDPrimeREFmarker < 700 ) set MQ11.LDSequenceStart to 1 endif endif endif end ; when done talking, set variable to tell anyone else they can talk now begin SayToDone MQ01LyonsPrideVargas set MQ01.talking to 0 end ; advance scene when Vargas reaches his location begin OnPackageDone MQ01GoToSchoolHouseVargas3 setstage MQ01 88 end ; advance post-behemoth scene when Vargas sits in chair begin OnPackageDone MQ01VargasGNRSit setstage MQ01 142 end
464MQ01RedshirtSCRIPTscn MQ01RedshirtSCRIPT short talk ; set to 1 to start talking float timer ; used for custom dialogue short die ; set to start death timer begin gamemode ; looping speech for specific points in MQ01 scenes if talk == 1 if timer > 0 set timer to timer - GetSecondsPassed else Say MQ01LyonsPrideReddinSolo set talk to 2 endif endif ; timed death when told to die by MQ01 (behemoth entry scene) if die > 0 if timer > 0 set timer to timer - GetSecondsPassed if timer < .6 && die == 1 MQ01BehemothREF.pushactoraway MQ01ReddinRef 20 set die to 2 endif elseif IsEssential == 0 kill set die to -1 endif endif end ; when done talking, set variable to tell anyone else they can talk now begin SayToDone MQ01LyonsPrideReddin set MQ01.talking to 0 end ; different topic callback for her "solo" dialogue begin SayToDone MQ01LyonsPrideReddinSolo set talk to 0 end begin OnPackageStart MQ01ReddinSceneA2 UseWeapon WeapAssaultRifle MQ01ReddinRef MQ01CitySuperMutant01REF 5 0 0 0 end ; when Reddin starts patrol, trigger behemoth entry begin OnPackageDone MQ01ReddinDeathPatrol setstage MQ01 104 end begin OnHit MQ01BehemothRef ; go flying when hit by Behemoth MQ01BehemothRef.pushActorAway MQ01ReddinRef 20 ; then die, tragically set die to 1 set timer to 1 end
465MQ01SarahLyonsSCRIPTscn MQ01SarahLyonsSCRIPT ;; // ===============================================================// short MQ11SarahTravel ;flag set for updating packages as Sarah paths out to the exterior short MQ11Follow ;var set based on whether Sarah is following the player during MQ11 short AirlockTalk ;var set to have Sarah say lines to the player if the Airlock isn't opened short AirlockTimer ;timer used for spacing out lines about the airlock short AirlockActivate ;flag set when Sarah activates the airlock for the player short MQ11PanelAnimate ;flag set when Sarah activates the control panel, used for juggling animations short HelmetGone ;flag set when player loads into Citadel Lab in MQ09 Short MQ11AirlockGo ;flag set when Sarah is in position for activating panel short MQ11AirlockEVP ;flag set when telling Sarah to update packages short MQ11Forcegreet ;flag set when Autumn is dead or has left the Rotunda float MQ11GreetTimer ;timer used for delaying forcegreet in Rotunda ;; // ===============================================================// ;prevent player from talking to Sarah during Elder Lyons' speech in MQ11 ;and also during her briefing at stage 10 Begin OnActivate if ( GetStage MQ11 == 1 ) Return elseif ( MQ11.SarahSpeech >= 1 ) if ( MQ01SarahRef.GetCurrentAIProcedure == 4 ) return else Activate endif elseif ( MQ11.IntConvInit == 1 ) return elseif ( MQ11.IntConvInit == -1 ) if ( MQ01SarahRef.GetCurrentAiProcedure == 4 ) return else Activate endif else Activate endif if ( ElderLyonsRef.NoActivate == 1 ) Return else Activate endif End begin gamemode ; // MQ11 Scripting Stuff =====// ;Pull Sarah's helmet if ( GetStage MQ09 == 60 ) if ( GetInSameCell Player == 1 ) if ( HelmetGone == 0 ) RemoveItem ArmorReconHelmet 1 set HelmetGone to 1 endif endif endif ;When Autumn is dead, or has left, pause for a moment before re-evaluating packages if ( GetStage MQ11 >= 40 ) if ( MQ11Forcegreet == 0 ) if ( MQ11.AutumnDead >= 3 ) set MQ11ForceGreet to 1 set MQ11GreetTimer to 3 elseif ( MQ11.AutumnLeave >= 1 ) set MQ11Forcegreet to 1 set MQ11GreetTimer to 3 endif elseif ( MQ11ForceGreet == 1 ) if ( MQ11GreetTimer <= 0 ) Set MQ11ForceGreet to 2 MQ01SarahRef.EVP else set MQ11GreetTimer to ( MQ11GreetTimer - GetSecondsPassed ) endif endif endif ;Check for distance from airlock wait marker before allowing Sarah to activate panel ;used to make sure she doesn't start Activate package early if ( GetStage MQ11 >= 50 ) if ( MQ11AirlockGo == 0 ) if ( GetDistance MQ11AirlockWaitMarker <= 150 ) Set MQ11AirlockGo to 1 MQ01SarahRef.EVP endif endif endif ;When Sarah's done with the keypad animation, update the variable for panel activation so she'll run her death anim if ( MQ11PanelAnimate == 1 ) if IsIdlePlaying == 0 set MQ11PanelAnimate to 2 set PPurityKeypadEnterRef.PanelActivated to 2 endif endif ;Have Sarah fire off a line to Rothchild when she's done with her speech if ( MQ11.SarahPrimeLine == 0 ) if ( MQ11.SarahSpeech >= 9 ) if ( GetCurrentAIProcedure != 4 ) set MQ11.SarahPrimeLine to 1 MQ01SarahRef.SayTo ScribeRothchildRef MQ11SarahActivatePrimeLine endif endif endif ;update MQ11SarahTravel when Sarah reaches the Bailey Marker if ( MQ11SarahTravel == 0 ) if ( GetStage MQ11 == 30 ) if ( GetDistance MQ11SarahBaileyMarker < 400 ) set MQ11SarahTravel to 1 EVP endif endif endif ;update MQ11SarahTravel again when she reaches the exterior marker if ( MQ11SarahTravel == 1 ) if ( GetStage MQ11 == 30 ) if ( GetDistance MQ11SarahExitCitadelMarker <= 512 ) if ( Player.GetDistance MQ11SarahExitCitadelMarker <= 512 ) Set MQ11SarahTravel to 2 Set MQ11Follow to 1 endif endif endif endif ;Run lines when waiting for the player to open the airlock. if ( MQ11.Code == 2 ) if ( PPBulkhead01Ref.GetOpenState == 0 ) if ( MQ01SarahRef.GetDistance MQ11AirlockWaitMarker < 100 ) if ( AirlockTimer <= 0 ) if ( AirlockTalk == 0 ) SayTo Player MQ11SarahAirlockLines set AirlockTalk to 1 endif else set AirlockTimer to ( AirlockTimer - GetSecondsPassed ) endif endif endif endif ;If player is putting in the code, activate the airlock when she's close enough to the button and the player is inside the airlock if ( MQ11.Code == 1 ) if ( AirlockActivate == 0 ) if ( MQ01SarahRef.GetDistance MQ11SarahAirlockButtonMarker < 50 ) if ( Player.GetDistance MQ11AirlockWaitMarker < 150 ) ; MQ11AirlockControlRef.Activate MQ01SarahRef If ( PPBulkhead02Ref.GetOpenState == 1 ) set MQ11AirlockControlRef.OpenState to 1 set MQ11AirlockControlRef.SarahOpened to 1 set AirlockActivate to 1 endif endif endif endif endif end ;; // ===============================================================// ; when done talking, set variable to tell anyone else they can talk now begin SayToDone MQ01LyonsPrideSarah set MQ01.talking to 0 end ;; // ===============================================================// ; this package only completes when Vargas is seated and Sarah is nearby begin OnPackageDone MQ01SarahGNRToVargas2 setstage MQ01 143 end Begin SayToDone MQ09ElderSarahConv if ( ElderLyonsRef.ConvFlag == 1 ) set ElderLyonsRef.ConvFlag to 2 ElderLyonsRef.SayTo MQ01SarahRef MQ09ElderSarahConv endif if ( ElderLyonsRef.ConvFlag == 3 ) set ElderLyonsRef.ConvFlag to 4 ElderLyonsRef.SayTo MQ01SarahRef MQ09ElderSarahConv endif if ( ElderLyonsRef.ConvFlag == 6 ) set ElderLyonsRef.ConvFlag to 7 ElderLyonsRef.SayTo MQ01SarahRef MQ09ElderSarahConv endif if ( ElderLyonsRef.ConvFlag == 8 ) Set ElderLyonsRef.NoActivate to 0 set ElderLyonsRef.ConvFlag to -1 endif End Begin SayToDone MQ11ElderSarahConv if ( ElderLyonsRef.ConvFlag2 == 1 ) set ElderLyonsRef.ConvFlag2 to 2 ElderLyonsRef.SayTo MQ01SarahRef MQ11ElderSarahConv endif if ( ElderLyonsRef.ConvFlag2 == 3 ) set ElderLyonsRef.ConvFlag2 to 4 ElderLyonsRef.SayTo MQ01SarahRef MQ11ElderSarahConv endif if ( ElderLyonsRef.ConvFlag2 == 11 ) Set ElderLyonsRef.NoActivate to 0 set ElderLyonsRef.ConvFlag2 to -1 MQ01SarahRef.EVP endif End Begin SayToDone MQ11SarahActivatePrimeLine set MQ11.PrimeActivate to 1 End Begin SayToDone MQ11SarahAirlockLines Set AirlockTimer to 15 End ;---------------------------------
466MQ01StageTrig81SCRIPTscn MQ01StageTrig81SCRIPT short playerTriggered ; set to 1 when player triggers short sarahTriggered ; set to 1 when Sarah triggers ; triggers MQ01 schoolhouse scene when: ; a) MQ01 80 is done (mutants are dead) ; b) Sarah and player are in position begin onTriggerEnter if isActionRef player == 1 && playerTriggered == 0 set playerTriggered to 1 endif if isActionRef MQ01SarahRef == 1 && sarahTriggered == 0 set sarahTriggered to 1 endif end begin gamemode if GetStage MQ05 < 80 ; MQ01 is disabled at this stage if getStageDone MQ01 80 == 1 && getStageDone MQ01 81 == 0 if playerTriggered == 1 && sarahTriggered == 1 if player.getdistance MQ01SarahRef < 650 && MQ01SarahRef.getdistance MQ01SchoolSplitMarker < 650 setStage MQ01 81 endif endif endif endif end
467MQ02ElevatorControlTopOutsideScriptscn MQ02ElevatorControlTopOutsideScript begin OnActivate if IsActionRef player == 1 PlaySound AMBElevatorBell Player.Moveto MQ02ElevatorEntrance endif end
468MQ02GNRBackDoorScriptscn MQ02GNRBackDoorScript ;This prevents access to GNR through the "Backdoor" from the outside to keep the Waypoint System working and push the Player along begin OnActivate if IsActionRef player == 1 ShowMessage MQ02GNRBackdoorMessage endif end
469MQ02MuseumPlanetariumExitDoorSCRIPTscn MQ02MuseumPlanetariumExitDoorSCRIPT ; this is just the Planetarium's Exit Door that, if locked, has a script to tell the player that a show is in progress begin onActivate ;if MuseumTech03to01REF.GetLocked==0 ;Activate ;elseif (isActionRef player) ;messagebox "Show in Progress, Please Take Your Seats. Thank You." ; ShowMessage MQ02MuseumPlanetariumDoorMsg ;endif end
470MQ02MuseumPlanetariumTrigger01Scriptscn MQ02MuseumPlanetariumTrigger01Script ;This script activates the Planetarium lights and enables the Super Mutant near the exit. short DoOnce ;1 = makes sure trigger script runs through only one time begin onTriggerEnter Player if ( DoOnce == 0 ) MQ02PlanetariumMutant01REF.enable set MQ02.Planetarium to 1 Set DoOnce to 1 endif end
471MQ02MuseumPlaqueArms01Scriptscn MQ02MuseumPlaqueArms01Script begin OnActivate ShowMessage MQ02MuseumPlaqueArmsMessage01 end
472MQ02MuseumPlaqueArms02Scriptscn MQ02MuseumPlaqueArms02Script begin OnActivate ShowMessage MQ02MuseumPlaqueArmsMessage02 end
473MQ02MuseumPlaqueArms03Scriptscn MQ02MuseumPlaqueArms03Script begin OnActivate ShowMessage MQ02MuseumPlaqueArmsMessage03 end
474MQ02MuseumPlaqueFlag01Scriptscn MQ02MuseumPlaqueFlag01Script begin OnActivate ShowMessage MQ02MuseumPlaqueFlagMessage01 end
475MQ02MuseumPlaqueFlag02Scriptscn MQ02MuseumPlaqueFlag02Script begin OnActivate ShowMessage MQ02MuseumPlaqueFlagMessage02 end
476MQ02MuseumPlaqueMedals01Scriptscn MQ02MuseumPlaqueMedals01Script begin OnActivate ShowMessage MQ02MuseumPlaqueMedalsMessage01 end
477MQ02MuseumPlaquePortraits01Scriptscn MQ02MuseumPlaquePortraits01Script begin OnActivate ShowMessage MQ02MuseumPlaquePortraitsMessage01 end
478MQ02MuseumPlaqueRenovationScriptscn MQ02MuseumPlaqueRenovationScript begin OnActivate ShowMessage MQ02MuseumPlaqueRenovationMessage01 end
479MQ02MuseumPlaqueRocket01Scriptscn MQ02MuseumPlaqueRocket01Script begin OnActivate ShowMessage MQ02MuseumPlaqueRocketMessage01 end
480MQ02MuseumPlaqueSkeleton01Scriptscn MQ02MuseumPlaqueSkeleton01Script begin OnActivate ShowMessage MQ02MuseumPlaqueSkeletonMessage01 end
481MQ02MuseumPlaqueSSuit01Scriptscn MQ02MuseumPlaqueSSuit01Script begin OnActivate ShowMessage MQ02MuseumPlaqueSSuitMessage01 end
482MQ02MuseumPlaqueStealth01Scriptscn MQ02MuseumPlaqueStealth01Script begin OnActivate ShowMessage MQ02MuseumPlaqueStealthBoyMessage end
483MQ02MuseumPlaqueVertibird01Scriptscn MQ02MuseumPlaqueVertibird01Script begin OnActivate ShowMessage MQ02MuseumPlaqueVertibirdMessage01 end
484MQ02MuseumPlaqueVirgoII01Scriptscn MQ02MuseumPlaqueVirgoII01Script begin OnActivate ShowMessage MQ02MuseumPlaqueVirgoIIMessage01 end
485MQ02MuseumPlaqueWright01Scriptscn MQ02MuseumPlaqueWright01Script begin OnActivate ShowMessage MQ02MuseumPlaqueWrightMessage end
486MQ02MuseumVaultTourTrigger01Scriptscn MQ02MuseumVaultTourTrigger01Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played begin onTriggerEnter Player if ( DoOnce == 0 ) MuseumTech01LightsEnabler01REF.enable playsound OBJSwitchLights2D MuseumTechTourTalker01REF.Say MQ02MuseumVault01 Set MQ02Tour10.Reset to 0 Set DoOnce to 1 endif end
487MQ02MuseumVaultTourTrigger02Scriptscn MQ02MuseumVaultTourTrigger02Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played begin onTriggerEnter Player if ( DoOnce == 0 ) MuseumTech01LightsEnabler02REF.enable playsound OBJSwitchLights2D MuseumTechTourTalker02REF.Say MQ02MuseumVault02 Set MQ02Tour10.Reset to 0 Set DoOnce to 1 endif end
488MQ02MuseumVaultTourTrigger03Scriptscn MQ02MuseumVaultTourTrigger03Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines float Timer ;This ensures none of the lines overlap each other, as it is used to measure the time it takes for a line to complete begin onTriggerEnter Player if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached Set Timer to 10 Set DoOnce to 1 MuseumTourKlaxonSoundREF.enable MuseumTech02Klaxon01REF.playgroup Left 1 ;Makes the Klaxon light up and start spinning MuseumTech02Klaxon02REF.playgroup Left 1 ;Makes the Klaxon light up and start spinning MuseumTech02KlaxonLight01REF.playgroup Left 1 ;Klaxon Light Glow MuseumTech02KlaxonLight02REF.playgroup Left 1 ;Klaxon Light Glow endif end begin gamemode if Timer > 0 set Timer to Timer - GetSecondsPassed elseif Talk > 0 ;Waiting for the flag above in the OnTrigger block if ( Talk == 1 ) MuseumTechTourTalker03REF.Say MQ02MuseumVault03 Set Talk to 2 elseif ( Talk == 2 ) MuseumTourKlaxonSoundREF.disable MuseumTech02Klaxon01REF.playgroup Backward 1 MuseumTech02Klaxon02REF.playgroup Backward 1 MuseumTech02KlaxonLight01REF.playgroup Backward 1 ;Klaxon Light Glow MuseumTech02KlaxonLight02REF.playgroup Backward 1 ;Klaxon Light Glow Set Talk to 3 Set Timer to 1 ;1 seconds after klaxon lights turn off I want to turn on the ambient lighting elseif ( Talk == 3 ) playsound OBJSwitchLights2D MuseumTech01LightsEnabler03REF.enable ;Turns on ambient lighting set Talk to 0 ; all done endif endif end
489MQ02MuseumVaultTourTrigger04Scriptscn MQ02MuseumVaultTourTrigger04Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines float Timer begin onTriggerEnter Player if IsActionRef player == 1 if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached playsound OBJSwitchLights2D MuseumTech01LightsEnabler04aREF.enable Set Timer to 1 Set DoOnce to 1 endif endif end begin gamemode if Timer > 0 set Timer to Timer - GetSecondsPassed elseif Talk > 0 ;Waiting for the flag above in the OnTrigger block if ( Talk == 1 ) MuseumTechTourTalker04REF.Say MQ02MuseumVault04 Set Talk to 2 elseif ( Talk == 2 ) MuseumTech01LightsEnabler04bREF.enable playsound OBJSwitchLights2D set Talk to 3 Set Timer to 1 elseif ( Talk == 3 ) MuseumTech01LightsEnabler04cREF.enable playsound OBJSwitchLights2D set Talk to 4 Set Timer to 1 elseif ( Talk == 4 ) MuseumTech01LightsEnabler04dREF.enable playsound OBJSwitchLights2D set Talk to 0 endif endif end
490MQ02MuseumVaultTourTrigger05Scriptscn MQ02MuseumVaultTourTrigger05Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines Begin onActivate if IsActionRef player == 1 if ( DoOnce == 0 ) activate MuseumTech01Display01EnablerREF.enable 0 ;Turn on the display light MuseumTechTourTalker05REF.Say MQ02MuseumVault05 Set DoOnce to 1 endif endif End
491MQ02MuseumVaultTourTrigger06Scriptscn MQ02MuseumVaultTourTrigger06Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played begin onActivate if IsActionRef player == 1 if ( DoOnce == 0 ) activate MuseumTech01Display02EnablerREF.enable 0 ;Turn on the display light MuseumTechTourTalker06REF.Say MQ02MuseumVault06 1 Set DoOnce to 1 endif endif end
492MQ02MuseumVaultTourTrigger07Scriptscn MQ02MuseumVaultTourTrigger07Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played begin onActivate if IsActionRef player == 1 if ( DoOnce == 0 ) activate MuseumTech01Display03EnablerREF.enable 0 ;Turn on the display light MuseumTechTourTalker07REF.Say MQ02MuseumVault07 Set DoOnce to 1 endif endif end
493MQ02MuseumVaultTourTrigger08Scriptscn MQ02MuseumVaultTourTrigger08Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines begin onTriggerEnter Player if IsActionRef player == 1 if ( DoOnce == 0 ) MuseumTechTourTalker08REF.Say MQ02MuseumVault08 Set Talk to 2 Set DoOnce to 1 endif endif end
494MQ02MuseumVaultTourTrigger09Scriptscn MQ02MuseumVaultTourTrigger09Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines begin onTriggerEnter Player if ( DoOnce == 0 ) MuseumTechTourTalker09REF.Say MQ02MuseumVault09 Set Talk to 2 Set DoOnce to 1 endif end
495MQ02MuseumVaultTourTrigger10Scriptscn MQ02MuseumVaultTourTrigger10Script ;This script is designed to control the tour the player takes through the mini-vault in the Museum of Technology ;As the pass through each trigger, it reads a single line and then sets the next one ready. short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines short Reset ;This variable tells the entire array its done when set to 1 begin onTriggerEnter Player if DoOnce == 0 MuseumTechTourTalker10REF.Say MQ02MuseumVault10 set DoOnce to 1 endif end begin gamemode if DoOnce == 1 && Reset == 0 Set Reset to 1 ;Flag array as reset Set DoOnce to 0 Set MQ02Tour03.Talk to 0 Set MQ02Tour04.Talk to 0 Set MQ02Tour08.Talk to 0 Set MQ02Tour09.Talk to 0 Set MQ02Tour10.Talk to 0 Set MQ02Tour01.DoOnce to 0 ;Reset Talk flag in each trigger zone to 0 Set MQ02Tour02.DoOnce to 0 Set MQ02Tour03.DoOnce to 0 Set MQ02Tour04.DoOnce to 0 Set MQ02Tour05DisplayButton.DoOnce to 0 Set MQ02Tour06DisplayButton.DoOnce to 0 Set MQ02Tour07DisplayButton.DoOnce to 0 Set MQ02Tour08.DoOnce to 0 Set MQ02Tour09.DoOnce to 0 MuseumTech01LightsEnabler01REF.disable MuseumTech01LightsEnabler02REF.disable MuseumTech01LightsEnabler03REF.disable MuseumTech01LightsEnabler04aREF.disable MuseumTech01LightsEnabler04bREF.disable MuseumTech01LightsEnabler04cREF.disable MuseumTech01LightsEnabler04dREF.disable endif end
496MQ02PrimeScriptscn MQ02PrimeScript short Kaboom begin OnLoad if ( Kaboom == 0 ) MQ02PrimeRef.Kill MQ02PrimeRef 1 MQ02PrimeRef.Kill MQ02PrimeRef 3 MQ02PrimeRef.Kill MQ02PrimeRef 5 MQ02PrimeRef.Kill MQ02PrimeRef 7 MQ02PrimeRef.Kill MQ02PrimeRef 9 Set Kaboom to 1 endif end
497MQ02QuestScriptscn MQ02QuestScript short DoOnce ;A simple DoOnce variable short DoOnce1 ;A simple DoOnce variable short Planetarium ;When set to 1, the Planetarium show is "in progress" ;short Talk ;Helps the Planetarium vocals step through properly short Virus ;1= Infection removed from computer short Waypoint ;1= Switch the GNR to Museum of Tech waypoint on door activation short DishMaint ;1= Player had Dish, then spoke to Three Dog (to update Objectives, etc.) ;float TalkTimer ;Used to measure the length of a given dialog line begin gamemode ;This block sets the stage when the player arrives at the Museum if ( GetStage MQ02 >= 10 ) if ( Player.GetDistance MQ02MuseumMarker < 400 ) if ( DoOnce == 0 ) SetStage MQ02 20 Set DoOnce to 1 endif endif endif ;This block sets the stage when the player arrives at the WashingtonMonument if ( GetStage MQ02 >= 30 ) if ( Player.GetInCell WashingtonMonument01 == 1 ) if ( DoOnce1 == 0 ) SetStage MQ02 40 Set DoOnce1 to 1 endif endif endif ;This block handles the Player already having the Dish and THEN getting the quest from Three Dog if ( DishMaint == 0 ) if ( MQ02DishRef. HaveDish == 1 ) if ( GetStage MQ02 == 10 ) SetObjectiveCompleted MQ02 10 1 SetStage MQ02 30 set DishMaint to 1 endif endif endif ;This block handles the Planetarium Speech in the Tech Museum ; if ( Planetarium == 1 ) ;Check for flag ; if ( Talk == 0 ) && ( TalkTimer <= 0 ) ; Set TalkTimer to MQ02VoxPlanetRef.Say MQ02Planetarium01 ;Set the length of the dialog lines to length of actual line by measure ; MQ02VoxPlanetRef.Say MQ02Planetarium01 1 MQ02PlanetariumVoice 1 ;Talkbox says lines in Planetarium NPC Voice ; Set Talk to 1 ; elseif ( Talk == 1 ) && ( TalkTimer <= 0 ) ; Set TalkTimer to MQ02VoxPlanetRef.Say MQ02Planetarium02 ;" ; MQ02VoxPlanetRef.Say MQ02Planetarium02 1 MQ02PlanetariumVoice 1 ;" ; Set Talk to 2 ; elseif ( Talk == 2 ) && ( TalkTimer <= 0 ) ; Set TalkTimer to MQ02VoxPlanetRef.Say MQ02Planetarium03 ;" ; MQ02VoxPlanetRef.Say MQ02Planetarium03 1 MQ02PlanetariumVoice 1 ;" ; Set Talk to 0 ; endif ; endif ; if ( Talk > 0 ) && ( Talk < 3 ) ;This block actually counts down the timer when measuring line lengths (above) ; Set TalkTimer to TalkTimer - GetSecondsPassed ; endIf end
498MQ02RelayBeforeScriptscn MQ02RelayBeforeScript ;This does a whole mess of stuff after the Player brings the Virgo II dish from the Museum of Tech to the Relay ;The dish is remvoved from Player's inventory and added to the Relay ;The Relay and Control Panel plays an animation ;GNR instantly widens its broadcast diameter short Button short GoRelay begin OnActivate if ( RadioGalaxyNewsQuest.ThreeDogDead == 0 ) if ( GoRelay < 2 ) ShowMessage MQ02RelayBeforeMessage Set GoRelay to 1 elseif ( GoRelay == 2 ) ShowMessage MQ02RelayAfterMessage endif elseif ( RadioGalaxyNewsQuest.ThreeDogDead == 1 ) ;do nothing endif end begin gamemode Set Button to GetButtonPressed if ( Button == 0 ) && ( GoRelay == 1 ) Playsound QSTRelayFix Player.RemoveItem MQ02VirgoIIDish 1 MQ02DishDoneRef.Enable RadioGalaxyNewsRef02.Enable PipboyRadio tune RadioGalaxyNewsRef02 RadioGalaxyNewsRef01.Disable RadioGalaxyNewsRef02.StartRadioConversation RewardKarma 200 set GNRDishDone to 1 SetStage MQ02 50 MQ02RelayWithoutDish.playgroup backward 1 MonumentOsc.playgroup forward 1 Set GoRelay to 2 endif end
499MQ02VirgoIIDishScriptscn MQ02VirgoIIDishScript short Button ;1= Button Press short HaveDish ;1= Got the Dish ;This script handles removing the Virgo Communications Disk from the Lunar Lander begin OnActivate if ( RadioGalaxyNewsQuest.ThreeDogDead == 0 ) ShowMessage MQ02DishMessage elseif ( RadioGalaxyNewsQuest.ThreeDogDead == 1 ) ;do nothing endif end begin gamemode Set Button to GetButtonPressed if ( Button == 0 ) && ( HaveDish == 0 ) if ( GetQuestRunning MQ02 == 1 ) && ( RadioGalaxyNewsQuest.ThreeDogDead == 0 ) Disable Player.AddItem MQ02VirgoIIDish 1 SetStage MQ02 30 Set HaveDish to 1 elseif ( GetQuestRunning MQ02 == 0 ) && ( RadioGalaxyNewsQuest.ThreeDogDead == 0 ) Disable Player.AddItem MQ02VirgoIIDish 1 Set HaveDish to 1 elseif ( GetQuestRunning MQ02 == 0 ) && ( RadioGalaxyNewsQuest.ThreeDogDead == 1 ) ; do nothing endif elseif ( Button == 1 ) && ( HaveDish == 0 ) ;do nothing endif end
500MQ02WashingtonMonumentOuterDoorScriptscn MQ02WashingtonMonumentOuterDoorScript ;Due to the dangers of how our elevator fake out works inside the Monument, the outer door is scripted to prevent followers from entering ;According to Mike Lipari, this is the best method in dealing with this for safety reasons. begin OnActivate if ( IsActionRef Player == 1 ) Activate endif end
501MQ03purityMutantsSCRIPTscn MQ03purityMutantsSCRIPT ;; a basic bodycount tracker begin onDeath set MQ03.bodyCount to (MQ03.bodyCount + 1) end
502MQ05AirlockSignSCRIPTscn MQ05AirlockSignSCRIPT ref myLink short status ; 0 = locked ; 1 = cycling ; 2 = unlocked begin onLoad set myLink to getLinkedREF if myLink.getLocked == 1 set status to 2 playgroup backward 1 elseif myLink.getLocked == 0 set status to 0 playgroup forward 1 endif end begin gameMode if status == 0 set myLink to getLinkedREF if myLink.getLocked == 1 set status to 2 playgroup backward 1 endif elseif status == 2 set myLink to getLinkedREF if myLink.getLocked == 0 set status to 0 playgroup forward 1 endif endif end
503MQ05EnclaveSceneSCRIPTscn MQ05EnclaveSceneSCRIPT ; staged scene during which the Enclave invade Project Purity ; Chappy wants to trigger dad's speech differently, leaving hooks in case he changes his mind later ;;==VARS======================;; float timer ; several flags/floats to control timestamps short active short dadSpeechFlag01 ;Dad "Everyone, it seems we have some..." float dadStamp01 short dadSpeechFlag02 ;Dad "Please remain in your assigned ..." float dadStamp02 short dadSpeechFlag03 ;Dad "...The Enclave? What are they doing...." float dadStamp03 short troopactivityFlag float troopactivityStamp short vertiFlag ;flag for entering and animating the vertibird. float vertibird01Stamp ;timestamp for first vertibird appearance short vertiFlag2 ;flag for second (offscreen) vertibird float vertibird02Stamp ;timestamp for second vertibird appearance short officerFlag float officerStamp short extrasFlag float extrasStamp ;;==LOAD======================;; begin onLoad ; initialization stuffs set timer to 16 ;total number of seconds we store for the sequence set troopactivityStamp to (timer - 16) set vertibird01Stamp to (timer - 0) ; cue 1st bird @ 5secs set vertibird02Stamp to (timer - 3) ; cue 2nd bird @ 7secs set dadStamp01 to (timer - 9) set officerStamp to (timer - 12) set extrasStamp to (timer - 14) end ;;==LOOP======================;; begin gameMode if active == 1 if timer > 0 set timer to (timer - getSecondsPassed) else ; timer has expired, move on w/quest. MQ05VertibirdLandREF.playgroup backward 0 MQ05VertibirdLandREF02.playgroup backward 0 set active to 0 MQ05ExDoor02Ref.unlock setStage MQ05 75 endif if VertiFlag == 0 if timer <= Vertibird01Stamp MQ05VertibirdLandREF.enable set Vertiflag to 1 endif endif if VertiFlag2 == 0 if timer <= Vertibird02Stamp set MQ05.cueMusic to 1 ; kick off combat music... MQ05VertibirdLandREF02.enable set Vertiflag2 to 1 endif endif if officerFlag == 0 if timer <= officerStamp MQ05LandingOfficerREF.enable MQ05LandingOfficerREF.moveto MQ05LandingOfficerREF MQ05LandingOfficerREF.evp set officerFlag to 1 endif endif if extrasFlag == 0 if timer <= extrasStamp MQ05Extra01.enable MQ05Extra01.moveto MQ05Extra01 MQ05Extra01.evp set extrasFlag to 1 endif endif if troopActivityFlag == 0 if timer <= troopActivityStamp MQ05TroopSFXmarker.playsound3D QSTEnclaveTroopsMoving2D set troopActivityFlag to 1 endif endif endif if dadSpeechFlag01 == 0 if timer <= dadStamp01 ; dad speaks up from PA system MQ05PipeSpeaker.sayto Player MQ05DadBroadcast 1 set dadSpeechFlag01 to 1 endif endif end ;;==END=======================;; ; ;+ Player enters exterior pipe section ;+ Distant vertibird approaching sfx ;+ Dad "Everyone, it seems we have some visitors. I don't know who they are or what they want." ;+ Vertibirds are very near now. Loud and not far overhead. One may be in view. ;+ Dad "Please remain in your assigned areas while we get this sorted out´┐Ż" ;+ Vertibirds touch down, player sees armored soldier run by. Troop chatter can be heard. ;+ Dad "...The Enclave? What are they doing here... They're where? Madison, lock that door!" ;;;;+ Door Unlocks, sfx of troops and vertibirds on loop
504MQ05EnclaveWaveFodderLowerSCRIPTscn MQ05EnclaveWaveFodderLowerSCRIPT begin onLoad evp if getStage MQ05 >= 100 disable endif end begin onDeath set MQ05LD.BodyCountL to (MQ05LD.BodyCountL + 1) end
505MQ05EnclaveWaveFodderUpperSCRIPTscn MQ05EnclaveWaveFodderUpperSCRIPT begin onLoad evp if getStage MQ05 >= 100 disable endif end begin onDeath set MQ05LD.BodyCountU to (MQ05LD.BodyCountU + 1) end
506MQ05FollowerCatchupTrigSCRIPTscn MQ05FollowerCatchupTrigSCRIPT ; this script runs on a trigger in TaftTunnel01 that fakes followers moving through a load door ; in case they've been left behind somewhere at Project Purity or Taft Tunnel ; Erik may want ot make this more robust later on. short doOnce begin onTriggerEnter player if doOnce == 0 set doOnce to 1 MQ05EnclaveTaftBarrier.enable ; enable Enclave energy field to prevent backtracking in 02 DisableNavmesh TaftMinMesh ; disable navmesh under that energy field to prevent NPC pathing in low? TaftCheckpointDoor.unlock ; unlock door @ Brotherhood checkpoint if getStage MQ05 >= 80 && getStage MQ05 < 100 ;; // Check for here/dead on all the MQ05 tagalong NPCs if DoctorLiRef.getInCell TaftTunnel01 == 0 if DoctorLiRef.getDead == 0 DoctorLiRef.moveto MQ05FollowerCatchupMarker endif endif if GarzaRef.getInCell TaftTunnel01 == 0 if GarzaRef.getDead == 0 GarzaRef.moveto MQ05FollowerCatchupMarker endif endif if DanielAgincourtRef.getInCell TaftTunnel01 == 0 if DanielAgincourtRef.getDead == 0 DanielAgincourtRef.moveto MQ05FollowerCatchupMarker endif endif if AlexDargonRef.getInCell TaftTunnel01 == 0 if AlexDargonRef.getDead == 0 AlexDargonRef.moveto MQ05FollowerCatchupMarker endif endif ;; // Check for hired/here/dead on all the NPC followers the player might have if followers.CharonHired == 1 && CharonREF.getInCell TaftTunnel01 == 0 if CharonREF.getDead == 0 CharonREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.FawkesHired == 1 && MQ08FawkesREF.getInCell TaftTunnel01 == 0 if MQ08FawkesREF.getDead == 0 MQ08FawkesREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.JerichoHired== 1 && JerichoREF.getInCell TaftTunnel01 == 0 if JerichoREF.getDead == 0 JerichoREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.StarPaladinCrossHired== 1 && StarPaladinCrossREF.getInCell TaftTunnel01 == 0 if StarPaladinCrossREF.getDead == 0 StarPaladinCrossREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.ButchHired== 1 && ButchREF.getInCell TaftTunnel01 == 0 if ButchREF.getDead == 0 ButchREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.RL3Hired== 1 && RL3REF.getInCell TaftTunnel01 == 0 if RL3REF.getDead == 0 RL3REF.moveto MQ05FollowerCatchUpMarker endif endif if followers.CloverHired== 1 && CloverREF.getInCell TaftTunnel01 == 0 if CloverREF.getDead == 0 CloverREF.moveto MQ05FollowerCatchUpMarker endif endif if followers.DogmeatHired== 1 && DogmeatREF.getInCell TaftTunnel01 == 0 if DogmeatREF.getDead == 0 DogmeatREF.moveto MQ05FollowerCatchUpMarker endif endif endif endif end
507MQ05ldEnclaveWaveSCRIPTscn MQ05ldEnclaveWaveSCRIPT ; Special event trigger for MQ05 (level design) in Taft Tunnel sequence ; + triggered by player ; + locks player in room ; - begins timer loop ; - player can interrupt loop w/sufficient skill (science? repair?) ; + Periodic waves of enclave troops arrive @ wave room ; ;==============================================; float timer float timerMax float timeStamp1 float timeStamp2 float timeStamp3 short flag short stepflag1 short stepflag2 short stepflag3 short initSpawn short bcU ; locally store the body count - upper short bcL ; locally store the body count - lower ;==============================; ;==============================; ;==============================; begin onTriggerEnter player ;=======; ; Initial Handling ; if flag == 0 set MQ05LD.waveFlag to 1 ; tell MQ05LD quest that wave fight has begun set flag to 1 ; local control for gameMode loops set timerMax to 45 ; These control variables allow us to adjust timing set timer to timerMax ; and set it up to run... ; MQ05LD.waveFlag ; a variable in the MQ05LD quest script ; 0 -> default state ; used for packages *etc? ; 1 -> wave fight has begun ; 9 -> wave fight all over endif end ;==============================; ;==============================; ;==============================; begin gameMode ;===============; if flag == 1 && initSpawn == 0 ; spawn in four initial guys ; initial two guys spawned earlier on pkg to enter area - upper tier MQ05LDWaveSpawnMarker.placeatme MQ05EnclaveWaveLower 2 set initSpawn to 1 if MQ05BacktrackDoorREF.getOpenState == 1 || MQ05BacktrackDoorREF.getOpenState == 2 MQ05BacktrackDoorREF.setOpenState 3 ; set me to clsoed MQ05BacktrackDoorREF.lock 5 ; impossible lock me endif endif if flag == 1 if MQ05LD.BodyCountU > 0 set bcU to MQ05LD.bodyCountU MQ05LDUpperSpawnMarker.placeatme MQ05EnclaveWaveUpper bcU set MQ05LD.bodyCountU to 0 endif if MQ05LD.BodyCountL > 0 set bcL to MQ05LD.bodyCountL MQ05LDwaveSpawnMarker.placeatme MQ05EnclaveWaveLower bcL set MQ05LD.bodyCountL to 0 endif endif ; timer Loop control ; standard crap. ; if flag == 1 if timer > 0 set timer to (timer - getsecondspassed) else MQ05WaveDoorSwitchREF.activate MQ05LDwaveTerminalREF ; open the door set flag to 2 Set DoctorLiRef.WaveTrig to -1 MQ05TaftTurretREF.setUnconscious 0 set MQ05LD.waveFlag to 9 ; report that the fight has concluded entirely. DoctorLiRef.scaonactor DoctorLiRef.SetAV Confidence 0 GarzaRef.SetAV Confidence 0 AlexDargonRef.SetAV Confidence 0 if ( MQ05.DanGun == 0 ) DanielAgincourtRef.SetAV Confidence 0 endif GarzaREF.scaonactor AlexDargonREF.scaonactor DanielAginCourtREF.scaonactor DoctorLiRef.resetAI GarzaREF.resetAI AlexDargonREF.resetAI DanielAginCourtREF.resetAI endif endif if MQ05LD.waveFlag >= 9 set flag to 2 ; catch for alternative solutions to gameplay (player can hack terminal instead of Dr. Li) endif end
508MQ05ldSCRIPTscn MQ05ldSCRIPT ; global/quest script for MQ05 LD ; this will primarily handle timing for any special events ; particularly/exclusively in TaftTunnel sequence. short WaveFlag ; bool var - just flags on/off for wave fight in TaftTunnel01 short BodyCountU ; count up the number of guys killed in the wave fight upper mezzanine short BodyCountL ; count up the number of guys killed in the wave fight lower floor
509MQ05TaftCheckpointAttackSCRIPTscn MQ05TaftCheckpointAttackSCRIPT ; ghouls attempt to overrun the BoS checkpoint ; only happens if the checkpoint door is open and Enclave have taken Purity short doOnce begin onTriggerEnter player if getStage MQ05 >= 80 && doOnce == 0 if TaftCheckpointDoor.getOpenState == 1 || TaftCheckpointDoor.getOpenState == 2 ; if the door is open or opening TaftGhoulDoor.unlock TaftBoSGuardREF.activate ; unlock and open the feral ghoul door in Taft TaftGhoulsMarker01.placeatme MQ05TaftGhouls 2 TaftGhoulsMarker02.placeatme MQ05TaftGhouls 2 TaftGhoulsMarker03.placeatme MQ05TaftGhouls 2 set doOnce to 1 endif endif end
510MQ05TaftEnclaveBark01SCRIPTscn MQ05TaftEnclaveBark01SCRIPT short doOnce begin onTriggerEnter player if doOnce == 0 MQ05StagedREF02.say MQ05TaftDialogue set doOnce to 1 endif end
511MQ05TaftEndLadderSCRIPTscn MQ05TaftEndLadderSCRIPT ; scripting this ladder to force Dr. Li out of Taft when the player leaves, just in case she got stuck somewhere. short doOnce begin onActivate if IsActionRef player == 1 if getStage MQ05 >= 100 && doOnce == 0 DoctorLiRef.moveto MQ05TaftTunnelExitMarker set doOnce to 1 SetQuestDelay MQ05 0.01 activate else Activate endif else activate endif end
512MQ05TaftVictimSCRIPTscn MQ05TaftVictimSCRIPT short doOnce short frameCounter begin onTriggerEnter player if doOnce == 0 set doOnce to 1 MQ05TaftVictimREF.enable endif end begin gameMode if doOnce == 1 if frameCounter < 1 set frameCounter to (frameCounter + 1) else set doOnce to 2 endif endif if doOnce == 2 if MQ05TaftVictimREF.getdisabled == 0 MQ05VictimizerREF.enable MQ05TaftVictimREF.kill MQ05VictimizerREF 1 MQ05TaftVictimREF.kill MQ05VictimizerREF 3 ;TaftForceMarker.placeatMe FakeForceBallNudge 1 MQ05VictimizerREF.startCombat player MQ05VictimBarrierREF.disable endif endif end
513MQ05TaftWaitforPartySCRIPTscn MQ05TaftWaitforPartySCRIPT ;;===============================================================; short inPC short inLi short inGarza short inDaniel short inAlex short aliveGarza short aliveDaniel short aliveAlex short scenario short allAboard short doOnce ;;===============================================================; begin onLoad set scenario to 11000 end ;;===============================================================; begin onTriggerEnter if doOnce == 0 if getActionRef == player set inPC to 1 endif if getActionRef == DoctorLiRef set inLi to 1 endif if getActionRef == GarzaRef set inGarza to 1 endif if getActionRef == DanielAgincourtRef set inDaniel to 1 endif if getActionRef == AlexDargonRef set inAlex to 1 endif endif end ;;===============================================================; begin onTriggerLeave if doOnce == 0 if getActionRef == player set inPC to 0 DoctorLiRef.evp endif if getActionRef == DoctorLiRef set inLi to 0 endif if getActionRef == GarzaRef set inGarza to 0 endif if getActionRef == DanielAgincourtRef set inDaniel to 0 endif if getActionRef == AlexDargonRef set inAlex to 0 endif endif end ;;===============================================================; begin gameMode if doOnce == 0 if GarzaRef.getDead == 0 && aliveGarza == 0 ; update and set the scenario number set scenario to (scenario + 00100) set aliveGarza to 1 endif if GarzaRef.getDead == 1 && aliveGarza == 1 set scenario to (scenario - 00100) set aliveGarza to 0 endif if DanielAgincourtRef.getDead == 0 && aliveDaniel == 0 set scenario to (scenario + 00010) set aliveDaniel to 1 endif if DanielAgincourtRef.getDead == 1 && aliveDaniel == 1 set scenario to (scenario - 00010) set aliveDaniel to 0 endif if AlexDargonRef.getDead == 0 && aliveAlex == 0 set scenario to (scenario + 00001) set aliveAlex to 1 endif if AlexDargonRef.getDead == 1 && aliveAlex == 1 set scenario to (scenario - 00001) set aliveAlex to 0 endif if inPC == 1 && inLi == 1 && allAboard == 0 ; both the essentials are in the trigger if scenario == 11111 if inGarza == 1 && inDaniel == 1 && inAlex == 1 set allAboard to 1 endif elseif scenario == 11110 if inGarza == 1 && inDaniel == 1 set allAboard to 1 endif elseif scenario == 11101 if inGarza == 1 && inAlex == 1 set allAboard to 1 endif elseif scenario == 11100 if inGarza == 1 set allAboard to 1 endif elseif scenario == 11011 if inDaniel == 1 && inAlex == 1 set allAboard to 1 endif elseif scenario == 11010 if inDaniel == 1 set allAboard to 1 endif elseif scenario == 11001 if inAlex == 1 set allAboard to 1 endif elseif scenario == 11000 set allAboard to 1 endif endif ;/ if inPC == 1 && inLi == 1 && allAboard == 0 endif ;/ if doOnce == 0 if allAboard == 1 && doOnce == 0 ; close the door up MQ05TaftWaveBackdoorREF.activate TaftWaveBackdoorSwitchREF set doOnce to 1 endif end
514MQ05trickDoorSCRIPTscn MQ05trickDoorSCRIPT ; sneaky doors that lock behind the player. float timer begin onActivate if IsActionRef player == 1 ; player has activate me if MQ05LD.waveFlag == 0 || MQ05LD.waveFlag >= 9 activate ; behave normally else showMessage MQ05EnclaveDoorMSG ; disallow player to access endif else activate endif end begin gameMode if getOpenState == 1 ; if I'm open set timer to 1 ; wait 1 sec & close endif if timer > 0 set timer to (timer - getSecondsPassed) elseif getOpenState == 1 ; still open? setOpenState 0 ; close myself endif end
515MQ05TunnelBotSCRIPTscn MQ05TunnelBotSCRIPT begin onDeath ; bit of a hack. check baseID for NPCs to use them in wave fight. if getisID MQ05EnclaveStaged == 1 set MQ05LD.bodyCountU to (MQ05LD.bodyCountU + 1) endif end
516MQ08CapturedScriptscn MQ08CapturedScript short StartUp ;1= Player has tripped the trigger zone, starting grenade animation and some housekeeping short WhiteOut ;1= The white-out blinding effect has begun short EndStartUp ;1= The player has been moved to the capture marker, cue the other actor, etc. short FollowerCheck ;1= Begin to handle Followers (see bottom of script) short Locked ;1= The Door preventing the Fawkes exploit is locked short CharonCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short JerichoCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short PaladinCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short ButchCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short RL3Check ;1= Check the Teammate for Hire... also acts as a DoOnce short CloverCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short DogmeatCheck ;1= Check the Teammate for Hire... also acts as a DoOnce short CharonFTG ;x= Store the Teammate's Fatigue short JerichoFTG ;x= Store the Teammate's Fatigue short PaladinFTG ;x= Store the Teammate's Fatigue short ButchFTG ;x= Store the Teammate's Fatigue short RL3FTG ;x= Store the Teammate's Fatigue short CloverFTG ;x= Store the Teammate's Fatigue short DogmeatFTG ;x= Store the Teammate's Fatigue float TimerA ;This is the first timer. The grenade animation itself. Timer should match animation length float TimerB ;This is the second timer. The duration of the White-Out ISEFX until moving the player float TimerC ;This is the final timer. The time from moving player until fade-in is finished ;This is the main handler script for the Player being captured at the end of MQ08 begin onTriggerEnter Player if ( StartUp == 0 ) if ( GetStage MQ08 >= 30 ) DisablePlayerControls 0 0 1 0 0 0 0 MQ08FawkesRef.StopCombat Player MQ08FawkesRef.Evp Set TimerA to 3 MQ08GrenadeSpawn.PlaceAtMe FXFlashGrenade01 MQ08CaptureDoor.Unlock Set StartUp to 1 endif endif end begin gamemode ;This block handles the timeframe from the beginning of the grenade animation to the White-Out Effect if ( StartUp == 1 ) if ( TimerA > 0 ) Set TimerA to ( TimerA - GetSecondsPassed ) else Set WhiteOut to 1 Set StartUp to 2 endif endif ;This block sets up the White-Out image space effect if ( StartUp == 2 ) PlaySound FXDisintegration DisablePlayerControls 1 1 1 1 0 1 1 PipboyRadioOff imod MQ08FadeInFromWhiteISFX MQ08SMRef01.Kill ;This is a series of kills issued on the Creature refs that were already parented to spawn triggers (can't disable them) MQ08SMRef02.Kill MQ08SMRef03.Kill MQ08SMRef04.Kill MQ08SMRef05.Kill MQ08SMRef06.Kill MQ08SMRef07.Kill MQ08SMRef08.Kill MQ08SMRef09.Kill MQ08SMRef10.Kill MQ08SMRef11.Kill MQ08SMRef12.Kill MQ08SMRef13.Kill SidRef.Kill set FollowerCheck to 1 Set TimerB to 1 Set StartUp to 3 endif ;This block is the delay from the beginning of the White-Out effect until we move to player to make sure it happens when they are "fully blinded" if ( StartUp == 3 ) if ( TimerB > 0 ) Set TimerB to ( TimerB - GetSecondsPassed ) else Player.Moveto MQ08PlayerCaptureMarker Set MQ08.Falldown to 1 player.addscriptpackage MQ08PlayerFallsDownPackage Set TimerC to 5 Set StartUp to 4 endif endif ;This block is the timer that sets off the rest. The player has been moved to the capture marker, now wait til fade-in then do woozy effect and cue the end if ( StartUp == 4 ) if ( TimerC > 0 ) Set TimerC to ( TimerC - GetSecondsPassed ) else ;Woozy iMod needed Set StartUp to 5 ;After TimerC is complete, start the player falling down Set Locked to 2 ;After the player is captured, the Guards will enable outside the room MQ08Guard01.Enable MQ08Guard02.Enable MQ08Guard01.SetGhost 1 MQ08Guard02.SetGhost 1 MQ08Guard01.Evp MQ08Guard02.Evp endif endif ;Once the guards are in their final positions, one of them will confirm a dialog line, and Col Autumn will spawn in level if ( Locked == 2 ) if ( MQ08.GuardsinPos == 2 ) MQ08Guard01.Say MQ08GuardSay01 ColonelAutumnRef.Moveto MQ08AutumnStart ColonelAutumnRef.SetGhost 1 ;Once Autumn appears, he will walk up to the player ;Autumn has a bit of dialog with a guard Set Locked to 4 ColonelAutumnRef.Evp endif endif if ( MQ08.ConvoGo == 2 ) ColonelAutumnRef.Say MQ08AutumnSay01 Set ColonelAutumnRef.Talking to 1 Set MQ08.ConvoGo to 3 endif ;This is the Followers Subsystem Handling. ;We check which Teammates the Player has, knock 'em out, fire 'em and send 'em home if ( FollowerCheck == 1 ) set CharonCheck to 1 set JerichoCheck to 1 set PaladinCheck to 1 set ButchCheck to 1 set RL3Check to 1 set CloverCheck to 1 set DogmeatCheck to 1 set FollowerCheck to 2 endif if ( FollowerCheck == 2 ) if ( Followers.CharonHired == 1 ) if ( CharonCheck == 1 ) CharonRef.Moveto MQ08FollowerSpot Set CharonFTG to CharonRef.GetAV Fatigue CharonRef.DamageAV Fatigue -10000 set CharonCheck to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.JerichoHired == 1 ) if ( JerichoCheck == 1 ) JerichoRef.Moveto MQ08FollowerSpot Set JerichoFTG to JerichoRef.GetAV Fatigue JerichoRef.DamageAV Fatigue -10000 set JerichoCheck to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.StarPaladinCrossHired == 1 ) if ( PaladinCheck == 1 ) StarPaladinCrossRef.Moveto MQ08FollowerSpot Set PaladinFTG to StarPaladinCrossRef.GetAV Fatigue StarPaladinCrossRef.DamageAV Fatigue -10000 set PaladinCheck to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.ButchHired == 1 ) if ( ButchCheck == 1 ) ButchRef.Moveto MQ08FollowerSpot Set ButchFTG to ButchRef.GetAV Fatigue ButchRef.DamageAV Fatigue -10000 set ButchCheck to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.RL3Hired == 1 ) if ( RL3Check == 1 ) RL3Ref.Moveto MQ08FollowerSpot Set RL3FTG to RL3Ref.GetAV Fatigue RL3Ref.DamageAV Fatigue -10000 set RL3Check to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.CloverHired == 1 ) if ( CloverCheck == 1 ) CloverRef.Moveto MQ08FollowerSpot Set CloverFTG to CloverRef.GetAV Fatigue CloverRef.DamageAV Fatigue -10000 set CloverCheck to 2 endif endif endif if ( FollowerCheck == 2 ) if ( Followers.DogmeatHired == 1 ) if ( DogmeatCheck == 1 ) DogmeatRef.Moveto MQ08FollowerSpot Set DogmeatFTG to DogmeatRef.GetAV Fatigue DogmeatRef.DamageAV Fatigue -10000 set DogmeatCheck to 2 endif endif endif end
517MQ08CellConsoleScriptscn MQ08CellConsoleScript short Activated short CheckButtonPress short Button ;This script handles the console shutdown in the Labs level of Vault 87 and the opening of all cell doors ;Need to revisit this and add lighting triggers when LD adds lighting begin OnActivate if IsActionRef player == 1 if ( Activated == 0 ) ShowMessage MQ08FireControlConsoleMessage elseif ( Activated == 1 ) ShowMessage MQ08FireControlConsoleMessage02 endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( Activated == 0 ) MQ08CellDoor00Ref.SetOpenState 1 MQ08CellDoor01Ref.SetOpenState 1 MQ08CellDoor02Ref.SetOpenState 1 MQ08CellDoor03Ref.SetOpenState 1 MQ08CellDoor04Ref.SetOpenState 1 MQ08CellDoor05Ref.SetOpenState 1 Set MQ08.Door01 to 1 Set MQ08.Door02 to 1 Set MQ08.Door03 to 1 Set MQ08.Door04 to 1 Set MQ08.Door05 to 1 Set MQ08.PowerOff to 1 Set MQ08.IntercomTalk to 1 MQ08FawkesRef.Evp MQ08FawkesRef.SetPlayerTeammate 1 setAlly MQ08FawkesFaction PlayerFaction 1 1 Set Followers.FawkesHired to 1 SetAlly MQ08FawkesFaction PlayerFaction MQ08FawkesRef.AdditemHealthPercent MQ08FawkesWeaponReady 1 .6 MQ08FawkesRef.Equipitem WeapUniqueFawkesSuperSledge ;turn on the klaxons Vault87AlarmKlaxon01.playgroup left 1 Vault87AlarmKlaxon02.playgroup left 1 Vault87AlarmKlaxon03.playgroup left 1 Vault87AlarmKlaxon04.playgroup left 1 Vault87AlarmKlaxon05.playgroup left 1 Vault87AlarmKlaxon06.playgroup left 1 MQ08Vault87ConsoleLightRef.playgroup left 1 MQ08FireKlaxonRef.enable ;This is the audio of the klaxon MQ08FireKlaxon02Ref.enable ;This is the audio of the klaxon ;turn on the xmarkers to make the centaurs move xmrkVault87CentaurWanderA.disable xmrkVault87CentaurWanderB.disable ;deal with Sid SidRef.SetAV Aggression 3 Set MQ08.SidChange to 1 ;Set Stage 20 if player refused to help Fawkes SetStage MQ08 20 Set Activated to 1 elseif ( Button == 1 ) Return endif end
518MQ08CellIntercomScriptscn MQ08CellIntercomScript ;This script traps the activate on the intercom system for the cell Fawkes is in begin OnActivate if ( GetDeadCount MQ08Fawkes == 0 ) if ( MQ08.IntercomTalk == 0 ) Activate elseif ( MQ08.IntercomTalk == 1 ) Return endif endif end
519MQ08FawkesScriptscn MQ08FawkesScript short DoOnce ;Follower Variables short GreetPlayer short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting ;Variable for rescuing Fawkes short Rescued ;This is a handler for MQ08 if Fawkes dies BEGIN OnDeath Showmessage MQ08FawkesDead if ( IsKiller Player == 1 ) RewardKarma -100 endif if ( GetQuestRunning MQ08 == 0 ) if ( Followers.FawkesHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.FawkesHired to 0 ShowMessage FollowerMessageDeadFawkes endif endif END BEGIN GameMode if ( DoOnce == 0 ) if ( FollowersHireFawkes.EnclaveSoldierDown >= 3 ) StopCombat set GreetPlayer to 1 set DoOnce to -1 endif endif END BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END
520MQ08FawkesTriggerScriptscn MQ08FawkesTriggerScript short Said ;1= Fawkes called out to the player begin OnTriggerEnter Player if ( Said == 0 ) MQ08FawkesCellIntercomRef.Say MQ08FawkesSay01 1 MQ08Fawkes 1 MQ08FawkesCellIntercomRef.SetTalkingActivatorActor MQ08FawkesRef Set Said to 1 endif end
521MQ08GECKFailsafeScriptscn MQ08GECKFailsafeScript ;If the Player has the GECK in possession, make SURE the door unlocks. short UnlockDoor begin OnTriggerEnter Player if ( UnlockDoor == 0 ) if ( GetStage MQ08 == 30 ) if ( Player.GetItemCount MQ08GECK >= 1 ) MQ08CaptureDoorRef.Unlock set UnlockDoor to 1 endif endif endif end
522MQ08GECKScriptscn MQ08GECKScript short Button float Timer begin OnAdd Player if ( GoGECK == 0 ) SetStage MQ08 30 set GoGECK to 9 endif end begin OnActivate if IsActionRef player == 1 if ( GoGECK == 0 ) Showmessage GECKStart set GoGECK to 1 endif endif end begin gamemode set Button to GetButtonPressed if Button > -1 if GoGECK == 1 if ( Button == 0 ) Activate if ( GetStage MQ08 >= 10 ) SetStage MQ08 30 endif elseif ( Button == 1 ) Showmessage GECKActivate01 set GoGECK to 2 elseif ( Button == 2 ) set GoGECK to 0 endif elseif GoGECK == 2 if ( Button == 0 ) Showmessage GECKActivate02 set GoGECK to 3 elseif ( Button == 1 ) set GoGECK to 0 endif elseif GoGECK == 3 if ( Button == 0 ) set GoGECK to 4 elseif ( Button == 1 ) set GoGECK to 0 endif endif endif if ( GoGECK == 4 ) placeatme fxGeckActivate01 Set Timer to 9 MQ08GECKRef.PushActorAway Player 50 Player.DamageAV Fatigue 500 set GoGECK to 5 endif if ( GoGECK == 5 ) if ( Timer > 0 ) Set Timer to ( Timer - GetSecondsPassed ) else Player.Kill Set GoGECK to 6 endif endif end
523MQ08Guard01Scriptscn MQ08Guard01Script Begin SayToDone Set ColonelAutumnRef.Talking to 0 End
524MQ08QuestScriptscn MQ08QuestScript short GuardsinPos ;When this is set to 2, both capture guards in in Position for Autumn to appear short ConvoGo ;Helps to trigger the short verbal exchange between Col. Autumn and a Guard short Fader ;The timer variable to trigger an image space modifier of all black short DoOnce short GECKTalk ;1= Fawkes mentions the GECK in dialog (for dialog flag) short PowerOff ;1= The cell block power is now disabled and the doors to the cells all open in Vault87a short Escort ;1= Fawkes is in Escort with the Player short Door01 ;1= The matching door in the medical wing of Vault 87 has been tripped (door is open) short Door02 ;1= The matching door in the medical wing of Vault 87 has been tripped (door is open) short Door03 ;1= The matching door in the medical wing of Vault 87 has been tripped (door is open) short Door04 ;1= The matching door in the medical wing of Vault 87 has been tripped (door is open) short Door05 ;1= The matching door in the medical wing of Vault 87 has been tripped (door is open) short Method ;1= Fawkes explained how to get him out of cell. A dialog limiter. short IntercomTalk ;1= Fawkes's Intercom no longer needed (trap the activate on it) short FoundVault ;1= Entrance to Vault 87 proper discovered short SidChange ;1= Move Sid out of his patrols short Convo01Talk ;x= An advancing variable to set which line in convo is being spoken short Convo02Talk ;x= An advancing variable to set which line in convo is being spoken short Convo01Done ;1= Conversation 01 is done, move the Mutants into regular patrols short Convo02Done ;1= Conversation 02 is done, move the Mutants into regular patrols short Falldown ;1= Triggers the Player Falldown animation for 1st person camera short KarmaHit ;1= Player has taken the Karma Hit for NOT releasing Fawkes short FawkesGotIt ;1= Fawkes Picked Up the GECK float Timer begin gamemode if ( GetStage MQ08 >= 10 ) && GetStageDone MQ08 15 == 0 if ( Player.GetDistance MQ08VaultMarker < 500 ) SetStage MQ08 15 endif endif end
525MQ08SuperMutantConvo1Scriptscn MQ08SuperMutantConvo1Script short doOnce begin OnTriggerEnter Player if doOnce == 0 set doOnce to 1 MQ08SuperMutantConvo1aREF.StartConversation MQ08SuperMutantConvo1bREF, MQ08MutieConvo01 endif end
526MQ11DummyArtillery02SCRIPTscn MQ11DummyArtillery02SCRIPT ; script to live on a dummy object (tall yellow trigger) for MQ11 ; This is a secondary set of explosions underwater. float flakTimer ref flakType short flakTypeDice short flakDice ;;// // // // // // // // // // // // // // // // ;;// gameMode block // // // // // ;;// // // // // // // // // // // // // // // // begin gameMode ; // Surf Flak explosions Loop if getStageDone MQ11LD 10 == 1 && getStage MQ11LD < 20 if flakTimer > 0 set flakTimer to (flakTimer - getSecondsPassed) else ; randomly choose a type of explosion ; randomly choose one of our explosion markers ; and create an explosion there. set flakTypeDice to getRandomPercent if flakTypeDice < 25 set flakType to FXArtilleryStrike01 elseif flakTypeDice >= 25 set flakType to FXArtilleryStrike01 endif set flakDice to ( 1 + 0.6 * getRandomPercent ) if flakDice == 1 MQ11SurfBoom01.placeatme flakType elseif flakDice == 2 MQ11SurfBoom02.placeatme flakType elseif flakDice == 3 MQ11SurfBoom03.placeatme flakType elseif flakDice == 4 MQ11SurfBoom04.placeatme flakType elseif flakDice == 5 MQ11SurfBoom05.placeatme flakType elseif flakDice == 6 MQ11SurfBoom06.placeatme flakType endif ; and reset the timer to something between X and Y seconds set flakTimer to (0.35 + 2/99 * getRandomPercent) endif endif end
527MQ11DummyArtillerySCRIPTscn MQ11DummyArtillerySCRIPT ; script to live on a dummy object (tall yellow trigger) for MQ11 float flakTimer ref flakType short flakTypeDice short flakDice ;;// // // // // // // // // // // // // // // // ;;// gameMode block // // // // // ;;// // // // // // // // // // // // // // // // begin gameMode ; // West Coastal Flak explosions Loop if getStageDone MQ11LD 10 == 1 && getStage MQ11LD < 20 if flakTimer > 0 set flakTimer to (flakTimer - getSecondsPassed) else ; randomly choose a type of explosion ; randomly choose one of our explosion markers ; and create an explosion there. set flakTypeDice to getRandomPercent if flakTypeDice < 25 set flakType to FXArtilleryStrike01 elseif flakTypeDice >= 25 set flakType to FXArtilleryStrike01 endif set flakDice to ( 1 + 0.6 * getRandomPercent ) if flakDice == 1 MQ11CoastBoom01.placeatme flakType elseif flakDice == 2 MQ11CoastBoom02.placeatme flakType elseif flakDice == 3 MQ11CoastBoom03.placeatme flakType elseif flakDice == 4 MQ11CoastBoom04.placeatme flakType elseif flakDice == 5 MQ11CoastBoom05.placeatme flakType elseif flakDice == 6 MQ11CoastBoom06.placeatme flakType endif ; and reset the timer to something between X and Y seconds set flakTimer to (0.35 + 2/99 * getRandomPercent) endif endif end
528MQ11EndGateSCRIPTscn MQ11EndGateSCRIPT ; This script will control the staging of the scene when Prime shuts down the final gate @ Purity ;//VARIABLES///////////////////////////////////////////////////////////////////////////////////////////; short active ; flag to handle stuff in block short doOnce short init float timer ; standard timer var float timerMax ; variable - this is the total time of the animation ;//MAIN LOOP//////////////////////////////////////////////////////////////////////////////////; begin gameMode if MQ11LD.finalGateFlag == 1 && init == 0 set timerMax to 15.667 set timer to timerMax MQ11LDPrimeREF.stopCombat MQ11LDPrimeREF.setav aggression 0 set active to 1 set init to 1 endif if active == 1 if timer > 0 set timer to (timer - getSecondsPassed) else MQ11WaitGate04.disable MQ11LDPrimeREF.setav aggression 2 ; setting lp to Very Aggressive setStage MQ11LD 50 ; finish up MQ11LDPrimeREF.evp set active to 2 enclavePurityDefensesForcefieldsMarker.disable ;disables the forcefields around gates ;showwarning "THIS SCRIPT SHOULD STOP RUNNING NOW" endif if timer < 10 && doOnce == 0 ; play special fx on gate / Prime MQ11LDPrimeREF.pms MQ11ff1 MQ11LDPrimeREF.pms MQ11ff2 MQ11LDPrimeREF.pms MQ11ff3 MQ11FieldFX04L.playgroup backward 1 MQ11FieldFX04R.playgroup backward 1 MQ11FieldFX04L.activate MQ11EndGateDummySwitch MQ11FieldFX04R.activate MQ11EndGateDummySwitch set doOnce to 1 endif endif end ;///END////////////////////////////////////////////////////////////////////////////////////;
529MQ11EnergyFieldsSCRIPTscn MQ11EnergyFieldsSCRIPT ; script for enclave energy fields on energy gates ; temp - simply disable when activated by linked switch. short do1xflag begin onActivate if do1xflag == 0 set MQ11.FieldsDisabled to ( MQ11.FieldsDisabled + 1 ) set do1xflag to 1 if MQ11.FieldsDisabled == 1 ; quest stages for easy tracking setStage MQ11LD 20 elseif MQ11.fieldsDisabled == 2 setStage MQ11LD 30 elseif MQ11.fieldsDisabled == 3 setStage MQ11LD 40 endif setStage MQ11LD 2 ; this stage EVPs Prime & Friends disable ; and turn myself off endif end
530MQ11FieldFXDaisyChainSCRIPTscn MQ11FieldFXDaisyChainSCRIPT ; set up a simple daisy chain activation for a series of these gates to stagger off ; this is for the gates that ensconce project purity for the enclave ref myLink short doOnce Begin OnLoad Playgroup Forward 0 set myLink to getLinkedRef ; I'll be linked to my matching collision End begin onActivate if isActionRef player == 0 ; player can't get this activate if doOnce == 0 set doOnce to 1 playgroup backward 1 ; fizzle out if myLink != 0 myLink.disable endif activate endif endif end
531MQ11Gate01DummySCRIPTscn MQ11Gate01DummySCRIPT ;///////////////////////////////////////////////////////////; short init float timer float timer2 ;///////////////////////////////////////////////////////////; begin gameMode if init == 0 if MQ11LD.g01flag == 1 set timer to 3 set timer2 to 5.25 set init to 1 endif endif if MQ11LD.g01flag == 1 if timer > 0 set timer to (timer - getSecondsPassed) elseif timer <= 0 setStage MQ11LD 20 ; advance quest stage set MQ11.FieldsDisabled to ( MQ11.FieldsDisabled + 1 ) ; obsolete? endif if timer2 > 0 set timer2 to (timer2 - getSecondsPassed) elseif timer2 <= 0 MQ11LDPrimeREF.sms MQ11ff1 ; turn off shader fx for safety MQ11LDPrimeREF.sms MQ11ff2 MQ11LDPrimeREF.sms MQ11ff3 set MQ11LD.g01flag to 0 ; turn script off endif endif end
532MQ11Gate02DummySCRIPTscn MQ11Gate02DummySCRIPT ;///////////////////////////////////////////////////////////; short init float timer float timer2 ;///////////////////////////////////////////////////////////; begin gameMode if init == 0 if MQ11LD.g02flag == 1 set timer to 3 set timer2 to 5.25 set init to 1 endif endif if MQ11LD.g02flag == 1 if timer > 0 set timer to (timer - getSecondsPassed) elseif timer <= 0 setStage MQ11LD 30 ; advance quest stage set MQ11.FieldsDisabled to ( MQ11.FieldsDisabled + 1 ) ; obsolete? endif if timer2 > 0 set timer2 to (timer2 - getSecondsPassed) elseif timer2 <= 0 MQ11LDPrimeREF.sms MQ11ff1 ; turn off shader fx for safety MQ11LDPrimeREF.sms MQ11ff2 MQ11LDPrimeREF.sms MQ11ff3 set MQ11LD.g02flag to 0 ; turn script off endif endif end
533MQ11Gate03DummySCRIPTscn MQ11Gate03DummySCRIPT ;///////////////////////////////////////////////////////////; short init float timer float timer2 ;///////////////////////////////////////////////////////////; begin gameMode if init == 0 if MQ11LD.g03flag == 1 set timer to 3 set timer2 to 5.25 set init to 1 endif endif if MQ11LD.g03flag == 1 if timer > 0 set timer to (timer - getSecondsPassed) elseif timer <= 0 setStage MQ11LD 40 ; advance quest stage set MQ11.FieldsDisabled to ( MQ11.FieldsDisabled + 1 ) ; obsolete? endif if timer2 > 0 set timer2 to (timer2 - getSecondsPassed) elseif timer2 <= 0 MQ11LDPrimeREF.sms MQ11ff1 ; turn off shader fx for safety MQ11LDPrimeREF.sms MQ11ff2 MQ11LDPrimeREF.sms MQ11ff3 set MQ11LD.g03flag to 0 ; turn script off endif endif end
534MQ11GenericVertibirdLandingSCRIPTscn MQ11GenericVertibirdLandingSCRIPT ; This trigger just sets a variable flag on the control script if conditions are met. ; Used for the GenericVertibirdLandingControlSCRIPT short doOnce ref linkedRef ;**************************************** Begin onTriggerEnter Player set doOnce to MQ11VertibirdLandingControlTriggerREF.doOnce if (doOnce == 0) set MQ11VertibirdLandingControlTriggerREF.doOnce to 1 ;tells control script to fire off set doOnce to 1 endif End ;*****************************************
535MQ11JeffersonVertibirdLandingControlSCRIPTscn MQ11JeffersonVertibirdLandingControlSCRIPT ; This trigger enables it's linked ref (a vertibird) and calls its forward animation float timer short doOnce ref linkedRef ref vertibirdLinkedRef short init ;**************************************** Begin gameMode if init == 0 set linkedRef to getLinkedRef set vertibirdLinkedRef to linkedRef.getLinkedRef set init to 1 endif if (doOnce == 1) linkedRef.enable 0 set timer to 1 set doOnce to 2 elseif (doOnce == 2) if (timer <= 0) if ( linkedRef.HasLoaded3D != 0 ) linkedRef.playgroup Forward 0 set doOnce to 3 endif else set timer to timer - GetSecondsPassed endif elseif (doOnce == 3) if (linkedRef.isAnimPlaying Forward == 0) set timer to 3 ; 3 seconds while vertibird is on ground before it enables its xmarker MQ11PrimeVertibirdLandDestroy01Trig.enable set doOnce to 4 endif elseif (doOnce == 4) if (timer <= 0) if (linkedRef.getDestroyed == 0) vertibirdLinkedRef.enable ;enables an xmarker whose children are the enclave lists set timer to 2 ; 2 seconds before vertibird will take off set doOnce to 5 else set doOnce to 7 endif else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 5) if (timer <=0) linkedRef.playgroup backward 1 set doOnce to 6 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 6) if (linkedRef.isAnimPlaying Backward == 0) && (linkedRef.getDestroyed == 0) linkedRef.disable ;disable the vertibird when it's done playing its backward animation set doOnce to 7 endif endif End
536MQ11LDMasterTriggerSCRIPTscn MQ11LDMasterTriggerSCRIPT ; ============================; ; central script for all triggers in this sequence (or most) ; ============================; ; // the General Idea: ; // // // These triggers share one script, to emulate the workflow of calling functions from a central script. ; // // // To do this, we'll use persistent ref names and a huge, nested if-check. ; // // // Theoretically, this should only be nominally slower than several scripts ; // // // Totally modular, generic scripts using links have proven non-viable. ; // the Implementation concept ; // // // We begin by checking for our valid trigger actors. At the top-level we are at our most general ; // // // Therefore, the player, Prime, or Sarah can trigger any of the triggers. ; // // // When needed, we can exclude them individually later. ; // // // Once the block is running, we check the calling reference against a list. ; // // // This list is built through a large nest of specific reference names. ; // // // This emulates calling a function, in reverse. When we find our ref name, we step into that set of commands ; // // // Further if checks - like excluding Prime or Sarah - are performed here ; // // // Then we perform the set of actions - usually spawning references at specific points and EVPs ; // // // Generally - if not always - we'll then turn the block off (note - this doesn't work because of enable parenting) ; // // // (since we can't disable, we use DoOnce vars, instanced to each trigger ref) ; ============================; ;// == VARIABLES == // ;; ============================; short doOnce ; Should be instanced and not a problem. Will still need extra flag for multi-duty triggers short doSwarmOnce ; special flag for eyebot swarm within nuke event #1 float timer short timerFlag short shotCount short JeffersonVertibirdDestroyed ;0 -vertibird that lands near Jefferson is not destroyed yet 1 - it has been destroyed ref Actronaut ; silly name to store activating ref for ease of conditions tests ; ============================; ;// == TRIGGER ENTER BLOCK == // ; ============================; begin onTriggerEnter ; Triggers run for any of these three actors if isActionRef player == 1 || isActionRef MQ11LDPrimeREF == 1 || isActionRef MQ01SarahREF == 1 set Actronaut to getActionRef ; store who hit the trigger ;// == BEGIN TRIGGER FUNCTIONS == // ;// Main "do once" loop (special cases are in a separate if statement below) if doOnce == 0 if getisReference MQ11LDtrig01a ; Trig at bridge (1st spawn) MQ11CoastBoom01.placeatme FXArtilleryStrike01 ; create a fake "artillery" explosion MQ11Fodder01a.enable ; 1xSpawn MQ11Fodder01a.moveTo MQ11Fodder01aMarker MQ11Fodder01a.startCombat MQ11PoorSniperSap ; force battle. MQ11trig01aSniper.enable ; 1xSpawn MQ11trig01aSniper.moveTo MQ11Fodder01aMarker MQ11trig01aSniper.additem weapLaserRifle 1 MQ11trig01aSniper.startCombat MQ11BosSniperVictim01 ; force a sniper battle... set doOnce to 1 ;disable elseif getisReference MQ11PentagonFlyby01aTrig if actronaut == player MQ11VertibirdBeginning01REF.enable 0 MQ11VertibirdBeginning02REF.enable 0 MQ11VertibirdBeginning03REF.enable 0 set doOnce to 1 endif elseif getisReference MQ11ExplodeTrig01 MQ11BosSniperVictim01.setav health 1 MQ11CoastBoom02.placeatme FXArtilleryStrike01 ; fake artillery booms set doOnce to 1 ;disable elseif getisReference MQ11PregameTrig01 MQ11CoastBoom03.placeatme FXArtilleryStrike01 set doOnce to 1 ;disable elseif getisReference MQ11BoomTrig02 if actronaut == player BridgeBoom01.placeatMe FXArtilleryStrike01 ; artillery boomer set doOnce to 1 endif elseif getisReference MQ11PrimeSaytoTrig01 if actronaut == MQ11LDPrimeRef MQ11LDPrimeRef.sayTo MQ01SarahREF MQ11LDPrimeLines, 1, 1 ; Make Prime say his line about the Energy Field set doOnce to 1 endif elseif getIsReference MQ11LDTrigEvent01a if Actronaut == MQ11LDPrimeREF set MQ11LD.g01flag to 1 ; this flags the quest(global) variable to fire off dummy script set doOnce to 1 MQ11WaitGate01.disable ; disable gate collision MQ11LDPrimeREF.pms MQ11ff1 ; handle deactivation of the gate #1 MQ11LDPrimeREF.pms MQ11ff2 MQ11LDPrimeREF.pms MQ11ff3 MQ11FieldFX01L.playgroup backward 0 ; fade the gate fx out MQ11FieldFX01R.playgroup backward 0 set MQ11FieldFX01R.doOnce to 1 MQ11CleanupTrigger01REF.enable ;enable green trigger used to cleanup resources endif elseif getIsReference MQ11Partybus01DestroyTrig if Actronaut == MQ11LDPrimeREF if (MQ11Partybus01.getDestroyed == 0) MQ11Partybus01.do 1000 ;make sure vertibird is destroyed endif set doOnce to 1 endif elseif getIsReference MQ11Partybus02DestroyTrig if Actronaut == MQ11LDPrimeREF if (MQ11Partybus02.getDestroyed == 0) MQ11Partybus02.do 1000 ;make sure vertibird is destroyed endif set doOnce to 1 endif elseif getIsReference MQ11Partybus03DestroyTrig if Actronaut == MQ11LDPrimeREF if (MQ11Partybus03.getDestroyed == 0) MQ11Partybus03.do 1000 ;make sure vertibird is destroyed endif set doOnce to 1 endif elseif getIsReference MQ11Partybus04DestroyTrig if Actronaut == MQ11LDPrimeREF if (MQ11Partybus04.getDestroyed == 0) MQ11Partybus04.do 1000 ;make sure vertibird is destroyed endif MQ11CleanupTrigger03REF.enable ;enables green trigger used for cleanup set doOnce to 1 endif elseif getIsReference MQ11CleanupTrigger01REF if (Actronaut == Player) ;Green Trigger - player has made it to first gate, so disable actors behind the player that we don't need to spend resources on anymore MQ11FirstGateCleanupMarker.disable MQ11BoSExteriorGuard01REF.disable MQ11BoSExteriorGuard02REF.disable CitadelBOSGuardRef1.disable GateGuardRef.disable set doOnce to 1 endif elseif getIsReference MQ11CleanupTrigger02REF if (Actronaut == Player) ;Green Trigger - disable actors behind the player that we don't need to spend resources on anymore MQ11trig01aSniper.disable MQ11Fodder01a.disable MQ11Fodder02a.disable MQ11Fodder02b.disable MQ11Fodder02c.disable MQ11Fodder02d.disable set doOnce to 1 endif elseif getIsReference MQ11CleanupTrigger03REF if (Actronaut == Player) ;Green Trigger - disable actors behind the player that we don't need to spend resources on anymore MQ11BridgeCleanupMarker.disable MQ11EnclaveRiverSniper01.disable MQ11Swarm01c.disable MQ11BridgeFodder04a01.disable MQ11BridgeEndFodder01.disable MQ11BridgeEndFodder02.disable set doOnce to 1 endif elseif getIsReference MQ11CleanupTrigger04REF if (Actronaut == Player) ;Green Trigger - disable actors behind the player that we don't need to spend resources on anymore MQ11SkybridgeFodder01.disable MQ11SkybridgeFodder02.disable MQ11AlleyFodder02.disable MQ11RoadCleanupMarker.disable MQ11CourtyardFodder01.disable MQ11CourtyardFodder02.disable set doOnce to 1 endif elseif getIsReference MQ11CleanupTrigger05REF if (Actronaut == Player) ;Green Trigger - disable actors behind the player that we don't need to spend resources on anymore MQ11RampFodder03.disable MQ11Gate03Fodder01.disable MQ11Gate03Fodder02.disable MQ11Gate03Fodder03.disable MQ11RampFodder01.disable MQ11RampFodder02.disable MQ11BuildingFodder01.disable MQ11BuildingFodder02.disable MQ11BuildingFodder03.disable BasinSpawn01a.disable BasinSpawn01b.disable BasinSpawn01c.disable BasinSpawn02a.disable BasinSpawn02b.disable BasinSpawn02c.disable BasinSpawn02d.disable set doOnce to 1 endif elseif getIsReference MQ11LDtrig02a MQ11Fodder02a.enable ; 4xSpawn MQ11Fodder02a.moveto MQ11Fodder02a MQ11Fodder02b.enable MQ11Fodder02b.moveto MQ11Fodder02b MQ11Fodder02c.enable MQ11Fodder02c.moveto MQ1102aMarker MQ11Fodder02d.enable MQ11Fodder02d.moveto MQ1102aMarker02 set doOnce to 1 ;disable elseif getisReference MQ11LDNukeTrig01aREF ; First Prime-tosses-nuke event if actronaut == MQ11LDPrimeRef MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeNukerMarker01 1 0 0 set doOnce to 1 ;disable endif elseif getIsReference MQ11VertibirdEvent01 ;MQ11Vertibird01.enable MQ11Vertibird01.playgroup fastforward 0 set MQ11LD.Strafe01 to 1 set doOnce to 1 ;disable elseif getIsReference MQ11LDTrigEvent02a if actronaut == MQ11LDPrimeRef MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11Partybus02 3 0 0 set doOnce to 1 ;disable endif elseif getisReference MQ11LDtrig02b MQ11Bridge02bFodder01.enable ; 3xSpawn MQ11Bridge02bFodder01.moveto MQ11Bridge02bFodder01 MQ11Bridge02bFodder02.enable MQ11Bridge02bFodder02.moveto MQ11Bridge02bFodder02 MQ11Bridge02bFodder03.enable MQ11Bridge02bFodder03.moveto MQ11Bridge02bFodder03 set doOnce to 1 ;disable elseif getIsReference MQ11LDTrigEvent03a if actronaut == MQ11LDPrimeRef MQ11CleanupTrigger02REF.enable ;enable green trigger used for cleanup MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11Partybus03 3 0 0 set doOnce to 1 ;disable endif elseif getisReference MQ11LDtrig03a MQ11BridgeFodder04a01.enable MQ11BridgeFodder04a01.moveto MQ11BridgeFodder04a01 ; 1xSpawn MQ11EnclaveRiverSniper01.enable ; 3xSpawn MQ11EnclaveRiverSniper01.moveto MQ11EnclaveRiverSniper01 MQ11BridgeEndFodder01.enable MQ11BridgeEndFodder01.moveto MQ11BridgeEndFodder01 MQ11BridgeEndFodder02.enable MQ11BridgeEndFodder02.moveto MQ11BridgeEndFodder02 set doOnce to 1 ;disable elseif getisReference MQ11LDtrig04a MQ11SkybridgeFodder01.enable ; 2xSpawn MQ11SkybridgeFodder01.moveto MQ11SkybridgeFodder01 MQ11SkybridgeFodder02.enable MQ11SkybridgeFodder02.moveto MQ11SkybridgeFodder02 set doOnce to 1 ;disable elseif getisReference MQ11EndBridgePartyBusDestroyTrig if actronaut == MQ11LDPrimeRef MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11PartyBusEndBridgeREF 3 0 0 set doOnce to 1 ;disable endif elseif getisReference MQ11LDNukeTrig02aREF ; Second Prime-tosses-nuke event if isActionRef MQ11LDPrimeREF == 1 MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeNukerMarker02 1 0 0 set doOnce to 1 set MQ11LD.primeTurned to 1 ;disable endif elseif getisReference MQ11LDtrig05a MQ11AlleyFodder01.enable ; 3xSpawn MQ11AlleyFodder01.moveto MQ11AlleyFodder01 MQ11AlleyFodder02.enable MQ11AlleyFodder02.moveto MQ11AlleyFodder02 MQ11AlleyFodder03.enable MQ11AlleyFodder03.moveto MQ11AlleyFodder03 MQ11AlleyFodder01.evp MQ11AlleyFodder02.evp MQ11AlleyFodder03.evp set doOnce to 1 ;disable elseif getisReference MQ11LDtrig06a MQ11Gate02Fodder01.enable ; 3xSpawn MQ11Gate02Fodder01.moveto MQ11Gate02Fodder01 MQ11Gate02Fodder02.enable MQ11Gate02Fodder02.moveto MQ11Gate02Fodder02 MQ11Gate02Fodder03.enable MQ11Gate02Fodder03.moveto MQ11Gate02Fodder03 MQ11Gate02Fodder01.evp MQ11Gate02Fodder02.evp MQ11Gate02Fodder03.evp set doOnce to 1 elseif getIsReference MQ11LDTrigGate02 if Actronaut == MQ11LDPrimeREF ; // Below is stuff to disable Gate #2 set MQ11LD.g02flag to 1 set doOnce to 1 MQ11WaitGate02.disable ; disable gate collision MQ11LDPrimeREF.pms MQ11ff1 MQ11LDPrimeREF.pms MQ11ff2 MQ11LDPrimeREF.pms MQ11ff3 MQ11FieldFX02L.playgroup backward 0 ; fade the gate fx out MQ11FieldFX02R.playgroup backward 0 set MQ11FieldFX02L.doOnce to 1 ;showWarning "Disabling Gate #2" MQ11LDPrimeREF.evp endif elseif getisReference MQ11RiverSpawnTrig MQ11RuinsFodder01.enable ; 3xSpawn MQ11RuinsFodder01.moveto MQ11RuinsFodder01 MQ11RuinsFodder02.enable MQ11RuinsFodder02.moveto MQ11RuinsFodder02 MQ11RuinsFodder03.enable MQ11RuinsFodder03.moveto MQ11RuinsFodder03 MQ11RuinsFodder01.evp MQ11RuinsFodder02.evp MQ11RuinsFodder03.evp set doOnce to 1 ;disable elseif getisReference MQ11CourtyardSpawnTrig MQ11CourtyardFodder01.enable MQ11CourtyardFodder01.moveto MQ11CourtyardFodder01 ; 2xSPawn MQ11CourtyardFodder01.evp MQ11CourtyardFodder02.enable MQ11CourtyardFodder02.moveTo MQ11CourtyardFodder02 MQ11CourtyardFodder02.evp set doOnce to 1 ;disable elseif getisReference MQ11RampSpawnTrig MQ11RampFodder01.enable MQ11RampFodder01.moveto MQ11RampFodder01 ; 3xSpawn MQ11RampFodder01.evp MQ11RampFodder02.enable MQ11RampFodder02.moveTo MQ11RampFodder02 MQ11RampFodder02.evp MQ11RampFodder03.enable MQ11RampFodder03.moveTo MQ11RampFodder03 MQ11RampFodder03.evp set doOnce to 1 ;disable elseif getisReference MQ11RampSpawnTrig02 MQ11Gate03Fodder01.enable MQ11Gate03Fodder01.moveto MQ11Gate03Fodder01 ; 3xSpawn MQ11Gate03Fodder01.evp MQ11Gate03Fodder02.enable MQ11Gate03Fodder02.moveTo MQ11Gate03Fodder02 MQ11Gate03Fodder02.evp MQ11Gate03Fodder03.enable MQ11Gate03Fodder03.moveTo MQ11Gate03Fodder03 MQ11Gate03Fodder03.evp set doOnce to 1 ;disable elseif getIsReference MQ11LDTrigGate03 if Actronaut == MQ11LDPrimeREF ; stuff to disable Gate #3 set MQ11LD.g03flag to 1 set doOnce to 1 MQ11LDPrimeRef.sayTo MQ01SarahREF MQ11LDPrimeLines, 1, 1 ; Make Prime say his line about the Energy Field MQ11WaitGate03.disable ; disable gate collision MQ11LDPrimeREF.pms MQ11ff1 MQ11LDPrimeREF.pms MQ11ff2 MQ11LDPrimeREF.pms MQ11ff3 MQ11FieldFX03L.playgroup backward 0 ; fade the gate fx out MQ11FieldFX03R.playgroup backward 0 set MQ11FieldFX03L.doOnce to 1 MQ11CleanupTrigger04REF.enable ;enables green trigger used for cleanup ;showWarning "Disabling Gate #3" MQ11LDPrimeREF.evp endif elseif getisReference MQ11InBuildingSpawnTrig MQ11BuildingFodder01.enable MQ11BuildingFodder01.moveto MQ11BuildingFodder01 MQ11BuildingFodder01.evp MQ11BuildingFodder03.enable ; 3x spawn MQ11BuildingFodder03.moveto MQ11BuildingFodder03 MQ11BuildingFodder03.evp MQ11BuildingFodder02.enable MQ11BuildingFodder02.moveto MQ11BuildingFodder02 MQ11BuildingFodder02.evp set doOnce to 1 ;disable elseif getisReference MQ11StreetsExplosionTRIG if actronaut == MQ11LDPrimeRef MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11Partybus04 3 0 0 set doOnce to 1 ;disable endif elseif getisReference MQ11RoadVertibirdTrigEnabler if actronaut == MQ11LDPrimeRef MQ11RoadVertibirdTrig.enable ;enable trigger for player to spawn a vertibird set doOnce to 1 ;disable endif elseif getisReference MQ11RoadVertibirdTrig if actronaut == Player MQ11VertibirdRoad01REF.enable 0 ;enable vertibird that flys over road set MQ11VertibirdRoadControlTrig.Vertibird01Stage to 1 ;passing condition to control script for vertibirds flying overhead MQ11VertibirdRoad02REF.enable 0 ;enable vertibird that flys over road set MQ11VertibirdRoadControlTrig.Vertibird02Stage to 1 ;passing condition to control script for vertibirds flying overhead set doOnce to 1 ;disable endif elseif getisReference MQ11PostGate03TRIGa BasinSpawn01a.enable ; 3xSpawn BasinSpawn01a.moveto BasinSpawn01a BasinSpawn01a.evp BasinSpawn01b.enable BasinSpawn01b.moveto BasinSpawn01b BasinSpawn01b.evp BasinSpawn01c.enable BasinSpawn01c.moveto BasinSpawn01c BasinSpawn01c.evp set doOnce to 1 elseif getisReference MQ11PostGate03TRIGb BasinSpawn02a.enable ; 4xSpawn BasinSpawn02a.moveto BasinSpawn02a BasinSpawn02a.evp BasinSpawn02b.enable BasinSpawn02b.moveto BasinSpawn02b BasinSpawn02b.evp BasinSpawn02c.enable BasinSpawn02c.moveto BasinSpawn02c BasinSpawn02c.evp BasinSpawn02d.enable BasinSpawn02d.moveto BasinSpawn02d BasinSpawn02d.evp MQ11BasinBridgeFodder01.enable MQ11BasinBridgeFodder01.moveto MQ11BasinBridgeFodder01 ;3xSpawn MQ11BasinBridgeFodder01.evp MQ11BasinBridgeFodder02.enable MQ11BasinBridgeFodder02.moveto MQ11BasinBridgeFodder02 MQ11BasinBridgeFodder02.evp MQ11BasinBridgeFodder03.enable MQ11BasinBridgeFodder03.moveto MQ11BasinBridgeFodder03 MQ11BasinBridgeFodder03.evp set doOnce to 1 elseif getisReference MQ11PartyBus05PrimeDestroyTrig if actronaut == MQ11LDPrimeREF MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11vertibirdPartyBus05REF 3 0 0 set doOnce to 1 endif elseif getisReference MQ11PrimeNukeFinal if actronaut == MQ11LDPrimeREF ;Prime tosses a nuke from the bridge to destroy a vertibird near the Jefferson Memorial MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeNukeVertibirdTargetLastREF 1 0 0 MQ11CleanupTrigger05REF.enable ;enables green trigger used for cleanup set doOnce to 1 endif elseif getisReference MQ11PrimeDialogueTrigFinal if actronaut == MQ11LDPrimeREF MQ11LDPrimeRef.sayTo MQ01SarahREF MQ11LDPrimeLines, 1, 1 ; Make Prime say his line about the Energy Field set doOnce to 1 endif elseif getisReference MQ11PrimeDestroyVertibirdFinalTrig if actronaut == MQ11LDPrimeRef MQ11LDPrimeRef.useWeapon libertyPrimeLaser MQ11LDPrimeREF MQ11PrimeVertibirdTargetFinalREF 5 0 0 MQ11JeffersonVertibirdLandingREF.enable 0 set doOnce to 1 ;disable endif elseif getisReference MQ11PrimeDestroyVertibirdFinal02Trig if actronaut == MQ11LDPrimeRef && (JeffersonVertibirdDestroyed == 0) MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeVertibirdTargetFinal02REF 1 0 0 MQ11JeffersonVertibirdLandingREF.enable 0 MQ11PlayerVertibirdLandDestroy01Trig.enable set doOnce to 1 ;disable endif elseif getisReference MQ11PrimeVertibirdLandDestroy01Trig if actronaut == MQ11LDPrimeRef && (JeffersonVertibirdDestroyed == 0) MQ11LDPrimeREF.useweapon libertyPrimeLaser MQ11LDPrimeREF MQ11JeffersonVertibirdLandingREF 10 0 0 set JeffersonVertibirdDestroyed to 1 set doOnce to 1 ;disable endif elseif getisReference MQ11FinalSpawnTrig MQ11FinalFodder01.enable ; 5xSpawn MQ11FinalFodder01.moveto MQ11FinalFodder01 MQ11FinalFodder02.enable MQ11FinalFodder02.moveto MQ11FinalFodder02 MQ11FinalFodder03.enable MQ11FinalFodder03.moveto MQ11FinalFodder03 MQ11FinalFodder04.enable MQ11FinalFodder04.moveto MQ11FinalFodder04 MQ11FinalFodder06.enable MQ11FinalFodder06.moveto MQ11FinalFodder06 set doOnce to 1 endif endif ; // ENDIF ---> for main "function" nest ;// Special cases (for multi-function triggers): if getisReference MQ11LDNukeTrig01aREF && doSwarmOnce == 0 ; Piggy-backing Nuke Trigger ;; = The following stuff probably belongs elsewhere ;; = Spawn a swarm of eyebots to attack Prime ;MQ11Swarm01a.enable ; 6xSpawn (eyebots) ;MQ11Swarm01a.moveto MQ11Swarm01a ;MQ11Swarm01a.startcombat MQ11ldPrimeREF ;MQ11Swarm01b.enable ;MQ11Swarm01b.moveto MQ11Swarm01b ;MQ11Swarm01b.startcombat MQ11ldPrimeREF ;MQ11Swarm01c.enable ;MQ11Swarm01c.moveto MQ11Swarm01c ;MQ11Swarm01c.startcombat MQ11ldPrimeREF ;MQ11Swarm01d.enable ;MQ11Swarm01d.moveto MQ11Swarm01d ;MQ11Swarm01d.startcombat MQ11ldPrimeREF ;MQ11Swarm01e.enable ;MQ11Swarm01e.moveto MQ11Swarm01e ;MQ11Swarm01e.startcombat MQ11ldPrimeREF ;MQ11Swarm01f.enable ;MQ11Swarm01f.moveto MQ11Swarm01f ;MQ11Swarm01f.startcombat MQ11ldPrimeREF ;MQ11Swarm01a.evp ;MQ11Swarm01b.evp ;MQ11Swarm01c.evp ;MQ11Swarm01d.evp ;MQ11Swarm01e.evp ;MQ11Swarm01f.evp set doSwarmOnce to 1 ;disable elseif getisReference MQ11LDtrig06a && getStageDone MQ11LD 25 == 0 if actronaut == MQ01SarahREF setStage MQ11LD 25 ;disable ; disable myself endif ; \ v v v v v v v v v v v v v v v v v v v v v v v v v v v v / ;> NOTE - FINAL GATE DISABLE HANDLING IS ON MQ11EndGateSCRIPT < ; / ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ \ endif ; // ENDIF ---> for special case "function" nest endif ; // ENDIF --> triggers only care about particular actors end ; ============================; ; ======== F I N ===============; ; ============================;
537MQ11LDPentagonFlybyTrig01bSCRIPTscn MQ11LDPentagonFlybyTrig01bSCRIPT ;this script handles the vertibirds that flyby near the pentagon at the start of the prime march ;Stage 0 - tell the vertibird01 to playgroup fastforward and vertibird02 to playgroup right ;Stage 1 - tell the vertibird03 to playgroup forward ;Stage 2 - do damage to two of them while they are firing their guns ;Stage 3 - make one explode as it flys by Pentagon ;Stage 4&5 - disable the other two if they are no destroyed ;Stage 6 - all done float timer float Vertibird01ShootTimer float Vertibird02ShootTimer float Vertibird03ShootTimer short stage short Vertibird01Firing short Vertibird02Firing short Vertibird03Firing short V01Cleanup ;used for disabling vertibird short V02Cleanup ;used for disabling vertibird short V03Cleanup ;used for disabling vertibird ;******************************************* Begin onTriggerEnter Player if (stage == 0) MQ11VertibirdBeginning01REF.playgroup fastleft 0 MQ11VertibirdBeginning02REF.playgroup right 0 set timer to 3 set stage to 1 endif End ;******************************************* Begin gameMode if (stage == 1) if (timer <= 0) MQ11VertibirdBeginning03REF.playgroup right 0 set timer to 1 set stage to 2 else set timer to (timer - GetSecondsPassed) endif elseif (stage == 2) if (timer <= 0) set Vertibird02ShootTimer to 2 set Vertibird02Firing to 1 set Vertibird03ShootTimer to 3 set Vertibird03Firing to 1 MQ11VertibirdBeginning02REF.do 200 ;damage vertibird set timer to 6.5 ;after this many seconds the hovering vertibird should being firing set stage to 3 else set timer to (timer - GetSecondsPassed) endif elseif (stage == 3) if (timer <= 0) set Vertibird03Firing to 2 ;stop vertibird from shooting set Vertibird01ShootTimer to 2 set Vertibird01Firing to 1 set V01Cleanup to 1 set V02Cleanup to 1 set V03Cleanup to 1 set stage to 4 else set timer to (timer - GetSecondsPassed) endif endif ;--------------------------------------------------- ; Vertibird Disabling ;--------------------------------------------------- if (V01Cleanup == 1) if (MQ11VertibirdBeginning01REF.getDestroyed == 0) && (MQ11VertibirdBeginning01REF.isAnimPlaying Fastleft == 0) MQ11VertibirdBeginning01REF.disable set V01Cleanup to 2 ;all done endif endif if (V02Cleanup == 1) if (MQ11VertibirdBeginning02REF.getDestroyed == 0) && (MQ11VertibirdBeginning02REF.isAnimPlaying Right == 0) MQ11VertibirdBeginning02REF.disable set V02Cleanup to 2 ;all done endif endif if (V03Cleanup == 1) if (MQ11VertibirdBeginning03REF.getDestroyed == 0) && (MQ11VertibirdBeginning03REF.isAnimPlaying Right == 0) MQ11VertibirdBeginning03REF.disable set V03Cleanup to 2 ;all done endif endif ;--------------------------------------------------- ; Vertibird01 Handling ;--------------------------------------------------- if (Vertibird01Firing == 1) if (Vertibird01ShootTimer <= 0) set Vertibird01Firing to 2 else MQ11VertibirdBeginning01REF.fireWeapon vertibirdgun set Vertibird01ShootTimer to (Vertibird01ShootTimer - GetSecondsPassed) endif elseif (Vertibird01Firing == 2) MQ11LDPrimeREF.useweapon libertyPrimeLaser MQ11LDPrimeREF MQ11VertibirdBeginning01REF 10 0 0 set Vertibird01Firing to 3 endif ;--------------------------------------------------- ; Vertibird02 Handling ;--------------------------------------------------- if (Vertibird02Firing == 1) if (Vertibird02ShootTimer <= 0) set Vertibird02ShootTimer to 2 set Vertibird02Firing to 2 else MQ11VertibirdBeginning02REF.fireWeapon vertibirdgun set Vertibird02ShootTimer to (Vertibird02ShootTimer - GetSecondsPassed) endif endif ;--------------------------------------------------- ; Vertibird03 Handling ;--------------------------------------------------- if (Vertibird03Firing == 1) if (Vertibird03ShootTimer <= 0) set Vertibird03ShootTimer to 2 set Vertibird03Firing to 2 else MQ11VertibirdBeginning03REF.fireWeapon vertibirdgun set Vertibird03ShootTimer to (Vertibird03ShootTimer - GetSecondsPassed) endif endif End ;*******************************************
538MQ11LDPrimeSCRIPTscn MQ11LDPrimeSCRIPT ; script handles artillery explosions happening around Prime dynamically as he moves. ; ; short active ; flag to run the fun float timer float min ; min amount of time between explosions float max ; max time float rng ; difference between min & max (for convenience) float pPosX ; Prime's 3d coords float pPosY float pPosZ float DeltX ; save delta X/Y for comparing Prime loc w/Purity Loc float DeltY float hyp ; save hypotenuse of triangle with sides DeltX and DeltY float PpPosX ; store Project Purity coords float PpPosY float ang ; angle needed to face project purity short flakDice ; vars for randomizing explosion types short flakTypeDice ref flakType float fvar ; generic float variable for temp handling data float distTimer ; spare float timer for distance checking short distActive ;;===========================;; begin onLoad ; set PpPosX to 56765.2773 ; PPMapMarker coords are static. store to vars for convenient formatting ; set PpPosY to -68329.6719 set PpPosX to PPmapMarker.getpos x set PpPosY to PPmapMarker.getpos y set min to 3 set max to 7 set rng to (max - min) ; first value is max time, second is min time end ;;===========================;; begin gameMode ;;; This block handles checking player absence and is seperate from all the other stuff below. ;;; if MQ11LD.PCisAway == 0 if distActive == 0 if player.getDistance MQ11LDPrimeREF > 1500 ; if the player is very far from Prime at all set distActive to 1 set distTimer to 10 ; give the player 10 sec to get near Prime again endif else if distTimer > 0 set distTimer to (distTimer - getSecondsPassed) elseif distTimer <= 0 set distActive to 0 ; stop the cycle if player.getDistance MQ11LDPrimeREF > 4000 ; if player remains away for long. set MQ11LD.PCisAway to 1 ; then flag that MQ11LDPrimeREF.evp ; and wake Prime up. endif endif endif else if player.getDistance MQ11LDPrimeREF <= 4000 set MQ11LD.PCisAway to 0 MQ11LDPrimeREF.evp ; send Prime back on his merry. endif endif ;;; end distance checking stuff, begin main script body ;;; if getStage MQ11LD >= 20 && active == 0 set active to 1 ; conditionalize to begin after gate #1 endif if getStage MQ11LD >= 40 && active == 1 set active to 0 ; condition to end after gate #3 endif if active == 1 ; timer handling if timer > 0 set timer to (timer - getSecondsPassed) else ; Set up required math only when needed ; this is used to figure the offsets, which are set below only when the needed marker has been randomly chosen set pPosX to MQ11LDPrimeREF.getPos X ; store Prime's position as of current frame set pPosY to MQ11LDPrimeREF.getPos Y set pPosZ to (MQ11LDPrimeREF.getPos Z + 64) ; offset z-value to avoid splash damage occlusion ; derive delta and hyp; set fvar to (PpPosX - pPosX) set deltX to fvar ; get sides of triangle formed by Prime and Purity set fvar to (PpPosY - pPosY) set deltY to fvar ; not using hyp with this math. commenting out. ;set hyp to MQ11LDPrimeREF.getDistance PPmapMarker set fvar to (deltY/deltX) set ang to tan fvar 1 set ang to ((ang*-1.0) + 90) pTarg01.setAngle Z ang ; rotate marker to face purity/align smoke trail. set flakTypeDice to getRandomPercent if flakTypeDice < 25 ; randomly choose one of two explosions to cut down on repetition set flakType to FXArtilleryStrike01 else set flakType to FXArtilleryStrike01 endif ; get random value 1-6 set flakDice to (1+ (0.06 * getRandomPercent)) IF MQ11LD.primeTurned == 0 if flakDice == 1 ; create explosion strikes at the randomly chosen point set fvar to (pPosX + 912) ; move pTarg refs to (XYZ) relative to Prime pTarg01.setPos X fvar ; using fvar to temp store addition. setPos takes floats but no math. set fvar to (pPosY - 512); pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 2 set fvar to (pPosX + 1012) pTarg01.setPos X fvar set fvar to (pPosY + 356) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 3 set fvar to (pPosX + 1056) pTarg01.setPos X fvar set fvar to (pPosY + 712) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 4 set fvar to (pPosX + 812) pTarg01.setPos X fvar set fvar to (pPosY - 812) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 5 set fvar to (pPosX + 1112) pTarg01.setPos X fvar set fvar to (pPosY - 312) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 6 set fvar to (pPosX + 1112) pTarg01.setPos X fvar set fvar to (pPosY - 600) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType endif ELSEIF MQ11LD.primeTurned == 1 ; New explosion coords for after Prime has turned the corner and heads south if flakDice == 1 ; create explosion strikes at the randomly chosen point set fvar to (pPosX + 212) ; move pTarg refs to (XYZ) relative to Prime pTarg01.setPos X fvar ; using fvar to temp store addition. setPos takes floats but no math. set fvar to (pPosY - 912); pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 2 set fvar to (pPosX + 156) pTarg01.setPos X fvar set fvar to (pPosY - 1012) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 3 set fvar to (pPosX + 512) pTarg01.setPos X fvar set fvar to (pPosY - 1056) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 4 set fvar to (pPosX - 612) pTarg01.setPos X fvar set fvar to (pPosY - 812) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 5 set fvar to (pPosX - 112) pTarg01.setPos X fvar set fvar to (pPosY - 1112) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType elseif flakDice == 6 set fvar to (pPosX - 400) pTarg01.setPos X fvar set fvar to (pPosY - 1112) pTarg01.setPos Y fvar pTarg01.setPos Z pPosZ pTarg01.placeatme flakType endif ENDIF ; THE STUFF ABOUT PRIME TURNING ; set timer for rand between min and max seconds. set timer to ((getRandomPercent / 100 * rng) + min) endif ; end timer loop endif ; end active == 1 loop end Begin SayToDone MQ11LDPrimeLines if ( GetStage MQ11LD >= 40 ) if ( MQ11.PrimeVoiceStep == 0 ) Set MQ11.PrimeVoiceStep to 1 SayTo Player Mq11LDPrimeLines elseif ( MQ11.PrimeVoiceStep == 1 ) Set MQ11.PrimeVoiceStep to 2 SayTo Player MQ11LDPrimeLines endif endif End
539MQ11LDSCRIPTscn MQ11LDSCRIPT ; Script for MQ11LD sub-quest short Strafe01 ; used for 1st vertibird event short shotCount01 short PrimeAnimVar ; flag bool used for Prime shutting down final pylon short FinalGateFlag ; using this as a hook to time other things... short PrimeTurned ; flag to set if Prime has turned off the Key Bridge and south on the Boulevard to the Jefferson short PCisAway ; flag to track if player has walked away from Prime short g01flag ; vars used to activate dummy scripts for minor gates. short g02flag short g03flag
540MQ11PartyBusSCRIPTscn MQ11PartyBusSCRIPT short doOnce short active short init float timer begin onDestructionStageChange 3 if doOnce == 0 set active to 1 set init to 1 set doOnce to 1 endif MQ11LDPrimeREF.evp end begin gameMode if active == 1 ; main loop set on by destroy if init == 1 ; run-once setup set timer to 3 ; delay 3 sec for navmesh update set init to 0 endif if timer > 0 set timer to (timer - getSecondsPassed) ; decrement timer elseif timer <= 0 set active to 0 ; close loop if getIsReference MQ11PartyBus01 ; update quest stage specific to vertibird reference setStage MQ11LD 21 elseif getIsReference MQ11PartyBus02 setStage MQ11LD 22 elseif getIsReference MQ11PartyBus03 setStage MQ11LD 23 elseif getIsReference MQ11PartyBus04 setStage MQ11LD 24 endif MQ11LDPrimeREF.evp ; nudge him endif endif end
541MQ11PrimeNukesSCRIPTscn MQ11PrimeNukesSCRIPT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; NOTE NOTE NOTE NOTE NOTE ;;; all this stuff has been MOVED ;;; now living in ;;; --- MQ11LDMasterTriggerSCRIPT --- ;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; A single script meant to work with multiple triggers ; when a trigger is hit, one of Prime's scripted fatman nuke attacks happens begin onTriggerEnter MQ11LDPrimeREF if getisID MQ11PrimeNukeTrig01 == 1 MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeNukerMarker01 1 0 0 ;; = The following stuff probably belongs elsewhere ;; = Spawn a swarm of eyebots to attack Prime MQ11Swarm01a.enable MQ11Swarm01b.enable MQ11Swarm01c.enable MQ11Swarm01d.enable MQ11Swarm01e.enable MQ11Swarm01f.enable MQ11Swarm01a.evp MQ11Swarm01b.evp MQ11Swarm01c.evp MQ11Swarm01d.evp MQ11Swarm01e.evp MQ11Swarm01f.evp MQ11Swarm01a.startcombat MQ11ldPrimeREF MQ11Swarm01b.startcombat MQ11ldPrimeREF MQ11Swarm01c.startcombat MQ11ldPrimeREF MQ11Swarm01d.startcombat MQ11ldPrimeREF MQ11Swarm01e.startcombat MQ11ldPrimeREF MQ11Swarm01f.startcombat MQ11ldPrimeREF elseif getisID MQ11PrimeNukeTrig02 == 1 MQ11LDPrimeREF.useweapon libertyPrimeWeapBomb MQ11LDPrimeREF MQ11PrimeNukerMarker02 1 0 0 endif ; always disable after Prime triggers me disable end
542MQ11Vertibird01DummySCRIPTscn MQ11Vertibird01DummySCRIPT ; // dummy object will run this script to control firing of the vertibird over the Key Bridge ; start timestamp 3.33sec ; end timestamp 12.33 ;///////////////////////////////////////////////////////////// float timer ; basic firing timer float RoFtimer ; timer to control rate of fire float RoF ; control var for rate of fire float burstTimer ; used to fire bursts float TSbegin ; timestamp to start firing float TSend ; timestamp to end firing short FiringFlag ; flag for basic fire loop short burstFlag ; flag for burst fire loop short burstCount ; used to track individual shots short isFlying01 short isFlying02 ;///////////////////////////////////////////////////////////// begin onLoad set RoF to 0.1 ; flexible place to determine vars set TSbegin to 8.33 set TSend to 12.33 end ;///////////////////////////////////////////////////////////// begin gameMode if MQ11LD.strafe01 == 1 ; quest var thrown from master trigger script if (isFlying01 == 0) set isFlying02 to 1 set isFlying01 to 1 endif if timer < TSend set timer to (timer + getSecondsPassed) ; time to start firing? if timer > TSbegin && firingFlag == 0 set firingFlag to 1 endif else ; finished firing set MQ11LD.strafe01 to 0 set firingFlag to 0 endif if firingFlag == 1 if RoFtimer >= RoF set burstFlag to 1 set MQ11LD.shotcount01 to (MQ11LD.shotcount01 + 3) set RoFtimer to 0 else set RoFtimer to (RoFtimer + getSecondsPassed) endif if burstFlag == 1 set burstTimer to (burstTimer + getSecondsPassed) if burstTimer > 0 && burstCount == 0 MQ11Vertibird01.fireWeapon vertibirdgun set burstCount to 1 elseif burstTimer >= 0.005 && burstCount == 1 MQ11Vertibird01.fireWeapon vertibirdgun set burstCount to 2 elseif burstTimer >= 0.01 && burstCount == 2 MQ11Vertibird01.fireWeapon vertibirdgun ; finished with burst, reset variables for next burst set burstCount to 0 set burstFlag to 0 set burstTimer to 0 endif endif ; / burstFlag == 1 endif ; / firingFlag == 1 endif ; / strafe01 == 1 if (isFlying02 == 1) if (MQ11Vertibird01.isAnimPlaying FastForward == 0) && (MQ11Vertibird01.getDestroyed == 0) MQ11Vertibird01.disable set isFlying02 to 0 endif endif end
543MQ11VertibirdRoadControlTrigSCRIPTscn MQ11VertibirdRoadControlTrigSCRIPT float timer short Vertibird01Stage short Vertibird02Stage ;************************************************* Begin gameMode if (Vertibird01Stage == 1) set timer to .5 set Vertibird01Stage to 2 elseif (Vertibird01Stage == 2) if (timer <= 0) MQ11VertibirdRoad01REF.playgroup Right 0 set Vertibird01Stage to 3 else set timer to (timer - GetSecondsPassed) endif elseif (Vertibird01Stage == 3) if (MQ11VertibirdRoad01REF.isAnimPlaying Right == 0) MQ11VertibirdRoad01REF.disable set Vertibird01Stage to 4 endif endif ;--------------------------------------------------------- if (Vertibird02Stage == 1) set timer to .5 set Vertibird02Stage to 2 elseif (Vertibird02Stage == 2) if (timer <= 0) MQ11VertibirdRoad02REF.playgroup Right 0 set Vertibird02Stage to 3 else set timer to (timer - GetSecondsPassed) endif elseif (Vertibird02Stage == 3) if (MQ11VertibirdRoad02REF.isAnimPlaying Right == 0) MQ11VertibirdRoad02REF.disable set Vertibird02Stage to 4 endif endif End ;*************************************************
544MS01BigTownSuperMutantScriptscn MS01BigTownSuperMutantScript short talking ; used to control SayTo's short stopSneak ; set to 1 if player gets in combat with me -- remove Big Town from sneak faction ;is used to get them talking while they stomp around Begin GameMode if getAV Variable01 == 1 setav Variable01 2 endif if ms01.taunt == 1 if getDead == 0 if IsInCombat == 0 if GetIsReference MS01BigTownSuperMutant1Ref == 1 || GetIsReference MS01BigTownSuperMutant2Ref == 1 if MS01BigTownSuperMutant1Ref.talking == 0 && MS01BigTownSuperMutant2Ref.talking == 0 set talking to 1 say MS01MutantTaunt 1 endif endif endif endif endif if stopSneak == 0 if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set stopSneak to 1 setEnemy MS01BigTownMutantFaction BigTownFaction endif endif endif End Begin OnStartCombat ; turn off taunting if they go into combat set MS01.taunt to 0 End Begin OnDeath set MS01.mutantCount to MS01.mutantCount - 1 if MS01.mutantCount <= 0 set MS01.MutantsDealtWith to 1 endif End Begin SayToDone MS01MutantTaunt set talking to 0 End Begin OnPackageDone MS01SuperMutantsLeaveBigTown if MS01.mutantsDealtWith == 0 set MS01.mutantsDealtWith to 1 set MS01.townEVP to 1 endif End
545MS01CrowdScriptscn MS01CrowdScript ;used to get the crowd of townsfolk to mob talk at once in a natural but controlled way ;note because this script is not being passed any variables set on any of the actors "SayToDone" blocks... don't use this script to generate crowd babble unless you know they aren't talking short init ;doOnce - set up your variables here ;why use ref variables? So that if I need to I can always copy this stuff into another quest easier ref speaker1Ref ref speaker2Ref ref speaker3Ref ref speaker4Ref ref speaker5Ref ref speaker6Ref ref speaker7Ref ref speaker8Ref ;who should the speaker sayTo when speaking 0 = no one in particular, player = player, reference is the reference to look at (can be a reference variable if set before you set this variable) ref speaker1SayToTargetRef ref speaker2SayToTargetRef ref speaker3SayToTargetRef ref speaker4SayToTargetRef ref speaker5SayToTargetRef ref speaker6SayToTargetRef ref speaker7SayToTargetRef ref speaker8SayToTargetRef float speaker1StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker1StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker2StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker2StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker3StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker3StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker4StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker4StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker5StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker5StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker6StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker6StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker7StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker7StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered float speaker8StartTimeMin ;the soonest the actor will exclaim something after "crowd say mode" is triggered float speaker8StartTimeMax ;the latest the actor will exclaim something after "crow say mode" is triggered short speaker1Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker2Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker3Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker4Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker5Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker6Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker7Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again short speaker8Spoke ; 0 = unset, 1 = spoke, - 1 = ready to speak again float timer short crowdSay ;0 = unset, 1 = ready to start talking, 2 = talking Begin GameMode if init == 0 ;set up your variables here -- also don't forget to change which topic people are say/sayTo'ing... do a text search for ";say topic" to find them below set speaker1Ref to RedRef set speaker1StartTimeMin to 1 set speaker1StartTimeMax to 1 set speaker2Ref to FlashRef set speaker2StartTimeMin to 4 set speaker2StartTimeMax to 4 set speaker3Ref to PappyRef set speaker3StartTimeMin to 7 set speaker3StartTimeMax to 7 set speaker4Ref to BittercupRef set speaker4StartTimeMin to 9 set speaker4StartTimeMax to 9 set speaker5Ref to StickyRef set speaker5StartTimeMin to 15 set speaker5StartTimeMax to 15 set speaker6Ref to ShortyRef set speaker6StartTimeMin to 11 set speaker6StartTimeMax to 11 set speaker7Ref to KimbaRef set speaker7StartTimeMin to 12 set speaker7StartTimeMax to 12 set speaker8Ref to TimebombRef set speaker8StartTimeMin to 13 set speaker8StartTimeMax to 13 set speaker1SayToTargetRef to speaker2Ref set speaker2SayToTargetRef to speaker3Ref set speaker3SayToTargetRef to speaker4Ref set speaker4SayToTargetRef to speaker5Ref set speaker5SayToTargetRef to speaker6Ref set speaker6SayToTargetRef to speaker7Ref set speaker7SayToTargetRef to speaker8Ref set speaker8SayToTargetRef to speaker1Ref set init to 1 endif if crowdSay == 1 setQuestDelay MS01Crowd .01 set crowdSay to 2 set timer to 0 elseif crowdSay == 2 set timer to timer + getSecondsPassed if speaker1Ref.getDead == 1 set speaker1spoke to 999 endif if speaker2Ref.getDead == 1 set speaker2spoke to 999 endif if speaker3Ref.getDead == 1 set speaker3spoke to 999 endif if speaker4Ref.getDead == 1 set speaker4spoke to 999 endif if speaker5Ref.getDead == 1 set speaker5spoke to 999 endif if speaker6Ref.getDead == 1 set speaker6spoke to 999 endif if speaker7Ref.getDead == 1 set speaker7spoke to 999 endif if speaker8Ref.getDead == 1 set speaker8spoke to 999 endif if speaker1spoke <= 0 if timer >= speaker1StartTimeMax set speaker1spoke to 1 if speaker1SayToTargetRef == 0 speaker1Ref.say MS01CrowdSay ;say topic else speaker1Ref.sayTo speaker1SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker2spoke <= 0 if timer >= speaker2StartTimeMax set speaker2spoke to 1 if speaker2SayToTargetRef == 0 speaker2Ref.say MS01CrowdSay ;say topic else speaker2Ref.sayTo speaker2SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker3spoke <= 0 if timer >= speaker3StartTimeMax set speaker3spoke to 1 if speaker3SayToTargetRef == 0 speaker3Ref.say MS01CrowdSay ;say topic else speaker3Ref.sayTo speaker3SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker4spoke <= 0 if timer >= speaker4StartTimeMax set speaker4spoke to 1 if speaker4SayToTargetRef == 0 speaker4Ref.say MS01CrowdSay ;say topic else speaker4Ref.sayTo speaker4SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker5spoke <= 0 if timer >= speaker5StartTimeMax set speaker5spoke to 1 if speaker5SayToTargetRef == 0 speaker5Ref.say MS01CrowdSay ;say topic else speaker5Ref.sayTo speaker5SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker6spoke <= 0 if timer >= speaker6StartTimeMax set speaker6spoke to 1 if speaker6SayToTargetRef == 0 speaker6Ref.say MS01CrowdSay ;say topic else speaker6Ref.sayTo speaker6SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker7spoke <= 0 if timer >= speaker7StartTimeMax set speaker7spoke to 1 if speaker7SayToTargetRef == 0 speaker7Ref.say MS01CrowdSay ;say topic else speaker7Ref.sayTo speaker7SayToTargetRef MS01CrowdSay ;say topic endif endif elseif speaker8spoke <= 0 if timer >= speaker8StartTimeMax set speaker8spoke to 1 if speaker8SayToTargetRef == 0 speaker8Ref.say MS01CrowdSay ;say topic else speaker8Ref.sayTo speaker8SayToTargetRef MS01CrowdSay ;say topic endif endif endif if speaker1spoke >= 1 && speaker2spoke >= 1 && speaker3spoke >= 1 && speaker4spoke >= 1 && speaker5spoke >= 1 && speaker6spoke >= 1 && speaker7spoke >= 1 && speaker8spoke >= 1 set crowdSay to 0 set speaker1spoke to -1 set speaker2spoke to -1 set speaker3spoke to -1 set speaker4spoke to -1 set speaker5spoke to -1 set speaker6spoke to -1 set speaker7spoke to -1 set speaker8spoke to -1 set timer to 0 if MS01.townCheer == 1 set MS01.townCheer to - 1 endif setQuestDelay MS01Crowd 0 ;set it back to the default endif endif End
546MS01Lucky8BallScriptscn MS01Lucky8BallScript Begin OnAdd player player.addspell MS01Lucky8BallAbility ; ShowMessage MS01LuckActiveMsg End Begin OnDrop player player.removeSpell MS01Lucky8BallAbility ShowMessage MS01LuckInactiveMsg End
547MS01MutantConvTriggerScriptscn MS01MutantConvTriggerScript short doOnce Begin OnTriggerEnter Player if doOnce == 0 set MS01.StartMutantConv to 1 LDGermHQSuperMutant3rdFloorARef.evp set DoOnce to 1 endif End
548MS01MutantTrigger2Scriptscn MS01MutantTrigger2Script ;used to get the Super Mutants talking to themselves as they stomp around town - sets a Quest Variable which is condition in if statement on the mutant's scripts ;also used to get the crowd of towns people talking when the player returns after rescuing Red ;also used to evp Sticky, Shorty, and Red when the player arrives with them short doOnce short doOnce2 short doOnce3 short stickyevp Begin OnLoad ; used to move Red/Shorty back to Big Town if the players leaves them behind ;if the player rescued Red, but then didn't escort her back to Big Town, she makes it out on her own. if getStageDone MS01 80 == 0 if RedRef.rescued == 1 && RedRef.followingPlayer != 1 && RedRef.followingPlayer != 2 && RedRef.GetItemCount MS13Collar == 0 if RedRef.getDead ==0 if RedRef.getDistance player > 9000 RedRef.moveto xMS01BigTown setstage MS01 80 endif endif endif endif if getStageDone MS01 90 == 0 if ShortyRef.rescued == 1 && ShortyRef.followingPlayer != 1 && ShortyRef.followingPlayer != 2 if ShortyRef.getDead ==0 if player.GetInCell GermPoliceHQ == 0 if ShortyRef.getDistance player > 9000 ShortyRef.moveto xMS01BigTown setstage MS01 90 endif endif endif endif endif End Begin OnTriggerEnter if doOnce == 0 if IsActionRef MS01BigTownSuperMutant1Ref == 1 || IsActionRef MS01BigTownSuperMutant2Ref == 1 set MS01.taunt to 1 if MS01.shoot > 0 set MS01.townShootMutants to 1 endif set doOnce to 1 endif endif End Begin OnTriggerEnter player ; only greet player if she picked up quest from Big Town if RedRef.Rescued >= 1 && getStageDone MS01 10 == 1 if doOnce2 == 0 set MS01.townMob to 2 ;move them to "greet" the player set MS01.townEVP to 1 set doOnce2 to 1 endif endif end Begin OnTriggerEnter StickyRef ; if player fast travels to Big Town with Sticky, make sure he picks up his "arrival" package immediately if stickyevp == 0 set stickyevp to 1 StickyRef.evp endif End Begin OnTriggerEnter RedRef ; if player fast travels to Big Town with Red, count as "arrived" if getStageDone MS01 80 == 0 setstage MS01 80 RedRef.evp endif End Begin OnTriggerEnter ShortyRef ; if player fast travels to Big Town with Shorty, count as arrived if getStageDone MS01 90 == 0 setstage MS01 90 ShortyRef.evp endif End
549MS01MutantTriggerScriptscn MS01MutantTriggerScript short doOnce short doOnce2 float timer ; used to delay making mutants enemy so sentry has time to switch packages short runTimer ; set to 1 to run timer ref myActionRef Begin OnTriggerEnter if doOnce == 0 set myActionRef to GetActionRef If myActionRef.GetInFaction MS01BigTownMutantFaction == 1 ; showwarning "MS01: Mutants hit trigger" set doOnce to 1 set MS01.mutants to 1 BigtownSentryRef.evp set runTimer to 1 set timer to 5 endif endif End Begin OnTriggerLeave if doOnce2 == 0 if MS01.mutantsLeave == 1 ;if the supermutants are leaving, once they get far enough mark them "dealt with" if IsActionRef MS01BigTownSuperMutant1Ref == 1 || IsActionRef MS01BigTownSuperMutant2Ref == 1 set MS01.mutantsDealtWith to 1 set MS01.townEVP to 1 set doOnce2 to 1 endif endif endif End begin gamemode if runTimer == 1 set timer to timer - GetSecondsPassed if timer < 0 set runTimer to 2 ; make mutants enemies of Big Town faction at this point, unless doing sneak path if MS01.sneak == 0 setEnemy MS01BigTownMutantFaction BigTownFaction endif endif endif end
550MS01ProtectronScriptscn MS01ProtectronScript short resurrected ;used as a condition on package so NPC "repairs" the OTHER Protectron short repairMe ; set by NPC package to simulate them fixing it ; 1 = trigger repair ; 2 = repaired short button Begin OnActivate if resurrected == 0 if IsActionRef player == 1 if ( ms01.robot == 1 || ms01.robot == 2 ) && resurrected != 1 showMessage MS01ProtectronMessage endif endif else Activate endif End Begin GameMode set button to getButtonPressed if button == 1 ;repair protectron if resurrected != 1 setGhost 0 resurrect 1 set resurrected to 1 if ms01.robot == 1 set ms01.robot to 2 ;condition so NPCs "repair" the other robot elseif ms01.robot == 2 set ms01.robot to 3 ;condition so NPCs don't repair the second robot since the player already did set ms01.townEVP to 1 ;EVPs everyone in town endif endif endif if repairMe == 1 set repairMe to 2 if ms01.robot == 2 && resurrected != 1 setGhost 0 resurrect 1 set resurrected to 1 set ms01.robot to 3 ;condition on packages meaning "repair" lessson is done. endif endif End
551MS01QuestScriptscn MS01QuestScript short playerRefused ;1 = player refused to help, set in and used as condition by MS01QuestXXX topics in MS01 Dialog short playerAgreed ;1 = player agreed to help, set in and used as condition by MS01QuestXXX topics in MS01 Dialog short startMutantConv ;used to "trigger" the conversation between supermutants -- see package MS01MutantConversationA, set by trigger box script short mutantConvStage ;a variable used by MS01MutantConverstaion conversation topic as condition to control the conversation float teachTimer short Shoot ;1 = stand at marker, 2 = shoot (condition on packages) short Sneak ;1 = follow player for sneak training, 2 = take up positions at markers short Robot ;1 = follow player watch player fix robot, 2 = attempt to fix robot short RobotFixing ; 1 = someone has picked up a robot fixing package, nobody else run it short Mine ;1 = follow player watch player plant mine, 2 = plant your own mine at x markers short PlayerDefend ;1 = the player will defend Big Town short townEVP ;1 = evp everyone in town (used for crowd behavior when "teaching" them survival skills short townEVPCount ;how many times townEVP has been called (for debugging purposes) short townMob ;1 = everyone wander in the center of town, 2 = "greet" the player, 3 = stop waiting (used to have everyone greet the player when he returns from the Germantown PDQD short trained ;0 = unset, 1 = town was trained in self defense of some kind -- used as condition on the packages of MS01BigTownSuperMutant1 and 2 short mutants ;0 = unset, 1 = mutants approaching town, used to get the sentry to warn the town short taunt ;0 = unset, 1 = super mutants should start verbally taunting - set in MS01SuperMutantTrigger2Script used by MS01SuperMutants scripts short tauntStage ;incremental variabled used by MS01 conversation topic MS01MutantTaunt short mutantsLeave ;1 = if the towns people hide the mutants eventually leave and go somewhere else (package condition) short townCheer ; 1 = cheer, -1 = go back to life as normal short talking ;someone is talking during the waiting for player to teach town something scene, cleared in MS01 Greeting short randomQuestionerDieRoll short townShootMutants ;0 = unset, 1 = towns people should move into position to kill mutants (set in MS01SentryWarnShoot, and MS01MutantTrigger2Script) short mutantsDealtWith ;0 = unset, 1 = killed or evaded -- used as condition on CrowdSay and packages to get the town to congratulate the player short mutantCount ; set when mutants are enabled -- how many mutants are attacking? when reduced to 0, mutantsDealthWith set to 1 short killTown ;0 = unset, 1 = town should be killed offscreen (because the player didn't help them), -1 town has been killed float killTownDay ;the day when the town should be killed offscreen short townHasGuns ;a doOnce ; manual robot kill do once vars short killRobot1 short killRobot2 Begin GameMode ; kill robots if they haven't already been repaired if killRobot1 == 0 set killRobot1 to 1 if MS01Protectron1Ref.resurrected == 0 MS01Protectron1Ref.setDestroyed 1 MS01Protectron1Ref.kill MS01Protectron1Ref.setGhost 1 endif endif if killRobot2 == 0 set killRobot2 to 1 if MS01Protectron2Ref.resurrected == 0 MS01Protectron2Ref.setDestroyed 1 MS01Protectron2Ref.kill MS01Protectron2Ref.setGhost 1 endif endif ; kill Bigtown if player abandons it after rescuing Red & Sticky if killTown == 1 && mutantsDealtWith == 0 if killTownDay < GameDaysPassed if player.getInCell BigTown == 0 && player.IsInInterior == 1 setStage MS01 251 set killTown to -1 endif endif endif if mutantsDealtWith == 1 ;set below and in MS01BigTownSuperMutantScript setFactionReaction BigTownFaction playerFaction 100 ;turn off the various "scene variables" so people go back to their normal packages set shoot to -shoot set sneak to -sneak set robot to -robot set mine to -mine set townCheer to 1 set townEVP to 1 set MS01Crowd.crowdSay to 1 setStage MS01 200 set MS01.mutantsDealtWith to 2 endif if townCheer == -1 ;SET IN MS01CrowdQuestScript ;if the cheering mob talking scene is done StopQuest MS01 StopQuest MS01Crowd set townCheer to -2 endif endif if townCheer < 0 && townMob > 0 ;get them off their mobGreet packages set townMob to -1 set townEvp to 1 endif ;make the town say stuff while waiting for the player to teach them if trained == 0 if (sneak == 1 || shoot == 1 || robot == 1 || mine == 1) && sneak < 2 && shoot < 2 && robot < 2 && mine < 2 if talking == 0 set randomQuestionerDieRoll to getRandomPercent if randomQuestionerDieRoll <= 10 && BitterCupRef.getDead == 0 set talking to 1 BitterCupRef.say GREETING elseif randomQuestionerDieRoll <= 20 && FlashRef.getDead == 0 set talking to 1 FlashRef.say GREETING elseif randomQuestionerDieRoll <= 30 && KimbaRef.getDead == 0 set talking to 1 KimbaRef.say GREETING elseif randomQuestionerDieRoll <= 40 && PappyRef.getDead == 0 set talking to 1 PappyRef.say GREETING elseif randomQuestionerDieRoll <= 50 && RedRef.getDead == 0 set talking to 1 RedRef.say GREETING elseif randomQuestionerDieRoll <= 60 && ShortyRef.getDead == 0 set talking to 1 ShortyRef.say GREETING elseif randomQuestionerDieRoll <= 70 && StickyRef.getDead == 0 set talking to 1 StickyRef.say GREETING elseif randomQuestionerDieRoll <= 80 && TimeBombRef.getDead == 0 set talking to 1 TimeBombRef.say GREETING endif endif endif endif ;check for player laying mines if mine == 1 if IsPlayerActionActive 4 == 1 ; finish teaching, trigger mine laying packages set mine to 2 endif endif ;set a timer for how long the player is in sneak mode while he is "teaching" Big Town if sneak == 1 if player.IsSneaking == 1 if teachTimer > MS01TeachTime set sneak to 2 ;make mutants not perceptive, to help the player out if he's trying to be sneaky, but not if he's going to step out into the open MS01BigTownSuperMutant1Ref.setav Perception 1 MS01BigTownSuperMutant1Ref.setav Sneak 1 MS01BigTownSuperMutant2Ref.setav Perception 1 MS01BigTownSuperMutant2Ref.setav Sneak 1 else set teachTimer to teachTimer + getSecondsPassed endif endif endif ;Note: robot is set to 3 in the MS01ProtectronScripts OnActivate block when the player activates one of the robots; if (trained == 0) if (sneak == 2 || shoot == 2 || robot == 3 || mine == 2 || playerDefend == 1) setstage MS01 70 if MS01Crowd.crowdSay <= 0 set MS01Crowd.crowdSay to 1 endif ; make them your allies setAlly PlayerFaction BigTownFaction set trained to 1 if mine != 2 ; don't do this for mines to prevent hitch when they all get their mines set townEVP to 1 ;do once, townsfolk EVP endif endif endif ;spawn the super mutants and get them moving into town if trained == 1 set trained to 2 MS01BigTownSuperMutant1Ref.enable MS01BigTownSuperMutant2Ref.enable MS01BigTownSuperMutant1Ref.EVP MS01BigTownSuperMutant2Ref.EVP ; how may mutants? set mutantCount to 2 if sneak == 0 && mine == 0 ; enable more if doing one of the combat paths set mutantCount to 4 MS01BigTownSuperMutant3Ref.enable MS01BigTownSuperMutant4Ref.enable endif if shoot >= 1 ; up everyone's confidence from being trained to fight ShortyRef.setav confidence 3 BittercupRef.setav confidence 3 FlashRef.setav confidence 3 RedRef.setav confidence 3 PappyRef.setav confidence 3 TimebombRef.setav confidence 3 KimbaRef.setav confidence 3 StickyRef.setav confidence 3 endif endif if townEVP == 1 RedRef.evp FlashRef.evp PappyRef.evp BitterCupRef.evp StickyRef.evp ShortyRef.evp KimbaRef.evp TimeBombRef.evp ; don't evp sentry as this can break certain things ; BigTownSentryRef.evp MS01Protectron1Ref.evp MS01Protectron2Ref.evp set townEVPCount to townEVPCount + 1 set townEVP to 0 endif End
552MS01StickyGoodbyeTriggerScriptscn MS01StickyGoodbyeTriggerScript short doOnce Begin OnTriggerEnter player if doOnce == 0 set StickyRef.goodbyeStage to 1 set doOnce to 1 endif End
553MS01TemporaryFriendsTriggerScriptscn MS01TemporaryFriendsTriggerScript ; make Red temporarily a friend of the mutants in the jail area Begin OnTriggerEnter RedRef RedRef.addToFaction MS01TemporaryFriends 0 End Begin OnTriggerLeave RedRef RedRef.RemoveFromFaction MS01TemporaryFriends End
554MS01TriggerJunkyardScriptscn MS01TriggerJunkyardScript ;senses when the player is firing at the shooting range during the teach the town to shoot guns scene Begin OnHit ;showwarning "projectile hit me." if MS01.shoot == 1 set MS01.shoot to 2 set MS01.townEVP to 1 MS01TriggerJunkyard1Ref.disable ;no need to sense all the projectiles that the bigtown people shoot into it MS01TriggerJunkyard2Ref.disable endif End
555MS02QuestScriptscn MS02QuestScript ;related scripts: ;MS02IdQuestScript -- holds variables for which persona the Mechanist and AntAgonist are currently wearing ;The MS02Id stages get set whenever I want to make the Mechanist/AnAgonizer switch into their Super or Secret Identities short init ;a "do once" to intialize variables in the GameMode block ;variables to hold AI data that I change during battle scene to keep them from fighting, and change back once they are in their lairs short AntAgonizerAggresion short AntAgonizerConfidence short AntAgonizerAssistance short MechanistAggresion short MechanistConfidence short MechanistAssistance short AntAgonizerDamageResist short MechanistDamageResist short battleStage ;used to control say "conversation" during the initial battle scene -- set and checked by infos in MS02Confrontation topic short battleStages ;how many lines are there in the batttle say "conversation" -- used to end the battle scene after they are done short talking ;means someone is talking and is unset in SayToDone block or in the Result Script End of an info -- used to control the timing of say and sayTo functions short battle ;0 = battle is cued to happen, 1= battle should play out, 2 = battle should end -- used on packages and set in this script ref battleRef ;reference to the xMarker that is the center of the battle field short distanceToBattle ;how close does the player need to be battleRef to start the battle rolling? short RoeInfo ;1 = told about Mechanist or AntAgonizer, 2 = told about both (options up option to ask for more which gets player directed to Derek) short DominicInfo short MacheteInfo short PorterInfo short derekKnowledge ;1 = someone told player that Derek knows alot about the supers (used as condition in dialog) short DerekSecret ;1 = derek told the player about the supers being his idea short bailedOut ;0 = unset, 1 = one or both of the supers got into combat and so the battle scene ended prematurely short battleDone ;1 = battle is done, and supers should escape short mechanistEscaped ;1 = the mechanist has left the battle scene (used as condition on package and set by MS02MechanistEscape pack) short antAgonizerEscaped ;1 = the AntAgonizer has left the battle scene (used as condition on package and set by MS02AntAgonizerEscape pack) short mechanistRetired ;1 = he is retired, 2 = removed suit and is now wandering the wasteland until disabling short antAgonizerRetired ;1 = he is retired, 2 = removed suit and is now wandering the wasteland until disabling short AntAgonizerLeave ;set after she gets the Mechanist's suit, she walks out to the wasteland then disables so she's available for random encounter short MechanistLeave ;set after he gets the AndAgonizer's suit, he walks out to the wasteland then disables so he's available for random encounter short mechanistWantsSuit ;mechanist is going to go get the AntAgonizer suit, or demands it from the player if he has it short antAgonizerWantsSuit ;AntAgonizer is going to go get the Mechanist suit, or demands it from the player if he has it ;Fred's variables for revisions short DoublePay ;1 = the player convinced Roe to pay double. short AntAgonizerName ;1 = the player knows the Ant Agonizer's name (which makes it possible to speech challenge her) short AALair ;1 = the player has been told about the AntAgonizer's lair short MLair ;1 = the player has been told about the Mechanist's lair short MechanistWeakness ;1 = the player knows the Mechanist's "weakness" according to Derek, and can play off of it short BattleOver ;1 = the battle has ended, all the creatures are dead. short MechanistRaiding ;1 = the Mechanist is raiding the AntAtagonizer's lair, and attacking the player. short AntAgonizerRaiding ;1 = the AntAtagonizer is raiding the Mechanist's lair, and attacking the player. short AntOrigin ;1 = the player has read the MS02HubrisComicsNOTE letter to the editor and learned the original story of the Ant Agonizer short SuitRetire ;0 or 1, for tracking which speech challenge the player is attempting during the "suit" conversation short MechRetireTried ;0 = player has not tried to get the Mechanist to retire, 1 = player has tried and failed. short KilledBefore ;Set if the player kills the supers before getting a chance to accept the quest. If so, then Roe will reward the player when he speaks with them. short MDoOnce ;Set to disable the Mechanist when he flees short AADoOnce ;Set to disable the AntAgonizer when she flees ;Super resolutions short AADead ;Is AntAgonizer dead? short AARetired ;Is AntAgonizer retired? short AALeft ;Did AntAgonizer leave? short MDead short MRetired short MLeft ;OBSOLETE VARIABLES------------ ;short mechanistSuspected ;1 = Derek told the player, 2 = player saw him actually put on/take off the suit ;short antAgonizerSuspected ;1 = Derek told the player, 2 = player saw him actually put on/take off the suit ;short mechanistExposed ;1 = player knows he's the super, and the super will talk to him as if he was wearing his suit (he'll ask the player for help defeating his nemesis, etc.) ;short antAgonizerExposed ;1 = player knows he's the super, and the super will talk to him as if he was wearing his suit (he'll ask the player for help defeating his nemesis, etc.) ;short mechanistWontTalk ;1 = won't talk to the player any more (player tried forcing him to give up the suit and has bad karma) ;short antAgonistWontTalk ;1 = won't talk to the player any more (player tried forcing him to give up the suit and has bad karma) ;short townTalkedAboutBattle ;1 = someone in town talked about the super battle... this is so that the first person the player talked to will talk about it, but not all the towns people greetings will rehash it ;------------------------------------------------- Begin GameMode if init == 0 set battleRef to xMS02BattleCenter set distanceToBattle to 3500 set battleStages to 9 ;store starting AI data and set them up for non-combat for the battle scene: set AntAgonizerAggresion to AntAgonizerRef.getAV Aggression set AntAgonizerConfidence to AntAgonizerRef.getAV Confidence set AntAgonizerAssistance to AntAgonizerRef.getAV Assistance set MechanistAggresion to MechanistRef.getAV Aggression set MechanistConfidence to MechanistRef.getAV Confidence set MechanistAssistance to MechanistRef.getAV Assistance ;set AntAgonizerDamageResist to AntAgonizer.getAV DamageResist ;set MechanistDamageResist to Mechanist.getAV DamageResist AntAgonizerRef.setAV Aggression 0 AntAgonizerRef.setAV Confidence 0 AntAgonizerRef.setAV Assistance 0 MechanistRef.setAV Aggression 0 MechanistRef.setAV Confidence 0 MechanistRef.setAV Assistance 0 AntAgonizerRef.modAV Health 500 MechanistRef.modAV Health 500 ;DEBUG ;showWarning "Init set" set init to 1 endif ;Control the Battle Scene: if battle == 0 if player.getDistance battleRef < distanceToBattle ;battleref is reference variable set in "init block" above ;start the battle scene - begin with taunting ;just in case: MechanistRef.stopCombat AntAgonizerRef.stopCombat ;DEBUG ;showWarning "Trigger" set battle to 1 ;The AI data is set back to normal in the MS02XXXEscape On End result script endif elseif battle == 1 ;end the scene if the supers are done taunting each other, or if they get into combat (ie does the player start shooting at them) if MechanistRef.IsInCombat == 1 || AntAgonizerRef.IsInCombat == 1 ;DEBUG ;showWarning "In Combat - Bailing Out" MS02BattleAnt1Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt2Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt3Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt4Ref.addscriptpackage MS02BattleAntFlee MS02BattleRobot1Ref.addscriptpackage MS02BattleRobotFlee MS02BattleRobot2Ref.addscriptpackage MS02BattleRobotFlee set bailedOut to 1 set battle to 2 elseif (getDeadCount MS02BattleAnt >= 4 || getDeadCount MS02BattleRobot >= 2) ;DEBUG ;showWarning "One Side Wins - Bailing Out" MS02BattleAnt1Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt2Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt3Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt4Ref.addscriptpackage MS02BattleAntFlee MS02BattleRobot1Ref.addscriptpackage MS02BattleRobotFlee MS02BattleRobot2Ref.addscriptpackage MS02BattleRobotFlee set bailedOut to 1 set battle to 2 elseif battleStage >= battleStages set battle to 2 ;DEBUG ;showWarning "Stages Done" elseif talking == 0 ;talking is set to 0 in the end results of the infos ;get the supers talking - note: the conditions on the infos are such that only one will be talking at a time ;MechanistRef.say MS02Battle 1 AntAgonizerREF.sayto MechanistREF MS02Battle 1 set talking to 1 ;DEBUG ;showWarning "Talking" ;When A or M finish their info, MS02.talking will be set to 0 again, for next line. elseif talking == 1 ;if the player has gone away and come back, stalling the supers' conversation if MechanistREF.istalking == 0 && AntAgonizerREF.istalking == 0 && player.getDistance xMS02BattleCenter < distanceToBattle ;showWarning "Conversation stalled. Restarting." set MS02.battleStage to 2 AntAgonizerREF.sayto MechanistREF MS02Battle 1 endif endif elseif battle == 2 ;EVP the supers to get them running away to their secret lairs if battleDone == 0 set battleDone to 1 MechanistRef.evp AntAgonizerRef.evp endif ;DEBUG ;showWarning "M and A Leaving" if (player.isInCombat == 0) ;DEBUG ;Set fighters to flee MS02BattleAnt1Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt2Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt3Ref.addscriptpackage MS02BattleAntFlee MS02BattleAnt4Ref.addscriptpackage MS02BattleAntFlee MS02BattleRobot1Ref.addscriptpackage MS02BattleRobotFlee MS02BattleRobot2Ref.addscriptpackage MS02BattleRobotFlee ;showWarning "Dom and Machete come out" setQuestDelay MS02 0 ;set back to default ;Have Dom, Roe, and Machete come out and kill any remainders if (MacheteREF.getDead == 0) MacheteREF.moveto RoeHouseExitMarker endif if (DominicDEllsadroREF.getDead == 0) DominicDEllsadroREF.moveto RoeHouseExitMarker endif ;DominicDEllsadroREF.startcombat MS02BattleAnt1Ref ;DominicDEllsadroREF.startcombat MS02BattleAnt2Ref ;DominicDEllsadroREF.startcombat MS02BattleAnt3Ref ;DominicDEllsadroREF.startcombat MS02BattleAnt4Ref ;DominicDEllsadroREF.startcombat MS02BattleRobot1Ref ;DominicDEllsadroREF.startcombat MS02BattleRobot2Ref ;Bring out Roe after the supers run off ;DEBUG ;showWarning "Roe come out" if (UncleRoeREF.getDead == 0) UncleRoeRef.evp UncleRoeREF.moveto RoeHouseExitMarker endif set BattleOver to 1 if (JoePorterREF.getDead == 0) JoePorterREF.evp JoePorterREF.moveto RoeHouseExitMarker endif setEnemy MS02SuperFaction MS02SuperFaction set battle to 3 endif endif ;if (battle == 3) ; if (MDoOnce == 0) ; if (MechanistREF.GetInCell Forge03) ; MechanistREF.disable ; set MDoOnce to 1 ; endif ; endif ; if (AADoOnce == 0) ; if (AntAgonizerREF.GetInCell LairAntAgonizer03) ; AntAgonizerREF.disable ; set AADoOnce to 1 ; endif ; endif ;endif End
556MS03FoodRefrigeratorScriptscn MS03FoodRefrigeratorScript ;Picking up any instance of this item in the Super-Duper Mart sets MS03.MS03a1 from 1 to 2 ;It also removes objective 10 and displays objective 16 Begin OnActivate if IsActionRef player == 1 activate player set MS03.MS03a1Food to 1 if ( MS03.MS03a1 == 1) Set MS03.MS03a1 to 2 SetObjectiveCompleted MS03 10 1 SetObjectiveDisplayed MS03 16 1 if (MS03.MS03a1Meds == 1) Set MS03.MS03a1 to 3 endif endif endif End
557MS03MedicineKitScriptscn MS03MedicineKitScript ;Picking up any instance of this item in the Super-Duper Mart sets MS03.MS03a1 from 1 to 2 ;It also removes objective 10 and displays objective 16 Begin OnActivate if IsActionRef player == 1 activate player Set MS03.MS03a1Meds to 1 if (MS03.MS03a1 >= 1 || MS03.MS03a1 <= 2) SetObjectiveCompleted MS03 12 1 if (MS03.MS03a1 == 2) Set MS03.MS03a1 to 3 SetObjectiveDisplayed MS03 16 1 endif endif endif End
558MS03MerryGoRoundScriptscn MS03MerryGoRoundScript BEGIN GameMode ;During MS03a3, check to see if the player has reached the center of Minefield ;Minefield section running on object in Minefield if (MS03.MS03a3 == 1) if (GetDistance player < 600) Set MS03.MS03a3 to 2 SetObjectiveCompleted MS03 30 1 SetObjectiveDisplayed MS03 36 1 if (ArkansasREF.getDead == 0) ArkansasREF.useWeapon WeapSniperRifle ArkansasREF player 1 ArkansasREF.startcombat player Set MS03.MS03a3Sniper to 1 endif endif endif END
559MS03MirelurkScriptscn MS03MirelurkScript BEGIN OnDeath Player ;If the player is in mini-quest MS03b2, update variable in MS03script to show that the player killed a Mirelurk and failed MS03b2's bonus objective. if (MS03.MS03b2 == 1 || MS03.MS03b2 == 2) if (GetObjectiveDisplayed MS03 54 == 1) ShowMessage MS03MirelurkKilledMsg endif Set MS03.MS03b2Spot to 1 SetObjectiveDisplayed MS03 54 0 endif END
560MS03MoiraScriptscn MS03MoiraScript short BeginMedicalServices ;Set to 1 in dialog, starts script below. short DoOnce ;Script blocker float Timer ;Timer used for animation control short MoiraDead short Button BEGIN GameMode ;When set to 1, plays medical animations for five seconds then restarts conversation with the player if ( BeginMedicalServices == 1 ) if ( DoOnce== 0 ) disablePlayerControls SetRestrained 1 sayto player MS03MoiraBrownMedicalChatter ;PlayIdle LooseDoctorHealPlayer set Timer to 8 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 10 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) if (MS03.MS03a2 == 2 || MS03.MS03a2 == 3) player.restoreav radiationrads 1000 Set Ms03.MS03a2TurnIn to 1 elseif (MS03.MS03b3 == 2 || MS03.MS03b3 == 3) player.resethealth ;Player.CastImmediateOnSelf FFSawbonesHealEffect Set Ms03.MS03b3TurnIn to 1 endif enablePlayerControls SetRestrained 0 if DoOnce == 2 addScriptPackage DefaultNPCDialogPlayer set DoOnce to 3 endif endif endif END BEGIN OnDeath if (GetStage MS03 > 0 && GetStage MS03 < 200) ShowMessage MS03FailedMsg Set MoiraDead to 1 SetStage MS03 210 endif set DialogueMegaton.MoiraDead to 1 END
561MS03MoleRatRepellantScriptscn MS03MoleRatRepellantScript ref HitTarget ;Refers to the target of this script ref Explode ;Tests whether or not the molerat will explode BEGIN ScriptEffectStart ; Check to make sure the player isn't beating a Dead Mole-Rat set HitTarget to GetSelf if (HitTarget.getdead == 0) set MS03.MS03b1Target to GetSelf startCombat player ;If the target is a mole-rat, enact effects if (HitTarget.GetInFaction MoleRatFaction == 1 && MS03.MS03b1Target != MS03.MS03b1HitID) Set MS03.MS03b1HitID to GetSelf Set Explode to 1 ;Cause frenzy setAv Confidence 4 ; try to restart combat so he picks up his new confidence scaonactor ;If MS03b1 isn't completed, update it if (MS03.MS03b1 == 1 || MS03.MS03b1 == 2) Set MS03.MS03b1RatKill to MS03.MS03b1RatKill + 1 if (MS03.MS03b1 == 1 && MS03.MS03b1RatKill >= 3) Set MS03.MS03b1 to 2 SetObjectiveCompleted MS03 40 1 SetObjectiveDisplayed MS03 46 1 elseif (MS03.MS03b1 == 2 && MS03.MS03b1RatKill >= 10) Set MS03.MS03b1 to 3 SetObjectiveCompleted MS03 44 1 endif endif endif endif END BEGIN ScriptEffectFinish ;If the target is a mole-rat, they explode at the end of the fight if (HitTarget.GetInFaction MoleRatFaction == 1 && Explode == 1) ;And then, the mole-rat's limbs explode ;ShowWarning "Killing" kill player 1, 6 ;kill HitTarget 7, 6 ;kill HitTarget 8, 6 ;kill HitTarget 10, 6 ;kill HitTarget 11, 6 ;ModPcMiscStat "Creatures Killed" 1 player.rewardxp 5 ;As if the player killed the mole-rat endif END
562MS03RobCoMainframeTerminalScriptscn MS03RobCoMainframeTerminalScript short MainframeInteract ;Has the player interacted with the mainframe? 0 = no, 1 = yes short Button ;What button did they choose on the message? 0 = "leave it alone", 1 = "place the observer" short MainframeTerminalActive ;Has player placed the Telemetry Unit? 0 = no, 1 = yes ;Settings short AgainstRobots ;is the RobCoRobots faction an enemy of itself? 0 = no (ally), 1 = yes short AgainstPests ;is the RobCoRobots faction an enemy of RobCoPests? 0 = no (neutral), 1 = yes short AgainstPlayer ;is the RobCoRobots faction an enemy of PlayerFaction? 0 = no (ally), 1 = yes BEGIN OnActivate if IsActionRef player == 1 if (MainframeTerminalActive == 1) Activate ;player has already installed Telemetry Unit, show the terminal elseif (MS03.MS03c2 == 1 && player.getItemCount MS03TelemetryUnit >= 1) ;show the option messagebox ShowMessage MS03MainframeChangeMsg Set MainframeInteract to 1 else ;Show an unusable message ShowMessage MS03MainframeBrokenMsg endif endif END BEGIN GameMode if (MainframeInteract == 1) set button to GetButtonPressed if button > -1 set MainframeInteract to 0 if (button == 0) ShowMessage MS03MainframeChange0Msg elseif (button == 1) player.RemoveItem MS03TelemetryUnit 1 ShowMessage MS03MainframeChange1Msg ;Set faction numbers set AgainstPlayer to 1 ;Activate the terminal and light up the room set MainframeTerminalActive to 1 playgroup forward 1 RobcoMainFrameMist01.enable RobcoMainFrameMist02.enable RobcoMainFrameMist03.enable RobcoMainFrameMist04.enable RobcoMainFrameLight01.enable RobcoMainFrameLight02.enable RobcoMainFrameLight03.enable RobcoMainFrameLight04.enable RobcoMainFrameLightSource01.enable RobcoMainFrameLightSource02.enable RobcoMainFrameLightSource03.enable RobcoMainFrameLightSource04.enable RobcoMainFrameLightSource05.enable RobcoMainFrameLightSource06.enable RobcoMainFrameLightSource07.enable RobcoMainFrameLightSource08.enable RobcoMainFrameLightSource09.enable RobcoMainFrameLightSource10.enable RobcoMainFrameLightSource11.enable RobcoMainFrameLightSource12.enable playSound AMBElevatorMonumentPowerUp ;set robots to active AI, but not allied with the player Robco01EmployeeA.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeB.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeC.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeD.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeE.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeF.activate MS03RobCoMasterTerminalREF 1 Robco01EmployeeG.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeA.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeB.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeC.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeD.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeE.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeF.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeG.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeH.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeI.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeJ.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeK.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeL.activate MS03RobCoMasterTerminalREF 1 Robco02EmployeeM.activate MS03RobCoMasterTerminalREF 1 Robco01TurretA.activate MS03RobCoMasterTerminalREF 1 Robco01TurretB.activate MS03RobCoMasterTerminalREF 1 Robco01TurretC.activate MS03RobCoMasterTerminalREF 1 Robco02TurretA.activate MS03RobCoMasterTerminalREF 1 Robco02TurretB.activate MS03RobCoMasterTerminalREF 1 Robco02TurretC.activate MS03RobCoMasterTerminalREF 1 Robco02TurretD.activate MS03RobCoMasterTerminalREF 1 ;Progress quest SetObjectiveCompleted MS03 80 1 SetObjectiveDisplayed MS03 84 1 SetObjectiveDisplayed MS03 88 1 Set MS03.MS03c2 to 2 endif endif endif if (MainFrameTerminalActive == 1) if (isAnimPlaying == 0) playgroup backward 2 endif endif END
563MS03SanitizerSCRIPTscn MS03SanitizerSCRIPT BEGIN OnAdd player ShowMessage MS03SanitizerActiveMsg END BEGIN OnDrop player ShowMessage MS03SanitizerInactiveMsg END
564MS03scriptscn MS03script ;Other MS03 scripts used: ;MS03LeaScript ;Tracks when Lea dies to end quest ;MS03TestActivatorScript ;Temporary script device to progress quests ;MS03FoodScript ;Tracks when player picks up food in MS03a1 ;MS03MedicineScript ;Tracks when player picks up medicine in MS03a1 ;MS03FoodSanitizerScript ;Tracks use of the MS03a1 reward, the MS03FoodSanitizer ;MS03MerryGoRoundScript ;Tracks when character approachs center of Minefield (attached to Merry-Go-Round activator in center of town) ;MS03MoleRatRepellantScript ;Causes molerats to explode when struck and increases molerat kill counter MS03b1RatKill ;MS03BaitGrenadeScript ;Holds the script for the effects of the Mirelurk Bait Grenade enchantment ;MS03RobCoMainframeScript ;Controls the effects of activating the RobCo Mainframe ;MS03PrintingPressScript ;Controls the effects of activating the Printing Press ;Set script variables ;Set task tracking variables ;For set tracking variables, see below: ;0 = not yet activated ;1 = currently active ;2 = basic task completed (can return to Lea) ;3 = bonus task completed (must return to Lea) ;4 = Completed and turned in short MS03a 0 ;Denotes the player's progress on set one without an active task. short MS03a1 0 ;Denotes the player's progress on set one, task one. short MS03a2 0 ;Denotes the player's progress on set one, task two. short MS03a3 0 ;Denotes the player's progress on set one, task three. short MS03b 0 ;Denotes the player's progress on set two without an active task. short MS03b1 0 ;Denotes the player's progress on set two, task one. short MS03b2 0 ;Denotes the player's progress on set two, task two. short MS03b3 0 ;Denotes the player's progress on set two, task three. short MS03c 0 ;Denotes the player's progress on set three without an active task. short MS03c1 0 ;Denotes the player's progress on set three, task one. short MS03c2 0 ;Denotes the player's progress on set three, task two. short MS03c3 0 ;Denotes the player's progress on set three, task three. ;Set bonus tracking variables short bonusObjectives 0 ;How many bonus objectives the player has completed short MS03aBonus 0 ;How many bonus objectives the player completed in set A. short MS03bBonus 0 ;How many bonus objectives the player completed in set B. short MS03cBonus 0 ;How many bonus objectives the player completed in set C. short goodBookBonus 5 ;How many bonus objectives the player must complete for the "good" book. ;Set book style tracking variables short standard 0 ;How many times the player has responded with the "standard" A responses short smart 0 ;How many times the player has responded with the "smart" B responses short tough 0 ;How many times the player has responded with the "tough" C responses short sly 0 ;How many times the player has responded with the "sly" D responses short snide 0 ;How many times the player has responded with the "snide" E responses short currentStyle 0 ;Which style currently has the highest count. Check after each major stage ;Ties default to "standard". 0 = standard, 1 = smart, 2 = tough, 3 = sly, 4 = snide ;Set specific task variables short MS03a1Food 0 ;Has MS03Food been found in MS03a1. 0 = no, 1 = yes. short MS03a1Meds 0 ;Has MS03SuperStimpak been found in MS03a1. 0 = no, 1 = yes. short MS03a1Start 0 ;Set the time when the player starts MS03a1 short MS03a1Lie 0 ;Whether or not the player lied to end MS03a1 - 0 = no, 1 = yes short MS03a2Low 150 ;Radiation count for basic completion of MS03a1 short MS03a2High 800 ;Radiation count for bonus completion of MS03a1 short MS03a2Turnin ;Has the player turned in MS03a2 to Moira? 0 = no, 1 = yes float MS03a3Start 0 ;Set the time when the player starts MS03a3 short MS03a3Sniper 0 ;Set when sniper attacks in MS03 at Minefield. short MS03a3Lie 0 ;Whether or not the player lied to end MS03a3 - 0 = no, 1 = yes ref MS03b1Target ;Tracks the currently target of the mole-rat repellent, to stop multiple effects on the same mole-rat ref MS03b1HitID ;Tracks the most recently hit target of the mole-rat repellent, to stop multiple effects on the same mole-rat short MS03b1RatKill 0 ;Count of molerats killed in MS03b1 short MS03b1Low 3 ;Count of basic target number of molerats killed in MS03b1 short MS03b1High 10 ;Count of bonus target number of molerats killed in MS03b1 short MS03RepellentCharge ;Countdown of charges/ammo for MS03Repellent short MS03b1Start 0 ;Set the time when the player starts MS03b1 short MS03b1Lie 0 ;Whether or not the player lied to end MS03b1 - 0 = no, 1 = yes short MS03b2Spot 0 ;Tracks whether or not the mirelurks in MS03b2 have spotted the player: 0 = no, 1 = yes short MS03b2bonus 0 ;Tracks whether the player earned the bonus for MS03b2, and if they can get new Bait Grenades short MS03b3Low 0.25 ;Percent of player's max health to reduce current health to for MS03b3 short MS03b3Turnin ;Has the player turned in MS03b3 to Moira? 0 = no, 1 = yes short MS03c1Start 0 ;Tracks when the player starts MS03c1 short MS03c1BannonTarget 0 ;Has the player been directed to talk to Bannon? 0 = no, 1 = yes short MS03c1VeraTarget 0 ;Has the player been directed to talk to Vera? 0 = no, 1 = yes short MS03c1SeagraveTarget 0 ;Has the player been directed to talk to Seagrave? 0 = no, 1 = yes short MS03c1BelleTarget 0 ;Has the player been directed to talk to Belle? 0 = no, 1 = yes short MS03c1PinkertonTarget 0 ;Has the player been directed to talk to Pinkerton? 0 = no, 1 = yes short MS03c1TalkBannon 0 ;Tracks who the player has talked to about Rivet City's history: 0 = have not talked/have not gotten decent info out of, 1 = have received wrong information, 2 = have received clue for further information short MS03c1TalkVera 0 ;Tracks who the player has talked to about Rivet City's history: 0 = have not talked/have not gotten decent info out of, 1 = have received wrong information, 2 = have received clue for further information short MS03c1TalkBelle 0 ;Tracks who the player has talked to about Rivet City's history: 0 = have not talked/have not gotten decent info out of, 1 = have received wrong information, 2 = have received clue for further information short MS03c1TalkSeagrave 0 ;Tracks who the player has talked to about Rivet City's history: 0 = have not talked/have not gotten decent info out of, 1 = have received wrong information, 2 = have received clue for further information short MS03c1TalkPinkerton 0 ;Tracks who the player has talked to about Rivet City's history: 0 = have not talked/have not gotten decent info out of, 1 = have received correct information short MS03c1RCBonus 0 ;Tracks whether or not the player has received the bonus completion for MS03c1, and will receive the discount at RC stores. short MS03c3Start 0 ;Set the time when the player starts MS03c3 short MS03ScribeYearlingDead ;Tracks whether or not Scribe Yearling is alive for MS03c3: 0 = alive, 1 = dead and targets not yet changed, 2 = dead and targets changed short MS03Convince 0 ;tracks if the player's speech challenge is attempting to convince Lea to stop writing the book. Only used in MS03a, to avoid a potential error in SpeechChallengeFailure. 0 = not trying, 1 = trying ;Set other variables short MoiraBook ;tracks whether the player has heard about Moira's book (previously, stage 2): 0 = no, 1 = yes short MoiraGhoul ;tracks whether or not Moira has been turned into a ghoul by blowing up Megaton at MS11, stage 60: 0 = no, 1 = yes but hasn't met player to tell him, 2 = yes and met player, and now at or going to Underworld short MoiraDataEntry ;tracks whether or not Moira has to enter the player's data, with MS03EntryMegaton. 0 no, 1 = yes. BEGIN GameMode ;During MS03a2, check radiation levels against MS03a2 goal variables ;If radiation levels drop below their requirements, reset the objectives until the player completes them if (MS03a2 >= 1 && MS03a2 < 4 && MS03a2TurnIn == 0) ;If radiation level reaches MS03a2Low, complete the basic objective if (MS03a2 == 1) if (player.GetAV radiationrads >= 200) Set MS03a2 to 2 SetObjectiveCompleted MS03 20 1 SetObjectiveDisplayed MS03 26 1 endif ;If radiation level reaches MS03a2High, complete the bonus objective ;If radiation level drops below MS03a2Low, reset the basic objective elseif (MS03a2 == 2) if (player.GetAV radiationrads >= 600) Set MS03a2 to 3 SetObjectiveCompleted MS03 24 1 elseif (player.GetAV radiationrads < 150) Set MS03a2 to 1 SetObjectiveCompleted MS03 20 0 SetObjectiveCompleted MS03 24 0 SetObjectiveDisplayed MS03 20 1 SetObjectiveDisplayed MS03 24 1 SetObjectiveDisplayed MS03 26 0 endif ;If radiation level drops below MS03a2High, reset the bonus objective elseif (MS03a2 == 3) if (player.GetAV radiationrads < 200) Set MS03a2 to 1 SetObjectiveCompleted MS03 20 0 SetObjectiveCompleted MS03 24 0 SetObjectiveDisplayed MS03 20 1 SetObjectiveDisplayed MS03 24 1 SetObjectiveDisplayed MS03 26 0 elseif (player.GetAV radiationrads < 600) Set MS03a2 to 2 SetObjectiveCompleted MS03 24 0 SetObjectiveDisplayed MS03 24 1 SetObjectiveDisplayed MS03 26 1 endif endif endif ;During MS03b3, check to see if the player has reduced their health to MS03b3Low requirement if (MS03b3 == 1 || MS03b3 == 2 && MS03b3TurnIn == 0) if (MS03b3 == 1) if (player.getHealthPercentage <= 0.5) Set MS03b3 to 2 SetObjectiveCompleted MS03 60 1 SetObjectiveDisplayed MS03 66 1 endif elseif (MS03b3 == 2) if (player.getHealthPercentage > 0.5) Set MS03b3 to 1 SetObjectiveCompleted MS03 60 0 SetObjectiveDisplayed MS03 60 1 SetObjectiveDisplayed MS03 66 0 endif endif endif ;During MS03b3, check to see if the player has reduced their condition to MS03b3Low requirement if (MS03b3 == 2 && MS03b3TurnIn == 0) if (GetObjectiveCompleted MS03 64 == 0) if (player.getav enduranceCondition == 0 || player.getav leftMobilityCondition == 0 || player.getav rightMobilityCondition == 0 || player.getav perceptionCondition == 0 || player.getav leftAttackCondition == 0 || player.getav rightAttackCondition == 0 ) SetObjectiveCompleted MS03 64 1 endif elseif (GetObjectiveCompleted MS03 64 == 1) if (player.getav enduranceCondition != 0 && player.getav leftMobilityCondition != 0 && player.getav rightMobilityCondition != 0 && player.getav perceptionCondition != 0 && player.getav leftAttackCondition != 0 && player.getav rightAttackCondition != 0 ) SetObjectiveCompleted MS03 64 0 SetObjectiveDisplayed MS03 64 1 endif endif endif END
565MS03SpawningBallScriptscn MS03SpawningBallScript short BallInteract ;Has the player interacted with the spawning ball? 0 = no, 1 = yes short Button ;What button did they choose on the message? 0 = "leave it alone", 1 = "place the observer" BEGIN OnActivate if IsActionRef player == 1 if (MS03.MS03b2 == 1 && player.getItemCount MS03Observer >= 1) ;show the option messagebox ShowMessage MS03MirelurkObservationMsg Set BallInteract to 1 else activate player endif endif END BEGIN GameMode if (BallInteract == 1) set Button to GetButtonPressed if button > -1 set BallInteract to 0 if (button == 0) ShowMessage MS03MirelurkObservation0Msg elseif (button == 1) ;Remove MS03Observer player.RemoveItem MS03Observer 1 ShowMessage MS03MirelurkObservation1Msg ;Progress quest SetObjectiveCompleted MS03 50 1 SetObjectiveDisplayed MS03 56 1 Set MS03.MS03b2 to 2 endif endif endif END
566MS04FinScriptscn MS04FinScript short LLDone short PFDone short RCDone short Moved ; set to 1 when Bryan has moved to some home short Number short TakeNectar short CashGive short Report float ReportTime begin gamemode ;This handles Bryan moving to Little Lamplight if ( Moved == 0 ) if ( LLDone == 0 ) if ( GetStage MS04 >= 100 ) if ( MS04.StayLL == 1 ) if ( Player.GetInSameCell BryanWilksRef == 0 ) set MS04.StayHome to 0 BryanWilksRef.MoveTo MS04BryanWilksLLMarker set LLDone to 1 set Moved to 1 endif endif endif endif endif ;Due to complications with the MQ, we now disable Bryan Wilks if you sell him to Eulogy if ( Moved == 0 ) if ( PFDone == 0 ) if ( GetStage MS04 >= 100 ) if ( MS04.StayEulogy == 1 ) if ( Player.GetInSameCell BryanWilksRef == 0 ) set MS04.StayHome to 0 BryanWilksRef.Disable set PFDone to 1 set Moved to 1 endif endif endif endif endif ;This handles Bryan moving to Rivet City if ( Moved == 0 ) if ( RCDone == 0 ) if ( GetStage MS04 >= 100 ) if ( MS04.StayVera == 1 ) if ( Player.GetInSameCell BryanWilksRef == 0 ) set MS04.StayHome to 0 BryanWilksRef.MoveTo VeraWeatherlyHomeMarker set RCDone to 1 set Moved to 1 endif endif endif endif endif ;This block handles the once a day status report for Lesko if ( Report == 1 ) Set ReportTime to GameDaysPassed set Report to 2 endif if ( Report == 2 ) if ( GameDaysPassed - ReportTime >= 1 ) Set Report to 0 endif endif ;This block handles the removal of the Samples of Fire Ant Nectar from the Player's inventory as well as tallying the count for Post Quest Collection if ( TakeNectar == 1 ) ;This flag is set in dialog with Doc Lesko if ( Player.GetItemCount MS04FireAntNectar >= 1 ) Set Number to ( Player.GetItemCount MS04FireAntNectar ) ;Set the temporary variable to the number of samples player has Set TakeNectar to 3 ;Advance the flag endif endif if ( TakeNectar == 3 ) ;From the above block if ( Player.GetItemCount MS04FireAntNectar >= 1 ) Player.RemoveItem MS04FireAntNectar Number ;Remove the number of samples equal to amount tallyed/carried Set CashGive to ( Number * 40 ) ;Calculate Cash given Player.AddItem Caps001 CashGive ;Add 40 caps per sample turned in set TakeNectar to 0 ;Reset the flag set Number to 0 ;Reset the temporary variable set CashGive to 0 SetQuestDelay MS04Fin 0 endif endif end
567MS04GrayditchSurfaceAntsscn MS04GrayditchSurfaceAnts short DoOnce ;This is how we disable the ants on the surface ;Either they are killed when the Player initiates the Inhibitor Pulse himself or automatically at Stage 50 ;Either way, this script is waiting for the "MasterKill" variable to be set to 1 in the quest script ;The actual killing is done in the quest script, disable occurs on the individual and only after Stage 60 begin gamemode if ( DoOnce == 0 ) if ( MS04.AntsKilled == 1 ) if ( GetStage MS04 >= 60 ) if ( GetInSameCell Player == 0 ) set DoOnce to 1 Disable endif endif endif endif end ;This block handles the pairing of ants in Grayditch so that it "respawns once." When an ant dies, it's twin will enable elsewhere in Grayditch to keep the place populated ;Note that this will stop when the MasterKill variable is issued in Stage 50 or when done by the Player... no need to enable and instantly kill ants begin OnDeath if ( MS04.MasterKill == 0 ) ;Do not do any of the enable swapping if the MasterKill was issued by solving the quest if GetIsReference MS04Ant01Ref == 1 MS04Ant11Ref.Enable elseif GetIsReference MS04Ant13Ref == 1 MS04Ant21Ref.Enable elseif GetIsReference MS04Ant08Ref == 1 MS04Ant06Ref.Enable elseif GetIsReference MS04Ant14Ref == 1 MS04Ant09Ref.Enable elseif GetIsReference MS04Ant02Ref == 1 MS04Ant16Ref.Enable elseif GetIsReference MS04Ant03Ref == 1 MS04Ant15Ref.Enable elseif GetIsReference MS04Ant04Ref == 1 MS04Ant22Ref.Enable elseif GetIsReference MS04Ant24Ref == 1 MS04Ant05Ref.Enable elseif GetIsReference MS04Ant18Ref == 1 MS04Ant12Ref.Enable elseif GetIsReference MS04Ant10Ref == 1 MS04Ant20Ref.Enable elseif GetIsReference MS04Ant19Ref == 1 MS04Ant23Ref.Enable elseif GetIsReference MS04Ant07Ref == 1 MS04Ant17Ref.Enable endif endif end
568MS04KlaxonLightScriptscn MS04KlaxonLightScript begin OnLoad Playgroup Left 1 end
569MS04LugNutSpawnTriggerScriptscn MS04LugNutSpawnTriggerScript ;This is triggered after the Player acquires the package from Grady's Safe (the MS04AmorousAttire) ;This spawns Lug-Nut and starts his Dialog Package begin OnTriggerEnter Player if MS04LugGo == 0 set MS04LugGo to 1 endif end begin gamemode if ( MS04LugGo == 1 ) if ( Player.GetItemCount MS04AmorousAttire == 1 ) MS04LugNutRef.Enable MS04LugNutRef.Evp set MS04LugGo to 2 endif endif end
570MS04NestGuardianAntScriptscn MS04NestGuardianAntScript begin OnDeath Set MS04.AntCountHatch to ( MS04.AntCountHatch + 1 ) end
571MS04QueenAntScriptscn MS04QueenAntScript short ObjectiveCheck ;This resides on the Ant Queen in Marigold Metro Station ;If the Queen is slain by the Player, he automatically fails the Optional part of the Quest begin OnDeath if ( MS04.QueenHit == 0 ) if ( IsKiller Player == 1 ) if ( GetObjectiveDisplayed MS04 30 == 1 ) setObjectiveCompleted MS04 30 1 set MS04.MasterKill to 1 set MS04.QueenHit to 1 elseif ( GetObjectiveDisplayed MS04 35 == 1 ) setObjectiveCompleted MS04 35 1 set MS04.MasterKill to 1 set MS04.QueenHit to 1 endif endif endif if ( MS04.QueenHit == 1 ) if ( ObjectiveCheck == 0 ) if ( GetDeadCount DoctorLesko == 1 ) setObjectiveCompleted MS04 43 1 SetStage MS04 50 set ObjectiveCheck to 1 elseif ( GetDeadCount DoctorLesko == 0 ) setObjectiveDisplayed MS04 42 0 set ObjectiveCheck to 1 endif endif endif if ( MS04.KarmaBlock == 0 ) if ( ObjectiveCheck == 1 ) RewardKarma 100 set MS04.KarmaBlock to 1 endif endif end
572MS04ReturnTriggerScriptscn MS04ReturnTriggerScript short DoOnce ;This trigger handles Lesko's Forcegreet upon the Player's return from the Hatchery begin OnTriggerEnter Player if ( GetStageDone MS04 45 == 1 && DoOnce == 0 ) Set MS04.LeskoAfterGreet to 1 set DoOnce to 1 endif end
573MS04Scriptscn MS04Script short Asked ;Dialog limiter. When set to 1, player was offered the quest by Bryan Wilks. short Angered ;Bryan Wilks is angry and must be consoled before tree reopens short Apology ;A variable that keeps adding in the Anger thread of Bryan Wilk's dialog (5 = forgiven) short Greeted ;When set to 1, Bryan Wilks will stop his "Those!" hellos short DadDead ;When set to 1, Bryan Wilks knows Dad is dead short LeskoMentioned ;A dialog flag to activate mention of Doctor Lesko short BryanShelter ;When set to 1, Bryan's package tells him to wait for the Player in the Portashelter short FoundDad ;1= Bryan's Dad's corpse located in the house short LeskoRude ;1= Dialog flag (you pissed off Lesko) short LeskoQuestTold ;1= Doc Lesko has gone through his dialog tree and Player is pondering taking the quest or not short TerminalRobot ;1= Lesko's terminal has been used to disable the science bot short TerminalMutagen ;1= Lesko's terminal has been used to destroy the mutagen samples short BWLockout ;1= Bryan Wilks dialog lockout short MarigoldMentioned ;1= Marigold has been revealed as a target (for dialog on Bryan Wilks) short ChamberSecure ;1= The Hatchery (MarigoldStation02) is secured and safe for Doctor Lesko short AntCountHatch ;x= Number of Ants killed in the Hatchery for Objective update (includes Queen) 6 = Done short MutagenDestroyed ;1= The player elected to destroy the Mutagen in Lesko's comp short ChamberMarked ;1= The player has entered the Hatchery at least once (for Dialog) short TerminalArrival ;1= Doctor Lesko has pathed to his terminal short Brandice ;1= Brandice hook told short LeskoGreet ;1= For Lesko's dialog package short LeskoReward01 ;1= Lesko Offered Player the Mutagenic Bioenhancer injection Reward short LeskoReward02 ;1= Lesko Offered Player the Mutagenic Bioenhancer injection and his Lab Coat Rewards short QueenHit ;1= Queen Ant was damaged by the Player short RewardOK ;1= Player is clear to get reward top level topics short RewardLost ;1= Player destroyed the Mutagen or killed Queen Ant, and Doctor will not give reward short Injected ;1= Player picked a reward perk short LeskoAfterGreet ;1= Lesko Force Greets Player after Stage 45 set short ToldLie ;1= Player lied to Lesko and made him run into unsafe chamber short SentPulse ;1= Player sent the Inhibitor Pulse on his own short MasterKill ;1= Kill all the surface ants short AntsKilled ;1= All ants dead short KarmaBlock ;1= You can only get extra karma for Mutagen Destroyed OR killing Ant. Doing both only yields 100. short GoInject ;1= Trips Doctor Lesko's Injection routine (on his script) short PerkType ;1= Ant Might, 2= Ant Sight chosen as Perk (to pop proper message after Injection) short PFSent ;1= You told Bryan his Slave Collar was for PF... he's angry (for PQ Dialog) short HouseDone ;Bryan Wilks Adoption Variables short Adoption ;1= Adoption Completed short OkayVera ;1= Vera Weatherly agrees to take him in short OkayEulogy ;1= Paradise Falls agrees to take him in short OkayLL ;1= Little Lamplight agrees to take him in short StayVera ;1= Bryan stays with Vera Weatherly short StayEulogy ;1= Bryan ends up in Paradise Falls short StayLL ;1= Bryan ends up in Little Lamplight short StayHome ;1= Bryan ends up staying at his original home short MS04Good ;1= Wilks ends up in RC short MS04Bad ;1= Wilks ends up in PF short DoOnce short DoOnce1 ;1= Fred Wilks's Body discovered (for DoOnce & Dialog) short DoOnce2 short DoOnce3 ;1= Mutagen Destroyed Karma Rewarded float ShelterTimer ;Used for delay between Says while Bryan is in Portashelter float Timer ;Used for Lesko's injection routine begin gamemode ;This block handles Bryan's comments while in the Portashelter if ( BryanShelter == 2 ) if ( ShelterTimer > 0 ) set ShelterTimer to ( ShelterTimer - GetSecondsPassed ) else if ( Player.GetDistance BryanWilksRef < 500 ) if ( BryanWilksRef.GetDistance MS04BryanWilksInShelter < 100 ) BryanWilksRef.Say MS04ShelterTalk Set ShelterTimer to 30 endif endif endif endif ;This block adds the Lesko variable to the player if they enter the shack if ( DoOnce2 == 0 ) if ( GetStage MS04 >= 10 ) if ( Player.GetInCell GrayditchDoctorLeskosLab == 1 ) set MS04.LeskoMentioned to 1 set DoOnce2 to 1 endif endif endif ;This block is to clear the objective on discovering Fred Wilks's body if ( DoOnce1 == 0 ) ;Make sure we do this once if ( GetStage MS04 < 50 ) if ( Player.GetInCell GrayditchWilksHome ) if Player.GetLOS FredWilksRef == 1 Set FoundDad to 1 SetStage MS04 20 ;Set the new stage set DoOnce1 to 1 endif endif elseif ( GetStage MS04 >= 50 ) if ( Player.GetInCell GrayditchWilksHome ) if Player.GetLOS FredWilksRef == 1 if ( GetObjectiveDisplayed MS04 10 == 1 ) SetObjectiveCompleted MS04 10 1 ;Clear the objective, but don't set stage 20 endif Set FoundDad to 1 set DoOnce1 to 1 endif endif endif endif ;This block determines when Objective 40 updates for this quest (by killing all of the Nest Guardians) if ( GetStage MS04 >= 40 ) if ( GetDeadCount DoctorLesko == 0 ) if ( AntCountHatch == 5 ) ;5 Nest Guardians have been killed in the Hatchery cell SetStage MS04 45 Set AntCountHatch to 6 ;DoOnce endif endif endif ;This block handles the Player lying to Doctor Lesko about the Hatchery being clear (which will kill him) if ( ToldLie == 1 ) DocLeskoRef.Evp set ToldLie to 2 endif if ( ToldLie == 2 ) if ( Player.GetInSameCell DocLeskoRef == 0 ) DocLeskoRef.Moveto MS04LeskoTerminalMarker DocLeskoRef.Kill RewardKarma -100 set ToldLie to 3 endif endif if ( ToldLie == 3 ) SetObjectiveDisplayed MS04 40 0 SetObjectiveDisplayed MS04 42 0 SetObjectiveDisplayed MS04 43 1 set ToldLie to 4 endif ;This block tags that the player has entered the Hatchery at least once if ( ChamberMarked == 0 ) ;DoOnce and dialog tag variable if Player.GetInSameCell MS04ChamberMarker == 1 if ( Player.GetDistance MS04ChamberMarker < 400 ) ;Checking distance from marker in the cell Set ChamberMarked to 1 endif endif endif ;This handles the Player electing to send out the Inhibitor Pulse himself if Lesko is dead or hack it for fun and do it himself if ( SentPulse == 1 ) if ( GetObjectiveDisplayed MS04 30 == 1 ) setObjectiveCompleted MS04 30 1 set SentPulse to 2 elseif ( GetObjectiveDisplayed MS04 35 == 1 ) setObjectiveCompleted MS04 35 1 set SentPulse to 2 else set SentPulse to 2 endif endif if ( SentPulse == 2 ) if ( GetDeadCount DoctorLesko == 1 ) setObjectiveCompleted MS04 43 1 SetStage MS04 50 set MasterKill to 1 set SentPulse to 3 elseif ( GetDeadCount DoctorLesko == 0 ) set MasterKill to 1 set SentPulse to 3 endif endif ;Karma Reward for Destroying the Mutagen if ( MutagenDestroyed == 1 ) if ( DoOnce3 == 0 ) set DoOnce3 to 1 if ( KarmaBlock == 0 ) RewardKarma 100 Set KarmaBlock to 1 endif endif endif ;This is for Lesko's injection if ( GoInject == 1 ) set Timer to 8 disablePlayerControls set GoInject to 2 endif if GoInject == 2 || GoInject == 3 set Timer to ( Timer - GetSecondsPassed ) if ( GoInject == 2 ) && ( Timer <= 3 ) Playsound NPCHumanUsingMorphine IMod MS04InjectISFX set GoInject to 3 endif if ( GoInject == 3 ) && ( Timer <= 0 ) enablePlayerControls DocLeskoRef.Evp SetQuestDelay MS10 0 if ( PerkType == 1 ) ShowMessage MS04AntMightMessage elseif ( PerkType == 2 ) ShowMessage MS04AntSightMessage endif Set GoInject to 4 endif endif ;This is the Master Kill Block ;We are NOT running the script per creature as they will not get killed until the exterior loads which would look odd ;Therefore, we are running it on Quest Script and the refs are all persistant if ( AntsKilled == 0 ) if ( MasterKill == 1 ) MS04Ant01Ref.Kill MS04Ant02Ref.Kill MS04Ant03Ref.Kill MS04Ant04Ref.Kill MS04Ant05Ref.Kill MS04Ant06Ref.Kill MS04Ant07Ref.Kill MS04Ant08Ref.Kill MS04Ant09Ref.Kill MS04Ant10Ref.Kill MS04Ant11Ref.Kill MS04Ant12Ref.Kill MS04Ant13Ref.Kill MS04Ant14Ref.Kill MS04Ant15Ref.Kill MS04Ant16Ref.Kill MS04Ant17Ref.Kill MS04Ant18Ref.Kill MS04Ant19Ref.Kill MS04Ant20Ref.Kill MS04Ant21Ref.Kill MS04Ant22Ref.Kill MS04Ant23Ref.Kill MS04Ant24Ref.Kill set AntsKilled to 1 endif endif ;This cleans up Wilk's house if ( HouseDone == 0 ) if ( GetStage MS04 >= 60 ) if ( GetDeadCount BryanWilks == 0 ) if ( Player.GetInCell GrayditchWilksHome == 0 ) if ( BryanWilksRef.GetInCell GrayditchWilksHome == 1 ) MS04FireDamage.Disable if ( GetObjectiveDisplayed MS04 10 == 1 ) SetObjectiveDisplayed MS04 10 0 endif set HouseDone to 1 endif endif endif endif endif end
574MS04ShelterDoorTriggerScriptscn MS04ShelterDoorTriggerScript begin OnTriggerLeave Player MS04GrayditchShelter.SetOpenState 0 end
575MS05FinQuestScriptscn MS05FinQuestScript short Number short TakeBottles short MakePie ;1= Sierra regreets and gives a pie to player short CashGive short BakedPie ;1= Pie is done, for forcegreet after cooking short Talk ;x= For cascading conversation string short RonaldGoFight ;1= Start Combat for Ronald short RonaldFear ;1= Scared Ronald with SC... he leaves short RonaldSad ;1= Ronald is sad at Player for comments on Sierra if she's dead begin gamemode ;This block handles the removal of the Quantum from the Player's inventory as well as tallying the count if ( TakeBottles == 1 ) ;This flag is set in dialog with Sierra if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Set Number to ( Player.GetItemCount MS05NukaColaQtm ) ;Set the temporary variable to the number of bottles player has Set TakeBottles to 3 ;Advance the flag endif endif if ( TakeBottles == 3 ) ;From the above block if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Player.RemoveItem MS05NukaColaQtm Number ;Remove the number of Quantum bottles equal to amount tallyed/carried Set CashGive to ( Number * 50 ) ;Calculate Cash given Player.AddItem Caps001 CashGive ;Add 5 caps per bottle turned in set TakeBottles to 0 ;Reset the flag set Number to 0 ;Reset the temporary variable set CashGive to 0 endif endif ;This block handles Ronald Laren going into combat with Player if ( RonaldGoFight == 1 ) RonaldLarenRef.SetAV Aggression 1 RonaldLarenRef.StartCombat Player set RonaldGoFight to 2 endif end
576MS05MercierScriptscn MS05MercierScript short Kaboom begin OnLoad if ( Kaboom == 0 ) MS05MercierRef.Kill MS05MercierRef 3 MS05MercierRef.Kill MS05MercierRef 7 Set Kaboom to 1 endif end
577MS05QuestScriptscn MS05QuestScript short TourStart ;1= Kick off the tour sequence for Sierra short QuestOffered ;1= Quest flag for dialog... Sierra has offered the quest to the Player short NukaCount ;x= This is the master counter for turning in the Nuka Cola Quantum bottles short NukaCountR ;x= This is the master counter for turning in the Nuka Cola Quantum bottles for Ronald short TakeBottles ;1= The player has turned in bottles. This resets every time the player returns with more short TakeBottlesR ;1= The player has turned in bottles to Ronald. This resets every time the player returns with more short Number ;x= How many bottles in a turn in (a temporary holding variable) short NumberR ;x= How many bottles in a turn in (a temporary holding variable) for Ronald short RonaldOffer ;1= Offer has been made by Ronald Laren short RonaldDone ;1= 30 Bottles have been given to Ronald Laren, he is now done buying and initiates the "bad ending" short StageChange ;1= A DoOnce variable short RonaldAmbush ;1= Ronald has dialog ambushed player short CashGive ;x= A holding variable for how many caps player gets short CashGiveR ;x= A holding variable for how many caps player gets for Ronald short NukaTalk ;x= A holding variable to conditionalize Player prompts and Sierra's reaction appropriately short NukaTalkR ;x= A holding variable to conditionalize Player prompts and Ronald's reaction appropriately short PlantTold ;1= Sierra mentioned the Nuka-Cola Plant (for dialog) short Cocktail ;1= Player knows special reward is Cocktail (for dialog) short BlackWidow1 ;1= Player sent Ronald on quest (Player has Black Widow Trait) short DoubleDown ;1= Ronald pays double for Quantum short BoostCash ;1= Sets off the calculation of cash the player gets from Ronald per bottle depending on Speech Challenge in dialog short SierraDead ;1= Sierra is dead, Ronald speech reactions dialog limiter short Demerit ;x= The number of demerits until the Nuka Foreman "expells" the Player short ID ;1= Robot Foreman in Nuka-Cola Plant has cleared the Player short ForemanAmbush ;1= The Robot Foreman in Nuka-Cola Plant has ambushed the Player for dialog short ForemanInCombat ;1= The Robot Foreman is in combat with the Player short DoOnce ;1= DoOnce variable used in Terminal Data Module Block short HaveModule ;1= The Player has the Terminal Data Module short SierraAnger ;1= Player made Sierra angry enough to kick out of dialog short Manifest ;1= Manifest in possession short AngerBail01 ;1= Returns the player to the right spot in dialog after bringing Sierra a Quantum short AngerBail02 ;1= Returns the player to the right spot in dialog after bringing Sierra a Quantum short MachineNC ;1= Load Nuka-Cola into Sorter Unit short MachineQT ;1= Load Nuka-Cola Quantum into Sorter Unit short MachineBroken ;1= Packing Line is down short MercierFound ;1= The Player located Mercier's Corpse and picked up the Note short FormulaFound ;1= The Player located formula and picked up the Note short FactoryFound ;1= The Player has previously located the Nuka-Cola Plant before meeting Sierra short MS05Good short MS05Bad float Timer begin gamemode ;This block handles the removal of the Quantum from the Player's inventory as well as tallying the count for Sierra if ( TakeBottles == 1 ) ;This flag is set in dialog with Sierra if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Set Number to ( Player.GetItemCount MS05NukaColaQtm ) ;Set the temporary variable to the number of bottles player has Set TakeBottles to 2 ;Advance the flag endif endif if ( TakeBottles == 2 ) ;From the above block if ( Number >= 1 ) Set NukaCount to ( NukaCount + Number ) ;Set the "global" variable or the master count to the count plus whatever the player just turned in Set TakeBottles to 3 ;Advance the flag endif endif if ( TakeBottles == 3 ) ;From the above block if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Player.RemoveItem MS05NukaColaQtm Number ;Remove the number of Quantum bottles equal to amount tallyed/carried Set CashGive to ( Number * 40 ) ;Calculate Cash given Player.AddItem Caps001 CashGive ;Add 40 caps per bottle turned in set TakeBottles to 0 ;Reset the flag set Number to 0 ;Reset the temporary variable set CashGive to 0 if ( NukaCount >= 30 ) ;Player has turned in 30 Bottles total of Quantum SetStage MS05 100 ;Trigger quest end endif endif setQuestDelay MS05 0 endif ;This block handles the removal of the Quantum from the Player's inventory as well as tallying the count for Ronald Laren (seperate) if ( TakeBottlesR == 1 ) ;This flag is set in dialog with Ronald if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Set NumberR to ( Player.GetItemCount MS05NukaColaQtm ) ;Set the temporary variable to the number of bottles player has Set TakeBottlesR to 2 ;Advance the flag endif endif if ( TakeBottlesR == 2 ) ;From the above block if ( NumberR >= 1 ) Set NukaCountR to ( NukaCountR + NumberR ) ;Set the "global" variable or the master count to the count plus whatever the player just turned in Set TakeBottlesR to 3 ;Advance the flag endif endif if ( TakeBottlesR == 3 ) ;From the above block if ( Player.GetItemCount MS05NukaColaQtm >= 1 ) Player.RemoveItem MS05NukaColaQtm NumberR ;Remove the number of Quantum bottles equal to amount tallyed/carried Set CashGiveR to ( NumberR * BoostCash ) ;Calculate Cash given Player.AddItem Caps001 CashGiveR ;Add 5 caps per bottle turned in if ( NukaCountR < 30 ) set TakeBottlesR to 0 ;Reset the flag set NumberR to 0 ;Reset the temporary variable set CashGiveR to 0 setQuestDelay MS05 0 elseif ( NukaCountR >= 30 ) ;Check to see if Player is at 30 yet set TakeBottlesR to 0 ;Reset the flag set NumberR to 0 ;Reset the temporary variable set CashGiveR to 0 setStage MS05 100 endif endif SetQuestDelay MS05 0 endif ;This block calculates "BoostCash" variable which is set in dialog ;If the player completes the Speech Challenge with Ronald, they get double caps per bottle if ( BoostCash == 1 ) ;Flagged in dialog when accepting quest from Ronald if ( DoubleDown == 0 ) Set BoostCash to 40 ;SC was failed, Player gets 40 caps per bottle elseif ( DoubleDown == 1 ) ;Flagged in dialog if SC won Set BoostCash to 80 ;SC success, Player gets 80 caps per bottle endif endif ;This block triggers a stage change upon entry to the Nuka-Cola plant if ( GetStage MS05 >= 20 && GetStageDone MS05 30 == 0 ) ;Check to make sure at least Stage 20 is running if ( Player.GetInCell NukaColaPlant01 ) ;Player has entered the Nuka Cola Plant SetStage MS05 30 ;Trigger next stage endif elseif ( GetStage MS05 < 20 ) set FactoryFound to 1 ;This marks that the Player has previously discovered the Factory endif ;This block handles picking up Mercier's Note on the third floor if ( MercierFound == 0 ) if ( Player.GetHasNote MSMiniWingerMercierNote == 1 ) set MercierFound to 1 endif endif if ( FormulaFound == 0 ) if ( Player.GetItemCount MS05NukaColaDisk == 1 ) MS05RaiderDisabler.Disable set FormulaFound to 1 endif endif end
578MS05TerminalDataModuleScriptscn MS05TerminalDataModuleScript begin OnAdd Player Set MS05.Timer to 3 Set MS05.HaveModule to 1 end
579MS08FinQuestScriptscn MS08FinQuestScript short playerOkayToKillZimmer short VictoriaTalk short MovementMentioned short doOnce ;handles the various ending scenes short harknessTold ;0 = unset, 1 = Harkness was given proof he was an adroid, used to control what he says when Zimmer comes to take him away short endSceneType ;0 = unset, 1 = Zimmer takes Harkness, 2 = Harkness confronts Zimmer, 3 = Harkness runs away short endSceneStage ;variable that tracks the progress through the scene used as conditions on packages and dialog short endSceneOffscreen short androidReset ;1 = Harkness should get knocked down, -1 has been knocked down (see MS08HarknessAndroidReset package) short shootZimmer short endSceneDone ;0 = unset, 1 = scene is done short liedAboutAndroidParts ;1 = player lied to Zimmer about android parts, 2 = player lied to Harkness about android parts. either way, you can only keep lying to the other person in the post quest dialog. Begin GameMode if endSceneType != 0 if doOnce == 0 if endSceneType== 2 || endSceneType == 3 || playerOkayToKillZimmer == 1 setEssential Zimmer 0 setEssential Armitage 0 set doOnce to 1 endif endif endif if endSceneDone == 1 if GetStageDone MS08 200 == 0 setstage ms08 200 endif endif End
580MS08NoteScriptscn MS08NoteScript ;!!!!!!!! Note there is a RETURN in the GameMode block !!!!!!!!!!!!! ;This script is placed on the note activators and adds the next note in the quest line ;What note gets added is flavored by where it is found short debugMessage ;0= not set, 1 = already showed the debug message, don't show it again. Begin GameMode if getStageDone MS08 20 || getStageDone MS08 100 Disable RETURN endif End Begin OnActivate set MS08.patientKnowledge to 1 set MS08.androidKnowledge to 1 ;MEDICAL NOTES if IsOwner MS08NoteOwnerFactionDoctorBanfield set MS08.ClueOwner to 1 set MS08.ClueType to 1 setStage MS08 1 ;this is essentially a "function" that gives the player the proper note elseif IsOwner MS08NoteOwnerFactionDocChurch set MS08.ClueOwner to 2 set MS08.ClueType to 1 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionDoctorBarrows set MS08.ClueOwner to 3 set MS08.ClueType to 1 setStage MS08 1 ; elseif IsOwner CultivatorBuckthorn ; set MS08.ClueOwner to 4 ; set MS08.ClueType to 1 ; setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionCutter set MS08.ClueOwner to 5 set MS08.ClueType to 1 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionLucy set MS08.ClueOwner to 6 set MS08.ClueType to 1 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionDoctorPreston set MS08.ClueOwner to 7 set MS08.ClueType to 1 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionRed set MS08.ClueOwner to 7 set MS08.ClueType to 1 setStage MS08 1 ;TECHNICAL NOTES elseif IsOwner MS08NoteOwnerFactionKnickKnack set MS08.ClueOwner to 11 set MS08.ClueType to 2 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionMoiraBrown set MS08.ClueOwner to 12 set MS08.ClueType to 2 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionSeagraveHolmes set MS08.ClueOwner to 13 set MS08.ClueType to 2 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionScribeBowditch set MS08.ClueOwner to 14 set MS08.ClueType to 2 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionWinthrop set MS08.ClueOwner to 15 set MS08.ClueType to 2 setStage MS08 1 ; elseif IsOwner Trigger ; set MS08.ClueOwner to 16 ; set MS08.ClueType to 2 ; setStage MS08 1 ;SLAVER NOTES elseif IsOwner MS08NoteOwnerFactionEulogyJones set MS08.slaverNoteFound to 1 set MS08.ClueOwner to 21 set MS08.ClueType to 3 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionGrouse set MS08.slaverNoteFound to 1 set MS08.ClueOwner to 22 set MS08.ClueType to 3 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionSister set MS08.slaverNoteFound to 1 set MS08.ClueOwner to 23 set MS08.ClueType to 3 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionSister set MS08.ClueOwner to 24 set MS08.ClueType to 3 setStage MS08 1 ;SYMPATHIZER NOTES elseif IsOwner MS08NoteOwnerFactionManya set MS08.sympathizerNoteFound to 1 set MS08.ClueOwner to 31 set MS08.ClueType to 4 setStage MS08 1 ; elseif IsOwner BloomseerPoplar ; set MS08.sympathizerNoteFound to 1 ; set MS08.ClueOwner to 32 ; set MS08.ClueType to 4 ; setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionFatherClifford set MS08.sympathizerNoteFound to 1 set MS08.ClueOwner to 33 set MS08.ClueType to 4 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionHerbertDashwood set MS08.sympathizerNoteFound to 1 set MS08.ClueOwner to 34 set MS08.ClueType to 4 setStage MS08 1 elseif IsOwner MS08NoteOwnerFactionTulip set MS08.sympathizerNoteFound to 1 set MS08.ClueOwner to 35 set MS08.ClueType to 4 setStage MS08 1 ;; cell TestWarehouse has been deleted ;;elseif debugMessage == 0 ;This note is not owned and will break the quest, show a warning message ;; if getInCell TestWarehouse == 0 ;don't issue warning if in testWarehouse cells ;; showWarning "This MS08Note has no ownership." ;; set debugMessage to 1 ;; endif endif ;stage now happens in result scripts of listening to the audio ;setStage MS08 3 ;this stage pops a vague quest objective if you aren't on the quest already disable End
581MS08QuestScriptscn MS08QuestScript ;variables used for tracking the clues the player has uncovered, set in dialog or via the MS08NoteScript ;debugging variables ref debugNoteRef ;see MS08XXXNoteScript for details ref debugNoteContainerRef ;see MS08XXXNoteScript for details ;short test ;These are variables set on the onactivate block of MS08Terminals and MS08Notes ;they are used in the "function" call of Set Stage MS08 1 ;they are also used as conditions on terminals short ClueOwner short ClueType short ClueNumber short ZimmerProd1 short patientKnowledge ;1 = player can ask people to find clue 1 -- set by talking to Zimmer or uncovering a clue short androidKnowledge ;1 = player can ask people ro find clue 1 -- set by talking to ZImmer or uncovering a clue short slaverNoteFound ;you can't ask slavers until you've found a slaver note, set in MS08Note script and used as conditions in dialog short sympathizerNoteFound ;you can't ask sympathizers until you've found a sympathizer note, set in MS08Note script and used as conditions in dialog short clue1 short clue2 short clue3 short clue4 ;0 = not found ;Doctors: ;1 = DoctorBanfield ;2 = DocChurch ;3 = DoctorBarrows ;4 = ;5 = Cutter ;6 = Lucy ;7 = DoctorPreston ;8 = Red ;Techies ;11 = KnickKnack ;12 = MoiraBrown ;13 = SeagraveHolmes ;14= ScribeBowditch ;15 = Winthrop ;16 = Trigger ;Slavers ;21 = EulogyJones ;22 = Grouse ;23 = Sister (Rivet City / Paradise Falls) ;Sympathizers ;31 = Manya ;32 = ;33 = FatherClifford ;34 = HerbertDashwood ;35 =Tulip ;!!! negative values represent the player got the clue by finding a note in the NPCs things or computer !!! short clue1XPReward ;1 = rewarded short clue2XPReward ;1 = rewarded short clue3XPReward ;1 = rewarded short clue4XPReward ;1 = rewarded ;These are variables from the first implementation of the quest ;They are used as conditions in all the dialog so I'm keeping them so i don't have to change all the conditions in dialog ;They are essentially equivelent to clue1, clue2, clue3, and clue4 variables short medicalClue1 ; "VIP Patient from North looking for suregey" 0 = not found, N = enum representing the NPC who he got the info from short medicalClue2 ; "Looking for place and gear for Facial Reconstruction" 0 = not found, N = enum representing the NPC who he got the info from short medicalClue3 ; "They located a Lipoplasticator and Mirco Dermal Graftilizer" 0 = not found, N = enum representing the NPC who he got the info from short medicalClue4 ; "VIP Patient from North conducted to Rivet City for Surgery" 0 = not found, N = enum representing the NPC who he got the info from short slaverClue1 short slaverClue2 short slaverClue3 short slaverClue4 short sympathizerClue1 short sympathizerClue2 short sympathizerClue3 short sympathizerClue4 short technicalClue1 short technicalClue2 short technicalClue3 short technicalClue4 short railroadAmbush ;1 = rail road agent tries to get player to give up the chase, 2= rail road agent should disappear into the wasteland short prestonTold ;0 = unset, 1 = Doctor Preston told the player about Harkness (used as condition on dialog in conjuction with harknessWantsProof) -- OBSOLETE?? short pinkertonTold ;0 = unset, 1 = Pinkerton told the player about Harkness (used as condition on dialog in conjuction with harknessWantsProof) short harknessWantsProof ;0 = unset, 1 = player talked to harkness without proof, now player can ASK Pinkerton directly for proof if they didn't get it the first time, or snoop to find it (if you intimidate Preston, he tells you its harkness, but doesn't offer you pictures) short pinkertonFaceGen ;0 = unset, 1 = will offer to do face gen menu -- NOTE: the dialog option to do this lives in DialogueRivetCity NOT MS08 short finishedXPAwarded ;1 = awarded the player the final xp, so don't do it again (to handle telling harkness his secret is safe with you, then selling him out... don't wnat to get xp twice) ;THESE ARE OBSOLETE? ------------- short ZimmerKnows ;0 = unset, 1 = player told Zimmer about Harkness short HarknessLeave ;0 = unset, 1 = player told Harkness Zimmer is out to get him short HarknessLeaveDay ;the day that Harkness runs away, used to make Zimmer leave after awhile short ZimmerLeave ;s0 = unset, 1 = player told Harkness about Zimmer and Harkness is going to make him leave ------------------ short railRoadKnowledge ;player has heard of Railroad short HarknessWaitingForZimmer ;0 = unset, 1 = player convinces Harkness to go to commonwealth, he tells player to tell Zimmer he's ready to go short moveVictoriaToPlayer ;0 = unset, 1 = get ready to move her, 2 = player has been detected in an interior, move her to him immediately upon player moving into exterior location, -1 = moved her, -9999 means player has talked her before she had to be moved Begin GameMode ; ;if the player hasn't talked to Victoria yet, the next time he goes into an interior, move her to him when he enters an exterior ; if railroadAmbush == 1 ; if VictoriaWattsRef.getTalkedToPC == 0 ; if moveVictoriaToPlayer == 0 ; set moveVictoriaToPlayer to 1 ; endif ; else ; set moveVictoriaToPlayer to -9999 ; endif ; ; if moveVictoriaToPlayer == 1 ; if player.IsInInterior == 1 ; set moveVictoriaToPlayer to 2 ; setQuestDelay MS08 .001 ; endif ; elseif moveVictoriaToPlayer == 2 ; if player.IsInInterior == 0 ; VictoriaWattsRef.moveTo Player ; VictoriaWattsRef.evp ; set moveVictoriaToPlayer to -1 ; setQuestDelay MS08 0 ; endif ; endif ; ; endif End
582MS08TerminalScriptscn MS08TerminalScript short clueOwner short ClueType ;1 = Medical, 2 = Technical, 3 = Slaver, 4 = Sympathizer short ClueNumber ;This script runs on all the terminals associated with MS08. It sets MS08QuestScript variables that are used on terminal menu item conditions Begin OnActivate if IsActionRef player == 1 ;MEDICAL if IsOwner DoctorBanfield == 1 set clueOwner to 1 set clueType to 1 elseif IsOwner DocChurch == 1 set clueOwner to 2 set clueType to 1 elseif IsOwner DoctorBarrows == 1 set clueOwner to 3 set clueType to 1 ; elseif IsOwner CultivatorBuckthorn == 1 ; set clueOwner to 4 ; set clueType to 1 elseif IsOwner Cutter == 1 set clueOwner to 5 set clueType to 1 elseif IsOwner Lucy == 1 set clueOwner to 6 set clueType to 1 elseif IsOwner DoctorPreston == 1 set clueOwner to 7 set clueType to 1 elseif IsOwner Red == 1 set clueOwner to 8 set clueType to 1 ;TECHNICAL elseif IsOwner KnickKnack == 1 set clueOwner to 11 set clueType to 2 elseif IsOwner MoiraBrown == 1 set clueOwner to 12 set clueType to 2 elseif IsOwner SeagraveHolmes == 1 set clueOwner to 13 set clueType to 2 elseif IsOwner ScribeBowditch == 1 set clueOwner to 14 set clueType to 2 elseif IsOwner Winthrop == 1 set clueOwner to 15 set clueType to 2 elseif IsOwner Trigger == 1 set clueOwner to 16 set clueType to 2 ;SLAVER elseif IsOwner EulogyJones == 1 set clueOwner to 21 set clueType to 3 elseif IsOwner Grouse == 1 set clueOwner to 22 set clueType to 3 elseif IsOwner Sister == 1 set clueOwner to 23 set clueType to 3 ;SYMPATHIZER elseif IsOwner Manya == 1 set clueOwner to 31 set clueType to 4 ; elseif IsOwner BloomseerPoplar == 1 ; set clueOwner to 32 ; set clueType to 4 elseif IsOwner FatherClifford == 1 set clueOwner to 33 set clueType to 4 elseif IsOwner HerbertDashwood == 1 set clueOwner to 34 set clueType to 4 elseif IsOwner Tulip == 1 set clueOwner to 35 set clueType to 4 endif ;which clue number should be displayed? if MS08.Clue1 == 0 set clueNumber to 1 elseif MS08.Clue1 == clueOwner || MS08.Clue1 == -clueOwner ;the player already got this clue from this person set clueNumber to 1 elseif MS08.Clue2 == 0 set clueNumber to 2 elseif MS08.Clue2 == clueOwner || MS08.Clue2 == -clueOwner ;the player already got this clue from this person set clueNumber to 2 elseif MS08.Clue3 == 0 set clueNumber to 3 elseif MS08.Clue3 == clueOwner || MS08.Clue3 == -clueOwner ;the player already got this clue from this person set clueNumber to 3 elseif MS08.Clue4 == 0 set clueNumber to 4 elseif MS08.Clue4 == clueOwner || MS08.Clue4 == -clueOwner ;the player already got this clue from this person set clueNumber to 4 else set clueNumber to 5 endif ;these are then used as conditions on the terminal to display the proper item set MS08.ClueOwner to clueOwner set MS08.ClueType to clueType set MS08.ClueNumber to clueNumber endif Activate End
583MS09ArefuArrivalTriggerScriptscn MS09ArefuArrivalTriggerScript ;This script handles the actions taken by Evan King when the player first arrives at Arefu float ShootTimer begin OnTriggerEnter Player if ( MS09ArefuHates == 0 ) if ( GetQuestRunning MS09 == 1 ) if ( GetDeadCount EvanKing == 0 ) if ( MS09.EvanAmbushed == 0 ) Set ShootTimer to 3 DisablePlayerControls MS09BoomMarker.PlaceatMe FakeMediumExplosion 1 set MS09.EvanAmbushed to 1 endif endif endif endif end begin gamemode if ( MS09.EvanAmbushed == 1 ) if ( ShootTimer > 0 ) Set ShootTimer to ( ShootTimer - GetSecondsPassed ) else Set MS09.EvanAmbushed to 2 EvanKingRef.Evp endif endif end
584MS09ArefuResidentScriptscn MS09ArefuResidentScript short Factionset ;This handles if the Player engages in combat with the Arefu NPC or if I decide to call "MS09ArefuHates" anywhere by Player action ;The last block closes the quest, gives the failure message and sets up blocker dialogue begin OnHit Player if ( MS09ArefuHates == 0 ) set MS09ArefuHates to 1 endif end begin gamemode if ( MS09ArefuHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS09ArefuHates to 1 endif endif endif if ( MS09ArefuHates >= 1 ) if ( Factionset == 0 ) SetEnemy ArefuFaction PlayerFaction setFactionrank ArefuHostile 0 setAV Aggression 2 EVP set Factionset to 1 endif endif if ( Factionset == 1 ) set FactionSet to 2 if ( GetStage MS09 < 10 ) Set MS09.ArefuDead to 1 StopQuest MS09 StartQuest MS09Fin elseif ( GetStage MS09 >= 10 ) && ( GetStage MS09 < 100 ) Set MS09.ArefuDead to 1 SetStage MS09 150 elseif ( GetStage MS09 == 100 ) Set MS09.ArefuDead to 1 endif endif end begin OnDeath set MS09ArefuHates to 1 end
585MS09ArefuResidentScriptEvanKingscn MS09ArefuResidentScriptEvanKing short Factionset ;This handles if the Player engages in combat with the Arefu NPC or if I decide to call "MS09ArefuHates" anywhere by Player action ;The last block closes the quest, gives the failure message and sets up blocker dialogue begin OnHit Player if ( MS09ArefuHates == 0 ) set MS09ArefuHates to 1 endif end begin gamemode if ( MS09ArefuHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS09ArefuHates to 1 endif endif endif if ( MS09ArefuHates >= 1 ) if ( Factionset == 0 ) SetEnemy ArefuFaction PlayerFaction setFactionrank ArefuHostile 0 setAV Aggression 2 EVP set Factionset to 1 endif endif if ( Factionset == 1 ) set FactionSet to 2 if ( GetStage MS09 < 10 ) Set MS09.ArefuDead to 1 StopQuest MS09 StartQuest MS09Fin elseif ( GetStage MS09 >= 10 ) && ( GetStage MS09 < 100 ) Set MS09.ArefuDead to 1 SetStage MS09 150 elseif ( GetStage MS09 == 100 ) Set MS09.ArefuDead to 1 endif endif end begin OnDeath set MS09ArefuHates to 1 EnablePlayerControls end
586MS09EwersDoorScriptscn MS09EwersDoorScript short DoorLock ;1= Door is Unlocked short CheckButtonPress short Button ;This script is used for the Knocking of the doors in Arefu and getting a response begin OnActivate if MS09ArefuHates == 0 if IsActionRef player == 1 if ( DoorLock == 0 ) MS09EwersTalkerRef.setTalkingActivatorActor BraileeEwersRef Showmessage MS09EwersDoorMessage else Activate endif else Activate endif elseif ( MS09ArefuHates == 1 ) Activate endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) Player.StartConversation MS09EwersTalkerRef endif end
587MS09FamilyCombatScriptscn MS09FamilyCombatScript ;This resides on all of the NPCs in The Family. If attacked, this makes the entire Family hostile and nullifys the Family Badge short Factionset begin OnDeath set MS09FamilyHates to 1 ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end begin gamemode if ( MS09FamilyHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS09FamilyHates to 1 endif endif endif if ( MS09FamilyHates >= 1 ) if ( Factionset == 0 ) SetEnemy MS09TheFamilyFriendly PlayerFaction setfactionrank MS09TheFamilyHostile 0 setAV Aggression 1 EVP set Factionset to 1 endif endif end begin OnHit Player if ( MS09FamilyHates == 0 ) set MS09FamilyHates to 1 endif ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end
588MS09FamilyCombatScriptRobertscn MS09FamilyCombatScriptRobert ;This resides on all of the NPCs in The Family. If attacked, this makes the entire Family hostile and nullifys the Family Badge short Factionset begin OnDeath MS09FamilyGateRef.Unlock set MS09FamilyHates to 1 ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end begin gamemode if ( MS09FamilyHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS09FamilyHates to 1 endif endif endif if ( MS09FamilyHates >= 1 ) if ( Factionset == 0 ) SetEnemy MS09TheFamilyFriendly PlayerFaction setfactionrank MS09TheFamilyHostile 0 setAV Aggression 1 EVP set Factionset to 1 endif endif end begin OnHit Player if ( MS09FamilyHates == 0 ) set MS09FamilyHates to 1 endif ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end
589MS09FamilyFailsafeTriggerScriptscn MS09FamilyFailsafeTriggerScript ;Similar to Paradise Falls, this prevents unauthorized entry into Meresti ;If the Player has not spoken to Robert and gotten his permission to enter, when they break this zone they will switch everyone to Hostile ;This may already be the case if Robert's been shot, but this is for sneaking or running by ;Also, this box will complete the Found Family objective in case the Player decided NOT to speak to Robert begin OnTriggerEnter Player if ( MS09.RobertPass == 0 ) if ( MS09FamilyHates == 0 ) set MS09FamilyHates to 1 endif endif if ( GetStage MS09 >= 30 ) if ( GetObjectiveCompleted MS09 30 == 0 ) SetStage MS09 40 Set MS09.FoundFamily to 2 endif endif end
590MS09FamilyVanceScriptscn MS09FamilyVanceScript ;This resides on all of the NPCs in The Family. If attacked, this makes the entire Family hostile and nullifys the Family Badge short Factionset begin OnHit Player if ( MS09FamilyHates == 0 ) set MS09FamilyHates to 1 endif ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end begin OnDeath set MS09.VanceDead to 1 set MS09FamilyHates to 1 if ( MS09.GotShish == 0 ) AddItem SchematicsShishkebabItem 1 endif ;Special Handler for aggroing the Family after speaking to Ian West and resolving his issue if ( MS09.AggroHandler == 0 ) if ( MS09.IanMeetFirstTime == 1 ) if ( MS09FamilyHates == 1 ) set MS09IanHates to 1 set MS09.AggroHandler to 1 endif endif endif end begin gamemode if ( MS09FamilyHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS09FamilyHates to 1 endif endif endif if ( MS09FamilyHates >= 1 ) if ( Factionset == 0 ) SetEnemy MS09TheFamilyFriendly PlayerFaction setfactionrank MS09TheFamilyHostile 0 setAV Aggression 1 EVP set Factionset to 1 endif endif if ( MS09VanceSpeechProg == 10 ) set MS09Meet to 0 set DialogueTheFamily.Meeting to 0 set DialogueTheFamily.Ready to 0 set DialogueTheFamily.MeetTimer to 0 FamVanceRef.Evp FamHollyRef.Evp FamKarlRef.Evp FamBriannaRef.Evp FamAlanRef.Evp FamJustinRef.Evp set MS09VanceSpeechProg to 0 endif end begin SayToDone MS09VanceSpeech elseif ( MS09VanceSpeechProg == 2 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 3 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 4 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 5 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 6 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 7 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 8 ) Say MS09VanceSpeech 1 elseif ( MS09VanceSpeechProg == 9 ) Say MS09VanceSpeech 1 endif end
591MS09FinScriptscn MS09FinScript short Rocks ;10=Brailee is all out of her "cookies" short ProposalAccepted ;1= Evan King accepted the proposal from Meresti short ProposalAcknowledged ;1= Vance has been told the proposal was accepted short TakeBlood ;1= The trigger in the info for buying bloodpacks short Number ;1= Used for Bloodpacks block (Holding variable) short CashGive ;1= Used for Bloodpacks block (Holding variable) short LetterDelivered ;1= Player gave letter to Ian short AlanMoves ;1= If Proposal 2 was accepted by Evan King, move Alan to Arefu short SetupDone ;1= The above was done (DoOnce) short DoOnceLast ;1= Letter Delivered (DoOnce) begin gamemode ;This block handles the removal of the Bloodpacks from the Player's inventory and caps from Vance if Proposal was accepted if ( TakeBlood == 1 ) if ( Player.GetItemCount Bloodpack >= 1 ) Set Number to ( Player.GetItemCount Bloodpack ) ;Set the temporary variable to the number of packs player has Set TakeBlood to 2 ;Advance the flag endif endif if ( TakeBlood == 2 ) ;From the above block if ( Player.GetItemCount Bloodpack >= 1 ) Player.RemoveItem Bloodpack Number ;Remove the number of Quantum bottles equal to amount tallyed/carried Set CashGive to ( Number * 15 ) ;Calculate Cash given Player.AddItem Caps001 CashGive ;Add 15 caps per pack turned in set TakeBlood to 0 ;Reset the flag set Number to 0 ;Reset the temporary variable set CashGive to 0 endif endif ;This block Handles the setup of Alan at Arefu if the Proposal was presented and accepted if ( AlanMoves == 1 ) if ( SetupDone == 0 ) if ( Player.GetInSameCell FamAlanRef == 0 ) FamAlanRef.Moveto MS09AlanAIMarker MS09PostSetupLightRef.Enable set MS09Fin.AlanMoves to 1 SetCellFullName ArefuAbandonedShack NamedCellArefu MS09OuterBarricadeRef.Disable MS09AbandonOuterDoorRef.Unlock FamAlanRef.Evp Set SetupDone to 1 endif endif endif ;This block handles converting the Delivery variable from MS09 to MS09Fin's in case Player doesn't return to Megaton until post-quest if ( DoOnceLast == 0 ) if ( MS09.LetterDelivered == 1 ) Set MS09Fin.LetterDelivered to 1 Set DoOnceLast to 1 endif endif end
592MS09IanWestHandlerScriptscn MS09IanWestHandlerScript short Factionset ;This will only be used if the Player attacks Ian before the quest is obtained. ;Note that Ian is not accessible until the Quest begins with Lucy or Evan King begin gamemode if ( MS09IanHates == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set Factionset to 1 set MS09IanHates to 1 endif endif endif if ( MS09IanHates >= 1 ) if ( Factionset == 0 ) SetEnemy MS09TheFamilyFriendly PlayerFaction setfactionrank MS09TheFamilyHostile 0 setAV Aggression 1 EVP set Factionset to 1 endif endif if ( Factionset == 1 ) if ( GetStage MS09 == 0 ) if ( GetObjectiveDisplayed MS09 15 == 1 ) Set MS09.IanDead to 1 Set MS09FamilyHates to 1 set MS09ArefuHates to 1 SetStage MS09 150 elseif ( GetObjectiveDisplayed MS09 15 == 0 ) Set MS09.IanDead to 1 Set MS09FamilyHates to 1 set MS09ArefuHates to 1 SetStage MS09 150 endif elseif ( GetStage MS09 >= 10 ) && ( GetStage MS09 < 100 ) Set MS09.IanDead to 1 Set MS09FamilyHates to 1 set MS09ArefuHates to 1 SetStage MS09 150 elseif ( GetStage MS09 == 100 ) Set MS09.IanDead to 1 Set MS09ArefuHates to 1 Set MS09FamilyHates to 1 endif set Factionset to 2 endif end begin OnDeath if ( MS09IanHates == 0 ) set MS09IanHates to 1 endif if ( MS09ArefuHates == 0 ) set MS09ArefuHates to 1 endif SetQuestObject MS09SealedEnvelope 0 end begin OnHit Player if ( MS09IanHates == 0 ) set MS09IanHates to 1 endif if ( MS09ArefuHates == 0 ) set MS09ArefuHates to 1 endif end
593MS09QuestScriptscn MS09QuestScript ;Global Variables ;MS09FamilyHates = A flag when set to 1, the Family perm hates the player (because he attacked them) ;External Scripts ;MS09CorpseScript = This script will reside on the West's Corpses and is for the examination section of the quest ;MS09FamilyBadgeScript= This is the script on the Badge given to the player by Robert that swaps them into the friendly faction ;MS09FamilyCombatScript= This resides on all of the NPCs in The Family. If attacked, this makes the entire Family hostile and nullifys the Badge ;These are all variables for use in dialog (conditions that change what infos are provided) short LucyHouse ;1= Told where Lucy West's House is short WestsDeadToldEK ;1= Evan King told Wests are Dead short EvanAmbushed ;1= Evan King has completed his initial ambush (shuts off package) short EvanMet ;1= Evan King has been met and spoken to at least once before or during this quest (for dialog) short DataGathered ;1= Level 1-3 of the Medical Data from the West Corpses gathered, 4 is same but the trainyard dust added - for dialog use short IanHatesMe ;1= Made Ian angry enough to lock out of dialog short IanGreet ;1= Sets up Ian for the Forcegreet after speaking to Vance short FamilyDeath ;1= When set to 1, this variable indicates to the Family that the player is a danger and should be attacked on sight short KenEwersBlock ;1= Player has pissed off Ken Ewers, locking out dialog (nothing quest important) short KenEwersInit ;1= Blocks the dialog on the initial greet so it isnt repeated at Stage 10 short RobertPass ;1= Opens up Robert's dialog tree for player short VampireData ;x= This is an incrementing variable acquired by speaking to Family members. When the threshold of 3 is reached, it will unlock more conversation with Vance. short VanceDead ;1= Vance is dead to help with alternate questline conditions. Set on his script. short TalkedIan ;1= Player talked to Ian before quest started. Used for dialog limitations. Set in Results Script. short TalkedtoWest ;1= Entered the West place, since there is no one to dialog with for completeing Evan King's task short TalkedtoSchenzy ;1= Spoke to Karen Schenzy for completing Evan King's task short TalkedtoEwers ;1= Spoke to Ken Ewers for completeing Evan King's task short IanStays ;1= Ian has decided to stay with the Family short KnowsAboutParents ;1= Dialog limiter. Lucy knows about Parents short LucyIsPissed ;1= Bad ending with Lucy for MS09Fin short LucyIsEmo ;1= Sad ending with Lucy for MS09Fin short RobertTalk ;1= Roberts Dialog Package has completed short KenTalk ;1= Ken Ewers dialog package has completed short VanceTalk ;1= Vance has refused the path to Ian, player will have to gleen the info from the people of Meresti short FoundFamily ;2= The Family has been located by Player (for dialog) short VampireResearch ;1= Vance has tasked the Player with Vampire Research (for dialog) short Proposal ;x= Player has bargained for a truce with Arefu (for dialog) short BodyBeenExam ;1= One of the West corpses was checked short FoundIan ;1= Player has found/spoken to Ian at least once (for dialog) short LucyKnowsIanMissing ;1= Lucy is now aware of Player's search for Ian (for dialog) short ArefuDead ;1= An Arefu Resident has been attacked (see his script) short IanDead ;1= Ian West has been attacked (see his script) short Terminal001 ;1= Law One was read off of the terminal and tallied short Terminal002 ;1= Law Two was read off of the terminal and tallied short Terminal003 ;1= Law Three was read off of the terminal and tallied short Terminal004 ;1= Law Four was read off of the terminal and tallied short Terminal005 ;1= Law Five was read off of the terminal and tallied short KarenForce ;1= Karen Schenzy has completed her force greet short NewGuy ;1= Player has heard the "new guy" mentioned in a conversation (for dialog) in Meresti short IanMad ;1= Player made Ian so angry, he engaged in combat (which will close quest) short ArefuClue ;1= Player overheard something about Arefu in Meresti (for optional open) short IanPost ;1= Ian's Post Quest A.I. if he decides to move to Arefu ( MS09.IanStays == 0 ) short Bypass ;1= Player arrived at Ian without any other starting point (except maybe letter). short VanceClear ;1= Vance cleared the Player to speak to Ian himself short LetterDelivered ;1= Player delivered the letter to Ian short GotShish ;1= Player got the Shish schematic from Vance (so do not add OnDeath) short MetLucy ;1= Dialog limiter. Met Lucy once. short Resolution ;1= Player delt with Ian West before ever visiting Arefu (to assist in greet handling) short IanMeetFirstTime ;1= First Time Speaking with Ian West (to track various issues) short AggroHandler ;1= A DoOnce variable that marks Aggro for purposes of dialog and script handling short MS09Good short MS09Bad begin gamemode ;These blocks track talking with all the Arefu residents as Evan King requested if ( TalkedtoWest == 1 ) && ( TalkedtoSchenzy == 1 ) && ( TalkedtoEwers == 1 ) ;All flags are set to 2 from above blocks SetStage MS09 25 ;Change master stage for dialog changes Set TalkedtoWest to 2 ;Set All flags to 3 for DoOnce Set TalkedtoSchenzy to 2 Set TalkedtoEwers to 2 endif ;This is an override script block for use when the player attacks a Family member. if ( MS09FamilyHates >= 1 ) Set RobertPass to 0 Set MS09FamilyHates to 2 ;Sets the Gobal to 2, so this block stops running endif ;This handles Finding The Family if ( FoundFamily == 1 ) set FoundFamily to 2 if ( GetObjectiveDisplayed MS09 30 == 1 ) SetStage MS09 40 endif endif ;This handles getting Ian angry and initiating combat ;The Player has to start out hostile to The Family to have this occur (it's from dialog) if ( MS09FamilyHates >= 1 ) if ( IanMad == 1 ) Set MS09IanHates to 1 set IanMad to 2 endif endif ;If the Player visits Meresti first, then Arefu, they may get this objective to help lead them there ;It's set in a terminal and on some infos if ( GetStage MS09 < 30 ) if ( ArefuClue == 1 ) SetObjectiveDisplayed MS09 15 1 set ArefuClue to 2 endif endif ;End State Handler for Ian West if Player is not in same cell if ( GetStage MS09 >= 60 ) if ( IanStays == 0 ) if ( IanPost == 0 ) if ( Player.GetInSameCell ArefuIanWestRef == 0 ) ArefuIanWestRef.MoveTo MS09WestArrivalMarker ArefuIanWestRef.Evp set IanPost to 1 endif endif endif endif end
594MS09RobertPackageTriggerScriptscn MS09RobertPackageTriggerScript short DoOnce ;This is a trigger to move Robert to the speaking position if the Player approaches regardless of his current package ;Only needed one time for this quest begin OnTriggerEnter Player if ( DoOnce == 0 ) if ( MS09.RobertTalk == 0 ) Set MS09.RobertTalk to 1 FamRobertRef.Evp Set DoOnce to 1 endif endif end
595MS09SchenzyDoorScriptscn MS09SchenzyDoorScript short DoorLock ;1= Door is Unlocked short CheckButtonPress short Button ;This script is used for the Knocking of the doors in Arefu and getting a response begin OnActivate if ( MS09ArefuHates == 0 ) if IsActionRef player == 1 if ( DoorLock == 0 ) MS09SchenzyTalkerRef.setTalkingActivatorActor KarenSchenzyRef Showmessage MS09SchenzyDoorMessage else Activate endif else Activate endif elseif ( MS09ArefuHates == 1 ) Activate endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) MS09SchenzyTalkerRef.StartConversation Player endif end
596MS10BowlScriptscn MS10BowlScript float ImodTimer float AfterDrinkTimer short FadingOut short MovePlayer short PlayerPassOutNow short TalkingGo short Button short Bowl Begin OnActivate if IsActionRef player == 1 if ( GetQuestRunning MS10 == 1 ) if ( Bowl == 0 ) if ( MS10.CeremonyGo < 2 ) ShowMessage MS10BasinMessageNoCeremony elseif ( MS10.CeremonyGo == 2 ) ShowMessage MS10BasinMessagePreCeremony Set Bowl to 1 elseif ( MS10.CeremonyGo >= 10 ) ShowMessage MS10BasinMessageNoCeremony endif endif endif endif End Begin GameMode ;This is the button press logic set Button to GetButtonPressed if ( Button == 0 ) && ( Bowl == 1 ) if ( MS10.CeremonyGo == 2 ) set MS10.CeremonyInt to 0 MS10BirchRef.Evp DisablePlayerControls playSound3D NPCHumanDrinkingHand MS10DrugSound.Enable imod MS10DrinkSap02ISFX imod MS10DrinkSapISFX Set AfterDrinkTimer to 4 Set MS10.CeremonyGo to 3 Set Bowl to 0 endif elseif ( Button == 1 ) && ( Bowl == 1 ) Set Bowl to 0 endif ;This block handles the actual player passing out. It will be triggered in game after the last line of dialog is delivered (info results). if ( PlayerPassOutNow == 1 ) imod MS10FadeOutISFX disableplayercontrols set ImodTimer to 4.5 set FadingOut to 1 set PlayerPassOutNow to 2 endif if ( FadingOut == 1 ) && ( ImodTimer > 0 ) set ImodTimer to ( ImodTimer - GetSecondsPassed ) elseif ( FadingOut == 1 ) && ( ImodTimer <= 0 ) SetStage MS10 5 imod MS10OutISFX rimod MS10DrinkSapISFX rimod MS10DrinkSap02ISFX set FadingOut to 2 MS10DrugSound.Disable player.moveto MS10PlayerAwakensMarker rimod MS10OutISFX imod MS10FadeInISFX EnablePlayerControls SetObjectiveCompleted MS10 5 1 endif ;This series of blocks handles the rest of the Ceremony ;Checking for deaths is not needed here, because Ceremony will be impossible if Player killed anyone (see main quest script) ;The Ceremony advances by SayToDone blocks on each individual NPC if ( TalkingGo == 0 ) && ( MS10.CeremonyGo == 3 ) && ( AfterDrinkTimer > 0 ) set AfterDrinkTimer to ( AfterDrinkTimer - GetSecondsPassed ) elseif ( TalkingGo == 0 ) && ( MS10.CeremonyGo == 3 ) && ( AfterDrinkTimer <= 0 ) MS10Birchref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 1 endif if ( TalkingGo == 1 ) && ( MS10.CeremonyGo == 4 ) MS10Poplarref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 2 endif if ( TalkingGo == 2 ) && ( MS10.CeremonyGo == 5 ) MS10Cypressref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 3 endif if ( TalkingGo == 3 ) && ( MS10.CeremonyGo == 6 ) MS10Lindenref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 4 endif if ( TalkingGo == 4 ) && ( MS10.CeremonyGo == 7 ) MS10Laurelref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 5 endif if ( TalkingGo == 5 ) && ( MS10.CeremonyGo == 8 ) MS10Yewref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 6 endif if ( TalkingGo == 6 ) && ( MS10.CeremonyGo == 9 ) MS10Birchref.Say MS10TreemindersCeremonySay 1 Set TalkingGo to 7 endif if ( TalkingGo == 7 ) && ( MS10.CeremonyGo == 10 ) MS10Birchref.SayTo Player MS10TreemindersCeremonySay 1 Set TalkingGo to 8 endif End
597MS10CeremonyAreaTriggercScriptscn MS10CeremonyAreaTriggercScript ;This traps if the Player decides to walk away from the basin during the Ceremony Begin OnTriggerLeave player if ( MS10.CeremonyGo == 2 ) Set MS10.CeremonyGo to 1 Set MS10.CeremonyInt to 1 MS10BirchRef.Evp endif End
598MS10FinQuestscn MS10FinQuest float FutureTimer ;x= The time left until Bloomseer Poplar will read the future for Player short Future ;1= Player has been told the future by Bloomseer Poplar short LastFuture ;1= Make sure she doesn't give two of the same fortunes in a row begin gamemode if ( Future == 1 ) if ( GameDaysPassed - FutureTimer >= 1 ) Set Future to 0 endif endif end
599MS10HaroldsHeartScriptscn MS10HaroldsHeartScript short doOnce short Button short HeartDone begin OnActivate if IsActionRef player == 1 if ( HeartDone == 0 ) Showmessage MS10HaroldHeartMessage set HeartDone to 1 elseif ( HeartDone == 2 ) Showmessage MS10HaroldHeartMessageKill elseif ( HeartDone == 3 ) Showmessage MS10HaroldHeartMessageSap elseif ( HeartDone == 4 ) Showmessage MS10HaroldHeartMessageLiniment endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( HeartDone == 1 ) playgroup forward 1 player.addPerk MS10Barkskin ShowMessage MS10BarkskinPerkMessage NPCHaroldHeartbeatLPRef.Disable NPCHaroldHeartbeatChamberLPRef.Disable setstage MS10 40 Set HeartDone to 2 elseif ( Button == 1 ) && ( HeartDone == 1 ) playgroup right 0 pms HaroldSap Player.Removeitem MS10TestTubeFull 1 SetQuestObject MS10Liniment 0 setstage MS10 30 Set HeartDone to 3 elseif ( Button == 2 ) && ( HeartDone == 1 ) playgroup left 0 pms HaroldLiniment Player.Removeitem MS10Liniment 1 SetQuestObject MS10TestTubeFull 0 setstage MS10 35 Set HeartDone to 4 elseif ( Button == 3 ) && ( HeartDone == 1 ) Set HeartDone to 0 endif end ;This block sets the Heart to animate when the cell is loaded begin OnLoad if ( DoOnce == 0 ) playgroup backward 1 Set DoOnce to 1 endif end
600MS10QuestScriptscn MS10QuestScript short BirchGreets ;1= Tree Father Birch is done with the initial dialog package (calling from afar) short BirchGreets2 ;1= Tree Father Birch is done with the second dialog package short BirchEscort ;1= Tree Father Birch escorts the Player directly to the central area. short RefusedEntry ;1= Didn't accept the Escort from Tree Father Birch, sets up Maple properly short Initial ;1= During Escort or later entry, set up NPCs so Player can "meet them" short CeremonyDenied ;1= Player refused or delayed doing the ceremony short CeremonyGo ;1= Begin the Ceremony sequence short CeremonyCount ;6= All of the Treeminders are in place for the Ceremony to begin (set on Package End) short InPlace ;1= All of the Treeminders have been EVP'd to get into place (package triggers) short CeremonyInt ;1= Player is in Ceremony Area, if they leave, Ceremony resets short InFlames ;1= Harold was struck with a fire-causing weapon (See MS10SetHaroldOnFireWeaponsList) short Argue ;1= Trigger the Arguement sequence between Leaf Mother Laurel and Tree Father Birch (via Trigger Zone) short BirchArgueGreet ;1= After the Argue scene, kick off Birch's forcegreet short LaurelArgueGreet ;1= After Birch is done talking to Player, kick off Laurel's forcegreet short ArgueDone ;1= Helps get the forcegreet to happen at the right time short Blasphemy ;1= Birch has been pissed off by Player's attitude regarding Harold 2= Excommunication Lockout short BlasphemyHostile ;2= BlasphemyTimer has triggered and place is Hostile to Player short BirchDoneGreet ;1= Birch is done the last forcegreet, and hands it off to Laurel short LaurelDoneGreet ;1= Laurel is done the last forcegreet short LindenBos ;1= Linden is a Brotherhood of Steel Outcast revealed (unlocks dialog) short YewLocked ;1= Player was mean to Sapling Yew which locks her dialog until quest ends short OasisHostile ;1= Player has started combat with a Treeminder OR burned Harold (Faction swap) short QuestClosed ;1= MS10 was prematurely closed by Player hostility short HesDead ;1= Harold was killed by Player in Stage 40 (Not Burned) for dialogue short BirchGo ;1= Birch Evp's after Player refuses entry short MS10Done ;1= For radio short EndgameDiscussHarold ;1= Did the endgame talk with Harold before the Fin short AssetMove ;1= Move Birch or Laurel to Harold when heart is dealt with short EscortMove ;1= Evp Birch for second leg of the Escort package short RestWake ;1= The Player tried to rest or sleep during the Blashpemy Kickout short CypressBlackMark ;1= This reverses the Like unlock because the Player treated that NPC poorly short PoplarBlackMark ;1= This reverses the Like unlock because the Player treated that NPC poorly short LindenBlackMark ;1= This reverses the Like unlock because the Player treated that NPC poorly short MapleBlackMark ;1= This reverses the Like unlock because the Player treated that NPC poorly short PoplarLike ;1= This NPC is now happy or likes the Player, this unlocks minor ending gift short LindenLike ;1= This NPC is now happy or likes the Player, this unlocks minor ending gift short YewLike ;1= This NPC is now happy or likes the Player, this unlocks minor ending gift short MapleLike ;1= This NPC is now happy or likes the Player, this unlocks minor ending gift short CypressLike ;1= This NPC is now happy or likes the Player, this unlocks minor ending gift short BirchLike ;1= This NPC is now happy or likes the Player short LaurelLike ;1= This NPC is now happy or likes the Player float BirchDoneTimer float BlasphemyTimer float BirchSayTimer begin gamemode ;This sets up Birch if Player refuses entry if ( BirchGo == 0 ) if ( RefusedEntry == 1 ) MS10BirchRef.Evp Set BirchGo to 1 endif endif ;This block will help push Birch along onto the second leg of the escorting package if ( EscortMove == 0 ) if ( BirchEscort == 2 ) if ( Player.GetInWorldspace Oasis == 1 ) MS10BirchRef.Evp set EscortMove to 1 endif endif endif ;This block calls all of the Treeminders to the Ceremony ;All 6 of them (Maple stays outside Guarding) must be at their markers for the Ceremony to start (see next block) if ( InPlace == 0 ) if ( CeremonyGo == 1 ) MS10BirchRef.Evp MS10LaurelRef.Evp MS10YewRef.Evp MS10LindenRef.Evp MS10CypressRef.Evp MS10PoplarRef.Evp Set InPlace to 1 endif endif ;This block causes Tree Father Birch to do a looping Say if Player is not drinking Sap if ( CeremonyGo == 2 ) if ( Player.GetDistance MS10BirchRef < 500 ) if ( BirchSayTimer > 0 ) set BirchSayTimer to ( BirchSayTimer - GetSecondsPassed ) elseif ( BirchSayTimer <= 0 ) MS10BirchRef.Say MS10BirchCeremonyDrinkSay Set BirchSayTimer to 15 endif endif endif ;This block signals that all of the Treeminders are in place, and begins the Ceremony proper. if ( CeremonyGo == 1 ) if ( CeremonyCount >= 6 ) set CeremonyGo to 2 endif endif ;This block handles the Player interrupting the ceremony and then changing his mind. It will reset all of the people and allow them to return to packages if ( CeremonyDenied == 1 ) MS10BirchRef.Evp MS10LaurelRef.Evp MS10YewRef.Evp MS10LindenRef.Evp MS10CypressRef.Evp MS10PoplarRef.Evp Set CeremonyDenied to 2 endif ;At the end of Birch and Laurel's Arguement, make Birch Force Greet the Player if ( ArgueDone == 1 ) set BirchArgueGreet to 1 MS10BirchRef.Evp set ArgueDone to 2 endif if ( BirchDoneGreet == 1 ) && ( BirchDoneTimer > 0 ) set BirchDoneTimer to ( BirchDoneTimer - GetSecondsPassed ) elseif ( BirchDoneGreet == 1 ) && ( BirchDoneTimer <= 0 ) set LaurelArgueGreet to 1 MS10LaurelRef.Evp set BirchDoneGreet to 2 endif ;This is a sample quest closing handler if the Player triggers the Hostility factor ;If the Player chooses to Burn Harold after getting Objective 10, Player will get a massive Karma hit, but will get XP ;If Player elected to attack Treeminders before Objective 10 or somehow manages to burn Harold before, Player will get only massive Karma hit if ( QuestClosed == 0 ) if ( OasisHostile == 1 ) if ( InFlames == 0 ) if ( GetStage MS10 >= 10 ) || ( GetObjectiveCompleted MS10 5 == 0 ) SetStage MS10 150 else Showmessage MS10QuestFailMessage StopQuest MS10 endif ; always do all these things EnablePlayerControls ;In case Ceremony was triggered, do the following for safety rimod MS10DrinkSap02ISFX rimod MS10DrinkSapISFX MS10BirchRef.Evp MS10LaurelRef.Evp MS10YewRef.Evp MS10MapleRef.Evp MS10CypressRef.Evp MS10LindenRef.Evp MS10PoplarRef.Evp set QuestClosed to 1 endif endif endif ;This is specifically for Harold being burned if ( OasisHostile == 1 ) && GetStageDone MS10 100 == 0 if ( InFlames >= 1 ) SetStage MS10 100 MS10BirchRef.Evp MS10LaurelRef.Evp MS10YewRef.Evp MS10MapleRef.Evp MS10CypressRef.Evp MS10LindenRef.Evp MS10PoplarRef.Evp SetQuestDelay MS10 0 endif endif ;This handles the Player being "Excommunicated" ;If the Player is nasty to Tree Father more than once, this variable is set in dialog and kicks off a timer ;If the Player is still in the Cell after the timer elapses (10 minutes), Oasis will go hostile to Player if ( BlasphemyHostile == 0 ) if ( Blasphemy == 2 ) Set BlasphemyTimer to 600 Set BlasphemyHostile to 1 endif endif if ( BlasphemyHostile == 1 ) && ( BlasphemyTimer > 0 ) Set BlasphemyTimer to ( BlasphemyTimer - GetSecondsPassed ) elseif ( BlasphemyHostile == 1 ) && ( BlasphemyTimer <= 0 ) Set OasisHostile to 1 set BlasphemyHostile to 2 endif ;This block is handling for Moving Laurel or Birch to Harold after Stages 30-40 (depending on Player) if ( AssetMove == 1 ) if ( GetStageDone MS10 30 == 1 ) MS10BirchRef.Moveto MS10BirchLaurelMarker MS10BirchRef.Evp set AssetMove to 2 elseif ( GetStageDone MS10 35 == 1 ) MS10LaurelRef.Moveto MS10BirchLaurelMarker MS10LaurelRef.Evp set AssetMove to 2 elseif ( GetStageDone MS10 40 == 1 ) MS10BirchRef.Moveto MS10BirchLaurelMarker MS10BirchRef.Evp set AssetMove to 2 endif endif end ;This MenuMode Block handles the Player attempting to rest during the Blashpemy Kickout sequence ;If they attempt to rest at all, wake them up and set Hostility instantly begin MenuMode if ( BlasphemyHostile >= 0 ) if ( Blasphemy == 2 ) if ( GetPCSleepHours > 0 ) SetPCSleepHours 0 Set BlasphemyTimer to 0 Set OasisHostile to 1 set BlasphemyHostile to 2 endif endif endif if ( BlasphemyHostile == 2 ) if ( GetPCSleepHours > 0 ) SetPCSleepHours 0 endif endif end
601MS10Stage10ExitTriggerScriptscn MS10Stage10ExitTriggerScript ;This script is used to start the arguement between Leaf Mother Laurel and Tree Father Birch ;This triggerbox becomes "active" in the stage results of Stage 10 (After speaking to Harold) ;This will give the player the Optional paths to the Heart as detailed in wiki short TriggerGo begin OnTriggerEnter Player if ( GetDeadCount OasisTreeFatherBirch == 0 ) && ( GetDeadCount OasisLeafMotherLaurel == 0 ) if ( GetQuestRunning MS10 == 1 ) if ( GetStage MS10 >= 10 ) if ( TriggerGo == 0 ) Set MS10.Argue to 1 DisablePlayerControls MS10LaurelRef.SayTo MS10BirchRef MS10Argue Set TriggerGo to 1 endif endif endif endif end begin gamemode if ( TriggerGo == 1 ) && ( MS10.Argue == 2 ) MS10BirchRef.SayTo MS10Laurelref MS10Argue set TriggerGo to 2 endif if ( TriggerGo == 2 ) && ( MS10.Argue == 3 ) MS10LaurelRef.SayTo MS10BirchRef MS10Argue set TriggerGo to 3 endif if ( TriggerGo == 3 ) && ( MS10.Argue == 4 ) MS10BirchRef.SayTo MS10Laurelref MS10Argue set TriggerGo to 4 endif if ( TriggerGo == 4 ) && ( MS10.Argue == 5 ) MS10LaurelRef.SayTo MS10BirchRef MS10Argue set TriggerGo to 5 endif if ( TriggerGo == 5 ) && ( MS10.Argue == 6 ) MS10BirchRef.SayTo Player MS10Argue set TriggerGo to 6 endif end
602MS11and12DialogStartTriggerScriptscn MS11and12DialogStartTriggerScript Begin OnTriggerEnter Player If RoyPhillipsRef.GetIsCurrentPackage MS11RoyPhillipsDiscussWithBurkeWait == 1 RoyPhillipsRef.evp endif End
603MS11BalconyHotelDoor01Scriptscn MS11BalconyHotelDoor01Script ;this script lives on both the inside and outside door, and controls the precaching of the nuke effect. The sound effect is also precached but is the enable child of the nuke FX ;to find these references in the editor, go to TenpennyExterior01, and filter reference list for "cache" ref myActionRef Begin OnActivate set myActionRef to getActionRef if IsActionRef player == 1 if player.IsInInterior == 1 if getstage MS11 == 40 || getstage MS11 == 50 FXMegatonNukePreCacheRef.enable endif else FXMegatonNukePreCacheRef.disable endif activate elseif MS12.FeralsReleased != 0 && getStageDone MS12 250 == 0 ;prevent NPCs from leaving the Tower to go outside if myActionRef.IsInInterior == 1 && myActionRef.getInFaction TenpennyTowerResidentFaction == 1 ;don't allow them to activate else activate endif else activate endif End
604MS11BombScriptscn MS11BombScript short button short skillNeeded ;how much explosives skill is needed to interact with the bomb short skillNeededDisarm ;how much explosive skill is needed to disarm the bomb short playerSkill short doOnce short dieRoll short captureButton ;which button press are we tracking short explodeMe short camVar ;used as a condition on VATS death camera short AnglePlayer float deathTimer Begin OnActivate if IsActionRef player == 1 ;setup variables (used so we can easily change the skill amounts later) if skillNeeded == 0 set skillNeeded to 25 set skillNeededDisarm to 25 endif set playerSkill to player.getAv explosives if playerSkill < skillNeeded showMessage MS11BombMessageNoSkill skillNeeded elseIf MS11.Disarm >= 2 showMessage MS11BombMessageDisarmed ;If player refused pay, they'll get their karma when they talk with Simms. elseif MS11.blowup >= 3 showMessage MS11BombMessageArmed else set captureButton to 1 showMessage MS11BombMessage endif endif End Begin GameMode ;Initial interact with bomb message if captureButton == 1 set button to getButtonPressed if button > -1 set captureButton to 0 if button == 0 ;Do nothing elseif button == 1 ;Disarm bomb if player has high enough skill if playerSkill >= skillNeededDisarm set MS11.Disarm to 2 setQuestObject FusionPulseCharge 0 setStage MS11 30 showMessage MS11BombMessageDisarmSuccess playsound OBJMegatonBombTamperArm else ;Show a warning if he doesn't have enough skill showMessage MS11BombMessageDisarmFail skillNeededDisarm playsound OBJMegatonBombTamperFail endif elseif button == 2 ;Rig the bomb to explode if the player has the Fusion Pulse Charge if player.getItemCount FusionPulseCharge >= 1 set MS11.BlowUp to 3 player.removeitem FusionPulseCharge 1 SetStage MS11 40 showMessage MS11BombMessageArmSuccess playsound OBJMegatonBombTamperArm else ;Show a message stating he doesn't have the needed gear if the player doesn't have the Fusion Pulse Charge showMessage MS11BombMessageArmFail playsound OBJMegatonBombTamperFail endif endif endif ;/ button > -1 endif ;/ captureButton == 1 if ms11.BombKnowledge == 0 if getDistance player < 800 set ms11.BombKnowledge to 1 endif endif End
605MS11DeputyWeldHeadScriptscn MS11DeputyWeldHeadScript short talking Begin OnActivate ;Do nothing End Begin OnLoad set MegatonGateProtectronRef.talkDelay to 0 ;a condition on MegProtectronTalk infos for the initial scene End Begin GameMode if getDisabled == 1 RETURN else if talking == 0 if getDistance player < 500 set talking to 1 say MegProtectronTalk2 endif endif endif End Begin SayToDone set talking to 0 End
606MS11DetonatorSCRIPTscn MS11DetonatorSCRIPT ; This script handles the detonation of Megaton ; + handles animations on the suitcase nuke object ; + handles timing of explosion fx ;============DECALRE VARIABLES================================; ;EXPLOSION EFFECTS ETC VARIABLES float Timer ; float value holds the timer float timerLimit ; easy-to-tweak upper limit for the counter short step ; animation stage short timerOn short doShockwave1x short doGlassBurst1x ;LOCKING PLAYER CONTROLS VARIABLES short controlsLocked ;used to prevent player from fast traveling while nuke explosion is happening float controlsTimer ;============ONLOAD BLOCK================================; begin onLoad set timerLimit to 20 end ;============ONACTIVATE BLOCK=====================; begin onActivate if IsActionRef player == 1 if step == 0 playgroup forward 0 set step to 1 Activate elseif step == 2 set controlsTimer to 30 set controlsLocked to 1 DisablePlayerControls ;controls restored in GameMode block playgroup backward 0 set step to 3 set MS11.NukeExploding to 1 ;used as dialog blocker for NPCs while Nuke is exploding so player can't talk to them while it's going off ;set up rumble "quest script parameters" set ControlRumble.stage1FireOnTimerValue to .5 set ControlRumble.stage1RumbleLeft to .1 set ControlRumble.stage1RumbleRight to .2 set ControlRumble.stage1Duration to .5 set ControlRumble.stage2FireOnTimerValue to 1 set ControlRumble.stage2RumbleLeft to .15 set ControlRumble.stage2RumbleRight to .2 set ControlRumble.stage2Duration to 1 set ControlRumble.stage3FireOnTimerValue to 2 set ControlRumble.stage3RumbleLeft to .25 set ControlRumble.stage3RumbleRight to .2 set ControlRumble.stage3Duration to 1 set ControlRumble.stage4FireOnTimerValue to 3 set ControlRumble.stage4RumbleLeft to .3 set ControlRumble.stage4RumbleRight to .35 set ControlRumble.stage4Duration to 1 set ControlRumble.stage5FireOnTimerValue to 4 set ControlRumble.stage5RumbleLeft to .35 set ControlRumble.stage5RumbleRight to .35 set ControlRumble.stage5Duration to .9 set ControlRumble.stage6FireOnTimerValue to 4.9 set ControlRumble.stage6RumbleLeft to 1 set ControlRumble.stage6RumbleRight to 1 set ControlRumble.stage6Duration to 1.1 set ControlRumble.stage7FireOnTimerValue to 6 set ControlRumble.stage7RumbleLeft to .3 set ControlRumble.stage7RumbleRight to .2 set ControlRumble.stage7Duration to 2 set ControlRumble.stage8FireOnTimerValue to 8 set ControlRumble.stage8RumbleLeft to .1 set ControlRumble.stage8RumbleRight to .2 set ControlRumble.stage8Duration to 2 set ControlRumble.stage9FireOnTimerValue to 10 set ControlRumble.stage9RumbleLeft to .15 set ControlRumble.stage9RumbleRight to .1 set ControlRumble.stage9Duration to 2 set ControlRumble.stage10FireOnTimerValue to 12 set ControlRumble.stage10RumbleLeft to .05 set ControlRumble.stage10RumbleRight to .05 set ControlRumble.stage10Duration to 8 set ControlRumble.timerMaxValue to 20 ;see gamemode block for "setStage ControlRumble 1" which gets rumbling Activate endif endif end ;=============GAMEMODE BLOCK==============================; begin gameMode ;-------------------LOCK PLAYER CONTROLS------------------------------------------------------------------------------------------------------------------------------------ ;handle locking controls -- lock starts in onActivate block if controlsLocked == 1 if controlsTimer <= 0 set controlsLocked to -1 EnablePlayerControls else set controlsTimer to controlsTimer - getSecondsPassed endif endif ;--------------------EXPLOSION EFFECTS AND QUEST STAGE AND VARIABLE SETTING---------------------------------------------------------------------------- ; handle the animation of the suitcase opening and triggering explosion. if step == 1 && isAnimPlaying == 0 playgroup left 0 set step to 2 elseif step == 3 && isAnimPlaying == 0 demoNukeMarker.placeAtMe megatonNuke imod MegatonNukeISFX set timerOn to 1 set Timer to 0 MisterBurkeRef.playIdle MS11ShieldsEyes set step to 4 ;start rumble setStage ControlRumble 1 endif ; this block handles timing the various stages of the detonation sequence if timerOn == 1 if Timer >= timerLimit set timerOn to 0 MisterBurkeRef.stoplook elseif Timer > 4.11 && doGlassburst1x == 0 set doGlassBurst1x to 1 elseif Timer > 4.9 && doShockwave1x == 0 MS11ShockwaveMarker.placeatme fakeforceball4000 MisterBurkeRef.playIdle MS11MTHitHeadA set doShockwave1x to 1 elseif Timer > 8 && GetStage MS11 != 60 set MS11.NukeExploding to -1 setStage MS11 60 set MS11.BurkeTenpennyDiscussNuke to 1 MisterBurkeRef.evp elseif Timer < timerLimit set Timer to (Timer + getSecondsPassed) endif endif end ;============================================;
607MS11FinScriptscn MS11FinScript short BurkeCharmed ;set in MS11 dialog if player charmed Burke with Black Widow dialog option float letterDeliveryDay ;stores the last day a letter arrived, used in dialog with Moriarity to deliver love letters to player short lettersWaiting ;stores a count of how many letters the player has to pick up -- controls dialog infos short lettersSent ;how many letters have been sent (so we stop sending them after all of them are sent) short moved short assassins ;1 = burke should send assassins - float debugTimer Begin GameMode set debugTimer to debugTimer + getSecondsPassed if BurkeCharmed != 0 ;set up the first delivery day if BurkeCharmed == 1 set letterDeliveryDay to GameDaysPassed + 7 set BurkeCharmed to 2 endif ;deliver letters if lettersSent < 4 if letterDeliveryDay <= GameDaysPassed set lettersSent to lettersSent + 1 set lettersWaiting to lettersWaiting + 1 set letterDeliveryDay to GameDaysPassed + 7 endif endif endif ;Make Burke disappear if moved == 0 ;Obsolete - Burke is moved to Tenpenny Tower when the bomb is armed ;The commented out script could cause issues if player trains him out of the world space after he has accepted the quest ; if getStageDone MS11 15 == 1 ; if MisterBurkeRef.GetInWorldSpace MegatonWorld == 0 && MisterBurkeRef.GetInZone MegatonZone == 0 ; ;he vanishes like the mysterious henchman he is, to appear at Tenpenny Tower ; MisterBurkeRef.moveto xMS11BurkeStandTenpenny ; set moved to 1 ; endif ; endif if MisterBurkeRef.getIsCurrentPackage MS11BurkeFlee == 1 if MisterBurkeRef.getInSameCell player == 0 ;he vanished like the myserious henchman he is, and is never seen again MisterBurkeRef.disable set moved to 1 endif elseif MS11Fin.BurkeCharmed != 0 if MisterBurkeRef.getInSameCell player == 0 ;he vanished like the myserious henchman he is, and is never seen again MisterBurkeRef.disable set moved to 1 endif endif if getStageDone MS11 210 == 1 ;player disarmed bomb and got reward from Simms if MisterBurkeRef.getInSameCell player == 0 ;he vanished like the myserious henchman he is, and is never seen again MisterBurkeRef.disable set moved to 1 endif endif endif if moved == 1 setQuestDelay MS11Fin 0 set moved to 2 endif End
608MS11LucasGreetTriggerScriptscn MS11LucasGreetTriggerScript short triggered Begin OnTriggerEnter Player if triggered == 0 set LucasSimmsRef.greet to 1 LucasSimmsRef.evp set triggered to 1 endif End
609MS12AccessDoorScriptscn MS12AccessDoorScript ref self begin onActivate if ( self == 0 ) Set self to GetSelf endif if ( IsActionRef self ) Activate WarringtonDoorKlaxon01REF.playgroup Forward 0 WarringtonDoorKlaxon02REF.playgroup Forward 0 WarringtonDoorGlow01REF.playgroup Forward 0 WarringtonDoorGlow02REF.playgroup Forward 0 if getStage MS12 < 200 ;set variable to get the feral ghouls moving if MS12.FeralsMoveToLobby == 0 set MS12.FeralsMoveToLobby to 1 endif if RoyPhillipsRef.cheerToPlayer == 0 RoyPhillipsRef.moveto xMS12MoveRoyPhillipsCongrats set RoyPhillipsRef.cheerToPlayer to 1 endif ;player takes a karma hit RewardKarma -600 endif endif if (IsActionRef player) ShowMessage GenericDoorActivatedElsewhereMsg endif end
610MS12ArgumentTriggerScriptscn MS12ArgumentTriggerScript short triggered Begin OnTriggerEnter player if triggered == 0 set triggered to 1 if RoyPhillipsRef.getIsCurrentPackage MS12ArgueAtGate == 0 RoyPhillipsRef.evp endif endif ;enables/disables random wandering tenpenny residents setStage DialogueTenpenny 10 End
611MS12AttackElevatorDoorScriptscn MS12AttackElevatorDoorScript Begin OnActivate if MS12.FeralsReleased != 0 && MS12Fin.TenpennyRepaired == 0 if IsActionRef player == 1 if RoyPhillipsRef.getDead == 0 if MS11.BurkePhillipsConverationStage != -1 RoyPhillipsRef.moveto xMS11RoyPhillipsDiscussWithBurke endif endif endif endif ;in case Tenpenny is somehow trapped outside on his balcony during the MS12 attack scene if MS12.setUpAttackScene > 0 if AllistairTenpennyRef.IsInInterior == 0 AllistairTenpennyRef.moveto xMS12AttackAllistairTenpenny endif endif activate End
612MS12AttackLoadDoorScriptscn MS12AttackLoadDoorScript ref myActionRef ;Make sure the Load door to the balcony on the third floor also has this functionality Begin OnActivate set myActionRef to getActionRef if IsActionRef player == 1 activate elseif MS12.FeralsReleased != 0 && getStageDone MS12 250 == 0 ;prevent NPCs from leaving the Tower to go outside if myActionRef.IsInInterior == 1 && myActionRef.getInFaction TenpennyTowerResidentFaction == 1 ;don't allow them to activate else activate endif else activate endif End
613MS12DoorTerminalScriptscn MS12DoorTerminalScript ;See the base object menu system for how the terminal works ;This script polls the damage state of the generators and if they are destroyed advances the quest as if the player opened the door via the terminal short doOnce Begin GameMode if doOnce == 0 if MS12ElectricBoxExplode1Ref.getDestroyed == 1 || MS12ElectricBoxExplode2Ref.getDestroyed == 1 MS12AccessDoorRef.activate MS12AccessDoorRef 1 xMS12LightToggle.disable set doOnce to 1 endif endif End
614MS12DoorWarringtonToTenpennyExteriorScriptscn MS12DoorWarringtonToTenpennyExteriorScript ;This script is on both the outside to inside, and inside to outside doors Begin OnActivate if IsActionRef player == 1 if player.getInCell WarringtonStation03 == 1 ;used to set up the scene in the TenpennyXXAttack cells if MS12.FeralsReleased == 0 if MS12.FeralsMoveToLobby == 1 if MS12.SetUpAttackScene == 0 MS12DoorToggle.disable ;is parent to tower's front doors, toggles door to normal interior off and door to "attack scene" interior on set MS12.SetUpAttackScene to 1 setStage MS12Fin 1 ;moves followers out of the interior into the courtyard endif endif endif player.removeFromFaction MS12FeralGhoulFaction else ;player is entering from exterior if player.GetItemCount MS12Key > 0 if MS12.feralsWaiting == 0 ;set variable used to set up horde and move Roy Phillips set MS12.feralsWaiting to 1 player.addToFaction MS12FeralGhoulFaction 1 endif endif endif endif Activate End
615MS12FeralGhoulAttackScriptscn MS12FeralGhoulAttackScript ref attackRef ;holds reference to the current victim this ghoul should attack short attackSceneSpawn ;0 = not set, 1= Tenpenny01Attack, 2 = Tenpenny02Attack, 3 = Tenpenny03Attack -- stores where this ghoul spawned so it knows where to spawn when it dies Begin OnLoad if attackSceneSpawn == 0 if getInCell Tenpenny01Attack == 1 set attackSceneSpawn to 1 elseif getInCell Tenpenny02Attack == 1 set attackSceneSpawn to 2 elseif getInCell Tenpenny03Attack == 1 set attackSceneSpawn to 3 endif endif End Begin OnDeath set MS12.CountPlayerKilledFerals to MS12.CountPlayerKilledFerals + 1 if IsKiller Player == 1 && MS12.CountPlayerKilledFerals >= 3 set MS12.StopRespawn to 1 setQuestDelay MS12 .1 endif if MS12.FeralsReleased < 3 && MS12.StopRespawn == 0 if attackSceneSpawn == 1 if getIsID MS12FeralGhoulAttack1A == 1 xMS12Attack01SpawnB.placeAtMe MS12FeralGhoulAttack1B elseif getIsID MS12FeralGhoulAttack1B == 1 xMS12Attack01Spawn.placeAtMe MS12FeralGhoulAttack1A elseif getIsID MS12FeralGhoulAttack2A == 1 xMS12Attack01SpawnB.placeAtMe MS12FeralGhoulAttack2B elseif getIsID MS12FeralGhoulAttack2B == 1 xMS12Attack01Spawn.placeAtMe MS12FeralGhoulAttack2A elseif getIsID MS12FeralGhoulAttackGlowingOne == 1 xMS12Attack01SpawnGlowingOne.placeAtMe MS12FeralGhoulAttackGlowingOne endif elseif attackSceneSpawn == 2 if getIsID MS12FeralGhoulAttack1A == 1 xMS12Attack02Spawn.placeAtMe MS12FeralGhoulAttack1B elseif getIsID MS12FeralGhoulAttack1B == 1 xMS12Attack02Spawn.placeAtMe MS12FeralGhoulAttack1A elseif getIsID MS12FeralGhoulAttack2A == 1 xMS12Attack02Spawn.placeAtMe MS12FeralGhoulAttack2B elseif getIsID MS12FeralGhoulAttack2B == 1 xMS12Attack02Spawn.placeAtMe MS12FeralGhoulAttack2A elseif getIsID MS12FeralGhoulAttackGlowingOne == 1 xMS12Attack02Spawn.placeAtMe MS12FeralGhoulAttackGlowingOne endif elseif attackSceneSpawn == 3 if getIsID MS12FeralGhoulAttack1A == 1 xMS12Attack03Spawn.placeAtMe MS12FeralGhoulAttack1B elseif getIsID MS12FeralGhoulAttack1B == 1 xMS12Attack03Spawn.placeAtMe MS12FeralGhoulAttack1A elseif getIsID MS12FeralGhoulAttack2A == 1 xMS12Attack03Spawn.placeAtMe MS12FeralGhoulAttack2B elseif getIsID MS12FeralGhoulAttack2B == 1 xMS12Attack03Spawn.placeAtMe MS12FeralGhoulAttack2A elseif getIsID MS12FeralGhoulAttackGlowingOne == 1 xMS12Attack03Spawn.placeAtMe MS12FeralGhoulAttackGlowingOne endif endif endif End Begin GameMode ;ATTACK SCENE IMPLEMENTATION -- the ghoul is initially spawned by MS12QuestScript and respawns on death if IsInCombat == 0 ;this gets the ghoul to attack the NPCs who are nearby (starting with guards, then residents) if attackRef == 0 if getInSameCell TenpennyGuardDay1Ref && TenpennyGuardDay1Ref.getDead == 0 set attackRef to TenpennyGuardDay1Ref elseif getInSameCell TenpennyGuardDay2Ref && TenpennyGuardDay2Ref.getDead == 0 set attackRef to TenpennyGuardDay2Ref elseif getInSameCell TenpennyGuardDay3Ref && TenpennyGuardDay3Ref.getDead == 0 set attackRef to TenpennyGuardDay3Ref elseif getInSameCell JoJoRef && JoJoRef.getDead == 0 set attackRef to JoJoRef elseif getInSameCell TenpennyGuardDay5Ref && TenpennyGuardDay5Ref.getDead == 0 set attackRef to TenpennyGuardDay5Ref elseif getInSameCell TenpennyGuardNight1Ref && TenpennyGuardNight1Ref.getDead == 0 set attackRef to TenpennyGuardNight1Ref elseif getInSameCell TenpennyGuardNight3Ref && TenpennyGuardNight3Ref.getDead == 0 set attackRef to TenpennyGuardNight3Ref elseif getInSameCell TenpennyGuardNight5Ref && TenpennyGuardNight5Ref.getDead == 0 set attackRef to TenpennyGuardNight5Ref elseif getInSameCell AnthonyLingRef && AnthonyLingRef.getDead == 0 set attackRef to AnthonyLingRef elseif getInSameCell ChiefGustavoRef && ChiefGustavoRef.getDead == 0 set attackRef to ChiefGustavoRef elseif getInSameCell DoctorBanfieldRef && DoctorBanfieldRef.getDead == 0 set attackRef to DoctorBanfieldRef elseif getInSameCell EdgarWellingtonIIRef && EdgarWellingtonIIRef.getDead == 0 set attackRef to EdgarWellingtonIIRef elseif getInSameCell HerbertDashwoodRef && HerbertDashwoodRef.getDead == 0 set attackRef to HerbertDashwoodRef elseif getInSameCell IrvingChengRef && IrvingChengRef.getDead == 0 set attackRef to IrvingChengRef elseif getInSameCell LydiaMontenegroRef && LydiaMontenegroRef.getDead == 0 set attackRef to LydiaMontenegroRef elseif getInSameCell MargaretPrimroseRef && MargaretPrimroseRef.getDead == 0 set attackRef to MargaretPrimroseRef elseif getInSameCell MillicentWellingtonRef && MillicentWellingtonRef.getDead == 0 set attackRef to MillicentWellingtonRef elseif getInSameCell SusanLancasterRef && SusanLancasterRef.getDead == 0 set attackRef to SusanLancasterRef elseif getInSameCell TiffanyChengRef && TiffanyChengRef.getDead == 0 set attackRef to TiffanyChengRef elseif getInSameCell MichaelHawthorneRef && MichaelHawthorneRef.getDead == 0 set attackRef to MichaelHawthorneRef elseif getInSameCell AllistairTenpennyRef && AllistairTenpennyRef.getDead == 0 set attackRef to AllistairTenpennyRef endif if attackRef != 0 startCombat attackRef endif ;if he does have a target, check to see if it is dead so he can pick a new one elseif attackRef != 0 if attackRef.getDead == 1 set attackRef to 0 else startCombat attackRef endif endif endif End
616MS12FeralGhoulScriptscn MS12FeralGhoulScript short evpToLobby ;variable used as condition to evp the ghoul to get him moving when the door opens ref attackRef ;holds reference to the current victim this ghoul should attack short attackSceneSpawn ;0 = not set, 1= Tenpenny01Attack, 2 = Tenpenny03Attack, 3 = Tenpenny01Attack -- stores where this ghoul spawned so it knows where to spawn when it dies Begin GameMode if evpToLobby == 0 if MS12.FeralsMoveToLobby == 1 evp set evpToLobby to 1 endif endif ;currently because of a problem with enabling/disabling doors and portals on the nav mesh, I am sending these guys to Tenpenny01 even though the player will be going to Tenpenny01Attack ;So I am disabling them, so they aren't in there when the state change reverts and the player goes into Tenpenny01 again. ;This will need to change once the doors are disabling/enabling properly on the nav mesh if getInCell Tenpenny01 == 1 && getInCell Tenpenny01attack == 0 disable endif ;ATTACK SCENE IMPLEMENTATION -- the ghoul is initially spawned by MS12QuestScript and respawns on death if getInCell WarringtonStation02 == 0 ;only run this part on ghouls that are spawned in the Tenpenny Tower cells if IsInCombat == 0 ;this gets the ghoul to attack the NPCs who are nearby (starting with guards, then residents) if attackRef == 0 if getInSameCell TenpennyGuardDay1Ref && TenpennyGuardDay1Ref.getDead == 0 set attackRef to TenpennyGuardDay1Ref elseif getInSameCell TenpennyGuardDay2Ref && TenpennyGuardDay2Ref.getDead == 0 set attackRef to TenpennyGuardDay2Ref elseif getInSameCell TenpennyGuardDay3Ref && TenpennyGuardDay3Ref.getDead == 0 set attackRef to TenpennyGuardDay3Ref elseif getInSameCell JoJoRef && JoJoRef.getDead == 0 set attackRef to JoJoRef elseif getInSameCell TenpennyGuardDay5Ref && TenpennyGuardDay5Ref.getDead == 0 set attackRef to TenpennyGuardDay5Ref elseif getInSameCell TenpennyGuardNight1Ref && TenpennyGuardNight1Ref.getDead == 0 set attackRef to TenpennyGuardNight1Ref elseif getInSameCell TenpennyGuardNight3Ref && TenpennyGuardNight3Ref.getDead == 0 set attackRef to TenpennyGuardNight3Ref elseif getInSameCell TenpennyGuardNight5Ref && TenpennyGuardNight5Ref.getDead == 0 set attackRef to TenpennyGuardNight5Ref elseif getInSameCell AnthonyLingRef && AnthonyLingRef.getDead == 0 set attackRef to AnthonyLingRef elseif getInSameCell ChiefGustavoRef && ChiefGustavoRef.getDead == 0 set attackRef to ChiefGustavoRef elseif getInSameCell DoctorBanfieldRef && DoctorBanfieldRef.getDead == 0 set attackRef to DoctorBanfieldRef elseif getInSameCell EdgarWellingtonIIRef && EdgarWellingtonIIRef.getDead == 0 set attackRef to EdgarWellingtonIIRef elseif getInSameCell HerbertDashwoodRef && HerbertDashwoodRef.getDead == 0 set attackRef to HerbertDashwoodRef elseif getInSameCell IrvingChengRef && IrvingChengRef.getDead == 0 set attackRef to IrvingChengRef elseif getInSameCell LydiaMontenegroRef && LydiaMontenegroRef.getDead == 0 set attackRef to LydiaMontenegroRef elseif getInSameCell MargaretPrimroseRef && MargaretPrimroseRef.getDead == 0 set attackRef to MargaretPrimroseRef elseif getInSameCell MillicentWellingtonRef && MillicentWellingtonRef.getDead == 0 set attackRef to MillicentWellingtonRef elseif getInSameCell SusanLancasterRef && SusanLancasterRef.getDead == 0 set attackRef to SusanLancasterRef elseif getInSameCell TiffanyChengRef && TiffanyChengRef.getDead == 0 set attackRef to TiffanyChengRef elseif getInSameCell MichaelHawthorneRef && MichaelHawthorneRef.getDead == 0 set attackRef to MichaelHawthorneRef elseif getInSameCell AllistairTenpennyRef && AllistairTenpennyRef.getDead == 0 set attackRef to AllistairTenpennyRef endif if attackRef != 0 startCombat attackRef endif ;if he does have a target, check to see if it is dead so he can pick a new one elseif attackRef != 0 if attackRef.getDead == 1 set attackRef to 0 endif endif endif endif End
617MS12FinScriptscn MS12FinScript float repairDay ;the day the ferals were released, used to revert switch tenpenny tower back to normal short TenpennyRepaired ;is the Tenpenny Tower cells returned to normal state used in conditions short TenpennyCorpse ;0 = unset, 1 = player has "seen" Tenpenny's corpse, set by MS12TenpennyDeadTriggerScript float murderDay ;the day that the Ghouls murder the human residents after they agree to cohabitate short murdered short BasementCorpses ;0 = unset, 1 = player has seen corpses ;used in dialog with the ghouls Begin GameMode ;handles the ghoul mask clearing faction crime so once player drops out of combat he can wear the mask to not aggro ferals again if player.IsInCombat ClearFactionPlayerEnemyFlag feralGhoulFaction endif ;Ghouls into Tenpenny attack version: if MS12.GhoulsOk == 2 if player.IsInInterior == 0 BessieLynnRef.moveto xMS12AttackLobby MichaelMastersRef.moveto xMS12AttackLobby set repairDay to GameDaysPassed + 1 set MS12.GhoulsOk to 3 setQuestDelay MS12Fin 1 endif endif ;Swap Cells if MS12.GhoulsOk == 3 if GameDaysPassed > repairDay if player.IsInInterior == 0 MS12DoorToggle.enable ;toggles off the door to the "attack scene" interior, and toggles on the door to the normal interior setStage MS12Fin 2 ;moves followers out of the attack version interior into the courtyard MS12FollowerEscapeHatchExteriorRef.enable MS12FollowerEscapeHatchInteriorRef.enable set TenpennyRepaired to 1 set MS12.GhoulsOk to 4 AllistairTenpennyDoorRef.unlock endif endif endif ;Move into Tenpenny regular non-attack version If MS12.GhoulsOk == 4 if player.IsInInterior == 0 RoyPhillipsRef.moveto TenpennyLobby if MichaelMastersRef.getDead == 0 MichaelMastersRef.moveto TenpennyLobby VendorContainerMichaelMastersRef.enable VendorContainerLydiaMontenegroRef.disable endif if BessieLynnRef.getDead == 0 BessieLynnRef.moveto TenpennyLobby VendorContainerBessieLynnRef.enable VendorContainerAnthonyLingRef.disable endif if AllistairTenpennyRef.getDead == 0 AllistairTenpennyRef.kill AllistairTenpennyRef.disable MS12TenpennyDeadTriggerRef.enable endif if ShakesRef.getDead == 0 ShakesRef.moveto xShakesStandHere endif set murderDay to GameDaysPassed + 1 set MS12.GhoulsOk to 5 setQuestDelay MS12Fin 0 endif Endif if MS12.GhoulsOk == 5 ;if the attack scene happened OR they've been cohabitating for a few days, then put the corpses in the basement if murdered == 0 if player.IsInInterior == 0 if MS12.FeralsReleased != 0 || GameDaysPassed >= murderDay ;set up radio station rumors set MS12GhoulsMovedIn to 1 Set RadioGalaxyNewsQuest.MS12Clear to ( GameDaysPassed + 1 ) Set RadioGalaxyNewsQuest.ExploitReady to 1 set murdered to 1 ;enable corpses and feral ghoul in basement MS12TenpennyCorpseBasementTriggerRef.enable ;make sure everyone is dead and disabled AllistairTenpennyRef.kill AllistairTenpennyRef.disable AnthonyLingRef.kill AnthonyLingRef.disable ChiefGustavoRef.kill ChiefGustavoRef.disable DoctorBanfieldRef.kill DoctorBanfieldRef.disable EdgarWellingtonIIRef.kill EdgarWellingtonIIRef.disable HerbertDashwoodRef.kill HerbertDashwoodRef.disable IrvingChengRef.kill IrvingChengRef.disable LydiaMontenegroRef.kill LydiaMontenegroRef.disable MargaretPrimroseRef.kill MargaretPrimroseRef.disable MichaelHawthorneRef.kill MichaelHawthorneRef.disable MillicentWellingtonRef.kill MillicentWellingtonRef.disable SusanLancasterRef.kill SusanLancasterRef.disable TiffanyChengRef.kill TiffanyChengRef.disable TenpennyGuardDay1Ref.kill TenpennyGuardDay1Ref.disable TenpennyGuardDay2Ref.kill TenpennyGuardDay2Ref.disable TenpennyGuardDay3Ref.kill TenpennyGuardDay3Ref.disable JoJoRef.kill JoJoRef.disable TenpennyGuardDay5Ref.kill TenpennyGuardDay5Ref.disable TenpennyGuardNight1Ref.kill TenpennyGuardNight1Ref.disable TenpennyGuardNight3Ref.kill TenpennyGuardNight3Ref.disable TenpennyGuardNight5Ref.kill TenpennyGuardNight5Ref.disable TenpennyResidentFemaleA1TEMPLATERef.disable TenpennyResidentFemaleA2Ref.disable TenpennyResidentFemaleB1TEMPLATERef.disable TenpennyResidentMaleA1Ref.disable TenpennyResidentMaleA2Ref.disable TenpennyResidentMaleB1Ref.disable TenpennyResidentMaleC1Ref.disable TenpennyResidentFemaleC1TEMPLATERef.disable TenpennyResidentFemaleD1TEMPLATERef.disable ;TenpennyResidentFemaleD2Ref.disable TenpennyResidentMaleD1Ref.disable ;TenpennyResidentMaleD2Ref.disable endif ;if MS12.FeralsReleased != 0 endif ;murdered == 0 endif ;if player.IsInInterior == 0 endif ;if MS12.GhoulsOk == 5 End
618MS12GhoulMaskScriptscn MS12GhoulMaskScript short doOnce ;puts the player into the Feral Ghoul Faction so they don't attack him Begin OnEquip Player if doOnce == 0 ;this clears the crime flag incase the player has gotten into combat with Feral Ghouls before ;this flag is cleared via the MS12Fin quest script whenever the player is not in combat ;So if a player attacks a ghoul, even while wearing the mask they will fight him, but if he drops out of combat, and wears the mask, they will again not be hostile until he attacks them again ClearFactionPlayerEnemyFlag FeralGhoulFaction set doOnce to 1 endif setAlly playerFaction FeralGhoulFaction 1 1 ;FRIEND End Begin OnUnEquip Player setEnemy playerFaction FeralGhoulFaction ;ENEMY End
619MS12KeyScriptscn MS12KeyScript Begin OnAdd Player set MS12.basementKnowledge to 2 End
620MS12QuestScriptscn MS12QuestScript ;See also: ;DialogueTenpennyScript ;TenpennyGateScript ;MS12FeralGhoulScript ;MS12DoorWarringtonToTenpennyExteriorScript ;MS12KeyScript ;RoyPhillipsScript ;MS12FinScript short debug ;0 = off, 1 = debug mode -- is condition on package to make NPCs gather at a single spot for testing dialog, etc. short debugDoOnce short TenpennyTalkedTo ;0 = player didn't ask Tenpenny about the ghouls yet, 1 = player asked about the ghouls short gustavoReward ;set in dialog, determines how many bottle caps the player is awarded for killing all the ghouls short CountDealtWith ;0 = unset; # = total number of residents "Dealt with" (bigots killed/theatened, non-bigots agrreed/killed) short CountDead ;0 = unset, # = total number of residents (including Tenpenny) and guards (including ChiefGustavo and JoJo) are dead -- used to know when Feral Ghouls have killed everyone short GhoulsOk ;0 = unset, 1 = its ok for ghouls to move in, based on the following being true: A)Tenpenny agreed (because residents agree); OR B) Tenpenny is dead AND Gustavo is dead or took bribe and left short ghoulKnowledge ;0 = unset, 1 = player knows about the ghouls trying to get into Tenpenny (used as condition on topic in MS12 dialg) short countGhoulsDead ;# = how many of the non-feral ghouls are dead (used as condition for branch where you eliminate the ghoul threat) short allGhoulsDead ;# = set in ghouls onDeath scripts short countSignatures ;# = how many people signed the petition allowing ghouls (not using petition anymore, but means they've agreed)... used as a condition on dialog so people seem aware that their neighbors have agreed to ghoul neighbors short countEvicted ;# = how many bigots we successfully persuaded to leaved... used as a condition on dialog short basementKnowledge ; 0 = unset, 1 = player knows about basement, 2 = player got key to basement -- used as condition on dialog, and to spawn keys on Gustavo and Herbert Dashwood short FeralsWaiting ;0 = unset, 1 = move Ferals and Roy Phillips into position, 2 = in position short FeralsMoveToLobby ;0 = unset 1 = moving to lobby short FeralsReleased ;0 = unset, 1 = feral ghouls have been released, 2 = guards have been EVPed (Ghouls are still attacking), 3 = Everyone is dead short SetUpAttackScene ;0 = unset, 1 = set up scene, 2 = scene is done being set up -- set by MS12DoorWarringtonToTenpennyExteriorScript short CountPlayerKilledFerals ;count how many feral ghouls the player killed in the attack scene, used to turn of the respawning so he doesn't turn it into a XP camping fest short StopRespawn ; 0 = unset, 1 = don't respawn them anymore because player has started killing them, set in MS12FeralGhoulAttackScript short playerHasMask ;0 = player doesn't have mask, 1 = player was given the mask by Roy Phillips short keysSpawned ;0 = not set, 1 = spawned MS12Key objects on Gustavo and Dashwood ;Variables for "dealing with" Residents: getting them to sign petition or move out, or they are dead ;0 = unset, 1 = convinced through dialog, 2 = dead short MP ;Margaret Primose dealt with short MH ;Michael Hawthorne dealt with short EW ;Edgar Wellington dealt with short MW ;Milicent Wellington dealt with ;3 = gave her the love letter and she went on a killing spree and left (See MillicentWellingtonScript) short DB ;Doctor Banfield dealt with short LM ;Lydia Montenegro dealt with short AL ;Anthony Ling dealt with short IC ;Irving Cheng dealt with short TC ;Tiffany Cheng dealt with short SL ;Susan Lancaster dealt with ;3 = enslaved in MS13 short HD ;Herbert Dashwood dealt with short TenpennyOk ;Allistair Tenpenny agreed (after bigots have been dealt with) short xpAwarded ;the half the exp awarded for achieving goals, don't award again except at quest completion short DaringGNR Begin GameMode if debug == 1 && debugDoOnce == 0 IrvingChengRef.moveto xMS12TenpennyLobby HerbertDashwoodRef.moveto xMS12TenpennyLobby EdgarWellingtonIIRef.moveto xMS12TenpennyLobby MillicentWellingtonRef.moveto xMS12TenpennyLobby SusanLancasterRef.moveto xMS12TenpennyLobby TenpennyGuardDay3Ref.moveto xMS12TenpennyLobby JoJoRef.moveto xMS12TenpennyLobby TenpennyGuardDay5Ref.moveto xMS12TenpennyLobby DoctorBanfieldRef.moveto xMS12TenpennyLobby LydiaMontenegroRef.moveto xMS12TenpennyLobby MargaretPrimroseRef.moveto xMS12TenpennyLobby AnthonyLingRef.moveto xMS12TenpennyLobby MichaelHawthorneRef.moveto xMS12TenpennyLobby ChiefGustavoRef.moveto xMS12TenpennyLobby AllistairTenpennyRef.moveto xMS12TenpennyLobby set debugDoOnce to 1 endif ;safety for Millicent killing people after player gives her the love letter if MillicentWellingtonRef.getIsCurrentPackage MS12KillHusbandTravel == 1 if player.getInSameCell MillicentWellingtonRef == 0 && player.getInSameCell EdgarWellingtonIIRef == 0 EdgarWellingtonIIRef.Kill set MillicentWellingtonRef.KillHusband to 3 ;this gets her walking away again, set MillicentWellingtonRef.deathTimer to 5 ;but when the timer runs out, she returns to shoot his corpse MillicentWellingtonRef.EVP endif endif if MillicentWellingtonRef.getIsCurrentPackage MS12KillSusanLancasterTravelShoot == 1 if player.getInSameCell MillicentWellingtonRef == 0 && player.getInSameCell SusanLancasterRef == 0 set MillicentWellingtonRef.KillSusan to 4 SusanLancasterRef.kill endif endif if keysSpawned == 0 if basementKnowledge > 0 ChiefGustavoRef.additem MS12Key 1 HerbertDashwoodRef.additem MS12Key 1 set keysSpawned to 1 endif endif if FeralsWaiting == 1 ;spawn the initial horde of Feral ghouls xMS12FeralsWait.placeLeveledActorAtMe MS12FeralGhoul1A xMS12FeralsWait.placeLeveledActorAtMe MS12FeralGhoul1B xMS12FeralsWait.placeLeveledActorAtMe MS12FeralGhoul2A xMS12FeralsWait.placeLeveledActorAtMe MS12FeralGhoul2B xMS12FeralsWait.placeLeveledActorAtMe MS12FeralGhoulGlowingOne set FeralsWaiting to 2 endif if SetUpAttackScene == 1 ;move actors, etc. to set up the attack scene in the TenpennyXXAttack cells TenpennyResidentFemaleA1TEMPLATERef.disable TenpennyResidentFemaleA2Ref.disable TenpennyResidentFemaleB1TEMPLATERef.disable TenpennyResidentMaleA1Ref.disable TenpennyResidentMaleA2Ref.disable TenpennyResidentMaleB1Ref.disable TenpennyResidentMaleC1Ref.disable TenpennyResidentFemaleC1TEMPLATERef.disable TenpennyResidentFemaleD1TEMPLATERef.disable TenpennyResidentMaleD1Ref.disable ;Gimp the guards: TenpennyGuardDay1Ref.addSpell MS12GimpGuards TenpennyGuardDay2Ref.addSpell MS12GimpGuards TenpennyGuardDay3Ref.addSpell MS12GimpGuards JoJoRef.addSpell MS12GimpGuards TenpennyGuardDay5Ref.addSpell MS12GimpGuards TenpennyGuardNight1Ref.addSpell MS12GimpGuards TenpennyGuardNight3Ref.addSpell MS12GimpGuards TenpennyGuardNight5Ref.addSpell MS12GimpGuards ;we used to make Burke disappear when Ferals were released. Leaving this in but commented out in case we decide to do that again. ;;Mister Burke Disappears ;MisterBurkeRef.disable ;if MisterBurkeRef.getTalkedToPC == 1 ; setStage MSObjectives 11 ;endif ;Set up third floor IrvingChengRef.moveto xMS12AttackIrvingCheng TiffanyChengRef.moveto xMS12AttackTiffanyCheng AllistairTenpennyRef.moveto xMS12AttackAllistairTenpenny TenpennyGuardDay1Ref.moveto xMS12AttackGuardDay1 TenpennyGuardDay2Ref.moveto xMS12AttackGuardDay2 xMS12Attack03Spawn.placeLeveledActorAtMe MS12FeralGhoulAttack1A xMS12Attack03Spawn.placeLeveledActorAtMe MS12FeralGhoulAttack2A xMS12Attack03Spawn.placeLeveledActorAtMe MS12FeralGhoulAttack2B xMS12Attack03Spawn.placeLeveledActorAtMe MS12FeralGhoulAttackGlowingOne ;Set up second floor HerbertDashwoodRef.moveto xMS12AttackHerbertDashwood EdgarWellingtonIIRef.moveto xMS12AttackEdgarWellingtonII if MW == 3 ;she left after killing her husband and Susan ;fake her being killed so scene can end if MillicentWellingtonRef.getDead == 0 set CountDead to CountDead + 1 endif else MillicentWellingtonRef.moveto xMS12AttackMillicentWellington endif if SusanLancasterRef.getItemCount MS13Collar >= 1 ;she was enslaved ;fake her being killed so scene can end if SusanLancasterRef.getDead == 0 set CountDead to CountDead + 1 endif else ;she's not enslaved SusanLancasterRef.moveto xMS12AttackSusanLancaster endif TenpennyGuardDay3Ref.moveto xMS12AttackGuardDay3 JoJoRef.moveto xMS12AttackJoJo TenpennyGuardDay5Ref.moveto xMS12AttackGuardDay5 TenpennyGuardDay5Ref.kill xMS12AttackEdgarWellingtonII.placeLeveledActorAtMe MS12FeralGhoulAttack1A xMS12AttackMillicentWellington.placeLeveledActorAtMe MS12FeralGhoulAttack1B xMS12AttackJoJo.placeLeveledActorAtMe MS12FeralGhoulAttack2B xMS12AttackHerbertDashwood.placeLeveledActorAtMe MS12FeralGhoulAttackGlowingOne ;setup first floor ShakesRef.moveto xMS12AttackShakesMarker DoctorBanfieldRef.moveto xMS12AttackDoctorBanfield LydiaMontenegroRef.moveto xMS12AttackLydiaMontenegro MargaretPrimroseRef.moveto xMS12AttackMargaretPrimrose AnthonyLingRef.moveto xMS12AttackAnthonyLing MichaelHawthorneRef.setFactionRank TenpennyTowerResidentFaction -1 ;pull him out so the ghouls attack him last, so the player can talk to him while he is drinking himself to death MichaelHawthorneRef.moveto xMS12AttackMichaelHawthorneDrink ChiefGustavoRef.moveto xMS12AttackChiefGustavo TenpennyGuardNight1Ref.moveto xMS12AttackGuardNight1 TenpennyGuardNight3Ref.moveto xMS12AttackGuardNight3 TenpennyGuardNight5Ref.moveto xMS12AttackGuardNight4 TenpennyGuardNight1Ref.kill TenpennyGuardNight5Ref.kill xMS12Attack01Spawn.placeLeveledActorAtMe MS12FeralGhoulAttack1A xMS12Attack01SpawnB.placeLeveledActorAtMe MS12FeralGhoulAttack1B xMS12Attack01Spawn.placeLeveledActorAtMe MS12FeralGhoulAttack2A xMS12Attack01SpawnGlowingOne.placeLeveledActorAtMe MS12FeralGhoulAttackGlowingOne ;set variables when scene is done setting up set SetUpAttackScene to 2 set FeralsMoveToLobby to -1 set FeralsReleased to 1 ;move Roy Phillips so he can forcegreet the player and give him ghoul mask set RoyPhillipsRef.MoveToLobby to -1 RoyPhillipsRef.moveto xMS12RoyPhililpsForceGreet RoyPhillipsRef.evp endif if FeralsReleased == 1 ;Other things used to happen here, but leaving variable increment so things keep working set FeralsReleased to 2 endif if FeralsReleased == 2 ;check to see if everyone is dead, if so then the Ghouls can move in. if CountDead >= 21 setQuestDelay MS12 0 setStage MS12 250 ;to turn off the quest set FeralsReleased to 3 set GhoulsOk to 2 elseif StopRespawn == 1 ;kill NPCs offscreen because player has been killing ferals so they stopped respawning if AllistairTenpennyRef.getDead == 0 if AllistairTenpennyRef.getInSameCell player == 0 AllistairTenpennyRef.kill endif endif if AnthonyLingRef.getDead == 0 if AnthonyLingRef.getInSameCell player == 0 AnthonyLingRef.kill endif endif if ChiefGustavoRef.getDead == 0 if ChiefGustavoRef.getInSameCell player == 0 ChiefGustavoRef.kill endif endif if DoctorBanfieldRef.getDead == 0 if DoctorBanfieldRef.getInSameCell player == 0 DoctorBanfieldRef.kill endif endif if EdgarWellingtonIIRef.getDead == 0 if EdgarWellingtonIIRef.getInSameCell player == 0 EdgarWellingtonIIRef.kill endif endif if HerbertDashwoodRef.getDead == 0 if HerbertDashwoodRef.getInSameCell player == 0 HerbertDashwoodRef.kill endif endif if IrvingChengRef.getDead == 0 if IrvingChengRef.getInSameCell player == 0 IrvingChengRef.kill endif endif if LydiaMontenegroRef.getDead == 0 if LydiaMontenegroRef.getInSameCell player == 0 LydiaMontenegroRef.kill endif endif if MargaretPrimroseRef.getDead == 0 if MargaretPrimroseRef.getInSameCell player == 0 MargaretPrimroseRef.kill endif endif if MichaelHawthorneRef.getDead == 0 if MichaelHawthorneRef.getInSameCell player == 0 MichaelHawthorneRef.kill endif endif if MillicentWellingtonRef.getDead == 0 if MillicentWellingtonRef.getInSameCell player == 0 MillicentWellingtonRef.kill endif endif if SusanLancasterRef.getDead == 0 if SusanLancasterRef.getInSameCell player == 0 SusanLancasterRef.kill endif endif if TiffanyChengRef.getDead == 0 if TiffanyChengRef.getInSameCell player == 0 TiffanyChengRef.kill endif endif if TenpennyGuardDay1Ref.getDead == 0 if TenpennyGuardDay1Ref.getInSameCell player == 0 TenpennyGuardDay1Ref.kill endif endif if TenpennyGuardDay2Ref.getDead == 0 if TenpennyGuardDay2Ref.getInSameCell player == 0 TenpennyGuardDay2Ref.kill endif endif if TenpennyGuardDay3Ref.getDead == 0 if TenpennyGuardDay3Ref.getInSameCell player == 0 TenpennyGuardDay3Ref.kill endif endif if JoJoRef.getDead == 0 if JoJoRef.getInSameCell player == 0 JoJoRef.kill endif endif if TenpennyGuardDay5Ref.getDead == 0 if TenpennyGuardDay5Ref.getInSameCell player == 0 TenpennyGuardDay5Ref.kill endif endif if TenpennyGuardNight1Ref.getDead == 0 if TenpennyGuardNight1Ref.getInSameCell player == 0 TenpennyGuardNight1Ref.kill endif endif if TenpennyGuardNight3Ref.getDead == 0 if TenpennyGuardNight3Ref.getInSameCell player == 0 TenpennyGuardNight3Ref.kill endif endif if TenpennyGuardNight5Ref.getDead == 0 if TenpennyGuardNight5Ref.getInSameCell player == 0 TenpennyGuardNight5Ref.kill endif endif endif endif ;determine if GhoulsOk (ghouls can move in) if GhoulsOk == 0 ;check if the bigots have been dealt with if EW > 0 && MW > 0 && EW > 0 && MW > 0 && AL > 0 && SL > 0 if AllistairTenpennyRef.getDead == 0 && TenpennyOk == 1 set GhoulsOk to 1 setStage MS12 120 elseif AllistairTenpennyRef.getDead == 1 && ChiefGustavoRef.getDead == 1 set GhoulsOk to 1 setStage MS12 120 endif endif endif End
621MS12TenpennyAttackVersionActivatorScriptscn MS12TenpennyAttackVersionActivatorScript ;This handles setup and activating the proper objects in the regular version of Tenpenny Tower when you activate various containers and terminals in the Attack version (example, vendor chests) ;It's placed on various things in TenpennyXXAttack cells ref myLinkedRef short locked short lockLevel Begin OnLoad ;poll associated reference in the other version of the cell set myLinkedRef to getLinkedRef set locked to myLinkedRef.getLocked set lockLevel to myLinkedRef.getLockLevel ;set this reference to be the same as the associated reference in the other version of the cell -- this is just so the mouse over display is the same, the player will actually be activating the associated reference "directly" (see onActivate block below) if locked > 0 lock lockLevel else ;unlocked unlock endif End Begin OnActivate if IsActionRef player == 1 set myLinkedRef to getLinkedRef ;Check to see if it's vendor containers, and do the thing that the VendorMerchantContainerScript would do if myLinkedRef.getIsID VendorContainerLydiaMontenegro == 1 if player.getItemCount LydiaMontenegroVendorKey >= 1 VendorChestBuriedLydiaMontenegroRef.removeAllItems VendorContainerLydiaMontenegroRef VendorChestBuriedLydiaMontenegroRef.disable endif elseif myLinkedRef.getIsID VendorContainerAnthonyLing == 1 if player.getItemCount AnthonyLingVendorKey >= 1 VendorChestBuriedAnthonyLingRef.removeAllItems VendorContainerAnthonyLingRef VendorChestBuriedAnthonyLingRef.disable endif elseif myLinkedRef.getIsID VendorContainerDoctorBanfield == 1 if player.getItemCount DoctorBanfieldVendorKey >= 1 VendorChestBuriedDoctorBanfieldRef.removeAllItems VendorContainerDoctorBanfieldRef VendorChestBuriedDoctorBanfieldRef.disable endif endif myLinkedRef.activate player 1 ;regardless of whether it's a vendor chest or not endif End
622MS12TenpennyCorpseBasementTriggerScriptscn MS12TenpennyCorpseBasementTriggerScript short doOnce ;enable parent of corpses ;when enabled and entered by player sets variable meaning "player has seen corpses" Begin OnTriggerEnter if doOnce == 0 if IsActionRef player == 1 set MS12Fin.BasementCorpses to 1 set doOnce to 1 endif endif End
623MS12TenpennyDeadResidentDismemberScriptscn MS12TenpennyDeadResidentDismemberScript short doOnce ref thisRef Begin OnLoad if doOnce == 0 set thisRef to getSelf killActor thisRef 1 killActor thisRef 3 killActor thisRef 5 killActor thisRef 7 killActor thisRef 10 set doOnce to 1 endif End
624MS12TenpennyDeadTriggerScriptscn MS12TenpennyDeadTriggerScript ;it's enable parent of bloodstains, and dead version of Tenpenny in the tub. ;when player enters it, it sets a variable he can ask Roy Phillips what happened to Tenypenny Begin OnTriggerEnter if IsActionRef player == 1 if MS12Fin.TenpennyCorpse == 0 set MS12Fin.TenpennyCorpse to 1 endif endif End
625MS13CollarEffectScriptscn MS13CollarEffectScript ;!!!!!!!!!!!!!!!!------------- the "don't dispel on death" flag in the Magic Effect form it needs to be marked so this script with work properly with the death on the actor ---------------!!!!!!!!!!!!!!!!!!!!!!!! short arrived short statsChanged ; set to 1 after Mezzed spell goes away and stats have been changed ; save original stats so we can restore them if collar removed short StartingAggression Short StartingAssistance Short StartingConfidence Short StartingEnergy Short StartingResponsibility Short StartingMood short StartingIgnoreCrime float alarmTimer Begin ScriptEffectStart ; get rid of mezzed spell dispel MS13MezzedSpell ;add to a faction which is friends with the player so that I won't aggro on player even if he has a crime tracking faction that hates the player addToFaction MS13CollarFaction 0 set StartingIgnoreCrime to GetIgnoreCrime ignoreCrime 1 ; make sure running correct package if GetInCell PFallsSlaveHouse == 0 AddScriptPackage MS13TravelToParadiseFalls endif End Begin ScriptEffectUpdate if statsChanged == 0 if HasMagicEffect MS13Mezzed == 0 ; don't change stats until mezzed effect goes away, to make sure we're looking at REAL stats set statsChanged to 1 ; save stats for VIPs in case they're rescued after arriving in PF if GetIsID Red == 1 && MS13.RedStatsChanged == 0 set MS13.RedStatsChanged to 1 set MS13.RedAggression to getAv aggression set MS13.RedAssistance to getAv assistance set MS13.RedConfidence to getAv confidence elseif GetIsID Flak == 1 && MS13.FlakStatsChanged == 0 set MS13.FlakStatsChanged to 1 set MS13.FlakAggression to getAv aggression set MS13.FlakAssistance to getAv assistance set MS13.FlakConfidence to getAv confidence elseif GetIsID SusanLancaster == 1 && MS13.SusanStatsChanged == 0 set MS13.SusanStatsChanged to 1 set MS13.SusanAggression to getAv aggression set MS13.SusanAssistance to getAv assistance set MS13.SusanConfidence to getAv confidence elseif GetIsID Arkansas == 1 && MS13.ArkansasStatsChanged == 0 set MS13.ArkansasStatsChanged to 1 set MS13.ArkansasAggression to getAv aggression set MS13.ArkansasAssistance to getAv assistance set MS13.ArkansasConfidence to getAv confidence endif set StartingAggression to getAv Aggression set StartingAssistance to getAv Assistance set StartingConfidence to getAv Confidence set StartingEnergy to getAv Energy set StartingResponsibility to getAv Responsibility set StartingMood to getAv Mood ;set up AI data setAv Aggression 0 setAv Assistance 0 setAv Confidence 0 setAv Energy 5 setAv Responsibility 0 setAv Mood 4 endif endif ; send assault alarm after exiting dialogue ; use actor value so we make sure to only do this once if getav variable09 == 0 if menumode == 0 set alarmTimer to alarmTimer + ScriptEffectElapsedSeconds if alarmTimer > 2 setav variable09 9 SendAssaultAlarm stopcombat endif endif endif ; make sure running correct package if getIsCurrentPackage MS13TravelToParadiseFalls == 0 && getIsCurrentPackage MS13Enslaved == 0 AddScriptPackage MS13TravelToParadiseFalls endif if arrived == 0 if getDead == 1 ; this only makes sense because the effect is marked not to be dispelled on death set arrived to -1 set MS13Slaves.slaveArrived to -1 ;(-1 = died) GrouseRef.evp ;to get him walking to forcegreet the player elseif getInCell ParadiseFallsExterior == 1 || GetInWorldspace ParadiseFalls == 1 ;slave arrived on his own because he was a persistent actor, or a non-persistent actor who didn't unload (accompanied by the player) set arrived to 1 ; add to slave faction so slavers react to player attacking addToFaction ParadiseFallsSlaveFaction 0 ;check to see if this is any of the named targets of MS13 and set the proper variable if GetSelf == RedRef if MS13.RedArrived == 0 set MS13.RedArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 endif elseif GetSelf == ArkansasRef if MS13.ArkansasArrived == 0 set MS13.ArkansasArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 endif elseif GetSelf == FlakRef if MS13.FlakArrived == 0 set MS13.FlakArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 endif elseif GetSelf == SusanLancasterRef if MS13.SusanArrived == 0 set MS13.SusanArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 endif else ; only for generic slaves set MS13Slaves.slaveArrived to 1 ;(1 = he arrived for real) endif GrouseRef.evp ;to get him walking to forcegreet the player endif endif End Begin ScriptEffectFinish if MS13Slaves.debug == 1 ShowWarning "MS13CollarEffect -- ScriptEffectFinish" endif ;This block will run if the spell is dispelled, which only happens when the NPC unloads (because the spell effect is marked not to dispell on death), of if the player removes the collar from the NPC if MS13Slaves.playerRemovedCollar == 1 set MS13Slaves.playerRemovedCollar to -1 ; reset stats back to original removeFromFaction MS13CollarFaction RemoveFromFaction ParadiseFallsSlaveFaction RemoveScriptPackage ignoreCrime StartingIgnoreCrime if GetIsID Red == 1 && MS13.RedStatsChanged == 1 set MS13.RedStatsChanged to 0 setav aggression MS13.RedAggression setav assistance MS13.RedAssistance setav confidence MS13.RedConfidence elseif GetIsID Flak == 1 && MS13.FlakStatsChanged == 1 set MS13.FlakStatsChanged to 0 setav aggression MS13.FlakAggression setav assistance MS13.FlakAssistance setav confidence MS13.FlakConfidence elseif GetIsID SusanLancaster == 1 && MS13.SusanStatsChanged == 1 set MS13.SusanStatsChanged to 0 setav aggression MS13.SusanAggression setav assistance MS13.SusanAssistance setav confidence MS13.SusanConfidence elseif GetIsID Arkansas == 1 && MS13.ArkansasStatsChanged == 1 set MS13.ArkansasStatsChanged to 0 setav aggression MS13.ArkansasAggression setav assistance MS13.ArkansasAssistance setav confidence MS13.ArkansasConfidence elseif statsChanged == 1 setAv Aggression StartingAggression setAv Assistance StartingAssistance setAv Confidence StartingConfidence setAv Energy StartingEnergy setAv Responsibility StartingResponsibility setAv Mood StartingMood endif else ;assume the NPC unloaded ;if the slave hasn't arrived yet, we'll fake it as if he did arrive when the player wasn't looking (he's not in the same cell as the player or he wouldn't have unloaded) if arrived == 0 set arrived to 2 set MS13Slaves.slaveArrived to 2 ;(2 = we faked his arrival) ; add to slave faction so slavers react to player attacking addToFaction ParadiseFallsSlaveFaction 0 if GetSelf == RedRef moveto ParadiseFallsSlaveHouseMARKER set MS13.RedArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 elseif GetSelf == ArkansasRef moveto ParadiseFallsSlaveHouseMARKER set MS13.ArkansasArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 elseif GetSelf == FlakRef moveto ParadiseFallsSlaveHouseMARKER set MS13.FlakArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 elseif GetSelf == SusanLancasterRef moveto ParadiseFallsSlaveHouseMARKER set MS13.SusanArrived to 1 set MS13Slaves.slaveArrived to 0 ;or you'll get generic dialog instead of dialog refering to the target slave setstage MS13 100 else ;it was someone else ;because we are pretending he was sold, we don't want the player finding this unloaded actor again if he loads the cell he is in, so we disable him if MS13Slaves.debug == 1 ShowWarning "Slave unloading -- kill/disable and mark as delivered to Paradise Falls" endif KILL ;killing so that dialog assumes the player has been "killed" which makes more sense than people talking about them like they are still in town DISABLE endif GrouseRef.evp ;to get him walking to forcegreet the player endif endif End
626MS13FrenzyScriptscn MS13FrenzyScript Short StartingConfidence Short StartingAggression Begin ScriptEffectStart set StartingConfidence to getAv Confidence set StartingAggression to getAv Aggression setAv Confidence 4 setAv Aggression 5 ; frenzied ; try to restart combat so he picks up his new confidence scaonactor End Begin ScriptEffectFinish setAv Confidence StartingConfidence setAv Aggression StartingAggression End
627MS13HeadExplodeScriptscn MS13HeadExplodeScript Begin ScriptEffectStart playidle 3rdPHitHead scaonactor End Begin ScriptEffectFinish killActor player 1 0 End
628MS13MesmetronEffectScriptscn MS13MesmetronEffectScript ;This script is used by the mesmetron to place an appropriate spell effect on the victim ;!!!!!---- This script assumes the player is the only person who will use this gun ----!!!!!! ;!!!!!---- make sure "MS13Mesmetron" weapon is marked "player only" -----!!!!!! short dieRoll short frenzyChance short mezzChance Begin ScriptEffectStart ; if already running a sub effect (already hit by mesmetron), do nothing if IsSpellTarget MS13FrenzySpell == 1 || IsSpellTarget MS13MezzedSpell == 1 || MS13HeadExplodeSpell == 1 ; already a target if MS13Slaves.debug == 1 ShowWarning "I've already been hit by mesmetron" endif return endif ; if wearing MS13 collar, just explode their head if GetEquipped MS13Collar == 1 CastImmediateOnSelf MS13HeadExplodeSpell return endif ; track anyone actually mezzed here ModPCMiscStat "People Mezzed", 1 set dieRoll to getRandomPercent if MS13Slaves.debug == 1 ShowWarning "Mesmetron die roll: %.0f" dieRoll endif if getInFaction MS13AlwaysMez == 1 if MS13Slaves.debug == 1 ShowWarning "Always Mez" endif if MS13Slaves.Mezzed == 0 ;only one person can be mezzed at a time for ease of implementation of the script collar behavior if MS13Slaves.debug == 1 ShowWarning "CastImmediateOnSelf MS13MezzedSpell" endif CastImmediateOnSelf MS13MezzedSpell else ;nothing happens, fails to work endif else if MS13Slaves.debug == 1 ShowWarning "Random effects" endif ; 20% chance head explodes ; 80% chance it does something else: set frenzyChance to 80 if getInFaction MS13CanMez == 1 && getInFaction MS13CantMez == 0 && MS13Slaves.Mezzed == 0 && isEssential == 0 && IsChild == 0 ;only one person can be mezzed at a time for ease of implementation of the script collar behavior set mezzChance to 50 else ;the target is not in either MS13AlwaysMez or MS13CanMez factions OR is in the MS13CantMez faction OR MS13Slaves.Mezzed != 0 set mezzChance to 0 endif if dieRoll < mezzChance if MS13Slaves.debug == 1 showwarning "Mezzed" endif ;Mezzed CastImmediateOnSelf MS13MezzedSpell elseif dieRoll < frenzyChance if MS13Slaves.debug == 1 showwarning "Frenzied" endif ;Frenzy CastImmediateOnSelf MS13FrenzySpell else ;head explodes CastImmediateOnSelf MS13HeadExplodeSpell endif endif End
629MS13MezzedScriptscn MS13MezzedScript short mezzFlag ;set to 1 if I actually get "mezzed" (only 1 NPC can be mezzed at a time) short StartingAggression Short StartingAssistance Short StartingConfidence Short StartingEnergy Short StartingResponsibility Short StartingMood short StartingIgnoreCrime Begin ScriptEffectStart Say IdleChatter if getInFaction MS13AlwaysMez == 1 || getInFaction MS13CanMez == 1 if MS13Slaves.Mezzed == 0 && mezzFlag == 0 ; nobody currently mezzed, so okay to mezz me set MS13Slaves.Mezzed to 1 set mezzFlag to 1 addToFaction MS13MezzedFaction 0 set StartingAggression to getAv Aggression set StartingAssistance to getAv Assistance set StartingConfidence to getAv Confidence set StartingEnergy to getAv Energy set StartingResponsibility to getAv Responsibility set StartingMood to getAv Mood set StartingIgnoreCrime to GetIgnoreCrime setAv Aggression 0 setAv Assistance 0 setAv Confidence 4 setAv Energy 5 setAv Responsibility 0 setAv Mood 8 ignoreCrime 1 StopCombat StopCombatAlarmOnActor ;this sets up a variable to give each slave different dialog options if MS13Slaves.slaveDialogStage < 3 set MS13Slaves.slaveDialogStage to MS13Slaves.slaveDialogStage + 1 else set MS13Slaves.slaveDialogStage to 0 endif else dispel MS13MezzedSpell endif endif End Begin ScriptEffectUpdate if mezzFlag == 1 && getIsCurrentPackage MS13MezzedPackage == 0 AddScriptPackage MS13MezzedPackage endif End Begin ScriptEffectFinish if MS13Slaves.Mezzed == 1 && mezzFlag == 1 ;this is finishing and I was mezzed, so reset actor to starting values set MS13Slaves.Mezzed to 0 RemoveFromFaction MS13MezzedFaction setAv Aggression StartingAggression setAv Assistance StartingAssistance setAv Confidence StartingConfidence setAv Energy StartingEnergy setAv Responsibility StartingResponsibility setAv Mood StartingMood ignoreCrime StartingIgnoreCrime removeScriptPackage EVP endif End
630MS13QuestScriptscn MS13QuestScript short RedArrived ;0 = unset, 1 = arrived, -1 = player rewarded by slavers short FlakArrived ;0 = unset, 1 = arrived, -1 = player rewarded by slavers short ArkansasArrived ;0 = unset, 1 = arrived, -1 = player rewarded by slavers short SusanArrived ;0 = unset, 1 = arrived, -1 = player rewarded by slavers short playerRefused ;1 = player refused to work for Grouse short bribe ;1 = Grouse is willing to take a bribe ; store actor values so they can be restored when rescued short RedStatsChanged short RedAggression short RedAssistance short RedConfidence short SusanStatsChanged short SusanAggression short SusanAssistance short SusanConfidence short FlakStatsChanged short FlakAggression short FlakAssistance short FlakConfidence short ArkansasStatsChanged short ArkansasAggression short ArkansasAssistance short ArkansasConfidence
631MS13RemoveCollarScriptscn MS13RemoveCollarScript Begin ScriptEffectFinish playSound FXExplosionCollar killActor player 1 0 SendAssaultAlarm Player SlaverFaction SendAssaultAlarm Player ParadiseFallsSlaverFaction End
632MS13SlavesQuestScriptscn MS13SlavesQuestScript ;Slaves are "created" through dialog conditioned on being in MS13AlwaysMezFaction and having MS13Mezzed magic effect short capCount ;how many bottle caps the slave is carrying, used by MS13Mezzed01 topic in MS13Slaves quest ;set by the MS13MezzedScript short Mezzed ;1 = someone is already mezzed... this is a condition on the MS13Enchantment MS13Mezzed effect so only one NPC can be mezzed at a time ;Set by MS13Mezzed2 topic (to -2) Set by MS13CollarEffectScript upon arrival (to -1, 1 or 2). Unset by dialog with slavers when they reward the player for delivering slave. short slaveArrived ;0 = unset ;1 = slave arrived on his own power ;2 = arrival is faked because he was a non-persistent reference that unloaded, and we deleted him. "The slave made it before you! We sold him already! Here's your money!" ; -1 = slave was killed prior to arrival ;-2 = slave is on the way short playerRemovedCollar ;set in MS13RemoveCollar1a infos, and used by MS13CollarEffectScript short slaveDialogStage ;set in MS13Mezzed effect script and used by MS13Slaves topics to give you different choices between slaves, but consistent choices within each slaves dialog short wakeUpNow ;set in MS13Mezzed3 topic in MS13Slaves, used by MS13Mezzed to cause the mez effect to dispel short debug ; set to 1 to get debug messages on mesmetron scripts
633MS15ArchivesGameRedemptionTerminalScriptscn MS15ArchivesGameRedemptionTerminalScript short Voucher
634MS15ArchivesGameTerminalScriptscn MS15ArchivesGameTerminalScript short Q1 short Q2 short Q3 short Q4 short Q5 short Q6 short Q7 short Q8 short Q1Guess short Q2Guess short Q3Guess short Q4Guess short Q5Guess short Q6Guess short Q7Guess short Q8Guess short Prize
635MS15BackupPodScriptscn MS15BackupPodScript float timer short startTimer Begin OnActivate if IsActionRef MS15BUTerm == 1 setopenstate 1 ; open it set timer to 2 set startTimer to 1 endif End begin gamemode if startTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else ;turn on the Protectron set MS15BUProRef.turnOnTimer to 5 set MS15BUProRef.turnOn to 1 set startTimer to 0 endif endif end
636MS15BackupProtectronScriptscn MS15BackupProtectronScript short active ; set to 1 to turn on and start moving short shutdown short turnOn float turnOnTimer begin onLoad if active == 0 ; make me unconscious so I don't play sounds setUnconscious 1 endif end begin gamemode if turnOn == 1 if turnOnTimer >= 0 set turnOnTimer to turnOnTimer - GetSecondsPassed else set turnOn to 2 ;get him to move around setUnconscious 0 Addspell MS15GNRBroadcast set active to 1 evp endif endif if shutdown == 1 set MS15BUTerm.BUactive to 3 set MS15BUTerm.BUprogram to 3 set MS15BUTerm.BUrecall to 3 set MS15BUTerm.BUshutdown to 3 PlaceatMe MediumExplosion MS15BUProRef.Kill MS15BUProRef 1 MS15BUProRef.Kill MS15BUProRef 3 MS15BUProRef.Kill MS15BUProRef 5 MS15BUProRef.Kill MS15BUProRef 7 MS15BUProRef.Kill MS15BUProRef 9 set shutdown to 2 endif end
637MS15BackupTerminalScriptscn MS15BackupTerminalScript short BUactive short BURecall short BUShutdown short BUProgram
638MS15DeclarationFinalRefScriptscn MS15DeclarationFinalRefScript ;This script will trigger quest changes when object is added to Player's inventory short CleanUp ;1= Sydney has been disabled as if never there begin OnAdd Player if ( MS15.QuestTold == 1 ) ;Check that player knows where to bring Declaration SetStage MS15 60 ;Set the stage to 60 if ( MS15.SydneyJoin == 1 ) Set MS15.SydneyStage to 7 ;Advance this quest variable to 7 (for Sydney's Dialog) endif endif ;This block is used if the Player elected to completely ignore the encounter in the Rotunda, and never interacts with Sydney before getting the Declaration if ( CleanUp == 0 ) if ( MS15.SydneyJoin == 0 ) MS15SydneyRef.Disable set CleanUp to 1 endif endif end
639MS15Intercom01Scriptscn MS15Intercom01Script begin SayToDone MS15ButtonCCT01 Say MS15ButtonCCT02 1 MS15ButtonGwinnett end begin SayToDone MS15ButtonCCT02 Say MS15ButtonCCT03 1 MS15ButtonGwinnett end
640MS15Intercom02Scriptscn MS15Intercom02Script begin SayToDone MS15ButtonCCT04 Say MS15ButtonCCT05 1 MS15ButtonGwinnett end
641MS15Intercom03Scriptscn MS15Intercom03Script begin SayToDone MS15ButtonCCT06 Say MS15ButtonCCT07 1 MS15ButtonGwinnett end
642MS15Intercom04Scriptscn MS15Intercom04Script begin SayToDone MS15ButtonCCT08 Say MS15ButtonCCT09 1 MS15ButtonGwinnett end
643MS15IntercomTrigger01Scriptscn MS15IntercomTrigger01Script ;This script will cause a series of Say messages to play from the appropriate matching MS15ArchivesIntercom0x ;When the trigger zone is broken by the player, it plays the line(s) once then can't be activated again short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking begin onTriggerEnter Player if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached Set DoOnce to 1 endif end begin gamemode if ( Talk == 1 ) MS15ArchivesIntercom1Ref.Say MS15ButtonCCT01 1 MS15ButtonGwinnett Set Talk to 2 endif end
644MS15IntercomTrigger02Scriptscn MS15IntercomTrigger02Script ;This script will cause a series of Say messages to play from the appropriate matching MS15ArchivesIntercom0x ;When the trigger zone is broken by the player, it plays the line(s) once then can't be activated again short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines begin onTriggerEnter Player if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached Set DoOnce to 1 endif end begin gamemode if ( Talk == 1 ) MS15ArchivesIntercom02Ref.Say MS15ButtonCCT04 1 MS15ButtonGwinnett Set Talk to 2 endif end
645MS15IntercomTrigger03Scriptscn MS15IntercomTrigger03Script ;This script will cause a series of Say messages to play from the appropriate matching MS15ArchivesIntercom0x ;When the trigger zone is broken by the player, it plays the line(s) once then can't be activated again short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines begin onTriggerEnter player if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached Set DoOnce to 1 endif end begin gamemode if ( Talk == 1 ) MS15ArchivesIntercom03Ref.Say MS15ButtonCCT06 1 MS15ButtonGwinnett Set Talk to 2 endif end
646MS15IntercomTrigger04Scriptscn MS15IntercomTrigger04Script ;This script will cause a series of Say messages to play from the appropriate matching MS15ArchivesIntercom0x ;When the trigger zone is broken by the player, it plays the line(s) once then can't be activated again short DoOnce ;1= Trigger Zone has been tripped and Says have played short Talk ;This variable starts the intercom speaking, and as the number rises, it steps through the say lines begin onTriggerEnter Player if ( DoOnce == 0 ) Set Talk to 1 ;Trigger the gamemode block below when trigger zone breached Set DoOnce to 1 endif end begin gamemode if ( Talk == 1 ) MS15ArchivesIntercom04Ref.Say MS15ButtonCCT08 1 MS15ButtonGwinnett Set Talk to 2 endif end
647MS15LvlRobotsScriptscn MS15LvlRobotsScript ;This small script will shift the Robot's aggressions if the Player does: ;Agrees to get the Ink to make the Forgery or pulls the Jefferson ploy ;Killing him or Shutting him down with Perk will NOT calm his army short DoOnce begin gamemode if ( DoOnce == 0 ) if ( MS15.SwapOut == 1 ) SetAV Aggression 0 set DoOnce to 1 endif endif end
648MS15MuseumTalkBox01ScriptNEWscn MS15MuseumTalkBox01ScriptNEW ;These scripts handle the activation of the Museum Talkboxes in the Capital Pres. Society ;They are intended to be modified parking meters that output misguided or erroneous information short Talk ;When set to 1, this flag launches the gamemode block and does the speaking short NoMoney ;" short GoTalk ; begin OnActivate if IsActionRef player == 1 if ( GoTalk == 0 ) ;Check to see if a sound is playing if ( Player.GetItemCount MS15MuseumToken < 1 ) ;Check to see if player has Museum Token if ( Player.GetItemCount Caps001 < 1 ) ;Check to make sure player has a cap Set NoMoney to 1 elseif ( Player.GetItemCount Caps001 >= 1 ) ;Check to make sure player has a cap Player.RemoveItem Caps001 1 ;Remove a cap Set GoTalk to 1 ;Launch talk block endif elseif ( Player.GetItemCount MS15MuseumToken >= 1 ) ;Player has token Set GoTalk to 1 ;Launch talk block endif endif endif end begin gamemode if ( NoMoney == 1 ) Say MS15MuseumTBNoMoney 1 AbrahamWashington 1 ;If no caps, play this message Set NoMoney to 0 endif if ( GoTalk == 1 ) ;Check for flag Say MS15MuseumTB01 1 AbrahamWashington 1 ;Talkbox says lines in Abraham's voice Set GoTalk to 2 endif end begin SayToDone MS15MuseumTB01 Say MS15MuseumTB01A 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB01A Say MS15MuseumTB01B 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB01B Set GoTalk to 0 end
649MS15MuseumTalkBox02ScriptNEWscn MS15MuseumTalkBox02ScriptNEW ;These scripts handle the activation of the Museum Talkboxes in the Capital Pres. Society ;They are intended to be modified parking meters that output misguided or erroneous information short Talk ;When set to 1, this flag launches the gamemode block and does the speaking short NoMoney ;" short GoTalk ; begin OnActivate if IsActionRef player == 1 if ( GoTalk == 0 ) ;Check to see if a sound is playing if ( Player.GetItemCount MS15MuseumToken < 1 ) ;Check to see if player has Museum Token if ( Player.GetItemCount Caps001 < 1 ) ;Check to make sure player has a cap Set NoMoney to 1 elseif ( Player.GetItemCount Caps001 >= 1 ) ;Check to make sure player has a cap Player.RemoveItem Caps001 1 ;Remove a cap Set GoTalk to 1 ;Launch talk block endif elseif ( Player.GetItemCount MS15MuseumToken >= 1 ) ;Player has token Set GoTalk to 1 ;Launch talk block endif endif endif end begin gamemode if ( NoMoney == 1 ) Say MS15MuseumTBNoMoney 1 AbrahamWashington 1 ;If no caps, play this message Set NoMoney to 0 endif if ( GoTalk == 1 ) ;Check for flag Say MS15MuseumTB02 1 AbrahamWashington 1 ;Talkbox says lines in Abraham's voice Set GoTalk to 2 endif end begin SayToDone MS15MuseumTB02 Say MS15MuseumTB02A 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB02A Say MS15MuseumTB02B 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB02B Set GoTalk to 0 end
650MS15MuseumTalkBox03ScriptNEWscn MS15MuseumTalkBox03ScriptNEW ;These scripts handle the activation of the Museum Talkboxes in the Capital Pres. Society ;They are intended to be modified parking meters that output misguided or erroneous information short Talk ;When set to 1, this flag launches the gamemode block and does the speaking short NoMoney ;" short GoTalk ; float TalkTimer ;Used to measure length of spoken line for spacing issues begin OnActivate if IsActionRef player == 1 if ( GoTalk == 0 ) ;Check to see if a sound is playing if ( Player.GetItemCount MS15MuseumToken < 1 ) ;Check to see if player has Museum Token if ( Player.GetItemCount Caps001 < 1 ) ;Check to make sure player has a cap Set NoMoney to 1 elseif ( Player.GetItemCount Caps001 >= 1 ) ;Check to make sure player has a cap Player.RemoveItem Caps001 1 ;Remove a cap Set GoTalk to 1 ;Launch talk block endif elseif ( Player.GetItemCount MS15MuseumToken >= 1 ) ;Player has token Set GoTalk to 1 ;Launch talk block endif endif endif end begin gamemode if ( NoMoney == 1 ) Say MS15MuseumTBNoMoney 1 AbrahamWashington 1 ;If no caps, play this message Set NoMoney to 0 endif if ( GoTalk == 1 ) ;Check for flag Say MS15MuseumTB03 1 AbrahamWashington 1 ;Talkbox says lines in Abraham's voice Set GoTalk to 2 endif end begin SayToDone MS15MuseumTB03 Say MS15MuseumTB03A 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB03A Say MS15MuseumTB03B 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB03B Say MS15MuseumTB03C 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB03C Set GoTalk to 0 end
651MS15MuseumTalkBox04ScriptNEWscn MS15MuseumTalkBox04ScriptNEW ;These scripts handle the activation of the Museum Talkboxes in the Capital Pres. Society ;They are intended to be modified parking meters that output misguided or erroneous information short Talk ;When set to 1, this flag launches the gamemode block and does the speaking short NoMoney ;" short GoTalk ; float TalkTimer ;Used to measure length of spoken line for spacing issues begin OnActivate if IsActionRef player == 1 if ( GoTalk == 0 ) ;Check to see if a sound is playing if ( Player.GetItemCount MS15MuseumToken < 1 ) ;Check to see if player has Museum Token if ( Player.GetItemCount Caps001 < 1 ) ;Check to make sure player has a cap Set NoMoney to 1 elseif ( Player.GetItemCount Caps001 >= 1 ) ;Check to make sure player has a cap Player.RemoveItem Caps001 1 ;Remove a cap Set GoTalk to 1 ;Launch talk block endif elseif ( Player.GetItemCount MS15MuseumToken >= 1 ) ;Player has token Set GoTalk to 1 ;Launch talk block endif endif endif end begin gamemode if ( NoMoney == 1 ) Say MS15MuseumTBNoMoney 1 AbrahamWashington 1 ;If no caps, play this message Set NoMoney to 0 endif if ( GoTalk == 1 ) ;Check for flag Say MS15MuseumTB04 1 AbrahamWashington 1 ;Talkbox says lines in Abraham's voice Set GoTalk to 2 endif end begin SayToDone MS15MuseumTB04 Say MS15MuseumTB04A 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB04A Say MS15MuseumTB04B 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB04B Set GoTalk to 0 end
652MS15MuseumTalkBox05ScriptNEWscn MS15MuseumTalkBox05ScriptNEW ;These scripts handle the activation of the Museum Talkboxes in the Capital Pres. Society ;They are intended to be modified parking meters that output misguided or erroneous information short Talk ;When set to 1, this flag launches the gamemode block and does the speaking short NoMoney ;" short GoTalk ; float TalkTimer ;Used to measure length of spoken line for spacing issues begin OnActivate if IsActionRef player == 1 if ( GoTalk == 0 ) ;Check to see if a sound is playing if ( Player.GetItemCount MS15MuseumToken < 1 ) ;Check to see if player has Museum Token if ( Player.GetItemCount Caps001 < 1 ) ;Check to make sure player has a cap Set NoMoney to 1 elseif ( Player.GetItemCount Caps001 >= 1 ) ;Check to make sure player has a cap Player.RemoveItem Caps001 1 ;Remove a cap Set GoTalk to 1 ;Launch talk block endif elseif ( Player.GetItemCount MS15MuseumToken >= 1 ) ;Player has token Set GoTalk to 1 ;Launch talk block endif endif endif end begin gamemode if ( NoMoney == 1 ) Say MS15MuseumTBNoMoney 1 AbrahamWashington 1 ;If no caps, play this message Set NoMoney to 0 endif if ( GoTalk == 1 ) ;Check for flag Say MS15MuseumTB05 1 AbrahamWashington 1 ;Talkbox says lines in Abraham's voice Set GoTalk to 2 endif end begin SayToDone MS15MuseumTB05 Say MS15MuseumTB05A 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB05A Say MS15MuseumTB05B 1 AbrahamWashington 1 end begin SayToDone MS15MuseumTB05B Set GoTalk to 0 end
653MS15OverlookTriggerScriptscn MS15OverlookTriggerScript ;This trigger will be tripped if the player looks down into the Rotunda, and Sydney's encounter has not begun. short DoOnce begin OnTriggerEnter Player if ( DoOnce == 0 ) if ( MS15.SydneyJoin == 0 ) MS15SydneyRef.SayTo Player MS15SydneyOverlookSay 1 set DoOnce to 1 endif endif end
654MS15QuestScriptscn MS15QuestScript short SydneyJoin ;1= Sydney has joined the player and is now a part of the group 2= Sydney was not joined, and will now ignore player short SydneyStage ;1+= As the player hits hidden waypoints, this variable will increase. This helps determine where the player is for Sydney's help dialog. short TempBlock ;This is a temp block variable to block dialog until a function goes in (future use) short WaveAttack ;1= When this flag is set to 1 in MS15RotundaEntryTriggerScript, the Supermutants will attack the Rotunda short SMDeathCount ;2= When this number reaches the threshold, Sydney will know attack is done, and new objective is set (2 is temp for now) short SydneyFollow ;A variable to track when Sydney is in Follow (1) or Wait (2) mode if you team up with her short Shutdown ;1= Run script on Button to "shut him down" (Basically, an instant kill) short WashBack ;1= Good response from Abe's background discussion, 2= Bad response (for dialog) short DoOnce short Forgery ;1= Player has selected the forgery branch short SydneyChange ;1= After Supermutant Attack, chage Sydney's AI package short ButtonReboot ;1= Button's programming overriden by Robotics Expert short ButtonDestruct ;1= Button self-destructs short OnMission ;1= Player is on the quest from Abraham short HaveModule ;1= Player obtained the module from Button's "corpse" short SayWarning ;1= Sydney comments between waves short QuestTold ;1= Player was told about the document, but may or may not have taken quest (for dialog) short Father ;1= Sydney mentions her father (for dialog) short Solved ;1= Dealt with Button short IKnowAbe ;1= Player is "aware" of Abraham Washington either through Sydney or Abe himself or Sydney's Terminal short Ponder short SwapOut ;1= Change Button's Robot Army's aggression short OneTime short WeTalked ;1= A flag used to indicate the Player has bailed out of Abe's dialog without taking quest, etc. float RotundaTimer ;A float variable used to delay the appearance of the Supermutants in the Rotunda float Timer ;The timer related to removing the password from the data terminal short MS15Good ;Forge the Declaration and Enable Button to keep it short MS15Bad ;Player destroys Button/Makes him Self Destruct begin gamemode ;This block handles the attack on the Rotunda ;After hitting second trigger, 3 Supermutants will spawn and attack the player and Sydney in the Rotunda ;This is triggered when the trigger zone is broken on entry to the Rotunda (MS15RotundaEntryTriggerScript) if ( WaveAttack == 1 ) ;Variable is set on trigger zone break MS15SuperMutant01RotundaRef.Enable ;Enable both Supermutants, and Evp them MS15SuperMutant02RotundaRef.Enable MS15SuperMutant03RotundaRef.Enable MS15SuperMutant01RotundaRef.Evp MS15SuperMutant02RotundaRef.Evp MS15SuperMutant03RotundaRef.Evp Set WaveAttack to 2 ;Set the Variable to 2 as a doOnce endif ;This block checks to see if the number of Supermutants involved in the Rotunda attack are dead ;This Stages the quest to 40 and allows it to continue if ( SayWarning == 0 ) if ( SMDeathCount >= 3 ) MS15SydneyRef.SayTo Player MS15SydneyTrigger03 1 Set SayWarning to 1 endif endif if ( MS15SM == 0 ) if ( SMDeathCount >= 2 ) MS15SuperMutant04RotundaRef.Enable MS15SuperMutant05RotundaRef.Enable MS15SuperMutant04RotundaRef.Evp MS15SuperMutant05RotundaRef.Evp Set MS15SM to 1 endif endif if ( OneTime == 0 ) if ( SMDeathCount == 5 ) ;Death counter has confirmed all Supermutants are dead (Scripts on each creature) Set SydneyChange to 1 ;Change Sydney's AI Package MS15SydneyRef.SetPlayerTeammate 0 SetEnemy MS15SydneyFaction PlayerFaction 1 1 MS15SydneyRef.Evp SetStage MS15 40 ;Stage quest to 40 Set OneTime to 1 endif endif endif ;Another stage change by way of being near an X-Marker if ( GetStage MS15 >= 40 ) && ( GetStageDone MS15 50 == 0 ) ;Stage check (is at 40?) if ( Player.GetDistance MS15ArchivesStrongroomEntryMarker < 400 ) ;Checking player's distance from X-Marker (400 units) SetStage MS15 50 ;Bring stage to 50 endif endif end
655MS15RotundaEntryTriggerScriptscn MS15RotundaEntryTriggerScript ;This is a quick script that handles the trigger box upon entry of the National Archives Rotunda area ;When the plane is broken, Sydney will do a say short DoOnce ;A simple DoOnce variable begin OnTriggerEnter Player if ( DoOnce == 0 ) MS15SydneyRef.SayTo Player MS15SydneyTrigger 1 set DoOnce to 1 endif end
656MS15RotundaFloorActivatorScriptscn MS15RotundaFloorActivatorScript ;This script runs the floor activator ; ;=============================== short wasActivated begin onActivate if isActionRef player == 0 set wasActivated to 1 endif end begin gameMode if getOpenState == 1 MS15RotundaFloorDoorRef.enable disable endif end
657MS15RotundaWaveTriggerScriptscn MS15RotundaWaveTriggerScript ;This is a quick script that handles the trigger box upon entry of the National Archives Rotunda area ;When the box is triggered, a bunch of Supermutants swarm and attack short DoOnce ;A simple DoOnce variable begin OnTriggerEnter Player if ( DoOnce == 0 ) SetStage MS15 30 set MS15.WaveAttack to 1 MS15SydneyRef.SetPlayerTeammate 1 setAlly MS15SydneyFaction PlayerFaction 1 1 MS15SydneyRef.SayTo Player MS15SydneyTrigger02 1 MS15OverlookTriggerRef.Disable set DoOnce to 1 endif end
658MS15SecurityModuleScriptscn MS15SecurityModuleScript begin OnAdd Player Set MS15.Timer to 3 Set MS15.HaveModule to 1 end
659MS15SupermutantRotundaAttackScriptscn MS15SupermutantRotundaAttackScript ;A very brief OnDeath script that increases a variable onDeath of the creature begin OnDeath Set MS15.SMDeathCount to ( MS15.SMDeathCount + 1 ) ;Increase the variable by "1" each time a Supermutant is killed (in MS15QuestScript) end
660MS15SydneyEntryTriggerScriptscn MS15SydneyEntryTriggerScript ;This is a quick script that handles the trigger box upon entry of the National Archives Rotunda area short DoOnce ;A simple DoOnce variable begin OnTriggerEnter Player if ( DoOnce == 0 ) SetQuestDelay MS15 .1 MS15SydneyRef.Evp set DoOnce to 1 endif end
661MS15SydneyScriptscn MS15SydneyScript ;This script causes Sydney to Evp whenever the SydneyFollow variable is toggled in Dialog short DoOnce ;a DoOnce variable short Leaves ;a DoOnce variable so Sydney won't keep disabling every frame short Check ;a DoOnce variable so Sydney won't keep EVP'ing every frame short StimUse ;1= The Player just gave Sydney a Stimpak in dialog begin gamemode if ( DoOnce == 0 ) ;This will be reset to 0 in dialog whenever player issues commands if ( MS15.SydneyFollow >= 1 ) ;This will be set in Dialog as either 1 (Follow) or 2 (Wait) Evp ;Evp Sydney for immediate response in case the Dialog exit doesn't hack it Set DoOnce to 1 endif endif ;This block is a Failsafe to make sure Sydney EVP's after dialog (even though system should do it) if ( Check == 0 ) if ( MS15.SydneyJoin == 2 ) ;This flag is set in dialog Evp ;Evp Sydney Set Check to 1 ;Set the DoOnce endif endif ;This is for Sydney using Stimpaks... unlike normal NPCs, she will use them immediately if ( StimUse == 1 ) if ( MS15SydneyRef.GetItemCount Stimpak >= 1 ) cios Stimpak MS15SydneyRef.RemoveItem Stimpak 1 set StimUse to 0 endif endif end ;This block handles Sydney running from the Player on a no join result in dialog begin OnPackageEnd MS15SydneyLeavesNoJoin ;At the end of Sydney's run to the X-Marker in this package if ( Leaves == 0 ) if ( Player.GetInSameCell MS15SydneyRef == 0 ) MS15SydneyRef.Disable ;Disable Sydney (as if she exited buidling) Set Leaves to 1 ;Set the DoOnce endif endif end begin OnDeath RemoveItem WeapUniqueSydneys10mmSubGunFollwerVersion 1 end
662MS15SydneyTrigger02Scriptscn MS15SydneyTrigger02Script ;This is a short script that handles the changing of the "SyndeyStage" variable used for Sydney's Dialog ;When the plane is broken, the Sydney Stage advances by one. It cannot be reversed. short DoOnce begin onTriggerEnter Player if ( MS15.SydneyJoin == 1 ) ;Make sure Sydney joined the group if ( MS15.SydneyStage == 1 ) ;Checking current SydneyStage variable Set MS15.SydneyStage to 2 ;Advance the Stage endif endif end begin gamemode if ( DoOnce == 0 ) if ( MS15.SydneyStage == 2 ) MS15SydneyRef.SayTo Player MS15SydneySayStage02 1 set DoOnce to 1 endif endif end
663MS15SydneyTrigger03Scriptscn MS15SydneyTrigger03Script ;This is a short script that handles the changing of the "SyndeyStage" variable used for Sydney's Dialog ;When the plane is broken, the Sydney Stage advances by one. It cannot be reversed short DoOnce begin onTriggerEnter Player if ( MS15.SydneyJoin == 1 ) ;Make sure Sydney joined the group if ( MS15.SydneyStage == 2 ) ;Checking current SydneyStage variable Set MS15.SydneyStage to 3 ;Advance the Stage endif endif end begin gamemode if ( DoOnce == 0 ) if ( MS15.SydneyStage == 3 ) MS15SydneyRef.SayTo Player MS15SydneySayStage03 1 set DoOnce to 1 endif endif end
664MS15SydneyTrigger04Scriptscn MS15SydneyTrigger04Script ;This is a short script that handles the changing of the "SyndeyStage" variable used for Sydney's Dialog ;When the plane is broken, the Sydney Stage advances by one. It cannot be reversed short DoOnce begin onTriggerEnter Player if ( MS15.SydneyJoin == 1 ) ;Make sure Sydney joined the group if ( MS15.SydneyStage == 3 ) ;Checking current SydneyStage variable Set MS15.SydneyStage to 4 ;Advance the Stage endif endif end begin gamemode if ( DoOnce == 0 ) if ( MS15.SydneyStage == 4 ) MS15SydneyRef.SayTo Player MS15SydneySayStage04 1 set DoOnce to 1 endif endif end
665MS15SydneyTrigger05Scriptscn MS15SydneyTrigger05Script ;This is a short script that handles the changing of the "SyndeyStage" variable used for Sydney's Dialog ;When the plane is broken, the Sydney Stage advances by one. It cannot be reversed short DoOnce begin onTriggerEnter Player if ( MS15.SydneyJoin == 1 ) ;Make sure Sydney joined the group if ( MS15.SydneyStage == 4 ) ;Checking current SydneyStage variable Set MS15.SydneyStage to 5 ;Advance the Stage endif endif end begin gamemode if ( DoOnce == 0 ) if ( MS15.SydneyStage == 5 ) MS15SydneyRef.SayTo Player MS15SydneySayStage05 1 set DoOnce to 1 endif endif end
666MS15SydneyWrongWayTriggerScriptscn MS15SydneyWrongWayTriggerScript ;This trigger is in front of the door to the Sub-Basement (NtnlArchives02) in NtnlArchives01 ;If the player has Sydney in tow, she'll recommend that they go back to the Rotunda ;The trigger will not work if Player already has the Declaration and is simply exploring the building later with Sydney short DoOnce begin OnTriggerEnter Player if ( DoOnce == 0 ) if ( MS15.SydneyJoin == 1 ) if ( MS15.SydneyStage < 7 ) MS15SydneyRef.SayTo Player MS15SydneySayWrongWay01 1 set DoOnce to 1 endif endif endif end
667MS15ThomasJeffersonScriptscn MS15ThomasJeffersonScript short active begin onLoad if active == 0 ; make me unconscious so I don't play sounds setUnconscious 1 endif end
668MS15TurretGeneratorScriptscn MS15TurretGeneratorScript ;This is the script on the Turret Generator in NtnlArchives03 ;Successful repair skill check of 60 will allow player to disable all of the turrets on the level short TurretsOff ;1= All of the turrets are deactivated short Button short CheckButtonPress begin OnActivate if IsActionRef player == 1 if ( TurretsOff == 0 ) if ( Player.GetAV Repair >= 60 ) ShowMessage MS15TurretGeneratorMessageHigh Set CheckButtonPress to 1 elseif ( Player.GetAV Repair < 60 ) ShowMessage MS15TurretGeneratorMessageLow endif elseif ( TurretsOff == 1 ) ShowMessage MS15TurretGeneratorMessageOff endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( CheckButtonPress == 1 ) MS15TurretGeneratorSound01ref.disable ;turn off generator sounds MS15TurretGeneratorSound02ref.disable ;Disable the Turrets MS15TurretAref.stopCombat MS15TurretAref.setUnconscious 1 MS15TurretBref.stopCombat MS15TurretBref.setUnconscious 1 MS15TurretCref.stopCombat MS15TurretCref.setUnconscious 1 MS15TurretDref.stopCombat MS15TurretDref.setUnconscious 1 MS15TurretEref.stopCombat MS15TurretEref.setUnconscious 1 MS15TurretEref.stopCombat MS15TurretEref.setUnconscious 1 Playsound OBJTurretGeneratorDisable set TurretsOff to 1 set CheckButtonPress to 0 endif end
669MS16AmbushTriggerBSCRIPTscn MS16AmbushTriggerBSCRIPT BEGIN OnTriggerEnter PlayerREF if Vault101Security09REF.getDead == 0 if (getStageDone MS16 140 == 0 || OverseerREF.getDead == 1) if Vault101Security04REF.GetDistance player > 1000 && Vault101Security07REF.GetDistance player > 1000 Vault101Security09REF.moveto MS16AmbushPointB endif endif endif END
670MS16AmbushTriggerESCRIPTscn MS16AmbushTriggerESCRIPT BEGIN OnTriggerEnter PlayerREF if Vault101Security09REF.getDead == 0 Vault101Security09REF.moveto MS16AmbushPointE endif END
671MS16AtriumSecuritySCRIPTscn MS16AtriumSecuritySCRIPT BEGIN OnActivate if (MS16.AtriumDone == 1) activate player endif END
672MS16DoorCloseTriggerSCRIPTscn MS16DoorCloseTriggerSCRIPT BEGIN OnTriggerEnter FreddieGomezREF if MS16RebelSceneDoor.getOpenState < 3 MS16RebelSceneDoor.activate FreddieGomezREF endif END
673MS16finSCRIPTscn MS16finSCRIPT ;set variables for Vault101 post-MS16 dialogue short Chaos ;If the player failed MS16, set this to 1 - they aren't wanted in the vault, and everyone is in chaos.
674MS16scriptscn MS16script ;Other MS16 scripts used: ;DemoVaultExitScript - for ending the quest after leaving the vault at stage 190 ;MS16DetonatorScript - for the MS16Detonator and sealing the vault at stage 170 ;MS16TerminalScript - for the maintenance terminal and destroying the water chip at stage 80 ;MS16Vault101ControlPodScript - for opening and closing the vault 101 door from the outside ;Set script variables short Begin1 ;Checks whether or not the quest's radio messages from Amata have begun - should begin 14 days after player ends CG04: 0 = no, 1 = yes short GomezGreet ;Checks whether or not Officer Gomez has greeted the player at their return to the vault: 0 = no, 1 = yes. short AmataGreet ;Checks whether or not Amata has greeted the player after returning to the vault: 0 = no, 1 = yes. short OverseerKilled ;Checks whether or not the player has killed the Overseer during this quest. 0 = no, 1 = yes. short AmataKilled ;Checks whether or not the player has killed Amata during the quest. 0 = no, 1 = yes. short PastOpening ;Checks whether or not the player has heard that the vault had been opened before: 0 = no, 1 = heard of it but not understood, 2 = had it explained short ChallengeNumber ;Used when a single NPC has multiple speech challenges, differentiates between which challenge is being used. always reset to 0 after each response short Amnesty ;Checks whether or not the player has been granted amnesty to travel in the vault: 0 = not tried, 1 = granted, 2 = tried and failed. short Finish ;Checks whether the player has left Vault 101 permanently of his own volition, was banned, or has evacuated. 0 = not set, 1 = leaving voluntarily, 2 = banned by Amata, 3 = banned by the Overseer, 4 = evacuating, 5 = vault in chaos and quest failed short SealVault ;Checks whether or not the player has heard the option to seal the vault. 0 = no, 1 = yes. short VaultHatred ;Checks whether ot not the player has admitted to poisoning the vault, and will be used with postMS16OutsideVault. 0 = not known or not done, 1 = known short Evacuate ;Checks whether or not NPCs in Vault 101 have been told to evacuate. 0 = no, or no need to evacuate, 1 = told to evacuate, and waiting outside for more info, 2 = evacuated and moving on to new locations short AllenOverseer ;Checks whether or not Allen Mack is the new Overseer, if the Overseer was killed in CG04. 0 = no, 1 = yes. short TalkedToRebels ;Checks if the player has talked to the Rebels yet in MS16. 0 = no, 1 = yes short TalkedToStatusQuo ;Checks if the player has talked to the defenders of the Status Quo yet in MS16. 0 = no, 1 = yes short DoorOpen ;Checks the state of the door. 0 = closed, 1 = open short AndyDoctor ;dialogue check for Andy being a doctor short BrotchFree ;Checks for Brotch being jailed, or being free to return to rebels. 0 = jailed, 1 = free short AmataLeaving ;Is Amata supposed to leave the Vault forever now? 0 = no, 1 = yes short EnclaveContact ;Does the player know the Overseer has been contacted by the Enclave? short AttackPlan ;Does the player know that Security is planning a raid of the rebels? short AmataAnger ;Was the player exiled in anger? If so, people will not say goodbye as pleasantly when the player leaves. ;Atrium Scene Variables short AtriumInit ;a DoOnce variable short AtriumScene ;0 = Atrium scene cued to happen, 1 = scene playing, 2 = scene ending short AtriumDistance ;Distance from MS16AtriumSceneStartMarker before scene begins ref AtriumStartMarker ;Atrium trigger marker: MS16AtriumSceneStartMarker short AtriumLine ;Checks which point the atrium dialogue should be at. 0 = begins, 1 - 5 = lines of dialogue, 6 = running, 7 = done short AtriumLineTotal ;Checks line total for Atrium Scene short AtriumDone ;Checks if the scene has finished short FreddieEscaped ;Checks if Freddie escaped short AtriumTalking ;Used to keep only one character talking at a time. short AtriumShooting ;Used to keep track of shooting: 0 = not shooting, 1 = shooting, 2 = done shooting short AtriumShot ;Tracks which shot Taylor is doing short AtriumShotTotal ;Tracks total number of shots short AtriumGomez ;Was Gomez (04 or 07) at the scene? short AtriumPostTalk ;If Gomez was there, has he talked to the player? 0 = no, 1 = yes BEGIN GameMode ;Begin the quest when the player finishes MQ05 if (Begin1 == 0 && getStage CG04 >= 200 && getStage MQ05 >= 200) setStage MS16 0 endif ;If the quest is active, check to see if both faction leaders are dead (Amata for rebels, Overseer or AllenMack for statusquo) if (getStage MS16 >= 20 && getStage MS16 < 200 && getStage MS16 != 180) if (AmataREF.getdead == 1) if (OverseerREF.getdead == 1 || AllenMackREF.getdead == 1) setStage MS16 200 endif endif endif ;Control of Atrium Scene ;If quest is active, prepare scene If (GetStageDone MS16 10 == 1 && AtriumDone == 0) if (AtriumScene == 0) if (AtriumInit == 0) set AtriumDistance to 1500 set AtriumStartMarker to MS16AtriumSceneStartMarker set AtriumLineTotal to 4 set AtriumShotTotal to 3 set AtriumInit to 1 endif ;Start scene when player approaches if player.getDistance AtriumStartMarker < AtriumDistance set AtriumScene to 1 ;setQuestDelay MS16 1 ;so combat responses are faster ;ShowWarning "Beginning" ;DEBUG if (Vault101Security04REF.getDistance player <= 1000) Vault101Security04REF.sayto player MS16AtriumSceneGomez 1 Vault101Security04REF.evp Vault101Security04REF.addscriptpackage MS16GomezWaitx2 elseif (Vault101Security07REF.getDistance player <= 1000) Vault101Security07REF.sayto player MS16AtriumSceneGomez 1 Vault101Security07REF.evp Vault101Security07REF.addscriptpackage MS16GomezWaitx2 endif endif endif ;When scene is active if AtriumScene == 1 ;If either side is in combat, resolve as combat (and make Freddie flee, if possible) if Vault101Security08REF.IsInCombat == 1 || FreddieGomezREF.IsInCombat == 1 set AtriumScene to 2 setQuestDelay MS16 1 set AtriumDone to 1 Vault101Security08REF.startcombat player FreddieGomezREF.AddScriptPackage MS16AtriumSceneFreddieEscape ;If dialogue is over, end scene elseif AtriumLine >= AtriumLineTotal set AtriumScene to 2 ;Otherwise, begin talking elseif AtriumTalking == 0 ;ShowWarning "Talk Start" ;DEBUG FreddieGomezREF.sayto Vault101Security08REF MS16AtriumScene1 1 set AtriumTalking to 1 endif endif ;Handle Taylor's shooting if AtriumShooting == 1 && AtriumScene == 2 if AtriumShot == 0 ;ShowWarning "Shooting Starts" ;DEBUG Vault101Security08REF.useWeapon weap10mmPistol MS16GuardShootFrom02REF MS16AtriumShotTarget01 1 0 0 1 1 FreddieGomezREF.evp set AtriumShot to AtriumShot+1 if (Vault101Security04REF.getDistance Vault101Security08REF <= 600) Vault101Security04REF.sayto Vault101Security08REF MS16AtriumSceneGomez2 1 set AtriumGomez to 1 ;elseif (Vault101Security07REF.getDistance Vault101Security08REF <= 600) ;Vault101Security07REF.sayto Vault101Security08REF MS16AtriumSceneGomez2 1 ;set AtriumGomez to 1 endif set AtriumShot to 3 set AtriumShooting to 2 ; elseif AtriumShot == 1 ; Vault101Security08REF.useWeapon weap10mmPistol MS16GuardShootFrom02REF MS16AtriumShotTarget02 1 0 0 1 1 ; if (Vault101Security04REF.getDistance Vault101Security08REF <= 600) ; Vault101Security04REF.sayto Vault101Security08REF MS16AtriumSceneGomez2 1 ; set AtriumGomez to 1 ; ;elseif (Vault101Security07REF.getDistance Vault101Security08REF <= 600) ; ;Vault101Security07REF.sayto Vault101Security08REF MS16AtriumSceneGomez2 1 ; ;set AtriumGomez to 1 ; endif ; set AtriumShot to AtriumShot+1 ; elseif AtriumShot == 2 ; Vault101Security08REF.useWeapon weap10mmPistol MS16GuardShootFrom02REF MS16AtriumShotTarget03 1 0 0 1 1 ; set AtriumShot to AtriumShot+1 ; elseif AtriumShot == 3 ; Set AtriumShooting to 2 endif endif ;When scene ends if AtriumScene == 2 && AtriumShooting == 2 && AtriumDone == 0 setQuestDelay MS16 0 set AtriumDone to 1 Vault101Security08REF.addscriptpackage MS16TaylorPostAtriumGreet ;Vault101Security04REF.addScriptPackage MS16GomezAtriumTalk ;Vault101Security07REF.addScriptPackage MS16GomezAtriumTalk endif ;End scene if either are dead if FreddieGomezREF.GetDead == 1 || Vault101Security08REF.GetDead == 1 set AtriumScene to 2 setQuestDelay MS16 0 set AtriumDone to 1 endif endif END
675MS16TerminalSCRIPTscn MS16TerminalSCRIPT ;set variables short WaterOff ;For tracking water chip services: 0 = active, 1 = inactive, 2 = broken short isDestructing ; 0 - Means destruction sequence is not running, 1 - Means destruction sequence is happening. short soundStage float destructionTimer ; This is how long the launch sequence happens. ;*************************** Begin onLoad set destructionTimer to 13 End ;*************************** Begin gameMode if isDestructing == 1 if (soundStage == 1) MS16WaterChipWarningLightBulbRef01.playgroup left 1 MS16WaterChipWarningLightBulbRef02.playgroup left 1 MS16WaterChipWarningLightBulbRef03.playgroup left 1 MS16WaterChipWarningLightBulbRef04.playgroup left 1 MS16WaterChipWarningLightBulbRef05.playgroup left 1 MS16WaterChipWarningLightBulbRef06.playgroup left 1 MS16WaterChipWarningLightBulbRef07.playgroup left 1 MS16WaterChipWarningLightBulbRef08.playgroup left 1 MS16WaterChipWarningLightBulbRef09.playgroup left 1 MS16WaterChipEngineShock01REF.disable MS16WaterChipEngineShock02REF.disable MS16WaterChipEngineShock03REF.disable set destructionTimer to 1 set soundStage to 2 endif if (soundStage == 2) if (destructionTimer < 0) MS16WaterChipWarningShock01REF.enable MS16WaterChipWarningShock02REF.enable MS16WaterChipWarningShock03REF.enable If (StanleyREF.GetDistance StanleyWorkMarker <= 200) StanleyREF.playIdle MTHitLegLeftC endif set destructionTimer to 2 set soundStage to 3 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 3) if (destructionTimer < 0) ;MS16WaterChipWarningNormLights03REF.disable set destructionTimer to .5 set soundStage to 4 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 4) if (destructionTimer < 0) MS16WaterChipExplosion02REF.placeatme FortCLaunchComputerExplosion 1 MS16WaterChipEngineSmoke02REF.enable MS16WaterChipGen02LightsREF.disable MS16WaterChipWarningShock02REF.disable If (StanleyREF.GetDistance StanleyWorkMarker <= 200) StanleyREF.playIdle MTHitLegRightC endif set destructionTimer to 1 set soundStage to 5 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 5) if (destructionTimer < 0) MS16WaterChipExplosion03REF.placeatme FortCLaunchComputerExplosion 1 MS16WaterChipEngineSmoke03REF.enable MS16WaterChipSmoke01REF.enable MS16WaterChipGen03LightsREF.disable If (StanleyREF.GetDistance StanleyWorkMarker <= 200) StanleyREF.kill stanleyref 1, 0 elseif (Stanley.GetInSameCell Player) StanleyREF.AddScriptPackage MS16StanleyFlee else StanleyREF.disable endif MS16WaterChipWarningShock03REF.disable set destructionTimer to 2 set soundStage to 6 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 6) if (destructionTimer < 0) ;MS16WaterChipWarningNormLights02REF.disable set destructionTimer to .5 set soundStage to 7 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 7) if (destructionTimer < 0) ;MS16WaterChipWarningNormLights01REF.disable MS16WaterChipExplosion01REF.placeatme FortCLaunchComputerExplosion 1 MS16WaterChipEngineSmoke01REF.enable MS16WaterChipGen01LightsREF.disable MS16WaterChipWarningShock01REF.disable set destructionTimer to 1 set soundStage to 8 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif if (soundStage == 8) if (destructionTimer < 0) set isDestructing to 0 set soundStage to 0 else set destructionTimer to (destructionTimer - GetSecondsPassed) endif endif endif End ;***************************
676MS16Vault101ControlPodScriptscn MS16Vault101ControlPodScript short mode ref doorRef begin onActivate ; if the player tries to activate if (IsActionRef player == 1 ) if (getStage MS16 < 10) ;message "You don't know the new entrance password." ShowMessage MS16Vault101ControlPodMsg elseif (mode == 1 && getStage MS16 >= 10 && getStage MS16 != 210 && getStage MS16 != 220) ;player has access to vault ;message "Password 'Amata' entered." ShowMessage MS16Vault101ControlPodMsg02 setstage MS16 20 playgroup Left 0 set mode to 2 set MS16.DoorOpen to 1 elseif (getStage MS16 == 210 || getStage MS16 == 220) ;message "You don't know the new entrance password." ShowMessage MS16Vault101ControlPodMsg elseif (mode == 2 && GetStage MS16 != 90 && GetStage MS16 != 190 && getStage MS16 != 210 && getStage MS16 != 220) set doorRef to GetLinkedRef doorRef.activate player ; if (MS16.DoorOpen == 1) ; set MS16.DoorOpen to 0 ; else ; set MS16.DoorOpen to 1 ; endif endif else if mode == 0 playgroup Forward 0 set mode to 1 endif endif end begin gameMode if (mode == 2) && (isAnimPlaying == 0) set mode to 3 set doorRef to GetLinkedRef doorRef.activate player endif end
677MS16VaultDoorCloseTrigScriptscn MS16VaultDoorCloseTrigScript short MS16doonce ref doorRef begin onTriggerEnter player ;Close the door if the player has been exiled from Vault 101 in MS16 if (getStage MS16 == 190) if MS16doonce == 0 set doorRef to GetLinkedRef doorRef.activate player set MS16doonce to 1 endif elseif (getStage MS16 == 90 && MS16.Finish > 0) ;Close door if player has voluntarily left if MS16doonce == 0 set doorRef to GetLinkedRef doorRef.activate player set MS16doonce to 1 endif endif ;During MS16, if the player is evacuating, has been exiled, or has pledged never to return, end the quest. if getStage MS16 == 90 || getStage MS16 == 180 || getStage MS16 == 190 if MS16.Finish == 2 || MS16.Finish == 3 setStage MS16 210 elseif MS16.Finish == 1 setStage MS16 215 elseif MS16.Finish == 4 setStage MS16 240 endif endif ;If the player has evacuated the Vault, close the door and end the quest. if (getStage MS16 == 180) if MS16doonce == 0 set doorRef to GetLinkedRef doorRef.activate player setstage MS16 240 set MS16doonce to 1 endif endif end
678MS17FinQuestScriptscn MS17FinQuestScript short DayPass ;This variable is used to measure when a day passes for Agatha's dialog short QuestOn ;This denotes that the subquest to get Agatha the paper is on short Violin ;1= Agatha is set to play a song for the player short DoOnce short ToldSold ;1= You told Agatha you sold the Soil Strad short GaveBack ;1= Gave the Violin back to Agatha short Rebuy ;1= Player bought the Violin back from Abe ;This is some minor handling for asking Agatha to play "live" violin begin gamemode if ( DoOnce == 0 ) if ( Violin == 2 ) AgathaRef.Say MS17FinViolinMusic Set DoOnce to 1 endif endif end
679MS17MainframeScriptscn MS17MainframeScript short Done short Button short Offload ;This script is upon the player's first activation of the Mainframe, asking if they want to download the information in it to their PIP Boy begin OnActivate if IsActionRef player == 1 if ( Offload == 0 ) ShowMessage MS17MainframeMessage endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( Offload == 0 ) if ( GetStage MS17 >= 10 ) SetStage MS17 30 endif ShowMap Vault106MapMarker ShowMap Vault108MapMarkerREF ShowMap Vault92MapMarkerREF ShowMap Vault87MapMarker Player.AddNote MS17VaultsNote Set Offload to 1 endif end
680MS17MasterbrainInternalScriptscn MS17MasterbrainInternalScript short Done short Button begin OnActivate if IsActionRef player == 1 if ( GetDead == 1 ) || ( MS17.Shutdown == 1 ) if ( Done == 0 ) Showmessage MS17MasterbrainInternalMessage else Activate endif endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 && Done == 0 ) Set MS17.RobotsOff to 1 ShowMessage MS17RobotsMessage Set Done to 1 endif end
681MS17QuestScriptscn MS17QuestScript short DoOnce short DoOnce1 short SoldViolin ;If the player elected to sell the Violin to a merch, this variable will be set. short VaultArrival ;Multi-purpose variable starts up defences in Vault 92 and Stage Update short AgathaAnger ;1= Agatha is angry enough to shut down dialog with player unless they find violin first short AmmoBox ;1= Agatha gives the player the key to the ammunition box short AgathaBadEnd ;1= Player Sold the Stradivarius to someone else... for post-quest short Masterbrain01 ;1= Command is issued to the Masterbrain to unlock Mainframe Room from Terminal 1 short Masterbrain02 ;1= Command is issued to the Masterbrain to unlock Mainframe Room from Terminal 2 short Masterbrain03 ;1= Command is issued to the Masterbrain to unlock Mainframe Room from Terminal 3 short MFLock01 ;1= Command is issued to unlock the Mainframe Room from Terminal 1 short MFLock02 ;1= Command is issued to unlock the Mainframe Room from Terminal 2 short MFLock03 ;1= Command is issued to unlock the Mainframe Room from Terminal 3 short Shutdown ;1= Masterbrain is Shutdown short DoorUnlock ;1= Door Unlocked to Mainframe short RobotsOff ;1= Kills all Mechanized Security on Admin Level short VaultTec ;1= Found VaultTec (Arrived there) just for objective changes short QuestInProgress ;1= Quest was offered. This is for dialog limitations. short Recording ;1= Recording Door Unlocked short SoldtoAbe ;1= Sold Violin to Abraham Washington short GaveViolin ;1= Violin was given to Agatha (to unlock certain Fin topics) short MetAgatha ;1= Used to track if Player ever met Agatha (for Fin quest use) short FoundVT ;1= Used to track if Player has previosuly visited VT HQ short MS17Good short MS17Bad begin gamemode ;These 2 blocks handle the arrival of the Player at Vault 92 ;If the Player skipped VTHQ (like he already knows its locale), this will clear the other Optional objectives if ( VaultArrival == 0 ) if ( Player.GetInCell Vault92 ) Set VaultArrival to 1 endif endif if ( FoundVT == 0 ) if ( Player.GetInCell VaultTecHQ01 == 1 ) Set FoundVT to 1 endif endif if ( DoOnce1 == 0 ) if ( VaultArrival == 1 ) if ( GetStage MS17>= 10 ) SetObjectiveCompleted MS17 20 1 SetObjectiveCompleted MS17 30 1 Set DoOnce1 to 1 endif endif endif ;This block handles the arrival at VTHQ by the Player, and switches objectives if necessary if ( VaultTec == 0 ) if ( GetStage MS17 >= 10 ) if ( Player.GetInCell VaultTecHQ01 == 1 ) if ( GetObjectiveDisplayed MS17 20 == 1 ) SetObjectiveCompleted MS17 20 1 endif SetObjectiveDisplayed MS17 30 1 Set VaultTec to 1 endif endif endif ;This block handles the Shutdown of the Masterbrain if the Player issues the command from the three SysOp Terminals if ( Shutdown == 0 ) if ( Masterbrain01 == 1 ) && ( Masterbrain02 == 1 ) && ( Masterbrain03 == 1 ) MS17MasterbrainRef.SetUnconscious 1 Set Shutdown to 1 endif endif ;This block handles the player shutting down the uplink on the Masterbrain. This will in turn shutdown all of the mechanized security in the building ;Each ref will be shutdown individually, such as the robots and the turrets if ( RobotsOff == 1 ) MS17Mech01Ref.SetUnconscious 1 MS17Mech02Ref.SetUnconscious 1 MS17Mech03Ref.SetUnconscious 1 MS17Mech04Ref.SetUnconscious 1 MS17Mech05Ref.SetUnconscious 1 MS17Mech06Ref.SetUnconscious 1 MS17Mech07Ref.SetUnconscious 1 MS17Mech08Ref.SetUnconscious 1 MS17Mech09Ref.SetUnconscious 1 MS17Mech10Ref.SetUnconscious 1 MS17Mech11Ref.SetUnconscious 1 MS17Mech12Ref.SetUnconscious 1 MS17Mech13Ref.SetUnconscious 1 MS17Mech14Ref.SetUnconscious 1 MS17Mech15Ref.SetUnconscious 1 MS17Mech16Ref.SetUnconscious 1 set RobotsOff to 2 endif ;This block handles unlocking the Mainframe Access Door via the terminals. Once it is approved in all 3 places, the door unlocks ;This also enables a light outside the door, showing that the mainframe is unlocked. if ( DoorUnlock == 0 ) if ( MFLock01 == 1 ) && ( MFLock02 == 1 ) && ( MFLock03 == 1 ) MS17MainframeAccessDoor.Unlock MS17MainframeClosed.Disable MS17MainframeOpen.Enable set DoorUnlock to 1 endif endif end
682MS17RadioScriptscn MS17RadioScript short AlreadyPlayed x=The song has already been played, so don't play it again in a row short AlreadySaid x=The line has already been said, so don't play it again in a row short Debug
683MS17SoilStradCaseScriptscn MS17SoilStradCaseScript begin OnAdd Player if ( GetStage MS17 >= 10 ) && ( GetDeadCount Agatha == 0 ) setstage MS17 50 elseif ( GetStage MS17 >= 10 ) && ( GetDeadCount Agatha == 1 ) SetObjectiveCompleted MS17 10 1 SetObjectiveCompleted MS17 20 1 SetObjectiveCompleted MS17 30 1 SetObjectiveDisplayed MS17 60 1 else Return endif end
684MS18AlternateQuestTriggerScriptscn MS18AlternateQuestTriggerScript begin OnTriggerEnter Player if ( GetStage MS18 < 10 ) if ( GetObjectiveDisplayed MS18 5 == 1 ) setObjectiveDisplayed MS18 5 0 SetObjectiveDisplayed MS18 20 1 endif endif end
685MS18BrickScriptscn MS18BrickScript short DoOnce1 short Factionset begin OnHit Player if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) if ( MS18RangersHate == 0 ) set MS18RangersHate to 1 endif endif end begin OnDeath if ( DoOnce1 == 0 ) Set MS18.BrickDead to 1 Set DoOnce1 to 1 endif ;This is an OnDeath check that will override the Combat check if the Player has the capability of slaying the target in less than the amount of friendly fire hits if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) set MS18RangersHate to 1 endif end begin gamemode ;This is a trio of handler blocks if the Player elects to attack a Ranger at any time ;This fails the quest and makes the Rangers hostile (depending on where they are of course) if ( MS18RangersHate == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS18RangersHate to 1 endif endif endif if ( MS18RangersHate >= 1 ) if ( Factionset == 0 ) SetEnemy ReillysRangersFaction PlayerFaction setAV Aggression 2 EVP set Factionset to 1 endif if ( GetStage MS18 < 10 ) StopQuest MS18 Set MS18RangersHate to 2 elseif ( GetStage MS18 >= 10 ) && ( GetStage MS18 < 100 ) SetStage MS18 150 Set MS18RangersHate to 2 else Set MS18RangersHate to 2 endif endif end
686MS18ButcherScriptscn MS18ButcherScript ;This script is used to determine when the Ranger reaches the Ambush spot short DoOnce1 short DoOnce2 short BeginMedicalServices short Final short Factionset float Timer begin OnHit Player if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) if ( MS18RangersHate == 0 ) set MS18RangersHate to 1 endif endif end begin OnDeath if ( DoOnce1 == 0 ) Set MS18.ButcherDead to 1 Set DoOnce1 to 1 endif ;This is an OnDeath check that will override the Combat check if the Player has the capability of slaying the target in less than the amount of friendly fire hits if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) set MS18RangersHate to 1 endif end begin gamemode ;This series of blocks handles the medical use on the player when healing is needed. ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 1 ) if ( DoOnce2== 0 ) disablePlayerControls set Timer to 8 set DoOnce2 to 1 resetai endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce2 == 1 ) IMod FadeToBlackISFX set DoOnce2 to 2 endif if ( Timer <= 0 ) setstage Doctors 10 enablePlayerControls SetAv Variable01 3 resetai Set DoOnce2 to 0 endif endif ;This is a trio of handler blocks if the Player elects to attack a Ranger at any time ;This fails the quest and makes the Rangers hostile (depending on where they are of course) if ( MS18RangersHate == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) ; set Factionset to 1 set MS18RangersHate to 1 endif endif endif if ( MS18RangersHate >= 1 ) if ( Factionset == 0 ) SetEnemy ReillysRangersFaction PlayerFaction setAV Aggression 2 EVP set Factionset to 1 endif if ( GetStage MS18 < 10 ) StopQuest MS18 Set MS18RangersHate to 2 elseif ( GetStage MS18 >= 10 ) && ( GetStage MS18 < 100 ) SetStage MS18 150 Set MS18RangersHate to 2 elseif ( GetStage MS18 == 100 ) Set MS18RangersHate to 2 endif endif end
687MS18DonovanScriptscn MS18DonovanScript ;This script on Donovan of Reilly's Rangers handles fixing the elevator door short DoOnce short DoOnce3 short Final short Factionset begin gamemode if ( DoOnce == 0 ) if ( MS18.DonCell == 1 ) ;Flag is set when Donovan is given Power Cell by player in dialog Evp ;Evp him so he'll do his package Set DoOnce to 1 endif endif ;This is a trio of handler blocks if the Player elects to attack a Ranger at any time ;This fails the quest and makes the Rangers hostile (depending on where they are of course) if ( MS18RangersHate == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS18RangersHate to 1 endif endif endif if ( MS18RangersHate >= 1 ) if ( Factionset == 0 ) SetEnemy ReillysRangersFaction PlayerFaction setAV Aggression 2 EVP set Factionset to 1 endif if ( GetStage MS18 < 10 ) StopQuest MS18 Set MS18RangersHate to 2 elseif ( GetStage MS18 >= 10 ) && ( GetStage MS18 < 100 ) SetStage MS18 150 Set MS18RangersHate to 2 elseif ( GetStage MS18 == 100 ) Set MS18RangersHate to 2 endif endif end begin OnHit Player if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) if ( MS18RangersHate == 0 ) set MS18RangersHate to 1 endif endif end begin OnDeath if ( DoOnce3 == 0 ) Set MS18.DonDead to 1 Set DoOnce3 to 1 endif ;This is an OnDeath check that will override the Combat check if the Player has the capability of slaying the target in less than the amount of friendly fire hits if ( GetStage MS18 < 40 ) || ( GetStage MS18 >= 50 ) if GetInCell zDCint12RangerCompound == 0 && GetStageDone FFEUniqueB 56 == 1 ; do nothing -- Donovan is out on random encounter else set MS18RangersHate to 1 endif endif end
688MS18ElevatorRoofPanelScriptscn MS18ElevatorRoofPanelScript short Button short CheckButtonPress ;This is the script covering the player repairing the elevator on the roof of the Statesman Hotel ;The player has to have Repair Skill of 75% or greater and a Fission Battery to get it up and running otherwise give it to Donovan (if he's alive) begin OnActivate if IsActionRef player == 1 if ( MS18.Fixed == 0 ) if ( Player.GetItemCount FissionBattery >= 1 ) if ( Player.GetAV Repair >= 75 ) || ( Player.GetItemCount MS18DonovansWrench >= 1 ) ShowMessage MS18ElevatorRoofMessage Set CheckButtonPress to 1 elseif ( Player.GetAV Repair < 75 ) || ( Player.GetItemCount MS18DonovansWrench == 0 ) if ( GetDeadCount RRDonovan == 0 ) ShowMessage MS18ElevatorRoofMessageNoRepair elseif ( GetDeadCount RRDonovan >= 1 ) ShowMessage MS18ElevatorRoofMessageNoRepairDonDead endif endif elseif ( Player.GetItemCount FissionBattery == 0 ) ShowMessage MS18ElevatorRoofMessageNoBatt endif else ShowMessage MS18RoofElevatorPanelFixed endif endif end begin gamemode set Button to GetButtonPressed if ( Button == 0 ) && ( CheckButtonPress == 1 ) StatesmanHotel01toStatesmanRoofREF.SetMinimalUse 0 set MS18.Fixed to 1 MS18PanelRef.Playgroup Forward 1 Playsound3D AMBElevatorMonumentPowerUp SetStage MS18 40 Set MS18.AllMove to 1 DonovanRef.Evp ButcherRef.Evp BrickRef.Evp set CheckButtonPress to 0 if ( Player.GetAV Repair >= 75 ) RewardXP 50 endif endif end
689MS18FinQuestScriptscn MS18FinQuestScript short Mission ;1= Player is undergoing a mission for Reilly short Mappers ;1= This variable increases by 1 each time the player is given a replacement mapper after the first short LastFound ;1= This is the count of locations discovered from the previous time (for calculations) short Found ;1= This is the master overall count of locations discovered which will be pulled from the Misc Stat short Count ;1= This is the amount of locations discovered the player will be paid for this time around short Cash ;1= This is the cash in caps the player will get when turning in locations discovered short Go ;1= Starts the calculation, resets the variable, etc. short DataAvailable ;1= Lets the system know that player has new data begin gamemode if ( Go == 1 ) ; Set Found to GetPCMiscStat "Locations Discovered" ;Take new master count from the Misc Stat ; Set Count to ( Found - LastFound ) ;Subtract the new master count from the last one ; Set Cash to ( Count * 30 ) ;Multiply the difference by 30 Player.AddItem Caps001 Cash ;Award 30 caps per location discovered ; Set Found to LastFound ;The old total of locations discovered is now stored Set Count to 0 ;Reset variable Set Cash to 0 ;Reset variable Set Found to 0 ;Reset variable Set DataAvailable to 0 ;Reset variable SetQuestDelay MS18Fin 0 Set Go to 0 ;Reset variable endif if ( DataAvailable == 0 ) if ( Player.GetInCell zDCint12RangerCompound == 1 ) if ( LastFound < GetPCMiscStat "Locations Discovered" ) set DataAvailable to 1 endif endif endif end
690MS18FinTriggerScriptscn MS18FinTriggerScript begin OnTriggerEnter Player if ( GetStage MS18 >= 50 ) BrickRef.Enable ButcherRef.Enable DonovanRef.Enable BrickRef.Evp ButcherRef.Evp DonovanRef.Evp endif end
691MS18MutantAmbush01SCRIPTscn MS18MutantAmbush01SCRIPT short doOnce Begin OnDeath if (doOnce == 0) set MS18.AmbushCounter to MS18.AmbushCounter + 1 set doOnce to 1 endif End
692MS18MutantAmbush02SCRIPTscn MS18MutantAmbush02SCRIPT short doOnce Begin OnDeath if (doOnce == 0) set MS18.AmbushCounter to MS18.AmbushCounter + 1 set doOnce to 1 endif End
693MS18MutantAmbush03SCRIPTscn MS18MutantAmbush03SCRIPT short doOnce Begin OnDeath if (doOnce == 0) set MS18.AmbushCounter to MS18.AmbushCounter + 1 set doOnce to 1 endif End
694MS18MutantAmbush04SCRIPTscn MS18MutantAmbush04SCRIPT short doOnce Begin OnDeath if (doOnce == 0) set MS18.AmbushCounter to MS18.AmbushCounter + 1 set doOnce to 1 endif End
695MS18QuestScriptscn MS18QuestScript short TalkedBarrows ;When this flag is set to 1, the player may attempt to awaken Reilly with proper skill short ReillyNeg ;When flag is set to 1, Reilly is angry at player (for dialog) short ProposalDone ;When flag is set to 1, Reilly is primed for proposal (for dialog) short BarrowsActive ;When flag is set to 1, Doc Barrows will forcegreet Player after activating Reilly short DonCell ;When flag is set to 1, Donovan has the Cell and kicks off his repair package short RoofReady ;When flag is set to 1, the Rangers on the roof of the hotel get ready for player short AllMove ;When flag is set to 1, the Rangers on the roof move through elevator to ambush markers short Ambush ;Each time a Ranger gets to a given X-Marker it adds 1 to this flag. At 3, the ambush begins (when player in range) short ButcherTalk ;When flag is set to 1, Butcher will enter into a Dialog package at the conclusion of the Ambush short ButcherDead ;When flag is set to 1, Butcher has died short DonDead ;When flag is set to 1, Donovan has died short BrickDead ;When flag is set to 1, Brick has died short EndEarly ;When flag is set to 1, the quest has terminated early because all the Rangers have died short AmbushCounter ;Each time an Ambush Mutant is killed it adds 1 to this flag. At 5, the Ambush has ended and all Mutants have been killed. short DocRevive ;Kicks off Doc Barrow's AI package to revive Reilly short AltReward ;1=If the player selected an alternate reward (other than armor) short EndAIButcher ;1=A condition limiter for AI packages on Butcher short EndAIBrick ;1=A condition limiter for AI packages on Brick short EndAIDonovan ;1=A condition limiter for AI packages on Donovan short EquipCheck ;1=Player has entered Ranger Compound short Sidearm ;1=Equip all of the Rangers with Pistols on the fly short Order ;1=Player started the quest at the Rangers short Fixed ;1= Elevator on roof has been repaired short DoneWalk ;1= Doc Barrows has completed his travel to Reilly short Waypoint ;1= Quest Target assistance short Battery ;1= Player has one or more batteries short DonFixed ;1= Donovan fixed the elevator short DeadMode ;1= All Rangers Killed handling for Hostile short AmmoGivenBrick ;1= Loaded with ammo short AmmoGivenButcher ;1= Loaded with ammo short AmmoGivenDon ;1= Loaded with ammo float FixitTimer ;x= Delay for Donovan's Fixing Animation short MS18Good short MS18Bad ;1= All rangers dead begin gamemode ;This block handles if the Rangers are all killed early if ( EndEarly == 0 ) if ( ButcherDead == 1 ) && ( DonDead == 1 ) && ( BrickDead == 1 ) ;All Rangers are dead ShowMessage MS18RangersDeadMsg ;Make a message box SetStage MS18 50 ;Set Player to immediately return to Reilly SetObjectiveDisplayed MS18 5 0 SetObjectiveDisplayed MS18 20 0 SetObjectiveDisplayed MS18 25 0 SetObjectiveDisplayed MS18 28 0 SetObjectiveDisplayed MS18 30 0 SetObjectiveDisplayed MS18 40 0 set EndEarly to 1 ;Set Flag endif endif ;This block will handle Fission Battery pickup if ( Battery == 0 ) if ( GetStage MS18 >= 30 ) if ( Player.GetItemCount FissionBattery >= 1 ) SetObjectiveCompleted MS18 25 1 SetObjectiveDisplayed MS18 28 1 Set Battery to 1 endif endif endif ;This block will equip the Rangers with Sidearms when the flag is set if ( Sidearm == 1 ) if ( GetStage MS18 >= 30 ) BrickRef.AddItemHealthPercent Weap10mmPistol 1 .6 BrickRef.AddItem Ammo10mm 10 DonovanRef.AddItemHealthPercent Weap10mmPistol 1 .5 DonovanRef.AddItem Ammo10mm 10 ButcherRef.AddItem Ammo44magnum 10 ButcherRef.AddItemHealthPercent Weap44MagnumScoped 1 .5 Set Sidearm to 2 endif endif ;This block handles the triggering of Stage 20 if ( GetStage MS18 == 10 ) if ( Player.GetInCell OurLadyHope01 ) SetStage MS18 20 endif endif ;This block advances the quest once the Ambush Counter reaches 5 if ( AmbushCounter == 5 ) ;5 Mutants have been slain SetStage MS18 50 Set AmbushCounter to 6 endif ;This block is an emergency override for Butcher, in case player misses his Dialog Package if ( ButcherTalk == 2 ) if ( GetStage MS18 >= 50 ) if ( Player.GetInCell StatesmanHotel01 == 0 ) ButcherRef.Disable ButcherRef.Moveto MS18FinButcherRef Set MS18.EndAIButcher to 1 Set MS18.ButcherTalk to 3 endif endif endif ;This block is the timer for Donovan's fixing animation if ( DonCell == 2 ) && Fixed == 0 if ( FixitTimer > 0 ) Set FixitTimer to ( FixitTimer - GetSecondsPassed ) else set Fixed to 1 MS18PanelRef.Playgroup Forward 1 Playsound3D AMBElevatorMonumentPowerUp SetStage MS18 40 Set AllMove to 1 DonovanRef.Evp ButcherRef.Evp BrickRef.Evp endif endif ;This block is a bit of handling if the Player kills Reilly before taking the quest or before getting to the location if ( DeadMode == 1 ) BrickRef.Kill DonovanRef.Kill ButcherRef.Kill Set DeadMode to 2 endif ;This block clears the gearing up Objective if the Player goes to Ranger Compound before entering the Statesman ;If the Player gets to the Statesman Hotel and Speaks to Butcher without having done the Objective, remove it if ( EquipCheck == 0 ) if ( GetStage MS18 < 30 ) if ( Player.GetInCell zDCint12RangerCompound == 1 ) SetObjectiveCompleted MS18 12 1 Set EquipCheck to 1 endif elseif ( GetStage MS18 >= 30 ) if ( GetObjectiveCompleted MS18 12 == 0 ) SetObjectiveDisplayed MS18 12 0 Set EquipCheck to 1 endif endif endif end
696MS18RadioQuestScriptscn MS18RadioQuestScript short Spoke ;1= kicks off the timer when a broadcast is complete short Shutdown ;1= completely shutdown the broadcasts float RadioTimer ;x= the amount of time that has gone by between broadcasts begin gamemode if ( Shutdown == 0 ) if ( Spoke == 1 ) MS18RadioRef.SetBroadcastState 0 set RadioTimer to 120 set Spoke to 2 endif endif if ( Spoke == 2 ) if ( RadioTimer > 0 ) set RadioTimer to ( RadioTimer - GetSecondsPassed ) else MS18RadioRef.StartRadioConversation set Spoke to 0 endif endif if ( Shutdown == 1 ) MS18RadioRef.Disable set Shutdown to 2 endif end
697MS18ReillyScriptscn MS18ReillyScript ;This script is on RRReilly (Reilly of Reilly's Rangers) ;It handles when she is in her coma state and when she awakens ; GetRestrained and GetUnconscious conflict which ever is called last, resets the other one. ; Currently GetRestrained is commented out at unnecessary. If it turns out to be important, ; the code will have to be altered to make sure these two commands no longer conflict. short WakeComa ;When this flag is set to 1, Reilly is out of her coma short Final short Coma short DoOnce short DoOnce1 short Button short CheckButtonPress short Factionset Begin OnLoad If Coma == 0 SetUnconscious 1 EndIf End begin OnActivate if ( WakeComa == 0 ) if IsActionRef player == 1 ; clear button press variable Set CheckButtonPress to 0 if ( MS18.TalkedBarrows == 0 ) ShowMessage MS18ReillyComaMsg Set MS18.BarrowsActive to 1 elseif ( MS18.TalkedBarrows == 1 ) if ( Player.GetAv Medicine < 60 ) ShowMessage MS18ReillyLowSkillMsg elseif ( Player.GetAv Medicine >= 60 ) Set CheckButtonPress to 1 ShowMessage MS18ReillyHighSkillMsg endif endif endif else Activate endif end begin gamemode ;These blocks handle Reilly's state. The first block is her initial state (so nothing will wake her) ;The second block hits after she is awakened by medical skill or doctor if CheckButtonPress == 1 set Button to GetButtonPressed if ( Button == 0 ) SetUnconscious 0 Set Coma to 1 DamageAV LeftMobilityCondition 100 DamageAV RightMobilityCondition 100 Evp Set WakeComa to 1 Set CheckButtonPress to 0 endif endif ;This is a trio of handler blocks if the Player elects to attack a Ranger at any time ;This fails the quest and makes the Rangers hostile (depending on where they are of course) if ( MS18RangersHate == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) set MS18RangersHate to 1 endif endif endif if ( MS18RangersHate >= 1 ) if ( Factionset == 0 ) SetEnemy ReillysRangersFaction PlayerFaction setAV Aggression 2 EVP set Factionset to 1 endif if ( GetStage MS18 < 10 ) StopQuest MS18 Set MS18RangersHate to 2 elseif ( GetStage MS18 >= 10 ) && ( GetStage MS18 < 100 ) SetStage MS18 150 Set MS18RangersHate to 2 elseif ( GetStage MS18 == 100 ) Set MS18RangersHate to 2 endif endif end ;This is an OnDeath check that will override the Combat check if the Player has the capability of slaying the target in less than the amount of friendly fire hits begin OnDeath set MS18RangersHate to 1 if ( WakeComa == 0 ) set Coma to 1 set WakeComa to 1 setUnconscious 0 endif end
698MS18RoofElevatorDoorsScriptscn MS18RoofElevatorDoorsScript ;This is the script for the express elevator doors on the roof of the Statesman Hotel ;The doors can only be accessed after the panel is fixed (MS18ElevatorRoofPanelScript) begin OnActivate if ( MS18.Fixed == 0 ) if IsActionRef player == 1 ShowMessage MS18RoofElevatorMessageBroken endif elseif ( MS18.Fixed == 1 ) Activate endif end
699MS18RoofTriggerScriptscn MS18RoofTriggerScript ;This script prepares the Rangers for the player's arrival short DoOnce begin OnTriggerEnter Player if ( DoOnce == 0 ) ButcherRef.equipitem Weap10mmSubmachineGun DonovanRef.equipitem WeapChineseAssaultRifle BrickRef.equipitem WeapUniqueMS18Minigun Set MS18.RoofReady to 1 Set MS18Radio.Shutdown to 1 ButcherRef.Evp Set DoOnce to 1 endif end
700MS18SpineBreakerGuard01SCRIPTscn MS18SpineBreakerGuard01SCRIPT short doOnce Begin OnDeath if (doOnce == 0) set MS18.AmbushCounter to MS18.AmbushCounter + 1 set doOnce to 1 endif End
701MS18Statesman02ElevatorDoorSCRIPTscn MS18Statesman02ElevatorDoorSCRIPT Begin onActivate if StatesmanHotel02ElevatorPanelREF.elevatorRepaired == 1 || StatesmanHotel03ElevatorPanelREF.elevatorRepaired == 1 Activate else if IsActionRef player == 1 ShowMessage StatesmanHotel02ElevatorBrokenMsg endif endif End
702MS18Statesman02ElevatorPanelSCRIPTscn MS18Statesman02ElevatorPanelSCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short elevatorRepaired ; 1 = elevator has been repaired short repairAttempt ; 0 = default 1 = PC wants to try and repair the elevator short skillNeeded ; repair skill needed to rapair the elevator short button ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin onLoad if skillNeeded == 0 set skillNeeded to 35 endif End ;************************************************ Begin onActivate if elevatorRepaired == 0 && StatesmanHotel03ElevatorPanelREF.elevatorRepaired == 0 if IsActionRef player == 1 if player.GetAv Repair < skillNeeded ShowMessage StatesmanHotel02ElevatorLowSkillMsg skillNeeded endif if player.GetAv Repair >= skillNeeded ShowMessage StatesmanHotel02ElevatorSkillMsg set repairAttempt to 1 ; set up to repair endif endif endif End ;************************************************ Begin gameMode if repairAttempt == 1 ; procedure for repairing the elevator set repairAttempt to 0 set button to getbuttonpressed if button > -1 if button == 0 ShowMessage StatesmanHotel02ElevatorRepairMsg set elevatorRepaired to 1 ; elevator has been repaired StatesmanHotel02ElevatorLight01REF.enable ;enable both elevator lights as well as disable the off nifs and enable the on nifs StatesmanHotel03ElevatorLight01REF.enable StatesmanHotel02ElevatorLightOffREF.disable StatesmanHotel03ElevatorLightOffREF.disable StatesmanHotel02ElevatorLightOnREF.enable StatesmanHotel03ElevatorLightOnREF.enable elseif button == 1 ; don't do anything endif endif endif End
703MS18Statesman03Door01SCRIPTscn MS18Statesman03Door01SCRIPT float timer short doorOpened Begin onActivate if IsActionRef MS18Statesman03Terminal01REF == 1 if doorOpened == 0 setopenstate 1 ;open the door set timer to 60 set doorOpened to 1 elseif doorOpened == 1 set timer to 60 ;reset timer if player activates the door from the terminal again endif elseif IsActionRef player == 1 ;message "This door is activated elsewhere." ShowMessage GenericDoorActivatedElsewhereMsg endif End Begin gameMode if doorOpened == 1 if timer > 0 set timer to timer - GetSecondsPassed else setopenstate 0 ;close door set doorOpened to 0 endif endif End
704MS18Statesman03ElevatorDoorSCRIPTscn MS18Statesman03ElevatorDoorSCRIPT Begin onActivate if StatesmanHotel03ElevatorPanelREF.elevatorRepaired == 1 || StatesmanHotel02ElevatorPanelREF.elevatorRepaired == 1 Activate else if IsActionRef player == 1 ShowMessage StatesmanHotel02ElevatorBrokenMsg endif endif End
705MS18Statesman03ElevatorPanelSCRIPTscn MS18Statesman03ElevatorPanelSCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short elevatorRepaired ; 1 = elevator has been repaired short repairAttempt ; 0 = default 1 = PC wants to try and repair the elevator short skillNeeded ; repair skill needed to rapair the elevator short button ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin onLoad if skillNeeded == 0 set skillNeeded to 35 endif End ;************************************************ Begin onActivate if elevatorRepaired == 0 && StatesmanHotel02ElevatorPanelREF.elevatorRepaired == 0 if IsActionRef player == 1 if player.GetAv Repair < skillNeeded ShowMessage StatesmanHotel02ElevatorLowSkillMsg skillNeeded endif if player.GetAv Repair >= skillNeeded ShowMessage StatesmanHotel02ElevatorSkillMsg set repairAttempt to 1 ; set up to repair endif endif endif End ;************************************************ Begin gameMode if repairAttempt == 1 ; procedure for repairing the elevator set repairAttempt to 0 set button to getbuttonpressed if button > -1 if button == 0 ShowMessage StatesmanHotel02ElevatorRepairMsg set elevatorRepaired to 1 ; elevator has been repaired StatesmanHotel02ElevatorLight01REF.enable ;enable both elevator lights as well as disable the off nifs and enable the on nifs StatesmanHotel03ElevatorLight01REF.enable StatesmanHotel02ElevatorLightOffREF.disable StatesmanHotel03ElevatorLightOffREF.disable StatesmanHotel02ElevatorLightOnREF.enable StatesmanHotel03ElevatorLightOnREF.enable elseif button == 1 ; don't do anything endif endif endif End
706MS18StatesmanRoofElevatorDoorScriptscn MS18StatesmanRoofElevatorDoorScript ;This is the activation script for the Statesman Hotel roof doors ;The only way to make these doors accessable is by fixing the panel begin OnActivate if ( MS18.Fixed == 0 ) if IsActionRef player == 1 ShowMessage MS18StatesmanRoofElevatorDoorMessage endif elseif ( MS18.Fixed == 1 ) Activate endif end
707MS18StatesmanRoofElevatorDoorScriptBottomscn MS18StatesmanRoofElevatorDoorScriptBottom ;This handles the door at the bottom of the express elevator shaft in the Statesman begin OnActivate if ( MS18.Fixed == 0 ) if IsActionRef player == 1 ShowMessage MS18ElevatorDoorsMessageBottom endif elseif ( MS18.Fixed == 1 ) Activate endif end
708MS18TheosAmmoBoxScriptscn MS18TheosAmmoBoxScript short Open ;1= Code has been entered and ammo box is now unlocked ;This script handles the ammo box if the player has Reilly's code or if it is encountered ;At this time, it is unknown if we will allow hacking on it begin OnActivate if IsActionRef player == 1 if ( Open == 0 ) if ( Player.GetHasNote MS18AmmoBoxNote ) ;Messagebox "You use Reilly's code to open the ammo box." ShowMessage MS18TheosAmmoBoxUnlockMsg Activate SetObjectiveCompleted MS18 15 1 Set Open to 1 else ;Messagebox "The ammo box seems to be code locked." ShowMessage MS18TheosAmmoBoxLockedMsg endif elseif ( Open == 1 ) Activate endif endif end
709MS18TheoScriptscn MS18TheoScript short Kaboom begin OnLoad if ( Kaboom == 0 ) MS18TheoRef.Kill MS18TheoRef 1 MS18TheoRef.Kill MS18TheoRef 3 MS18TheoRef.Kill MS18TheoRef 5 MS18TheoRef.Kill MS18TheoRef 7 MS18TheoRef.Kill MS18TheoRef 9 Set Kaboom to 1 endif end
710MS18WaypointDoor01bScriptscn MS18WaypointDoor01bScript begin OnActivate if IsActionRef player == 1 if ( MS18.Waypoint == 1 ) Set MS18.Waypoint to 0 endif endif activate end
711MS18WaypointDoor01Scriptscn MS18WaypointDoor01Script begin OnActivate if IsActionRef player == 1 if ( MS18.Waypoint == 0 ) Set MS18.Waypoint to 1 endif endif Activate end
712MS18WaypointDoor02bScriptscn MS18WaypointDoor02bScript ;this is on the door in Statesman02 that leads out to VernonSquare begin OnActivate if IsActionRef player == 1 if ( MS18.Waypoint == 2 ) Set MS18.Waypoint to 1 endif endif Activate end
713MS18WaypointDoor02Scriptscn MS18WaypointDoor02Script begin OnActivate if IsActionRef player == 1 if ( MS18.Waypoint == 1 ) Set MS18.Waypoint to 2 endif endif Activate end
714MuseumTech01TalkerSCRIPTscn MuseumTech01TalkerSCRIPT ;This script allows the player to be able to activate the "interactive" near the display after the dialog has finished ;************************************************ Begin SayToDone MQ02MuseumVault05 set MQ02Tour05DisplayButton.doOnce to 0 MuseumTech01Display01EnablerREF.disable MQ02Tour05DisplayButton.activate End ;************************************************ Begin SayToDone MQ02MuseumVault06 set MQ02Tour06DisplayButton.doOnce to 0 MuseumTech01Display02EnablerREF.disable MQ02Tour06DisplayButton.activate End ;************************************************ Begin SayToDone MQ02MuseumVault07 set MQ02Tour07DisplayButton.doOnce to 0 MuseumTech01Display03EnablerREF.disable MQ02Tour07DisplayButton.activate End ;************************************************
715MuseumTech01TourDoorSCRIPTscn MuseumTech01TourDoorSCRIPT ; checks the state of the door and either opens or closes it ref myLink Begin onTriggerEnter set myLink to getLinkedRef myLink.setOpenState 1 End Begin onTriggerLeave set myLink to getLinkedRef myLink.setOpenState 0 End
716MuseumTech03ProjectorSCRIPTscn MuseumTech03ProjectorSCRIPT float timer short projectorState short showStopped short doOnce short Talk ;******************************************* Begin onLoad set showStopped to 1 MQ02MuseumPlanetariumSkyDome01aREF.disable 1 MQ02MuseumPlanetariumSkyDome02aREF.disable 1 MQ02MuseumPlanetariumSkyDome03aREF.disable 1 MuseumPlanetariumGlow01REF.disable 1 MQ02PlanetariumOffLight01REF.enable 0 MQ02PlanetariumOnLight01REF.disable set doOnce to 1 End ;******************************************* Begin gameMode if (showStopped == 0) if (projectorState == 0) MQ02MuseumPlanetariumSkyDome03aREF.enable playgroup forward 1 MQ02MuseumPlanetariumSkyDome01aREF.disable 1 MQ02MuseumPlanetariumSkyDome02aREF.disable 1 MuseumPlanetariumGlow01REF.disable 1 set projectorState to 1 elseif (projectorState == 1) if (isAnimPlaying == 0) MQ02MuseumPlanetariumSkyDome01aREF.enable MuseumPlanetariumGlow01REF.enable set timer to 5 set projectorState to 2 endif elseif (projectorState==2) if (timer < 0) playgroup backward 1 MQ02MuseumPlanetariumSkyDome01aREF.disable 1 MuseumPlanetariumGlow01REF.disable 1 set projectorState to 3 else set timer to (timer - GetSecondsPassed) endif elseif (projectorState==3) if (isAnimPlaying == 0) MQ02MuseumPlanetariumSkyDome02aREF.enable MuseumPlanetariumGlow01REF.enable set timer to 5 set projectorState to 4 endif elseif (projectorState==4) if (timer < 0) set projectorState to 0 else set timer to (timer - GetSecondsPassed) endif elseif (projectorState==5) MQ02MuseumPlanetariumSkyDome01aREF.disable 1 MQ02MuseumPlanetariumSkyDome02aREF.disable 1 MQ02MuseumPlanetariumSkyDome03aREF.disable 1 MuseumPlanetariumGlow01REF.disable 1 set showStopped to 1 endif endif if Talk == 1 MuseumTech03ProjectorRef.Say MQ02Planetarium01 1 MQ02PlanetariumVoice set Talk to 2 endif end begin SayToDone MQ02Planetarium01 Say MQ02Planetarium02 1 MQ02PlanetariumVoice end begin SayToDone MQ02Planetarium02 Say MQ02Planetarium03 1 MQ02PlanetariumVoice end
717MuseumTechMainBoss01bEnablerSCRIPTscn MuseumTechMainBoss01bEnablerSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce short PlanetariumDoorDisabled ;0 = door is still enabled 1 = door should be disabled Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable MuseumTechBossHenchman01REF.enable MuseumTechPlanetariumExit01bREF.enable ; this enables the broken door and disables the locked door to the Planetarium so the player doesn't have to backtrack set PlanetariumDoorDisabled to 1 MuseumTechMainBoss02TriggerREF.disable ;don't want the other boss to spawn MuseumTechMainBoss01TriggerREF.disable set doOnce to 1 ;Trigger is only set off one time endif End
718MuseumTechMainBoss01EnablerSCRIPTscn MuseumTechMainBoss01EnablerSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce short PlanetariumDoorDisabled ;0 = door is still enabled 1 = door should be disabled Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable MuseumTechBossHenchman01REF.enable MuseumTechPlanetariumExit01bREF.enable ; this enables the broken door and disables the locked door to the Planetarium so the player doesn't have to backtrack set PlanetariumDoorDisabled to 1 MuseumTechMainBoss02TriggerREF.disable ;don't want the other boss to spawn MuseumTechMainBoss01bTriggerREF.disable set doOnce to 1 ;Trigger is only set off one time endif End
719MuseumTechMainBoss02EnablerSCRIPTscn MuseumTechMainBoss02EnablerSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable MuseumTechBossHenchman01REF.enable MuseumTechMainBoss01TriggerREF.disable ;don't want the other boss to spawn MuseumTechMainBoss01bTriggerREF.disable set doOnce to 1 ;Trigger is only set off one time endif End
720MuseumTechPlanetariumAmbushTriggerSCRIPTscn MuseumTechPlanetariumAmbushTriggerSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ; This trigger starts the planetarium show ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable set MuseumTech03ProjectorREF.showStopped to 0 set MuseumTech03ProjectorREF.Talk to 1 set doOnce to 1 ;Trigger is only set off one time endif End
721MuseumtechScriptscn MuseumtechScript short Instruments ;1= Instruments Section is being illuminated in the Rocket Gallery short Crew ;1= Crew Section is being illuminated in the Rocket Gallery short Propulsion ;1= Propulsion Instruments is being illuminated in the Rocket Gallery
722MVSRaiderSpawnSCRIPTscn MVSRaiderSpawnSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;turn on the pathers npcMVSRaiderPatherA.enable npcMVSRaiderPatherB.enable endif end
723MVSSuperMutantRuinsSCRIPTscn MVSSuperMutantRuinsSCRIPT short playerTriggered ; set to 1 when player triggers begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;turn on the pathers npcMVSSuperMutantSpawnA.enable npcMVSSuperMutantSpawnB.enable endif end
724NathanSCRIPTscn NathanSCRIPT BEGIN OnDeath set DialogueMegaton.NathanDead to 1 END
725NovaSCRIPTscn NovaSCRIPT short Rent short RentDay short RentMonth short Cleanup short RentRoomSetup short ExitSaloon ; Set to 1 when PC first enters saloon, set to 2 when PC first leaves saloon. BEGIN SayToDone MegNovaRadioTalk set GobREF.Timer to 0 END BEGIN GameMode ; When the PC first leaves the Saloon, set ExitSaloon to 2 so that Nova will sleep. If ExitSaloon == 0 If player.GetInCell MegatonMoriartysSaloon == 1 Set ExitSaloon to 1 EndIf ElseIf ExitSaloon == 1 If player.GetInCell MegatonMoriartysSaloon == 0 Set ExitSaloon to 2 EndIf EndIf if ( Rent == 1 ) if ( RentRoomSetup == 0 ) set RentRoomSetup to 1 set RentDay to GameDay set RentMonth to GameMonth AddScriptPackage MegNovaSleepRentedBed MegMoriartysRentRoomDoorREF.unlock MegMoriartysRentRoomDoorREF.SetOwnership MegMoriartysRentalBedREF.SetOwnership else if ( GameDay != RentDay ) set Cleanup to 1 elseif ( GameMonth != RentMonth ) set Cleanup to 1 endif endif if ( Cleanup == 1 ) if ( Player.GetinCell MegatonMoriartysSaloon == 0 ) set Cleanup to 2 endif endif if ( Cleanup == 2 ) set Rent to 0 set RentRoomSetup to 0 set RentDay to 0 set RentMonth to 0 set Cleanup to 0 MegMoriartysRentRoomDoorREF.SetOpenState 0 MegMoriartysRentRoomDoorREF.lock 30 MegMoriartysRentRoomDoorREF.SetOwnership Nova MegMoriartysRentalBedREF.SetOwnership Nova endif endif END BEGIN OnDeath set DialogueMegaton.NovaDead to 1 END
726NPCVendorFollowPlayerTriggerScriptscn NPCVendorFollowPlayerTriggerScript ;NOTE: Do not place in areas where lots of actors will be hanging around inside the trigger box, because it is using the OnTrigger block ;This is used to get a linked ref actor to follow the player. ;It sets an actor value which is condition on a package in the actor's stack of packages. short playerIsInMe ;0 = unset, 1 = player in trigger box bounds, -1 equals player has left trigger box bounds ref myLinkedActor ;linked ref short setMyLinkedActorVariable ;0 = unset, 1 = i should set it, 2 = set, -1 = i should unset it ;myLinkedActor.getAV variable03... 0 = unset, 1= follow player, -1 stop following player ;DO NOT CHANGE THE ORDER OF THESE BLOCKS... THE VARIABLES NEED TO BE SET PRIOR TO OnTrigger BLOCK RUNNING -- THANKS!!! Begin OnTriggerEnter player set playerIsInMe to 1 set myLinkedActor to GetLinkedRef End Begin OnTriggerLeave player set playerIsInMe to -1 myLinkedActor.SetAv Variable03 -1 End Begin OnTrigger ;this block will run anytime any actor is in the trigger, but we can test to see if the player is still in it if playerIsInMe == 1 if myLinkedActor.getAV Variable03 != 1 myLinkedActor.SetAv Variable03 1 if myLinkedActor.GetSleeping == 0 && myLinkedActor.GetSitting == 0 myLinkedActor.ResetAI ;force this NPC to re-eval to pick a package that puts him in offers services and must complete so he follows player else myLinkedActor.EVP ;calling resetAI on NPC in furniture causes him to "pop", so EVP -- note is rare cases if he is doing something like continue while PC is near, this won't happen... but that's probably not on a package that would have him in furniture endif endif endif End
727NQlvlSCRIPTscn NQlvlSCRIPT ; script used to provide global variables to levels which do not need a quest of their own. ;Falls Church Variables ;short FallsChurchFromMetro ;Set to 1 if player enters Falls Church from the Metro Station ;short FallsChurchFromLOBE ;Set to 1 if player enters Falls Church from LOBE ;==================================================================================== ;Trap Variables These variables are set when stage NQlvl is set to 1 short TRAPGrenadeBouquetSkillReq ;Skill required to disarm the Grenade Bouquet trap, explosives short TRAPMailboxSkillReq ;Skill required to disarm the mailbox bomb, explosives short TRAPComputerSkillReq ;Skill required to disarm the Computer trap, explosives short TRAPBearSkillReq01 ;Skill required to disarm the Bear Trap, repair short TRAPBearSkillReq02 ;Skill required to rearm the Bear Trap, repair short TRAPMineSkillReq ;Skill required to disarm the Buried Mine, explosives short TRAPPlateSkillReq ;Skill required to disarm a pressure plate, repair short TRAPTripwireSkillReq ;Skill required to disarm a tripwire, repair short TRAPSensorSkillReq ;Skill required to disarm a motion sensor, science short TRAPBabySkillReq ;Skill required to disarm a baby carriage, explosives short TRAPShotgunSkillReq ;Skill required to disarm a shotgun trap, repair short TRAPValveSkillReq ;Skill required to fix a gas valve, repair short TRAPLaserLowRepairSkillReq ;Skill required to disarm the Laser Tripwire with repair skill if the power is turned off short TRAPLaserHighRepairSkillReq ;Skill required to disarm the Laser Tripwire with repair skill if the power is turned on short TRAPLaserScienceSkillReq ;Skill required to disarm the Laser Tripwire with science skill short TRAPToiletSkillReq ;Skill required to disarm the Electrified Toilet trap, repair short TRAPPitchingSkillReq ;Skill required to disable the pitching machine, repair ;==================================================================================== ;Chryslus Building short ChryslusBuildingSlaveDoor0 ;One of the two slave doors short ChryslusBuildingSlaveDoor1 ;One of the two slave doors ;Shalebridge Cavern Vars short enemyColonyKills ; body count, checks to see if player has exterminated aggressive red ant colony short colonyKills ; body count, checked to see if player has exterminated the colony short PCstimulatedEggs ; flag to check if high-medicine player has stimulated egg growth short DayLastSpawned ; stores the most recent day the container spawned ant nectar short InvaderAntActivated ; flag for only displaying message text when activating dead invader ant once ;==================================================================================== ;; FREEFORM RAIDER CAMP VARIABLES short RCamp01 ; state tracker vars - 0 == not visited, 1 == visited short Rcamp01day ; tracker for day last spawned. ;==================================================================================== ;; FREEFORM MUTANT CAMP VARIABLES ; tracking vars for story thread enabling the behemoth camp in wasteland short FoundGrave01 short FoundRangerMSG short FoundGrave03 short FoundGrave04 ;==================================================================================== ;; FREEFORM ENCLAVE CAMP VARIABLES ;Enclave Camp Variables These variables are set when stage NQlvl is set to 1 short DeathclawCageDoorLockLvlReq ; lock level for deathclaw cage doors found in Enclave Camps ;==================================================================================== ;; VARIABLES FOR GAME TERMINAL - FREEFORM ACTIVITY short gameVar01 ; has player examined north area? short gameVar02 ; player has the rough gem short gameVar02a ; player has talked to wizard short gameVar02b ; player has posessed the gem (ever) short gameVar03 ; player has killed zombie short gameVar04 ; player has taken zombie bit short gameVar05 ; player has chapel key short gameVar06 ; player has holy water short gameVar07 ; player has refined gemstone short gameVar08 ; player has magical shard short gameVar09 ; player has magical sword short gameVar10 ; player has won the game short gameVarExE2 ; player has examined east w/key short gameVarExE ; player has examined east short gameVarExW ; player has examined west short gameVarExS ; player has examined south ;==================================================================================== ref playerBed ; bed player is currently sleeping in (used for Well-Rested bonus) ;==================================================================================== ;; VARIABLES FOR TAKOMA PARK WORLDSPACE short artillerySwitchScienceSkillReq ;skill needed to successfully repair the artillery switch in Takoma Park ;==================================================================================== ;==================================================================================== ; VARIABLE TO TRACK FAST TRAVEL DISABLE IN DEFAULTDISABLEFASTTRAVELSCRIPT short FastTravelDisabled ;==================================================================================== ; THIS VARIABLE TRACKS IF THE PLAYER HAS UPLOADED THE SATELLITE LAUNCH CODES AT SATCOMARRAY01 short launchCodesUploaded short launchInView ;==================================================================================== ; THIS VAR USED IN FFBASEBALLSCRIPT short ballHit
728NtlGuardDepot06BunkerDoorSCRIPTscn NtlGuardDepot06BunkerDoorSCRIPT ref actionRef Begin onActivate set actionRef to getActionRef if (actionRef == Player) showmessage GenericDoorActivatedElsewhereMsg elseif (actionRef == NtlGuardDepot06TerminalREF) || (actionRef == NtlGuardDepot06BunkerSwitchREF) activate endif End
729NtlGuardDepot06DoorSCRIPTscn NtlGuardDepot06DoorSCRIPT ; This script tells the door to only be activated by its linked ref float timer short timerOn ; 0 - timer off 1 - timer on short doOnce ; 0 - dust has not gone off yet ;1 - dust has already gone off and is now disabled ;********************************** Begin onLoad set timer to 6 ;tweak for timing of dust cloud End ;********************************* Begin onActivate if ( IsActionRef player == 1 ) ShowMessage GenericDoorActivatedElsewhereMsg elseif (IsActionRef NtlGuardDepot06Switch01REF == 1) activate if (doOnce == 0) set timer to 4 NtlGuardDepot06DustCloud01REF.enable set timerOn to 1 set doOnce to 1 ;only want dust to happen once endif endif End ;********************************** Begin gameMode if (timerOn == 1) if (timer > 0) set timer to (timer - getSecondsPassed) elseif timer <= 0 NtlGuardDepot06DustCloud01REF.disable set timerOn to 0 endif endif End
730NtlGuardDepot06Switch01RefSCRIPTscn NtlGuardDepot06Switch01RefSCRIPT ; This script activates itself and also its LinkedRef when activated ref LinkedRef ref Self Begin onActivate set LinkedRef to getLinkedRef set Self to getSelf activate LinkedRef.activate Self 1 End
731NtlguardDepotVaultLightTrigSCRIPTscn NtlguardDepotVaultLightTrigSCRIPT ; The Vault Lights should turn on when the player enters trigger. ; Trigger enables once the entrance door to the depot vault has been unlocked. short mode Begin OnTriggerEnter Player if (mode == 0) NtlGuardDepotWorldKlaxon03REF.playgroup Left 0 NtlGuardDepotWorldKlaxonGlow03REF.playgroup Left 0 set mode to 1 endif End
732NtlGuardDepotWorldElectricalSwitch01SCRIPTscn NtlGuardDepotWorldElectricalSwitch01SCRIPT ;This script opens the utility door that leads to the armory while also animating the klaxon lights. short mode begin onActivate ; if the player tries to activate if (IsActionRef player == 1 ) if (mode ==0) ;unlocked, player can activate it activate set mode to 1 endif endif end begin gameMode if (mode == 1) if (isAnimPlaying == 0) NtlGuardDepotWorldVaultAccessDoor01REF.unlock NtlGuardDepotAlarmREF.enable NtlGuardDepotWorldKlaxon01REF.playgroup Left 0 NtlGuardDepotWorldKlaxon02REF.playgroup Left 0 NtlGuardDepotWorldKlaxon04REF.playgroup Forward 0 NtlGuardDepotWorldKlaxonGlow01REF.playgroup Left 0 NtlGuardDepotWorldKlaxonGlow02REF.playgroup Left 0 NtlGuardDepotWorldKlaxonGlow04REF.playgroup Forward 0 NtlGuardDepotWorldBoss01REF.enable NtlGuardDepotWorldVaultAccessDoor01REF.activate NtlGuardDepotWorldElectricalSwitch01REF set mode to 2 endif endif end
733NTlguardDepotWorldUtlDoor01SCRIPTscn NTlguardDepotWorldUtlDoor01SCRIPT ref LinkedRef Begin onActivate set LinkedRef to getLinkedRef if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg elseif (IsActionRef LinkedRef == 1) activate endif End
734NtnlArchivesRotundaFXOffScriptscn NtnlArchivesRotundaFXOffScript begin onTriggerEnter player NtnlArchivesRotundaFX2.disable NtnlArchivesRotundaFX3.disable NtnlArchivesRotundaFX1.disable end
735NtnlArchivesRotundaFXOnScriptscn NtnlArchivesRotundaFXOnScript begin onTriggerEnter player NtnlArchivesRotundaFX2.enable NtnlArchivesRotundaFX1.enable NtnlArchivesRotundaFX3.enable end
736NukaCola01DoorSwitchSCRIPTscn NukaCola01DoorSwitchSCRIPT begin onActivate if IsActionRef player == 1 ;unlock and open the door doorNukaColaMainDoor.unlock doorNukaColaMainDoor.activate player ;swap the lights nukaCola01LockedLight.disable nukaCola01UnlockedLight.enable endif end
737NukaColaAddCapEffectScriptscn NukaColaAddCapEffectScript begin ScriptEffectStart additem caps001 1 end
738OasisBloomseerPoplarScriptscn OasisBloomseerPoplarScript short FactionSet ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( IsKiller Player == 1 ) if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
739OasisBranchtenderCypressScriptscn OasisBranchtenderCypressScript short Factionset ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( IsKiller Player == 1 ) if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
740OasisBranchtenderLindenScriptscn OasisBranchtenderLindenScript short Factionset ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( IsKiller Player == 1 ) if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
741OasisBranchtenderMapleScriptscn OasisBranchtenderMapleScript short Factionset ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( IsKiller Player == 1 ) if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
742OasisLeafMotherLaurelScriptscn OasisLeafMotherLaurelScript short Factionset ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end begin SayToDone MS10Argue Set MS10.Argue to ( MS10.Argue + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( IsKiller Player == 1 ) if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
743OasisSaplingYewScriptscn OasisSaplingYewScript short Factionset ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif ;Sapling Yew has an extra package that will have her running away from Player. When she is in a different Cell, she will disable if ( FactionSet == 1 ) if ( GetInSameCell Player == 0 ) Disable set Factionset to 2 endif endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
744OasisTreeFatherBirchScriptscn OasisTreeFatherBirchScript short Factionset ;This is for moving along the Ceremony of Purification begin SayToDone MS10TreemindersCeremonySay Set MS10.CeremonyGo to ( MS10.CeremonyGo + 1 ) end begin SayToDone MS10Argue Set MS10.Argue to ( MS10.Argue + 1 ) end ;This block is handling for two scenarios: The player attacks a Treeminder, or Burns Harold ;OasisHostile is tripped in Harold's script if the fire is ignited begin gamemode if ( MS10.OasisHostile == 0 ) if ( IsInCombat == 1 ) if ( GetCombatTarget == Player ) setfactionrank MS10OasisFactionEnemy 0 set MS10.OasisHostile to 1 endif endif endif if ( MS10.OasisHostile == 1 ) if ( Factionset == 0 ) SetEnemy MS10OasisFaction PlayerFaction setfactionrank MS10OasisFactionEnemy 0 setAV Aggression 1 set Factionset to 1 endif endif end begin OnDeath if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end begin OnHit Player if ( MS10.OasisHostile == 0 ) set MS10.OasisHostile to 1 endif end
745OnDeathEnableLinkedRefscn OnDeathEnableLinkedRef ref linkedRef begin onDeath set linkedRef to getLinkedRef linkedRef.enable end
746OurLadyHopeMutantMineTriggerSCRIPTscn OurLadyHopeMutantMineTriggerSCRIPT ; This trigger only gets triggered once. ref linkedRef short doOnce Begin onTriggerEnter Player if doOnce == 0 set doOnce to 1 ;Trigger is only set off one time set linkedRef to getLinkedRef linkedRef.evp endif End
747OverseerSCRIPTscn OverseerSCRIPT float timer ; run timer to space out shouts for help short gotWeapon begin OnDeath if getStage MS16 > 10 && getstage MS16 < 100 set MS16.OverseerKilled to 1 setStage MS16 140 endif endif ;If player was reporting to him about stopping Amata and kills him, fail MS16 if getStage MS16 == 160 setStage MS16 200 endif end
748PAAvezDCint08aTriggerScriptscn PAAvezDCint08aTriggerScript short doOnce Begin onActivate if (doOnce == 0) if (PAAvezDCint08aBoSREF.isInCombat == 0) PAAvezDCint08aBoSREF.setav variable01 1 PAAvezDCint08aBoSREF.evp set doOnce to 1 endif endif End
749PaladinGunnySCRIPTSCN PaladinGunnySCRIPT short TrainPlayer short DoOnce float Timer BEGIN GameMode if ( TrainPlayer == 1 ) if ( DoOnce== 0 ) disablePlayerControls evp sayto player FFPAGunnyChatter ; set Timer to 10 set DoOnce to 1 endif if DoOnce == 2 set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 0 ) set TrainPlayer to 2 set DoOnce to 3 setstage FreeformPowerArmor 100 enablePlayerControls setessential PaladinGunny 0 evp endif endif endif END
750ParadiseFallsAttackTriggerSCRIPTSCN ParadiseFallsAttackTriggerSCRIPT BEGIN OnTriggerEnter Player if ( DialogueParadiseFalls.PlayerPassedCheckpoint == 0 ) SetEnemy ParadiseFallsResidentFaction PlayerFaction SetEnemy ParadiseFallsSlaverFaction PlayerFaction set FreeformParadiseFalls.Hostile to 1 grouseRef.startcombat player richterRef.startcombat player fortyRef.startcombat player endif END
751ParadiseFallsBarTenderSCRIPTSCN ParadiseFallsBarTenderSCRIPT short factionset ;flag set when hostile var is incremented by someone else ref MySelf Begin OnHit YmirREF set MySelf to GetSelf Kill Myself 1 END Begin Gamemode if ( FreeformParadiseFalls.Hostile == 0 ) if ( IsInCombat == 1 ) if ( IsCombatTarget Player ) set FreeformParadiseFalls.Hostile to 1 setfactionrank paradisefallsslaverHOSTILEfaction 0 set factionset to 1 endif endif endif if ( FreeformParadiseFalls.Hostile == 1 ) if ( factionset == 0 ) setfactionrank ParadiseFallsSlaverHOSTILEfaction 0 set factionset to 1 endif endif End BEGIN OnDeath CarolinaRedREF.Say PFLaugh JotunREF.Say PFLaugh set MQ07.KillCount to ( MQ07.KillCount + 1 ) if ( YmirREF.IsCombatTarget Player == 0 ) YmirREF.SetAlert 0 endif END Begin OnHit Player if ( FreeformParadiseFalls.Hostile == 0 ) Set FreeformParadiseFalls.Hostile to 1 setfactionrank ParadiseFallsSlaverHOSTILEFaction 0 set factionset to 1 endif End
752ParadiseFallsEulogysDoorSCRIPTSCN ParadiseFallsEulogysDoorSCRIPT short DayPlayerEntered short DayToActivateEulogy ; JOEL ADDING STUFF to duplicate generic hostile door script functionality. ref myActor BEGIN OnActivate set myActor to getActionRef if ( IsActionRef Player == 1 ) if ( EulogyJonesREF.PlayerEnteredEulogysPad == 0 ) set EulogyJonesREF.PlayerEnteredEulogysPad to 1 EulogyJonesREF.evp CrimsonREF.evp CloverREF.evp endif endif if myActor.getinFaction ParadiseFallsSlaverHOSTILEFaction == 1 ; do nothing else activate endif END BEGIN OnLoad if ( EulogyJonesREF.PlayerEnteredEulogysPad == 0 ) set DayPlayerEntered to GameDaysPassed set DayToActivateEulogy to ( DayPlayerEntered + 2 ) endif END BEGIN GameMode if ( EulogyJonesREF.PlayerEnteredEulogysPad == 0 ) if ( DayToActivateEulogy > 0 ) if ( DayToActivateEulogy <= ( GameDaysPassed ) ) set EulogyJonesREF.PlayerEnteredEulogysPad to 1 EulogyJonesREF.evp CrimsonREF.evp CloverREF.evp endif endif endif END
753ParadiseFallsWarningTriggerSCRIPTSCN ParadiseFallsWarningTriggerSCRIPT BEGIN OnTriggerEnter Player if ( DialogueParadiseFalls.PlayerPassedCheckpoint == 0 ) ; always put Grouse on alert set GrouseREF.Alert to 1 if ( GrouseRef.Warn == 0 ) set GrouseRef.Warn to 1 endif GrouseRef.EVP endif END begin OnTriggerLeave player ; Grouse no longer alert set GrouseREF.Alert to 0 end
754ParkingMeter01SCRIPTscn ParkingMeter01SCRIPT ; Parking Meter expired tab rolls down and needle pops up when activated float timer short on begin onLoad set on to 0 end begin onActivate if on == 0 playgroup Forward 0 set on to 1 endif end
755PatchworkSCRIPTSCN PatchworkSCRIPT BEGIN OnDeath set DialogueUnderworld.PatchworkDead to 1 END
756PennAveExplosion01TriggerSCRIPTscn PennAveExplosion01TriggerSCRIPT ;This trigger spawns a bunch of explosions down Penn Ave short stage short doOnce float timer float timerConstant ;***************************** Begin onActivate if stage == 0 set stage to 1 set timerConstant to .5 set doOnce to 1 endif End ;***************************** Begin gameMode if(doOnce == 1) if (stage == 1) PennAveExplosion01REF.placeatme PAAveFragExplosion 1 PennAveExplosion02REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 2 elseif (stage == 2) if (timer < 0) PennAveExplosion03REF.placeatme PAAveFragExplosion 1 PennAveExplosion04REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 3 else set timer to timer - GetSecondsPassed endif elseif (stage == 3) if (timer < 0) PennAveExplosion05REF.placeatme PAAveFragExplosion 1 PennAveExplosion06REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 4 else set timer to timer - GetSecondsPassed endif elseif (stage == 4) if (timer < 0) PennAveExplosion07REF.placeatme PAAveFragExplosion 1 PennAveExplosion08REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 5 else set timer to timer - GetSecondsPassed endif elseif (stage == 5) if (timer < 0) PennAveExplosion09REF.placeatme PAAveFragExplosion 1 PennAveExplosion10REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 6 else set timer to timer - GetSecondsPassed endif elseif (stage == 6) if (timer < 0) PennAveExplosion11REF.placeatme PAAveFragExplosion 1 PennAveExplosion12REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 7 else set timer to timer - GetSecondsPassed endif elseif (stage == 7) if (timer < 0) PennAveExplosion13REF.placeatme PAAveFragExplosion 1 PennAveExplosion14REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 8 else set timer to timer - GetSecondsPassed endif elseif (stage == 8) if (timer < 0) PennAveExplosion15REF.placeatme PAAveFragExplosion 1 PennAveExplosion16REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 9 else set timer to timer - GetSecondsPassed endif elseif (stage == 9) if (timer < 0) PennAveExplosion17REF.placeatme PAAveFragExplosion 1 PennAveExplosion18REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 10 else set timer to timer - GetSecondsPassed endif elseif (stage == 10) if (timer < 0) PennAveExplosion19REF.placeatme PAAveFragExplosion 1 PennAveExplosion20REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 11 else set timer to timer - GetSecondsPassed endif elseif (stage == 11) if (timer < 0) PennAveExplosion21REF.placeatme PAAveFragExplosion 1 PennAveExplosion22REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 12 else set timer to timer - GetSecondsPassed endif elseif (stage == 12) if (timer < 0) PennAveExplosion23REF.placeatme PAAveFragExplosion 1 PennAveExplosion24REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 13 else set timer to timer - GetSecondsPassed endif elseif (stage == 13) if (timer < 0) PennAveExplosion25REF.placeatme PAAveFragExplosion 1 PennAveExplosion26REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 14 else set timer to timer - GetSecondsPassed endif elseif (stage == 14) if (timer < 0) PennAveExplosion27REF.placeatme PAAveFragExplosion 1 PennAveExplosion28REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 15 else set timer to timer - GetSecondsPassed endif elseif (stage == 15) if (timer < 0) PennAveExplosion29REF.placeatme PAAveFragExplosion 1 PennAveExplosion30REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 16 else set timer to timer - GetSecondsPassed endif elseif (stage == 16) if (timer < 0) PennAveExplosion31REF.placeatme PAAveFragExplosion 1 PennAveExplosion32REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 17 else set timer to timer - GetSecondsPassed endif elseif (stage == 17) if (timer < 0) PennAveExplosion33REF.placeatme PAAveFragExplosion 1 PennAveExplosion34REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 18 else set timer to timer - GetSecondsPassed endif elseif (stage == 18) if (timer < 0) PennAveExplosion35REF.placeatme PAAveFragExplosion 1 PennAveExplosion36REF.placeatme PAAveFragExplosion 1 set timer to timerConstant set stage to 19 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif endif End ;*****************************
757PennAveMissileFireTriggerSCRIPTscn PennAveMissileFireTriggerSCRIPT ;This trigger spawns in a mutant and then fires a missile near the player. ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable 0 PennAveMissileFire01REF.fireWeapon weapMissileLauncher target.startCombat Player set doOnce to 1 ;Trigger is only set off one time endif End
758PerkContractKillerQuestScriptSCN PerkContractKillerQuestScript short DoOnce short PlayerEarsCount short EarRewardAmount short KarmaRewardAmount short PlayerBonusCount short TotalEarsSold BEGIN GameMode if ( DoOnce == 0 ) if ( Player.HasPerk ContractKiller == 1 ) PerkContractKillerEnableMARKER.enable Player.AddNote PerkContractKillerNOTE ShowMap ScrapyardMapMarkerREF set DoOnce to -1 endif endif END
759PerkLawbringerQuestScriptSCN PerkLawbringerQuestScript short DoOnce short PlayerFingersCount short FingerRewardAmount short KarmaRewardAmount short PlayerBonusCount short TotalFingersSold BEGIN GameMode if ( DoOnce == 0 ) if ( Player.HasPerk Lawbringer == 1 ) PerkLawbringerEnableMARKER.enable ShowMap RegulatorHQMapMarkerREF Player.AddNote PerkLawbringerNOTE JundersPlunkettREF.enable ;enable a named bounty NPC set DoOnce to -1 endif endif END
760PFallsHostileDoorBlockerSCRIPTscn PFallsHostileDoorBlockerSCRIPT ; script for doors in Paradise Falls ; when the player is hostile towards slaver faction, slavers cannot path through certain doors ; This is to prevent combat from getting out of hand and letting us pace that scenario. ref myActor begin onActivate set myActor to getActionRef if FreeformParadiseFalls.hostile == 1 ; if the player is a hostile if myActor.getinFaction ParadiseFallsSlaverHOSTILEFaction == 1 ; and I hate the player ; don't activate for hostile slavers ; don't let me through else activate endif else activate ; peacetime = normal behvior. endif end
761PinkertonDoorUnlockSwitchScriptscn PinkertonDoorUnlockSwitchScript ref MyLink short wasActivated ;sets game mode block to run begin OnActivate if IsActionRef player == 1 set myLink to getLinkedRef activate myLink set wasActivated to 1 endif end begin gameMode if wasActivated == 1 if isAnimPlaying == 0 ;has the lever stopped moving? set myLink to getLinkedRef if myLink.getLocked > 0 MyLink.Unlock else MyLink.Lock 4 endif myLink.playsound3d DRSRivetCitySmallUnlock set wasActivated to 0 endif endif end
762PlayerBedSCRIPTscn PlayerBedSCRIPT short playerSleep begin OnActivate if isActionRef player == 1 ; set playerBed ref variable to me set playerSleep to 1 endif Activate end begin menumode ; player has activated me and is sleeping if playerSleep == 1 && IsPCSleeping == 1 set playerSleep to 2 endif end begin gamemode if playerSleep > 0 if playerSleep == 2 ; player has actually slept in this bed ; give player Well-Rested spell and then clear variable player.CastImmediateOnSelf WellRestedSpell endif ; clear variable set playerSleep to 0 endif end
763PortaShelter01Scriptscn PortaShelter01Script ; Shelter door opens on activate, stopping idle. Idle resumes when door is closed. float timer short on begin onLoad set on to 0 end begin onActivate if on == 0 if (isAnimPlaying Backward == 0) playgroup Forward 0 set on to 1 endif elseif on == 1 if (isAnimPlaying Forward == 0) playgroup Backward 0 set on to 0 endif endif end begin GameMode if on == 0 && isAnimPlaying == 0 playgroup SpecialIdle 0 set on to 0 endif end
764PrintingPressSCRIPTscn PrintingPressSCRIPT short pressOn ; 0 - press is off 1 - press is on ref actionRef Begin onActivate set actionRef to getActionRef if (actionRef == player) showmessage LDPrintingPressActivatedElsewhereMSG elseif (actionRef == PrintingPressTerminal01bREF) if (pressOn == 1) PrintingPress01REF.playgroup backward 1 PrintingPressTread01REF.playgroup backward 1 PrintingPressSmoke01REF.disable HubrisComics02Turret01REF.setunconscious 0 HubrisComics02Turret02REF.setunconscious 0 set pressOn to 0 elseif (pressOn == 0) PrintingPress01REF.playgroup forward 1 PrintingPressTread01REF.playgroup forward 1 PrintingPressSmoke01REF.enable HubrisComics02Turret01REF.setunconscious 1 HubrisComics02Turret02REF.setunconscious 1 set pressOn to 1 endif endif End
765ProtectronPod01Scriptscn ProtectronPod01Script ref myActionRef Begin OnActivate if IsActionRef player == 0 set myActionRef to getActionRef if myActionRef.getav variable01 == 0 setopenstate 0 else setopenstate 1 endif endif End
766PurityGrateSCRIPTscn PurityGrateSCRIPT ref myActor begin onActivate set myActor to getActionRef if myActor.getInFaction supermutantFaction == 1 ; then do nothing! else activate ; everyone else allowed through endif end
767QuinnSCRIPTSCN QuinnSCRIPT BEGIN OnDeath set DialogueUnderworld.QuinnDead to 1 END
768RadioTower06VertibirdFlybyScriptscn RadioTower06VertibirdFlybyScript float timer short runTimer short doOnce float birdFlybyStamp float rocket1Stamp float rocket2Stamp float rocket3Stamp float birdBlowupStamp float birdDisableStamp short birdFlybyFlag short rocket1Flag short rocket2Flag short rocket3Flag short birdBlowupFlag short birdDisableFlag Begin onLoad set timer to 21 set birdFlybyStamp to timer - 1 set rocket1Stamp to timer - 1.2 set rocket2Stamp to timer - 2.5 set rocket3Stamp to timer - 4.22 set birdBlowupStamp to timer - 5.27 set birdDisableStamp to timer - 20 End Begin onTriggerEnter Player if doOnce == 0 && getStage MQ05 >= 85 RadioTower06Bird01.enable 0 RadioTower06Bird02.enable 0 set runTimer to 1 set doOnce to 1 endif End Begin gameMode if runTimer == 1 if timer > 0 set timer to timer - getSecondsPassed else set runTimer to 0 endif if birdFlybyFlag == 0 if timer <= birdFlybyStamp RadioTower06EnclaveFlybyMutant.enable RadioTower06Bird01.playgroup Forward 1 RadioTower06Bird02.playgroup Forward 1 RadioTower06Bird01.do 200 set birdFlybyFlag to 1 endif endif if rocket1Flag == 0 if timer <= rocket1Stamp RadioTower06Missile01.FireWeapon WeapMissileLauncher set rocket1Flag to 1 endif endif if rocket2Flag == 0 if timer <= rocket2Stamp RadioTower06Missile02.FireWeapon WeapMissileLauncher set rocket2Flag to 1 endif endif if rocket3Flag == 0 if timer <= rocket3Stamp RadioTower06Missile03.FireWeapon WeapMissileLauncher set rocket3Flag to 1 endif endif if birdBlowupFlag == 0 if timer <= birdBlowupStamp RadioTower06Bird01.do 1000 set birdBlowupFlag to 1 endif endif if birdDisableFlag == 0 if timer <= birdDisableStamp RadioTower06Bird01.disable RadioTower06Bird02.disable set birdDisableFlag to 1 endif endif endif end
769RaiderCamp13WastelanderScriptscn RaiderCamp13WastelanderScript short runTimer short counter short maxCounts float checkDistDelay float failsafeTime float checkDistTimer float minDistance ref chasingRaider begin onLoad cios SpellFlamerEffect set checkDistDelay to 0.25 set failsafeTime to 15 set maxCounts to failsafeTime / checkDistDelay set minDistance to 350 set runTimer to 1 set checkDisttimer to checkDistDelay end begin gameMode if runTimer == 1 if checkDistTimer > 0 set checkDistTimer to checkDistTimer - getSecondsPassed else if counter < maxCounts && getDistance Player > minDistance set counter to counter + 1 set checkDistTimer to checkDistDelay else kill set chasingRaider to getLinkedRef chasingRaider.setAV variable01 1 chasingRaider.evp set runTimer to 0 endif endif endif end
770RaiderRaceControlScriptTriggerSCRIPTscn RaiderRaceControlScriptTriggerSCRIPT short raceStage ;0 - race has not begun 1 - Moles go up to line #1 2 - starter fires gun 3 - race one has begun 4 - race one has finished short ratsToLine ;counter for number of molerats to be at the starting line short ratsToEnd ;counter for number of molerats to finish the race short ratsFinished ;molerats have finished the race short ratsReady ;1 - rats are to the line short doOnce ref actionRef float timer ;************************************* Begin onTriggerEnter set actionRef to getActionRef if (doOnce == 0) if (actionRef == Player) set raceStage to 1 RaiderRaceMolerat01REF.evp RaiderRaceMolerat02REF.evp set doOnce to 1 endif endif End ;************************************* Begin gameMode if (raceStage == 1) if (ratsToLine == 2) set ratsReady to 1 endif if (ratsReady == 1) ;if all the molerats are to the line start the race set ratsReady to 0 set ratsToLine to 0 set raceStage to 2 RaiderRaceStarter01REF.evp endif elseif (raceStage == 3) if (ratsToEnd == 2) set ratsFinished to 1 endif if (ratsFinished == 1) set timer to 5 set ratsToEnd to 0 set ratsFinished to 0 set raceStage to 4 endif elseif (raceStage == 4) if (timer <= 0) set raceStage to 1 RaiderRaceMolerat01REF.evp RaiderRaceMolerat02REF.evp else set timer to (timer - GetSecondsPassed) endif endif End ;*************************************
771RavenRock01Barricade02TriggerSCRIPTscn RavenRock01Barricade02TriggerSCRIPT ;This script enables two Enclave Soldiers who run out of the room they're in. ;They then die by fire ref linkedRef ref barricadeDoor short doOnce float timer ;*************************************** Begin onTriggerEnter Player if (doOnce == 0) set doOnce to 1 set linkedRef to getLinkedRef set barricadeDoor to RR01BarricadeDoor03REF set timer to 1 RR01CollisionWall02REF.disable RR01GasTrap02REF.enable endif End ;*************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) RR01Flame04REF.FireWeapon weapFlamer RR01RoomVictim01REF.KillActor RR01RoomVictim01REF 1 ;dismember head RR01RoomVictim01REF.KillActor RR01RoomVictim01REF 3 ;disemember left arm RR01RoomVictim01REF.KillActor RR01RoomVictim01REF 5 ;disemember right arm RR01RoomVictim01REF.KillActor RR01RoomVictim01REF 7 ;disemember left leg RR01RoomVictim01REF.KillActor RR01RoomVictim01REF 10 ;disemember right leg set timer to .5 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 2) if (timer <= 0) linkedRef.activate player ;shut the door and lock the door as a safety measure linkedRef.lock 100 RR01ElectricalFX02REF.enable RR01CollisionWall02REF.enable ;start the electrical fx and enable a collision wall RR01CollisionWall03REF.disable ;disable the other wall and cause the other Enclave to come out of his doorway set timer to 1 set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 3) if (timer <= 0) RR01Flame05REF.FireWeapon weapFlamer RR01RoomVictim02REF.KillActor RR01RoomVictim02REF 1 ;disemember head RR01RoomVictim02REF.KillActor RR01RoomVictim02REF 3 ;disemember left arm RR01RoomVictim02REF.KillActor RR01RoomVictim02REF 5 ;disemember right arm RR01RoomVictim02REF.KillActor RR01RoomVictim02REF 7 ;disemember left leg RR01RoomVictim02REF.KillActor RR01RoomVictim02REF 10 ;disemember right leg set timer to .5 set doOnce to 4 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 4) if (timer <= 0) barricadeDoor.setOpenState 0 ;shut the door, start electrical fx and lock the door as a safety measure barricadeDoor.lock 100 RR01ElectricalFX03REF.enable RR01CollisionWall03REF.enable set doOnce to 5 else set timer to timer - GetSecondsPassed endif endif End ;***************************************
772RavenRock01BarricadeTriggerSCRIPTscn RavenRock01BarricadeTriggerSCRIPT ;This script causes two Enclave Soldiers to run down the hallway toward the player. Then a flame trap is ignited and envelopes the hallway killing the soldiers. ;Then the large door closes and becomes unusable by the player. ref linkedRef short doOnce float timer ;*************************************** Begin onTriggerEnter Player if doOnce == 0 set linkedRef to getLinkedRef set timer to 3.5 set doOnce to 1 RR01CollisionWall01REF.disable endif End ;*************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) RR01Flame01REF.FireWeapon weapFlamer ;ignite the flame trap chain set timer to 2 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 2) if (timer <= 0) RR01Flame02REF.FireWeapon weapFlamer ;shoot off two flames and then kill the two Enclave Soldiers RR01Flame03REF.FireWeapon weapFlamer RR01GasVictim01REF.KillActor RR01GasVictim01REF 1 ;dismember head RR01GasVictim01REF.KillActor RR01GasVictim01REF 3 ;dismember left arm RR01GasVictim01REF.KillActor RR01GasVictim01REF 5 ;dismember right arm RR01GasVictim01REF.KillActor RR01GasVictim01REF 7 ;dismember left leg RR01GasVictim01REF.KillActor RR01GasVictim01REF 10 ;dismember right leg RR01GasVictim02REF.KillActor RR01GasVictim01REF 1 ;dismember head RR01GasVictim02REF.KillActor RR01GasVictim01REF 3 ;dismember left arm RR01GasVictim02REF.KillActor RR01GasVictim01REF 5 ;dismember right arm RR01GasVictim02REF.KillActor RR01GasVictim01REF 7 ;dismember left leg RR01GasVictim02REF.KillActor RR01GasVictim01REF 10 ;dismember right leg set timer to .5 set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif if (doOnce == 3) if (timer <= 0) linkedRef.setOpenState 0 ;close the door linkedRef.lock 100 ;lock it as a safety percaution RR01ElectricalFX01REF.enable ;enable some electrical FX to reinforce the door no longer operates set doOnce to 4 else set timer to timer - GetSecondsPassed endif endif End ;***************************************
773RavenRock01SentryTriggerSCRIPTscn RavenRock01SentryTriggerSCRIPT ;This script just disables two invisible walls at different times ref linkedRef short doOnce float timer ;*************************************** Begin onTriggerEnter Player if doOnce == 0 set linkedRef to getLinkedRef linkedRef.disable set timer to 3 set doOnce to 1 endif End ;*************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) RR01SentryWall01REF.disable set timer to 2 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif End ;***************************************
774RavenRock01Vertibird01TriggerSCRIPTscn RavenRock01Vertibird01TriggerSCRIPT short doOnce ;*************************************** Begin onTriggerEnter Player if doOnce == 0 RR01Vertibird01REF.playgroup Forward 0 VertibirdPlatformSound01REF.enable set doOnce to 1 endif End ;*************************************** Begin gameMode if (doOnce == 1) if (RR01Vertibird01REF.isAnimPlaying Forward == 0) VertibirdPlatformSound01REF.disable set doOnce to 2 endif endif End
775RavenRock01Vertibird02TriggerSCRIPTscn RavenRock01Vertibird02TriggerSCRIPT short doOnce ;*************************************** Begin onTriggerEnter Player if doOnce == 0 RR01Vertibird02REF.playgroup forward 0 VertibirdPlatformSound02REF.enable set doOnce to 1 endif End ;*************************************** Begin gameMode if (doOnce == 1) if (RR01Vertibird02REF.isAnimPlaying Forward == 0) VertibirdPlatformSound02REF.disable set doOnce to 2 endif endif End
776RavenRock01Vertibird03TriggerSCRIPTscn RavenRock01Vertibird03TriggerSCRIPT short doOnce ;*************************************** Begin onTriggerEnter Player if doOnce == 0 RR01Vertibird03REF.playgroup forward 0 VertibirdPlatformSound03REF.enable set doOnce to 1 endif End ;*************************************** Begin gameMode if (doOnce == 1) if (RR01Vertibird03REF.isAnimPlaying Forward == 0) VertibirdPlatformSound03REF.disable set doOnce to 2 endif endif End
777RavenRock01VertibirdIdleTriggerSCRIPTscn RavenRock01VertibirdIdleTriggerSCRIPT short doOnce ;*************************************** Begin onTriggerEnter Player if doOnce == 0 RR01Vertibird01REF.playgroup Left 0 RR01Vertibird02REF.playgroup Left 0 RR01Vertibird03REF.playgroup Left 0 set doOnce to 1 endif End ;***************************************
778RavenRockCrDeathClawEnclave01SCRIPTscn RavenRockCrDeathClawEnclave01SCRIPT float timer short doOnce ;**************************************** Begin onPackageEnd DeathclawCAGE01a set timer to 20 ;give the Deathclaw enough time to finish his cageExit animation set doOnce to 1 End ;**************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) setav variable01 2 evp set doOnce to 3 else set timer to timer - GetSecondsPassed endif endif End ;****************************************
779RavenRockDoor01TriggerSCRIPTscn RavenRockDoor01TriggerSCRIPT ;This script just disables a collision wall and opens a door for the player. ref target short doOnce ;***************************************** Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.disable RR01Door01REF.setOpenState 1 set doOnce to 1 ;Trigger is only set off one time endif End ;*****************************************
780RavenRockDoor02TriggerSCRIPTscn RavenRockDoor02TriggerSCRIPT ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.disable RR01Door02REF.setOpenState 1 set doOnce to 1 ;Trigger is only set off one time endif End
781RavenRockDoor03TriggerSCRIPTscn RavenRockDoor03TriggerSCRIPT ref target float timer short doOnce ;**************************************** Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.disable RR01Door03REF.setOpenState 1 ;open the door set timer to 2 set doOnce to 1 endif End ;**************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) set doOnce to 2 ;condition used for a patrol package for an Enclave soldier else set timer to timer - GetSecondsPassed endif endif End ;****************************************
782RavenRockExteriorControlTriggerSCRIPTscn RavenRockExteriorControlTriggerSCRIPT ;This trigger controls the exploding of Raven Rock once the player exits the compound for MQ09 ; Stage 1 - Close the door, check to see if the explosion continues on based on MQ09.RRDestroy ; Stage 2 - Player is outside, vertibirds are enabled ; Stage 3 - Less frequent small and large explosions ; Stage 4 - More frequent small and large explosions ; Stage 5 - Big Door explosion, and start cool down of explosions ; Stages 6 & 7 - Raven Rock doesn't explode, but vertibirds still fly off toward DC ; Stage 8 - Done with everything ;********* Variables **************** float timer ;generic timer float largeExplosionTimer ;used for the larger explosions float smallExplosionTimer ;used for the smaller explosions float vertibirdsTimer ;used for when the vertibirds are enabled float vertibirdExplodeTimer ;used for the vertibird that is damaged in flight and explodes short stage ;what stage of the script we're in float stage3Timer ;how long Stage 3 will last float stage4Timer ;how long Stage 4 will last short finalExplosionSequence ;1 - cool down stage short vertibirdsEnabled short largeExplosionDice ;dice for the large explosions short smallExplosionDice ;dice for the small explosions short prevLargeExplosion ;set to the previous explosion (so we don't get same two explosions happening repeatedly) short prevSmallExplosion ;set to the previous explosion (so we don't get same two explosions happening repeatedly) ;************************************* Begin onLoad set stage to 0 set vertibirdsEnabled to 0 if (MQ09.RRDestroy == 0) ;Raven Rock will not explode set vertibirdsTimer to 5 elseif (MQ09.RRDestroy == 1) ;Raven Rock will explode set vertibirdsTimer to 5 endif set vertibirdExplodeTimer to 2 set timer to 4 ;how long before the explosion sequence starts once the door has been closed set stage3Timer to 20 set stage4Timer to 10 playsound AMBRGenericRumble2D End ;************************************* Begin gameMode ;------------------- Stage 1 ------------------------ ;door closes behind player if (stage == 1) if (RRExteriorDoor01REF.isAnimPlaying == 0) RRExteriorDoor01REF.activate RRExteriorStage1TriggerREF RRextDoorCollision01REF.enable ;enables collision as a safety precaution so player can't get stuck inside if (MQ09.RRDestroy == 1) ;If 1 then continue on with blowing up the place set stage to 2 RadioEnclaveRef.Disable elseif (MQ09.RRDestroy == 0) set stage to 6 ;If 6, then Raven Rock will not explode, but three vertibirds will still take off toward DC endif endif endif ;------------------- Stage 2 ------------------------ ;door has closed and the player is outside elseif (stage == 2) if (timer <=0) set stage to 3 set vertibirdsEnabled to 1 playsound AMBRGenericRumble2D else set timer to (timer - GetSecondsPassed) endif endif ;------------------- Stage 3 & 4 ------------------------ elseif (stage == 3) || (stage == 4) if (stage == 3) if (stage3Timer <= 0) if (finalExplosionSequence == 1) ;I'm reusing stage 3's explosions for the cool down sequence set stage to 8 ;8 means everything's done else set stage to 4 endif else set stage3Timer to (stage3Timer - GetSecondsPassed) endif elseif (stage == 4) if (stage4Timer <= 0) set timer to 1 ;buffer timer between stage 4 and 5 set stage to 5 RRExteriorDoor01REF.disable ;disable door and enables the destroyed door else set stage4Timer to (stage4Timer - GetSecondsPassed) endif endif ;------------------- Large Explosions ------------------------ if (largeExplosionTimer <= 0) if (stage == 3) set largeExplosionDice to (1 + (0.06 * getRandomPercent)) elseif (stage == 4) set largeExplosionDice to (1 + (0.08 * getRandomPercent)) endif ;we don't want explosions repeatedly happening in the same spot if (largeExplosionDice == prevLargeExplosion) set largeExplosionDice to largeExplosionDice + 1 endif if (largeExplosionDice == 1) RRExplosion01REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 1 elseif (largeExplosionDice == 2) RRExplosion02REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 2 elseif (largeExplosionDice == 3) RRExplosion03REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 3 elseif (largeExplosionDice == 4) RRExplosion04REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 4 elseif (largeExplosionDice == 5) RRExplosion05REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 5 elseif (largeExplosionDice == 6) RRExplosion06REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 6 elseif (largeExplosionDice == 7) RRExplosion07REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 7 elseif (largeExplosionDice == 8) RRExplosion08REF.placeatme FXFlyingRocks01 1 set prevLargeExplosion to 0 endif if(stage == 3) set largeExplosionTimer to (3 + 3.0/99 * getRandomPercent) ;In Stage 3 I want the large explosions to happen anywhere from 3 to 6 seconds elseif (stage == 4) set largeExplosionTimer to (0.5 + 0.2/99 * getRandomPercent) ;In Stage 4 I want the large explosions to happen anywhere from 0.2 to 0.7 seconds endif else set largeExplosionTimer to largeExplosionTimer - GetSecondsPassed endif ;------------------- Small Explosions ------------------------ if (smallExplosionTimer <= 0) if (stage == 3) set smallExplosionDice to (1 + (0.06 * getRandomPercent)) elseif (stage == 4) set smallExplosionDice to (1 + (0.08 * getRandomPercent)) endif ;we don't want explosions repeatedly happening in the same spot if (smallExplosionDice == prevSmallExplosion) set smallExplosionDice to smallExplosionDice + 1 endif if (smallExplosionDice == 1) RRExplosion01REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 1 elseif (smallExplosionDice == 2) RRExplosion02REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 2 elseif (smallExplosionDice == 3) RRExplosion03REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 3 elseif (smallExplosionDice == 4) RRExplosion04REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 4 elseif (smallExplosionDice == 5) RRExplosion05REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 5 elseif (smallExplosionDice == 6) RRExplosion06REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 6 elseif (smallExplosionDice == 7) RRExplosion07REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 7 elseif (smallExplosionDice == 8) RRExplosion08REF.placeatme GrenadeFragExplosion 1 set prevSmallExplosion to 0 endif if(stage == 3) set smallExplosionTimer to (2 + 2.0/99 * getRandomPercent) ;In Stage 3 I want the small explosions to happen anywhere from 2 to 4 seconds elseif(stage == 4) set smallExplosionTimer to (1.5 + 0.5/99 * getRandomPercent) ;In Stage 4 I want the small explosions to happen anywhere from 0.5 to 2 seconds endif else set smallExplosionTimer to smallExplosionTimer - GetSecondsPassed endif endif ;------------------- Stage 5 ------------------------ elseif (stage == 5) if (timer <=0) RRExteriorMainEntrance01REF.playgroup forward 1 ;set off the large explosion in the main entrance RRMainEntranceExplosion01REF.placeatme RavRockExplo02 RRExteriorDoor02REF.do 20 RRextDoorCollision01REF.disable ;disable the collision blocking doorway after door has exploded off RRExteriorEnclaveDebrisCollision01Ref.disable RRExteriorEnclaveDebris01Ref.enable RRExteriorEnclaveDebrisPusher01Ref.placeatme FakeForceBallNudge 1 RRExteriorEnclaveDebris02Ref.enable RRExteriorEnclaveDebrisPusher02Ref.placeatme FakeForceBallNudge 1 RRExteriorEnclaveDebris03Ref.enable RRExteriorEnclaveDebrisPusher03Ref.placeatme FakeForceBallNudge 1 set finalExplosionSequence to 1 set stage3Timer to 10 set stage to 3 else set timer to (timer - GetSecondsPassed) endif ;------------------- Stages 6 & 7 ------------------------ ;These stages are completely independent from the other stages and are the only stages that run when Raven Rock does NOT explode elseif (stage == 6) if (vertibirdsTimer <= 0) RRExteriorVertibird01REF.playgroup forward 0 ;first vertibird takes off RRExteriorVertibird02REF.playgroup forward 0 ;second vertibird takes off set vertibirdsTimer to 2 set stage to 7 else set vertibirdsTimer to (vertibirdsTimer - GetSecondsPassed) endif elseif (stage ==7) if (vertibirdsTimer <= 0) RRExteriorVertibird03REF.playgroup forward 0 ;third vertibird takes off set stage to 8 ;done with everything else set vertibirdsTimer to (vertibirdsTimer - GetSecondsPassed) endif endif ;-------------------Vertibirds Enabled ------------------------ if (vertibirdsEnabled == 1) if (vertibirdsTimer <= 0) RRExteriorVertibird01REF.playgroup forward 0 ;first vertibird takes off RRExteriorVertibird02REF.playgroup forward 0 ;second vertibird takes off set vertibirdsEnabled to 2 RRVertExplode03.playgroup backward 0 ;a damaged vertibird takes off RRVertExplode03.do 250 else set vertibirdsTimer to (vertibirdsTimer - GetSecondsPassed) endif elseif (vertibirdsEnabled == 2) if (vertibirdExplodeTimer <= 0) RRVertExplode.playgroup backward 0 ;damaged vertibird takes off RRVertExplode.do 200 ;do damage to it so its on fire RRVertExplode02REF.enable 0 ;third vertibird is enabled above entrance RRVertExplode02REF.do 1000 set vertibirdExplodeTimer to 1 ;how long before third vertibird explodes above the entrance set vertibirdsEnabled to 3 else set vertibirdExplodeTimer to (vertibirdExplodeTimer - GetSecondsPassed) endif elseif (vertibirdsEnabled == 3) if (vertibirdExplodeTimer <= 0) RRVertExplode02REF.do 1000 RRVertExplode03.do 1000 set vertibirdExplodeTimer to 5.25 ;how long before the damaged vertibird will explode set vertibirdsEnabled to 4 else set vertibirdExplodeTimer to (vertibirdExplodeTimer - GetSecondsPassed) endif elseif (vertibirdsEnabled == 4) if RRVertExplode.isanimplaying Backward == 0 ;(vertibirdExplodeTimer <= 0) RRVertExplode.do 1000 set vertibirdsEnabled to 5 ;else ; set vertibirdExplodeTimer to (vertibirdExplodeTimer - GetSecondsPassed) endif endif End ;*************************************
783RavenRockExteriorDoorTriggerSCRIPTscn RavenRockExteriorDoorTriggerSCRIPT ;This trigger makes sure the door opens and remains open until another script closes it. float timer short doOnce ;******************************** Begin onTriggerEnter Player if (doOnce == 0) RRExteriorDoor01REF.setOpenState 2 if (MQ09.RRDestroy == 0) ;Raven Rock will not explode RRExteriorVertibird01REF.enable RRExteriorVertibird02REF.enable RRExteriorVertibird03REF.enable ;enable three vertibirds to fly over as door opens RRExteriorVertibird04REF.enable 0 RRExteriorVertibird05REF.enable 0 RRExteriorVertibird06REF.enable 0 set timer to 2 set doOnce to 4 ;Raven Rock will not explode so we don't need anything but the three vertibirds enabled elseif (MQ09.RRDestroy == 1) ;Raven Rock will explode RRExteriorEnclaveDebrisCollision01Ref.enable RRExteriorEnclaveDebris01Ref.enable RRVertExplode.enable RRVertExplode03.enable RRExteriorVertibird01REF.enable RRExteriorVertibird02REF.enable ;enable two vertibirds to fly over base as door opens RRExteriorVertibird04REF.enable 0 RRExteriorVertibird06REF.enable 0 set timer to 4 set doOnce to 1 endif endif End ;******************************** Begin gameMode if (doOnce == 1) if (timer <= 0) RRExteriorEnclaveDebris01Ref.killactor RRExteriorEnclaveDebris01Ref 1 ;dismember Head RRExteriorEnclaveDebris01Ref.killactor RRExteriorEnclaveDebris01Ref 3 ;dismember Left Arm RRExteriorEnclaveDebris01Ref.killactor RRExteriorEnclaveDebris01Ref 7 ;dismember Left Leg RRExteriorEnclaveDebris01Ref.killactor RRExteriorEnclaveDebris01Ref 10 ;dismember Right Leg RRExteriorEnclaveDebris01Ref.killactor RRExteriorEnclaveDebris01Ref 5 ;dismember Right Arm RRExteriorEnclaveDebris01Ref.disable RRExteriorEnclaveDebris02Ref.killactor RRExteriorEnclaveDebris02Ref 1 ;dismember Head RRExteriorEnclaveDebris02Ref.killactor RRExteriorEnclaveDebris02Ref 3 ;dismember Left Arm RRExteriorEnclaveDebris02Ref.killactor RRExteriorEnclaveDebris02Ref 7 ;dismember Left Leg RRExteriorEnclaveDebris02Ref.killactor RRExteriorEnclaveDebris02Ref 10 ;dismember Right Leg RRExteriorEnclaveDebris02Ref.disable RRExteriorEnclaveDebris03Ref.killactor RRExteriorEnclaveDebris03Ref 1 ;dismember Head RRExteriorEnclaveDebris03Ref.killactor RRExteriorEnclaveDebris03Ref 7 ;dismember Left Leg RRExteriorEnclaveDebris03Ref.killactor RRExteriorEnclaveDebris03Ref 10 ;dismember Right Leg RRExteriorEnclaveDebris03Ref.disable set timer to 1 set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 2) if (timer <= 0) RRExteriorVertibird04REF.playgroup Forward 1 RRExteriorVertibird06REF.playgroup Forward 1 set doOnce to 3 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 3) if (RRExteriorVertibird04REF.isAnimPlaying Forward == 0) RRExteriorVertibird04REF.disable RRExteriorVertibird06REF.disable set doOnce to 6 endif elseif (doOnce == 4) if (timer <= 0) RRExteriorVertibird04REF.playgroup Forward 1 RRExteriorVertibird05REF.playgroup Forward 1 RRExteriorVertibird06REF.playgroup Forward 1 set doOnce to 5 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 5) if (RRExteriorVertibird04REF.isAnimPlaying Forward == 0) RRExteriorVertibird04REF.disable RRExteriorVertibird05REF.disable RRExteriorVertibird06REF.disable set doOnce to 6 endif endif End
784RavenRockExteriorStage1TriggerSCRIPTscn RavenRockExteriorStage1TriggerSCRIPT ;This trigger sets the Stage for the RavenRock control script to 1 short doOnce short doOnce02 ;****************************** Begin onTriggerEnter Player if (doOnce == 0) if (MQ09.RRDestroy == 0) ;Raven Rock will not explode set RavenRockExtLandingControlTrigREF.doOnce to 1 ;enables the vertibird in front of the base set doOnce to 1 endif endif if (MQ09.RRDestroy == 1) RavenRockExtLandingVertibirdREF.disable set doOnce to 1 endif End ;****************************** Begin onTriggerLeave Player if (doOnce02 == 0) SetStage MQ09 60 if (MQ09.RRDestroy == 0) ;Raven Rock will not explode set RavenRockExtLandingControlTrigREF.takeOffBegin to 1 ;condition to tell the vertibird on the ground to take off endif set RRExteriorControlTriggerREF.stage to 1 set doOnce02 to 1 endif if (getDeadCount MQ08Fawkes == 0) && ( GetStageDone FollowersHireFawkes 10 == 0 ) if (MQ08FawkesREF.Rescued == 1) SetStage FollowersHireFawkes 10 endif endif End
785RavenRockExteriorVertibirdTakeOffSCRIPTscn RavenRockExteriorVertibirdTakeOffSCRIPT ; This trigger just sets a variable flag on the control script if conditions are met. ; Used for the GenericVertibirdLandingControlSCRIPT ref linkedRef short doOnce short init ;**************************************** Begin onLoad if (init == 0) set linkedRef to getLinkedRef set init to 1 endif End ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) if (getStage MQ05 >= 85) set linkedRef to getLinkedRef linkedRef.activate linkedRef 1 set doOnce to 1 endif endif End ;**************************************** Begin onTriggerLeave Player set RavenRockExtLandingControlTrigREF.takeOffBegin to 1 ;condition to tell the vertibird on the ground to take off End ;*****************************************
786RavenRockExteriorVertibirdTakingOffControlSCRIPTscn RavenRockExteriorVertibirdTakingOffControlSCRIPT ; This trigger enables a vertibird outside RR and plays it's backward animation once conditions are met float timer short doOnce ref linkedRef ref vertibirdLinkedRef short takeOffBegin short init Begin onHitWith GenericVertibirdHitWithWeaponsList linkedRef.do 100 End ;**************************************** Begin onActivate set doOnce to 1 End ;**************************************** Begin gameMode if (init == 0) set init to 1 set linkedRef to getLinkedRef set vertibirdLinkedRef to linkedRef.getLinkedRef endif if (doOnce == 1) linkedRef.enable 0 set timer to 1 set doOnce to 2 elseif (doOnce == 2) if (timer <= 0) linkedRef.enable 0 linkedRef.playgroup Forward 0 set timer to 1 set doOnce to 3 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 3) if (timer <= 0) if ( linkedRef.HasLoaded3D != 0 ) linkedRef.playgroup Left 1 set doOnce to 4 endif else set timer to timer - GetSecondsPassed endif elseif (doOnce == 4) if (linkedRef.isAnimPlaying Forward == 0) vertibirdLinkedRef.enable ;enables an xmarker whose children are the enclave lists set doOnce to 5 endif elseif (doOnce == 5) && (takeOffBegin == 1) if (timer <= 0) set timer to 2 ; 2 seconds before vertibird will take off set takeOffBegin to 0 set doOnce to 6 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 6) if (timer <=0) if (linkedRef.getDestroyed == 0) linkedRef.playgroup backward 1 set doOnce to 7 else set doOnce to 8 endif else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 7) if (linkedRef.isAnimPlaying Backward == 0) && (getDestroyed == 0) linkedRef.disable ;disable the vertibird when it's done playing its backward animation set doOnce to 8 endif endif End
787RavenRockMissileTrigger02SCRIPTscn RavenRockMissileTrigger02SCRIPT short doOnce ;**************************************** Begin onTriggerEnter RR01MissileTargetREF if (doOnce == 0) ;if the correct NPC triggers then fire a missile in his direction RR01MissileShooterREF.FireWeapon WeapMissileLauncher set doOnce to 1 endif End ;****************************************
788RavenRockMissileTrigger03SCRIPTscn RavenRockMissileTrigger03SCRIPT short doOnce ;**************************************** Begin onTriggerEnter RR01MissileTargetREF if (doOnce == 0) ;If the correct NPC triggers then activate the door RR01Door03REF.activate Player set doOnce to 1 endif End ;****************************************
789RavenRockMissileTriggerSCRIPTscn RavenRockMissileTriggerSCRIPT ref target float timer short doOnce ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) set target to getLinkedRef target.disable RR01MissileTargetREF.enable ;enables the remaining Enclave Soldiers in Raven Rock 01 set timer to 4 set doOnce to 1 endif End ;**************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif End ;****************************************
790RavenRockPlasmaGrenadeExplosion01SCRIPTscn RavenRockPlasmaGrenadeExplosion01SCRIPT ref target ref plasmaTarget short doOnce float timer ;*************************************** Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef set plasmaTarget to RR01PlasmaGrenadeMarkerREF target.disable set timer to 3 set doOnce to 1 ;Trigger is only set off one time endif End ;*************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) plasmaTarget.placeatme RavenRockPlasmaExplosion 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif End ;***************************************
791RavenRockTrapLaserEmitterSCRIPTscn RavenRockTrapLaserEmitterSCRIPT short armed short skillPassed short button ref linkedRef short rewardXPOnce short XPForDisarm ;******************************************************* Begin OnLoad setStage NQlvl 1 set armed to 1 set skillPassed to 0 set linkedRef to getLinkedRef End ;******************************************************* Begin onActivate if armed == 1 ;is the trap already activated/disarmed? if isActionRef player == 1 ;can the player disarm the trap? if player.getAV Repair >= NQlvl.TRAPLaserHighRepairSkillReq || player.getAv Science >= NQlvl.TRAPLaserScienceSkillReq ;Do if player has sufficient skill ShowMessage TrapLaserOnDisarmDetectMsg NQlvl.TRAPLaserHighRepairSkillReq NQlvl.TRAPLaserScienceSkillReq set skillPassed to 1 else ;Player does not have sufficient skill ShowMessage TrapLowSkillLaserMsg NQlvl.TRAPLaserHighRepairSkillReq NQlvl.TRAPLaserScienceSkillReq endIf endif endif End ;******************************************************* Begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapTripwireDisarmMsg set armed to 0 ;disarm the trap if rewardXPOnce == 0 if NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif if linkedRef != 0 linkedRef.Disable linkedRef.activate endif endif set skillPassed to 0 ;stop running stuff endif endif End ;*******************************************************
792RavenRockTrapLaserTripwireSCRIPTscn RavenRockTrapLaserTripwireSCRIPT ref flameEmitter ;Where the flame comes from - most likely an xmarkerheading so you can point it wherever you want ref flameCloud ;Where the gas trap is placed - most likely an xmarker near the flameEmitter short trapTripped ;1 when the tripwire is triggered float timer ref actionRef ;********************************************** Begin onLoad set flameEmitter to getLinkedRef ;The linkedRef is the xmarkerheading you want the flame to come from set flameCloud to flameEmitter.getLinkedRef ;The linkedRef of the xmarkerheading where the flame comes from is the xmarker where you want to spawn a gas cloud End ;********************************************** Begin onTriggerEnter set actionRef to getActionRef if (actionRef.hasPerk LightStep == 0) playsound3D TRPTripwireLaser if flameCloud != 0 flameCloud.placeatme TrapGasFire01 1 ;Place a gas trap here endif set timer to 1 ;Allows one second before the flame emits and ignites the gas trap set trapTripped to 1 endif End ;********************************************** Begin gameMode if (trapTripped == 1) if (timer <= 0) activate if flameEmitter != 0 flameEmitter.FireWeapon weapFlamer ;Shoots a flame that ignites the gas trap endif set trapTripped to 0 ;Set it back to 0 so the trapped can be triggered again else set timer to timer - GetSecondsPassed endif endif End ;**********************************************
793RavenRockTriggerEnableNotInCombatSCRIPTscn RavenRockTriggerEnableNotInCombatSCRIPT ref linkedRef short doOnce Begin onTriggerEnter Player if (doOnce == 0) && (player.isInCombat == 0) set linkedRef to getLinkedRef linkedRef.enable set doOnce to 1 ;Trigger is only set off one time endif End
794RavenRockTurretCeiling02TriggerSCRIPTscn RavenRockTurretCeiling02TriggerSCRIPT ref target short doOnce ;**************************************** Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef RR01TurretCeiling02REF.UseWeapon Turret03Laser2HR RR01TurretCeiling02REF target 50 ;tell the turret to fire off 50 shots RR01TurretCeiling02REF.evp set doOnce to 1 ;Trigger is only set off one time endif End
795RCExBridge1SCRIPTscn RCExBridge1SCRIPT ;After the RC Bridge is finished extending, enable the navmesh there short doOnce short bForceOpen Begin gameMode ; if (doOnce == 1) ; if (isAnimPlaying Forward == 0) ; ; Jean: Had to change the name of the navmesh to its formID because in ; ; release final, editor IDs are not saved and I can't find the navmesh by its editor ID ; ; However, I'm leaving the old calls just so that things don't completely break in the interim ; enableNavmesh BE880 ; enableNavmesh BE87F ; enableNavmesh RCBridgeOpen01 ; enableNavmesh RCBridgeOpen02 ; set doOnce to 0 ; endif ; endif if ( bForceOpen == 1 && HasLoaded3D == 1 ) ;start anim and set flag so next frame we start waiting for anim to finish PlayGroup Forward 1 set doOnce to 1 set bForceOpen to 2 elseif (doOnce == 1) if (isAnimPlaying Forward == 0) ; Jean: Had to change the name of the navmesh to its formID because in ; release final, editor IDs are not saved and I can't find the navmesh by its editor ID ; However, I'm leaving the old calls just so that things don't completely break in the interim enableNavmesh BE880 enableNavmesh BE87F enableNavmesh RCBridgeOpen01 enableNavmesh RCBridgeOpen02 set doOnce to 0 endif endif End
796RCMisterBuckinghamScriptscn RCMisterBuckinghamScript short Rent short RentRoomSetup BEGIN OnDeath if VeraWeatherlyRef.getDead == 1 addItem VeraWeatherlyVendorKey 1 endif END BEGIN OnDeath if MisterBuckinghamRef.getDead == 1 addItem VeraWeatherlyVendorKey 1 endif END BEGIN GameMode if ( Rent == 1 ) if ( RentRoomSetup == 0 ) set VeraWeatherlyREF.RentDay to GameDay set VeraWeatherlyREF.RentMonth to GameMonth RCPlayerRentDoorREF.unlock RCPlayerRentableBed.SetOwnership set RentRoomSetup to 1 endif endif END
797redRacerDenizenSCRIPTscn redRacerDenizenSCRIPT short doOnce ref mySelf BEGIN onDeath set mySelf to getSelf playSound3D WPNMineTick KillActor mySelf 1 END BEGIN GAMEMODE IF redracerHeadExplodeXMRK.getDisabled != 1 IF doOnce == 0 set mySelf to getSelf mySelf.playSound3D WPNMineTick KillActor mySelf 1 set doOnce to 1 ENDIF ENDIF END
798redRacerSurgeonSCRIPTscn redRacerSurgeonSCRIPT ref mySelf BEGIN onHit Player set mySelf to getSelf IF mySelf.getHealthPercentage <= .75 && GetIsCurrentPackage redRacerSurgeonUnlockPackage == 0 redRacerSurgeonUnlockxmrk.enable mySelf.addScriptPackage redRacerSurgeonUnlockPackage ENDIF END
799RedScriptscn RedScript short rescued ;1 = player rescued her short followingPlayer ;1 = following, -1 watiing - set in dialog short arrivedAtBigTown ;1 = arrived at Big Town short reunionStage ;controls the reunion sayTo scene short reunionTalking ;1 = Red or Shorty are talking in a little reunion scene ;!!! Set to 0 in the infos said in the scene !!! ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! COPIED FROM DOCTOR TEMPLATE SCRIPT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! short DoOnce ;Script blocker float Timer ;Timer used for animation control !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Begin GameMode ; simulate Big Town being wiped out by mutants if getStageDone MS01 251 == 1 || getStageDone MS01 180 == 1 if GetDead == 0 kill endif endif if MS01.sneak == 1 if player.IsSneaking == 1 if GetForceSneak == 0 SetForceSneak 1 endif else if GetForceSneak == 1 SetForceSneak 0 endif endif elseif GetForceSneak == 1 SetForceSneak 0 endif ;Reunion scene if GetInZone GermPoliceHQZone == 1 if getDistance ShortyRef < 256 if reunionTalking == 0 if reunionStage < 2 if reunionStage == 0 ;Red says something to Shorty if RedRef.getDead == 0 RedRef.sayTo ShortyRef MS01RedShortyReunion 1 set reunionTalking to 1 endif elseif reunionStage == 1 ;Shorty says something to Red if ShortyRef.getDead == 0 ShortyRef.sayTo RedRef MS01RedShortyReunion 1 set reunionTalking to 1 endif endif set reunionStage to reunionStage + 1 endif endif endif endif ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! COPIED FROM DOCTOR TEMPLATE SCRIPT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 1 ) if ( DoOnce== 0 ) disablePlayerControls sayto player MegDocChurchMedicalChatter set Timer to 8 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHeal endif endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 10 enablePlayerControls evp SetAv Variable01 3 Set DoOnce to 0 endif endif ;When set to 1, plays medical animations for eight seconds then restarts conversation with the player if ( GetAV Variable01 == 2 ) if ( DoOnce== 0 ) disablePlayerControls evp set Timer to 8 set DoOnce to 1 if ( GetIsID Sawbones == 0 ) PlayIdle LooseDoctorHeal endif endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) && ( IsImagespaceActive FadeToBlackISFX == 0 ) setstage Doctors 20 enablePlayerControls evp SetAv Variable01 3 Set DoOnce to 0 endif endif ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! End Begin OnPackageStart MS01RedToBigTown set followingPlayer to 0 End Begin OnPackageDone MS01RedToBigTown setstage MS01 80 End Begin OnDeath setstage MS01 150 ;turn off objectives about enslaving her setstage MS13 31 End
800RegulatorSCRIPTSCN RegulatorSCRIPT BEGIN OnLoad RemoveItem ArmorLeather 99 RemoveItem ArmorCombat 99 RemoveItem ArmorMetal 99 RemoveItem ArmorCombatTalon 99 RemoveItem ArmorCombatHelmetTalon 99 if ( GetItemCount RegulatorDuster == 0 ) AddItem ConRegulatorDuster 1 EquipItem RegulatorDuster AddItem HitSquadNoteGoodGuys 1 endif END
801RHSgrenadierTrigSCRIPTscn RHSgrenadierTrigSCRIPT ; script an ambusher to toss grenade down on the player as he enters school lobby.; ; added a second ambusher w/rifle to make it a little more obvious to the player that he's being attacked and from where. short doOnce begin onTriggerEnter Player if doOnce == 0 RHS01GrenadierREF.useWeapon weapGrenadeFrag RHSGrenadierMarker player 1 RHS01GrenadierREF.evp RHS01GrenadierREF.startcombat player RHS01AmbusherREF.useWeapon weapChineseAssaultRifle RHSAmbushMarker player 12 RHS01AmbusherREF.evp RHS01AmbusherREF.startcombat player set doOnce to 1 endif end
802RHSProtectronSCRIPTscn RHSProtectronSCRIPT short talk ; set to 1 to start talking float timer ; used for custom dialogue ; variable01: ; 0: off ; 1-2: turning on ; >= 3: patrolling ; 4: will force greet player ; 9: done with force greet short playerDetected ; set to 1 if player has been detected begin onLoad if getav variable01 == 0 ; I'm currently "off" set talk to 0 ; make me unconscious so I don't play sounds setUnconscious 1 endif end begin OnActivate if isActionRef player == 0 if getav variable01 == 0 ; I'm currently "off" set timer to 1.5 set talk to 1 setav variable01 1 ; turn on setUnconscious 0 ; not unconscious any more Activate ; tell pod to open else setav variable01 0 ; turn off set talk to 0 evp endif else Activate endif end begin gamemode ; update my packages if player is detected (to activate force greet package) if playerDetected == 0 && getav variable01 == 4 if getDetected player == 1 evp set playerDetected to 1 endif endif if talk == 1 && getDead == 0 if timer > 0 set timer to timer - GetSecondsPassed else Say MetroRobotTalk ;roosevelt greeting set talk to 0 endif endif end begin OnPackageEnd ProtectronNotActive if getav variable01 == 0 Activate ; tell pod to open ; make me unconscious setUnconscious 1 endif end
803RHSSuperMutantGrenadierScriptscn RHSSuperMutantGrenadierScript ; Calls evp on Grenadier mutant so he's forced out of his Guard package when hes out of ammo short runTimer float timer begin OnLoad set runTimer to 1 set timer to 0.1 end begin GameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if getItemCount WeapGrenadeFrag == 0 stopcombat evp set runTimer to 0 endif endif endif end
804RL3SCRIPTscn RL3SCRIPT ;Follower Variables short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting BEGIN OnHit player if FFER54NPC1REF.fightPlayer == 0 set FFER54NPC1REF.fightPlayer to 1 endif END BEGIN OnStartCombat Player if FFER54NPC1REF.fightPlayer == 0 set FFER54NPC1REF.fightPlayer to 1 endif END BEGIN gamemode if FFER54NPC1REF.fightPlayer == 0 if isCombatTarget player == 1 set FFER54NPC1REF.fightPlayer to 1 endif elseif FFER54NPC1REF.fightPlayer == 1 set FFER54NPC1REF.fightPlayer to 2 FFER54NPC1REF.modav DamageResist -85 setEssential RL3Follower 0 endif END BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.RL3Hired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.RL3Hired to 0 ShowMessage FollowerMessageDeadRL3 endif END
805robco01MasterScriptscn robco01MasterScript ;/////////////////////////////// ;SCRIPT GLOBALS ;/////////////////////////////// short killRoaches short killEveryone short shutdown short oneShot ;;this ref has been deleted ;;begin onActivate ;; testRRRobot18.kill ;;end ;/////////////////////////////// ;GAME MODE ;/////////////////////////////// BEGIN onTrigger Player ;has the player decided to kill the radRoaches or everything? if xmrkRobcoFactory01KillEveryoneFlag.getDisabled != 1 set killEveryone to 1 set killRoaches to 0 set shutdown to 0 set oneShot to 1 elseIf xmrkRobcoFactory01KillRoachesFlag.getDisabled !=1 set killEveryone to 0 set killRoaches to 1 set shutdown to 0 set oneShot to 1 set oneShot to 1 elseif xmrkRobcoFactory01ShutdownFlag.getDisabled !=1 set shutdown to 1 set killEveryone to 0 set killRoaches to 0 set oneShot to 1 endIf if oneShot == 1 if killEveryone == 1 elseIf killRoaches == 1 ; message "Ze Robobotosos ZOMG!ZORSZ!" ; protRobco01EmployeeA.setFactionRank RobcoRobots -1 ; protRobco01EmployeeA.setFactionRank RobcoRobotsHacked 5 ; protRobco01EmployeeB.setFactionRank RobcoRobots -1 ; protRobco01EmployeeB.setFactionRank RobcoRobotsHacked 5 ; protRobco01EmployeeC.setFactionRank RobcoRobots -1 ; protRobco01EmployeeC.setFactionRank RobcoRobotsHacked 5 ; protRobco01EmployeeD.setFactionRank RobcoRobots -1 ; protRobco01EmployeeD.setFactionRank RobcoRobotsHacked 5 ; protRobco01EmployeeE.setFactionRank RobcoRobots -1 ; protRobco01EmployeeE.setFactionRank RobcoRobotsHacked 5 ; protRobco01EmployeeF.setFactionRank RobcoRobots -1 ; protRobco01EmployeeF.setFactionRank RobcoRobotsHacked 5 elseIf shutdown == 1 endIf endIf ;Clean up set oneShot to 0 xmrkRobcoFactory01ShutdownFlag.disable xmrkRobcoFactory01KillRoachesFlag.disable xmrkRobcoFactory01KillEveryoneFlag.disable END
806RobcoCeilingTurretScriptscn RobcoCeilingTurretScript begin onLoad stopCombat setUnconscious 1 end begin OnActivate if isActionRef player == 1 activate else setUnconscious 0 endif end
807RobcoProtectronSCRIPTscn RobcoProtectronSCRIPT begin onLoad if getav variable01 == 0 ; I'm currently "off" ; make me unconscious so I don't play sounds setUnconscious 1 else setav variable01 4 endif end begin OnActivate if isActionRef player == 0 if getav variable01 == 0 ; I'm currently "off" setav variable01 1 ; turn on setUnconscious 0 ; not unconscious any more Activate ; tell pod to open else setav variable01 0 ; turn off evp endif else Activate endif end begin OnPackageEnd ProtectronNotActive if getav variable01 == 0 Activate ; to get pod to close behind me ; make me unconscious setUnconscious 1 endif end
808RobcoRobotScriptscn RobcoRobotScript float timer short resurrected short hasLoaded begin onLoad if hasLoaded == 0 set hasLoaded to 1 kill endif end begin onActivate if isActionRef MS03RobCoMasterTerminalREF == 1 if IsLimbGone -1 || IsLimbGone 0 || IsLimbGone 1 || IsLimbGone 2 || IsLimbGone 3 || IsLimbGone 4 || IsLimbGone 5 || IsLimbGone 6 || IsLimbGone 7 || IsLimbGone 8 || IsLimbGone 9 || IsLimbGone 10 || IsLimbGone 11 || IsLimbGone 12 || IsLimbGone 13 else resurrect setav health 75 endif else activate endif end
809RonaldLarenScriptscn RonaldLarenScript short DoOnce short GoTalk ;This short script is designed for use only if the BlackWidow Trait line was used in dialog with Ronald Laren ;He will immediately make a beeline for the Nuka-Cola Plant, and will disable as soon as in different cell as the player begin gamemode if ( DoOnce == 0 ) if ( MS05.BlackWidow1 == 1 ) if ( GetInCell NukaColaPlant01 == 1 ) if ( Player.GetInCell NukaColaPlant01 == 0 ) Kill Disable RonaldLarenCorpseRef.Enable set DoOnce to 1 endif endif endif endif end begin OnDeath if ( GetObjectiveDisplayed MS05 45 == 1 ) setObjectiveDisplayed MS05 45 0 endif end
810RoyPhillipsScriptscn RoyPhillipsScript ;See MS12QuestScript for other script related to this character's involvement in that quest short moveToLobby short cheerToPlayer short evpToLobby short talking short GoToWarringtonDoOnce ;condition on package short resetAIDoOnce short argumentStage ;variable used in conversation Begin OnDeath set MS12.countGhoulsDead to MS12.countGhoulsDead + 1 RoyPhillipsRef.addToFaction MS12GhoulsHostileFaction 0 BessieLynnRef.addToFaction MS12GhoulsHostileFaction 0 MichaelMastersRef.addToFaction MS12GhoulsHostileFaction 0 if MS12.countGhoulsDead >= 3 set MS12.allGhoulsDead to 1 setStage MS12 20 endif End Begin GameMode if getIsCurrentPackage MS12RoyWaitForDoor == 1 if talking == 0 && getDistance player < 500 set talking to 1 sayto player MS12RoyPhillipsSayToPlayer endif endif if IsInCombat == 1 if GetCombatTarget == player ;this is to get him on a travel continue during combat package, so that if the player attacks him outside tenpenny tower, Roy doesn't try to take cover inside tenpenny tower. if GoToWarringtonDoOnce == 0 resetAI set resetAIDoOnce to 1 endif RoyPhillipsRef.addToFaction MS12GhoulsHostileFaction 0 BessieLynnRef.addToFaction MS12GhoulsHostileFaction 0 MichaelMastersRef.addToFaction MS12GhoulsHostileFaction 0 endif endif End Begin SayToDone set talking to 0 End
811RR01EcvDoorBg01SCRIPTscn RR01EcvDoorBg01SCRIPT Begin onActivate if IsActionRef player == 1 showmessage RR01BarricadeDoor01Msg endif End
812RR03TrigStartConversation01SCRIPTscn RR03TrigStartConversation01SCRIPT short doOnce ;******************************************* Begin onTriggerEnter Player if doOnce == 0 if (RR03EnclaveSoldier01REF.isInCombat != 1) && (RR03EnclaveSoldier02REF.isInCombat != 1) RR03EnclaveSoldier01REF.startConversation RR03EnclaveSoldier02REF set doOnce to 1 ;Trigger is only set off one time endif endif End ;*******************************************
813RRExtMainEntranceDoor01SCRIPTscn RRExtMainEntranceDoor01SCRIPT Begin onActivate if (IsActionRef Player == 1) showmessage GenericDoorActivatedElsewhereMsg elseif (IsActionRef RRExteriorStage1TriggerREF == 1) activate endif End
814RRExtMainEntranceDoor02SCRIPTscn RRExtMainEntranceDoor02SCRIPT Begin onLoad DamageObject 2 End
815SatCom01BossSCRIPTscn SatCom01BossSCRIPT ; simple script that enables the boss of this location only when the player is about to encounter him short doOnce begin onTriggerEnter player if doOnce == 0 SatComArray01BossREF.enable set doOnce to 1 endif end
816SatCom01DoorSCRIPTscn SatCom01DoorSCRIPT ; simple activate blocker. Don't let members of Talon Company get below this hatch. ref myActor begin onActivate set myActor to getActionRef if myActor.getInFaction TalonCompany == 1 ; do nothing else activate endif end
817SatComDelaySCRIPTscn SatComDelaySCRIPT ; this script is attached to a trigger that we use to get a better guess on the player's chance to see the bombs fall. begin onTriggerLeave if NQlvl.launchCodesUploaded == 1 if NQlvl.launchInView == 0 set NQlvl.launchInView to 1 endif endif end
818SatComLaunchSCRIPTscn SatComLaunchSCRIPT ; if player has uploaded launch codes at satcomarray01, triggers a bombing of area around exterior. float timer float timerMax short timerFlag float delay ; time to wait before launch sequence. short b01 short b02 short b03 short b04 short b05 short b06 short b07 short b08 ;short debugFlag short init ;===================== begin gameMode if init == 0 set delay to 3 set timerMax to (delay + 5) set init to 1 endif if NQlvl.launchCodesUploaded >= 1 && timerFlag == 0 ; check if codes were uploaded if NQlvl.launchInView == 1 ; and if the player's exited the trigger covering the blind spot set timer to 0 set timerFlag to 1 endif endif if timerFlag == 1 if timer < timerMax set timer to (timer + getSecondsPassed) elseif timer >= timerMax set timerFlag to 0 endif endif if timerFlag == 1 ; handle dropping the nukes ;if timer <= (timerMax ) && debugFlag == 0 ; ;showWarning "Launch commencing..." ; set debugflag to 1 ;endif if timer >= (0.0) && b01 == 0 SatcomLaunch01.fireweapon SatcomNuclearStrike SatcomLaunch01.fireweapon weapLaserRifle set b01 to 1 elseif timer >= (0.75) && b02 == 0 SatcomLaunch02.fireweapon SatcomNuclearStrike SatcomLaunch02.fireweapon weapLaserRifle set b02 to 1 elseif timer >= (1.25) && b03 == 0 SatcomLaunch03.fireweapon SatcomNuclearStrike SatcomLaunch03.fireweapon weapLaserRifle set b03 to 1 elseif timer >= (2) && b04 == 0 SatcomLaunch04.fireweapon SatcomNuclearStrike SatcomLaunch04.fireweapon weapLaserRifle set b04 to 1 elseif timer >= (2.55) && b05 == 0 SatcomLaunch05.fireweapon SatcomNuclearStrike SatcomLaunch05.fireweapon weapLaserRifle set b05 to 1 elseif timer >= (3.5) && b06 == 0 SatcomLaunch06.fireweapon SatcomNuclearStrike SatcomLaunch06.fireweapon weapLaserRifle set b06 to 1 elseif timer >= (4.0) && b07 == 0 SatcomLaunch07.fireweapon SatcomNuclearStrike SatcomLaunch07.fireweapon weapLaserRifle set b07 to 1 elseif timer >= (5.5) && b08 == 0 SatcomLaunch08.fireweapon SatcomNuclearStrike SatcomLaunch08.fireweapon weapLaserRifle set b08 to 1 endif endif end
819ScavengerBarnPostMQ05Scriptscn ScavengerBarnPostMQ05Script begin onTriggerEnter player if (getStage MQ05 >= 85) disable BarnScavengerItem01.ClearOwnership BarnScavengerItem02.ClearOwnership BarnScavengerItem03.ClearOwnership BarnScavengerItem04.ClearOwnership BarnScavengerItem05.ClearOwnership BarnScavengerItem06.ClearOwnership BarnScavengerItem07.ClearOwnership BarnScavengerItem08.ClearOwnership BarnScavengerItem09.ClearOwnership BarnScavengerItem10.ClearOwnership BarnScavengerItem11.ClearOwnership BarnScavengerItem12.ClearOwnership BarnScavengerItem13.ClearOwnership BarnScavengerItem14.ClearOwnership BarnScavengerItem15.ClearOwnership BarnScavengerItem16.ClearOwnership BarnScavengerItem17.ClearOwnership BarnScavengerItem18.ClearOwnership BarnScavengerItem19.ClearOwnership BarnScavengerItem20.ClearOwnership BarnScavengerItem21.ClearOwnership BarnScavengerItem22.ClearOwnership BarnScavengerItem23.ClearOwnership BarnScavengerItem24.ClearOwnership BarnScavengerItem25.ClearOwnership BarnScavengerItem26.ClearOwnership BarnScavengerItem27.ClearOwnership BarnScavengerItem28.ClearOwnership BarnScavengerItem29.ClearOwnership BarnScavengerItem30.ClearOwnership BarnScavengerItem31.ClearOwnership BarnScavengerItem32.ClearOwnership BarnScavengerItem33.ClearOwnership endif end
820SchematicsBottlecapMineItemSCRIPTscn SchematicsBottlecapMineItemSCRIPT short AddOnce ;Do Once variable BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item and updates the note. ;Second Improvement if (player.gethasnote SchematicsBottlecapMineNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countBottlecapBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsBottlecapMineNote10 player.addNote SchematicsBottlecapMineNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsBottlecapMineNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countBottlecapBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsBottlecapMineNote player.addNote SchematicsBottlecapMineNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsBottlecapMineNote20 == 0) ;Add the Schematic Note player.addNote SchematicsBottlecapMineNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
821SchematicsDartGunItemSCRIPTscn SchematicsDartGunItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsDartGunNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countDartgunBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsDartGunNote10 player.addNote SchematicsDartGunNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsDartGunNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countDartGunBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsDartGunNote player.addNote SchematicsDartGunNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsDartGunNote20 == 0) ;Add the Schematic Note player.addNote SchematicsDartGunNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
822SchematicsDeathclawGauntletItemSCRIPTscn SchematicsDeathclawGauntletItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsDeathclawGauntletNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countDeathclawBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsDeathclawGauntletNote10 player.addNote SchematicsDeathclawGauntletNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsDeathclawGauntletNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countDeathclawBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsDeathclawGauntletNote player.addNote SchematicsDeathclawGauntletNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsDeathclawGauntletNote20 == 0) ;Add the Schematic Note player.addNote SchematicsDeathclawGauntletNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
823SchematicsNukaCocktailItemSCRIPTscn SchematicsNukaCocktailItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsNukaCocktailNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countNukaBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsNukaCocktailNote10 player.addNote SchematicsNukaCocktailNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsNukaCocktailNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countNukaBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsNukaCocktailNote player.addNote SchematicsNukaCocktailNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsNukaCocktailNote20 == 0) ;Add the Schematic Note player.addNote SchematicsNukaCocktailNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
824SchematicsRailwayRifleItemSCRIPTscn SchematicsRailwayRifleItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsRailwayRifleNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countRailwayBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsRailwayRifleNote10 player.addNote SchematicsRailwayRifleNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsRailwayRifleNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countRailwayBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsRailwayRifleNote player.addNote SchematicsRailwayRifleNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsRailwayRifleNote20 == 0) ;Add the Schematic Note player.addNote SchematicsRailwayRifleNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
825SchematicsRockItLauncherItemSCRIPTscn SchematicsRockItLauncherItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsRockItLauncherNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countRockItBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsRockItLauncherNote10 player.addNote SchematicsRockItLauncherNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First note -> first Improvement elseif (player.gethasnote SchematicsRockItLauncherNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countRockItBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsRockItLauncherNote player.addNote SchematicsRockItLauncherNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsRockItLauncherNote20 == 0) ;Add the Schematic Note player.addNote SchematicsRockItLauncherNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
826SchematicsShishkebabItemSCRIPTscn SchematicsShishkebabItemSCRIPT short AddOnce BEGIN OnAdd player if (AddOnce == 0) ;If the player already has a copy of the schematic, getting another improves the quality of the created item. ;Second Improvement if (player.gethasnote SchematicsShishkebabNote10 == 1) ;Increment a variable for number of times this schematic has been gotten. set countShishkebabBonus to 1.25 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsShishkebabNote10 player.addNote SchematicsShishkebabNote20 ;Remove this item from inventory set AddOnce to 1 removeme ;First Improvement elseif (player.gethasnote SchematicsShishkebabNote == 1) ;Increment a variable for number of times this schematic has been gotten. set countShishkebabBonus to 1 ;Show message of quality improvement. ShowMessage SchematicsImprovedMsg player.removeNote SchematicsShishkebabNote player.addNote SchematicsShishkebabNote10 ;Remove this item from inventory set AddOnce to 1 removeme ;Otherwise, just add the note elseif (player.gethasnote SchematicsShishkebabNote20 == 0) ;Add the Schematic Note player.addNote SchematicsShishkebabNote ;Remove this item from inventory set AddOnce to 1 removeme endif endif END
827SchematicsWorkbenchScriptscn SchematicsWorkbenchScript ;workbench to create customized weapons ; 1. Which schematics does the player have? Display as buttons. ; 2. If has items needed to create, do it; otherwise display "error" message short HasItems short Button short item1 short item2 short item3 short item4 float weaponCondition ; calculate what condition the weapon is at when created ; how many of these weapons has the player made? ;short countBottlecap ;short countDartGun ;short countDeathclaw ;short countNuka ;short countRailway ;short countRockit ;short countShishkebab Begin OnActivate if IsActionRef player == 1 ; display message box of possible weapons set HasItems to 0 if GetHasNote SchematicsBottlecapMineNote == 1 || GetHasNote SchematicsDartGunNote == 1 || GetHasNote SchematicsDeathclawGauntletNote == 1 set HasItems to 1 endif if GetHasNote SchematicsNukaCocktailNote == 1 || GetHasNote SchematicsRailwayRifleNote == 1 || GetHasNote SchematicsRockitLauncherNote == 1 || GetHasNote SchematicsShishkebabNote == 1 set HasItems to 1 endif if GetHasNote SchematicsBottlecapMineNote10 == 1 || GetHasNote SchematicsDartGunNote10 == 1 || GetHasNote SchematicsDeathclawGauntletNote10 == 1 set HasItems to 1 endif if GetHasNote SchematicsNukaCocktailNote10 == 1 || GetHasNote SchematicsRailwayRifleNote10 == 1 || GetHasNote SchematicsRockitLauncherNote10 == 1 || GetHasNote SchematicsShishkebabNote10 == 1 set HasItems to 1 endif if GetHasNote SchematicsBottlecapMineNote20 == 1 || GetHasNote SchematicsDartGunNote20 == 1 || GetHasNote SchematicsDeathclawGauntletNote20 == 1 || GetHasNote SchematicsRockitLauncherNote30 == 1 set HasItems to 1 endif if GetHasNote SchematicsNukaCocktailNote20 == 1 || GetHasNote SchematicsRailwayRifleNote20 == 1 || GetHasNote SchematicsRockitLauncherNote20 == 1 || GetHasNote SchematicsShishkebabNote20 == 1 set HasItems to 1 endif if HasItems == 1 ShowMessage SchematicsWorkbenchMsg else ShowMessage SchematicsWorkbenchNoneMsg endif endif End Begin GameMode set Button to GetButtonPressed if ( Button >0 ) ; base condition is just repair skill set weaponCondition to (player.getav Repair)/100 if button == 1 ; bottlecap mine ; 1. check for schematics if GetHasNote SchematicsBottlecapMineNote == 0 && GetHasNote SchematicsBottlecapMineNote10 == 0 && GetHasNote SchematicsBottlecapMineNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount LunchBox > 0 ) && ( player.GetItemCount CherryBomb > 0 ) && ( player.GetItemCount SensorModule > 0 ) && ( player.GetItemCount Caps001 >= 10 ) ; 3. make it ShowMessage SchematicsWorkbenchSuccessBottlecapMsg player.RemoveItem LunchBox 1 1 player.RemoveItem CherryBomb 1 1 player.RemoveItem SensorModule 1 1 player.RemoveItem Caps001 10 1 ; Mines and Grenades are always 100% if player.gethasNote SchematicsBottlecapMineNote player.AddItemHealthPercent WeapMineBottlecap 1 100 elseif player.gethasNote SchematicsBottlecapMineNote10 player.AddItemHealthPercent WeapMineBottlecap 2 100 elseif player.gethasNote SchematicsBottlecapMineNote20 player.AddItemHealthPercent WeapMineBottlecap 3 100 endif PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countBottlecap to countBottlecap + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount LunchBox set item2 to player.GetItemCount CherryBomb set item3 to player.GetItemCount SensorModule set item4 to player.GetItemCount Caps001 ShowMessage SchematicsWorkbenchFailureBottlecapMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 2 ; dart gun ; 1. check for schematics if GetHasNote SchematicsDartGunNote == 0 && GetHasNote SchematicsDartGunNote10 == 0 && GetHasNote SchematicsDartGunNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ;2. check for components if ( player.GetItemCount PaintGun > 0 ) && ( player.GetItemCount RadscorpionPoisonGland > 0 ) && ( player.GetItemCount ToyCar > 0 ) && ( player.GetItemCount SurgicalTubing > 0 ) ;3. make it ;message "Dart Gun created." ShowMessage SchematicsWorkbenchSuccessDartGunMsg player.RemoveItem PaintGun 1 1 player.RemoveItem RadscorpionPoisonGland 1 1 player.RemoveItem ToyCar 1 1 player.RemoveItem SurgicalTubing 1 1 ; calculate condition set weaponCondition to (weaponCondition * countDartGunBonus) if weaponCondition > 100 set weaponCondition to 100 endif player.AddItemHealthPercent WeapDartGun 1 weaponCondition PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countDartgun to countDartgun + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ;failure message set item1 to player.GetItemCount PaintGun set item2 to player.GetItemCount RadscorpionPoisonGland set item3 to player.GetItemCount ToyCar set item4 to player.GetItemCount SurgicalTubing ShowMessage SchematicsWorkbenchFailureDartGunMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 3 ; deathclaw gauntlet ; 1. check for schematics if GetHasNote SchematicsDeathclawGauntletNote == 0 && GetHasNote SchematicsDeathclawGauntletNote10 == 0 && GetHasNote SchematicsDeathclawGauntletNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount WonderGlue > 0 ) && ( player.GetItemCount DeathclawHand > 0 ) && ( player.GetItemCount LeatherBelt > 0 ) && ( player.GetItemCount MedicalBrace > 0 ) ; 3. make it ;message "Deathclaw Gauntlet created." ShowMessage SchematicsWorkbenchSuccessDeathclawMsg player.RemoveItem WonderGlue 1 1 player.RemoveItem DeathclawHand 1 1 player.RemoveItem LeatherBelt 1 1 player.RemoveItem MedicalBrace 1 1 ; calculate condition set weaponCondition to (weaponCondition * countDeathclawBonus) if weaponCondition > 100 set weaponCondition to 100 endif player.AddItemHealthPercent WeapDeathclawGauntlet 1 weaponCondition PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countDeathclaw to countDeathclaw + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount WonderGlue set item2 to player.GetItemCount DeathclawHand set item3 to player.GetItemCount LeatherBelt set item4 to player.GetItemCount MedicalBrace ShowMessage SchematicsWorkbenchFailureDeathclawMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 4 ; nuka grenade ; 1. check for schematics if GetHasNote SchematicsNukaCocktailNote == 0 && GetHasNote SchematicsNukaCocktailNote10 == 0 && GetHasNote SchematicsNukaCocktailNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount MS05NukaColaQtm > 0 ) && ( player.GetItemCount TinCan01 > 0 ) && ( player.GetItemCount Turpentine > 0 ) && ( player.GetItemCount AbraxoCleaner > 0 ) ; 3. make it ;message "Nuka Cocktail created." ShowMessage SchematicsWorkbenchSuccessNukaCocktailMsg player.RemoveItem MS05NukaColaQtm 1 1 player.RemoveItem TinCan01 1 1 player.RemoveItem Turpentine 1 1 player.RemoveItem AbraxoCleaner 1 1 ; Mines and Grenades are always 100% if player.gethasNote SchematicsNukaCocktailNote player.AddItemHealthPercent WeapNukaCocktail 1 100 elseif player.gethasNote SchematicsNukaCocktailNote10 player.AddItemHealthPercent WeapNukaCocktail 2 100 elseif player.gethasNote SchematicsNukaCocktailNote20 player.AddItemHealthPercent WeapNukaCocktail 3 100 endif PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countNuka to countNuka + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount MS05NukaColaQtm set item2 to player.GetItemCount TinCan01 set item3 to player.GetItemCount Turpentine set item4 to player.GetItemCount AbraxoCleaner ShowMessage SchematicsWorkbenchFailureNukaCocktailMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 5 ; railway rifle ; 1. check for schematics if GetHasNote SchematicsRailwayRifleNote == 0 && GetHasNote SchematicsRailwayRifleNote10 == 0 && GetHasNote SchematicsRailwayRifleNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount Crutch > 0 ) && ( player.GetItemCount SteamGaugeAssembly > 0 ) && ( player.GetItemCount FissionBattery > 0 ) && ( player.GetItemCount PressureCooker > 0 ) ; 3. make it ;message "Railway Rifle created." ShowMessage SchematicsWorkbenchSuccessRailwayRifleMsg player.RemoveItem Crutch 1 1 player.RemoveItem SteamGaugeAssembly 1 1 player.RemoveItem FissionBattery 1 1 player.RemoveItem PressureCooker 1 1 ; calculate condition set weaponCondition to (weaponCondition * countRailwayBonus) if weaponCondition > 100 set weaponCondition to 100 endif player.AddItemHealthPercent WeapRailwayRifle 1 weaponCondition PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countRailway to countRailway + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount Crutch set item2 to player.GetItemCount SteamGaugeAssembly set item3 to player.GetItemCount FissionBattery set item4 to player.GetItemCount PressureCooker ShowMessage SchematicsWorkbenchFailureRailwayRifleMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 6 ; rock-it launcher ; 1. check for schematics if GetHasNote SchematicsRockItLauncherNote == 0 && GetHasNote SchematicsRockItLauncherNote10 == 0 && GetHasNote SchematicsRockItLauncherNote20 == 0 && GetHasNote SchematicsRockItLauncherNote30 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount VacuumCleaner > 0 ) && ( player.GetItemCount LeafBlower > 0 ) && ( player.GetItemCount FirehoseNozzle > 0 ) && ( player.GetItemCount Conductor > 0 ) ; 3. make it ;message "Rock-It Launcher created." ShowMessage SchematicsWorkbenchSuccessRockItMsg player.RemoveItem VacuumCleaner 1 1 player.RemoveItem LeafBlower 1 1 player.RemoveItem FirehoseNozzle 1 1 player.RemoveItem Conductor 1 1 ; calculate condition set weaponCondition to (weaponCondition * countRockitBonus ) if weaponCondition > 100 set weaponCondition to 100 endif player.AddItemHealthPercent WeapRockItLauncher 1 weaponCondition PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countRockit to countRockit + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount VacuumCleaner set item2 to player.GetItemCount LeafBlower set item3 to player.GetItemCount FirehoseNozzle set item4 to player.GetItemCount Conductor ShowMessage SchematicsWorkbenchFailureRockItMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif elseif button == 7 ; Shishkebab ; 1. check for schematics if GetHasNote SchematicsShishkebabNote == 0 && GetHasNote SchematicsShishkebabNote10 == 0 && GetHasNote SchematicsShishkebabNote20 == 0 ShowMessage SchematicsWorkbenchFailureGenericMsg else ; 2. check for components if ( player.GetItemCount MotorcycleGasTank > 0 ) && ( player.GetItemCount PilotLight > 0 ) && ( player.GetItemCount LawnmowerBlade > 0 ) && ( player.GetItemCount MotorcycleHandbrake > 0 ) ; 3. make it ;message "Shishkebab created." ShowMessage SchematicsWorkbenchSuccessShishkebabMsg player.RemoveItem MotorcycleGasTank 1 1 player.RemoveItem PilotLight 1 1 player.RemoveItem LawnmowerBlade 1 1 player.RemoveItem MotorcycleHandBrake 1 1 ; calculate condition set weaponCondition to (weaponCondition * countShishkebabBonus ) if weaponCondition > 100 set weaponCondition to 100 endif player.AddItemHealthPercent WeapShishkebab 1 weaponCondition PlaySound UIRepairWeapon ; increment count ModPCMiscStat "Weapons Created" 1 set countShishkebab to countShishkebab + 1 ;If the player has made one of each item, add Achievement 40 if countWeapAchievement == 0 if countBottlecap >= 1 && countDartgun >= 1 && countDeathclaw >= 1 && countNuka >= 1 && countRailway >= 1 && countRockit >= 1 && countShishkebab >= 1 addachievement 40 set countWeapAchievement to 1 endif endif else ; 4. failure message set item1 to player.GetItemCount MotorcycleGasTank set item2 to player.GetItemCount PilotLight set item3 to player.GetItemCount LawnmowerBlade set item4 to player.GetItemCount MotorcycleHandbrake ShowMessage SchematicsWorkbenchFailureShishkebabMsg, item1, item2, item3, item4 ShowMessage SchematicsWorkbenchMsg endif endif endif endif End
828ScribeYearlingScriptscn ScribeYearlingScript ;Tracks if Scribe Yearling is alive or dead and updates quest MS03, which uses her for task MS03c3 BEGIN OnDeath set MS03.MS03ScribeYearlingDead to 1 END
829scVault106BShrinkscn scVault106BShrink ref triggerRef BEGIN OnTriggerEnter Player set triggerRef to getSelf IF Vault106ShrinkingHallDoOnce.getDisabled == 1 ;////////////////////////////////////////////// ;//HANDLE THE SHRINKAGE// ;////////////////////////////////////////////// if triggerRef == Vault106BShrink100 || triggerRef == Vault106BShrink100A player.setScale 1 endIf if triggerRef == Vault106BShrink91 || triggerRef == Vault106BShrink91A player.setScale 0.91 endIf if triggerRef == Vault106BShrink83 || triggerRef == Vault106BShrink83A player.setScale 0.83 endIf if triggerRef == Vault106BShrink75 || triggerRef == Vault106BShrink75A player.setScale 0.75 endIf if triggerRef == Vault106BShrink66 || triggerRef == Vault106BShrink66A player.setScale 0.66 endIf if triggerRef == Vault106BShrink58 || triggerRef == Vault106BShrink58A player.setScale 0.58 endIf if triggerRef == Vault106BShrink50 player.setScale 0.5 endIf ;///////////////////////////////////////// ;//WORK THE MODIFIER// ;//////////////////////////////////////// IF triggerRef == Vault106BShrink100 ApplyIMageSpaceModifier vault106HallucinationISFX ELSEIF triggerRef == Vault106BShrink100A rimod vault106HallucinationISFX Vault106ShrinkingHallDoOnce.enable ENDIF ENDIF END
830scVault106RIMODSCRIPTscn scVault106RIMODSCRIPT BEGIN OnTriggerEnter Player rimod vault106HallucinationISFX ;kill some fathers V106SignsOfLifeFather0.disable V106SignsOfLifeFather1.disable V106SignsOfLifeFather2.disable ;kill the special terminal Vault106AHallucinationTerminalTERM.disable Vault106AHallucinationTerminalRegularXMRK.enable ;kill the overeeser just in case vault106OverseerREF.disable ;turn off the boss room flag vault106BossRoomiModsOn.disable END
831SDOHandlerScriptscn SDOHandlerScript ;This small script handles the disable of the SDO after successful transaction short DoneStuff begin gamemode if ( DoneStuff == 0 ) if ( DialogueMSMini.SDODone == 1 ) if ( GetInSameCell Player == 0 ) Disable set DoneStuff to 1 endif endif endif end
832SewardSqTalonFight01ControlTriggerSCRIPTscn SewardSqTalonFight01ControlTriggerSCRIPT ; This trigger is triggered by the player only and controls the first Talon Company Fight with the Mutants in Seward Sq near the Capitol. ; This trigger only gets triggered once. ref target short doOnce float timer ;********************************** Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable set timer to 120 set doOnce to 1 ;Trigger is only set off one time endif End ;********************************** Begin gameMode if (doOnce == 1) if (timer <= 0) ;after timer has expired set condition for talon company to take on sandbox packages. SewardSqTalonFight01Missile01REF.setav variable01 5 set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End ;**********************************
833SewardSqTalonFight01Missile01SCRIPTscn SewardSqTalonFight01Missile01SCRIPT float timer short doOnce short stage ;********************************************************************* Begin onPackageEnd SewardSqTalonFight01MissileTravel01 set timer to 10 setav variable01 1 evp set stage to 1 End ;********************************************************************* Begin onPackageEnd SewardSqTalonFight01MissileTravel02 setav variable01 3 evp End ;********************************************************************* Begin onPackageEnd SewardSqTalonFight01MissileUseWeap01 setav variable01 4 evp End ;********************************************************************* Begin gameMode if (doOnce == 0) if (stage == 1) if (timer <= 0) setav variable01 2 evp set doOnce to 1 else set timer to (timer - GetSecondsPassed) endif ;elseif (stage == 2) ;if (timer <= 0) ; useweapon endif endif End ;*********************************************************************
834SewardSqTalonFight01Switch01SCRIPTscn SewardSqTalonFight01Switch01SCRIPT float timer ref actionRef ref target01 ref target02 short artilleryDice short artilleryStage short previousTarget ;************************************ Begin onActivate set actionRef to getActionRef if (artilleryStage == 0) if (actionRef == Player) activate set artilleryStage to 1 endif endif End ;************************************ Begin gameMode if (artilleryStage == 1) ;need to pick two markers as targets for the artillery strike set artilleryDice to (1 + (0.06 * getRandomPercent)) if (artilleryDice == previousTarget) if (artilleryDice == 6) set artilleryDice to 1 else set artilleryDice to (artilleryDice + 1) endif set previousTarget to artilleryDice else set previousTarget to artilleryDice endif if (artilleryDice == 1) set target01 to SewardSqArtilleryStrike01REF set target02 to SewardSqArtilleryStrike02REF set artilleryStage to 2 elseif (artilleryDice == 2) set target01 to SewardSqArtilleryStrike02REF set target02 to SewardSqArtilleryStrike03REF set artilleryStage to 2 elseif (artilleryDice == 3) set target01 to SewardSqArtilleryStrike03REF set target02 to SewardSqArtilleryStrike04REF set artilleryStage to 2 elseif (artilleryDice == 4) set target01 to SewardSqArtilleryStrike04REF set target02 to SewardSqArtilleryStrike05REF set artilleryStage to 2 elseif (artilleryDice == 5) set target01 to SewardSqArtilleryStrike05REF set target02 to SewardSqArtilleryStrike06REF set artilleryStage to 2 elseif (artilleryDice == 6) set target01 to SewardSqArtilleryStrike06REF set target02 to SewardSqArtilleryStrike01REF set artilleryStage to 2 endif elseif (artilleryStage == 2) if (timer <= 0) target01.placeatme FXArtilleryStrike01 1 set timer to 2 set artilleryStage to 3 else set timer to (timer - GetSecondsPassed) endif elseif (artilleryStage == 3) if (timer <= 0) target02.placeatme FXArtilleryStrike01 1 set timer to 2 activate ;turn switch back to red set artilleryStage to 0 else set timer to (timer - GetSecondsPassed) endif endif End ;************************************
835ShalebridgeCompostHeapSCRIPTscn ShalebridgeCompostHeapSCRIPT ; this container does cool stuff. short active ; flag to run gameMode block short HighSci short AvgSci short LowSci short delayMod short seenQueenMsg ;========================================; begin onActivate if IsActionRef player == 1 ;-----------------------To Do: Set to kill queen ant instead----------------------------------------- if NQlvl.enemyColonyKills >= 1 ; must equal the number of ants in opposing colony! set delayMod to 3 ; if player has exterminated opposing colony, respawn two days faster endif set active to 1 if avgSci == 1 && NQlvl.enemyColonyKills >= 1 && seenQueenMsg == 0 ShowMessage ShalebridgeCompostHeapQueenMsg set seenQueenMsg to 1 endif if player.getAV science >= 40 && HighSci == 0 ShowMessage ShalebridgeCompostHeapSmartMsg set HighSci to 1 set avgSci to 1 elseif player.getAV science < 40 && player.getAV science >= 20 && AvgSci == 0 ShowMessage ShalebridgeCompostHeapAveMsg Set avgSci to 1 elseif player.getAV science < 20 && LowSci == 0 ShowMessage ShalebridgeCompostHeapStupidMsg set lowSci to 1 endif endif end ;========================================; begin gameMode if active == 1 if NQlvl.DayLastSpawned < 1 ; must be my first time being spawned set NQlvl.DayLastSpawned to gameDaysPassed ; save the current day to test when to respawn additem AntNectar 2 ; add initial freebie nectars else if gameDaysPassed >= ( NQlvl.DayLastSpawned + (7 - delayMod )) ; default spawn rate is 1x/week, delayMod can shorten this additem AntNectar 1 ; we're ready to respawn, so add nectar if NQlvl.PCstimulatedEggs >= 1 additem AntNectar 1 ; bonus dose if player cultured egg pile w/stimpak set NQlvl.PCstimulatedEggs to 0 endif set NQlvl.DayLastSpawned to gameDaysPassed ; and set this as the new spawn date endif endif if player.getAV science >= 20 ; blocks conditionalized for player access to contents activate player endif set active to 0 ; we're done, turn off the gameMode block. endif end
836ShalebridgeEggPileSCRIPTscn ShalebridgeEggPileSCRIPT short button short active ;----------------------------------------------------------------------------------- begin onActivate if NQlvl.PCstimulatedEggs == 0 if player.getAV medicine >= 40 || player.getAV science >= 70 || player.getav intelligence == 8 if player.getItemCount stimpak > 0 ShowMessage ShalebridgeEggPileMsg set active to 1 else ShowMessage ShalebridgeEggPileNoStimMsg endif elseif player.getAV intelligence <= 3 ShowMessage ShalebridgeEggPileStupidMsg else ShowMessage ShalebridgeEggPileNoSkillMsg endif endif end ;----------------------------------------------------------------------------------- begin gameMode if active != 0 set button to getButtonPressed set active to 0 if button > -1 if button == 1 ;Message "You have injected the eggs to stimulate future growth" ShowMessage ShalebridgeEggPileStimMsg set NQlvl.PCstimulatedEggs to 1 if player.getItemCount stimpak > 0 player.removeItem stimpak 1 endif elseif button == 0 ; leave it alone. endif endif endif end ;-----------------------------------------------------------------------------------
837ShalebridgeInvaderAntScriptscn ShalebridgeInvaderAntScript short button ref myself begin onActivate set myself to getSelf if (isactionref player == 1) if NQlvl.InvaderAntActivated < 1 set NQlvl.InvaderAntActivated to 1 showMessage ShalebridgeInvaderAntMsg elseif NQlvl.InvaderAntActivated == 2 activate endif endif end begin gameMode if NQlvl.InvaderAntActivated == 1 set button to getbuttonpressed if button > -1 activate set NQlvl.InvaderAntActivated to 2 ;disables message endif endif end
838ShalebridgeRedAntSCRIPTscn ShalebridgeRedAntSCRIPT begin onDeath set NQlvl.enemyColonyKills to (NQlvl.enemyColonyKills + 1) setzoneRespawns Shalebridge02 0 ShalebridgeMasterAnt.enable end
839ShortyScriptscn ShortyScript short kitchenStage ;(-1 = done with conversation) holds variable that controls conversation MS01KitchenConversation short startingAggression ;stores his starting aggression so I can change it back short rescued ;1 = player rescued, set in dialog, condition on package short followingPlayer ;1 = following, -1 == waiting short arrivedAtBigTown short init ;do once Begin GameMode if init == 0 set startingAggression to getAv Aggression set init to 1 endif ; simulate Big Town being wiped out by mutants if getStageDone MS01 251 == 1 || getStageDone MS01 180 == 1 if GetDead == 0 kill endif endif if MS01.sneak == 1 if player.IsSneaking == 1 if GetForceSneak == 0 SetForceSneak 1 endif else if GetForceSneak == 1 SetForceSneak 0 endif endif elseif GetForceSneak == 1 SetForceSneak 0 endif End Begin OnPackageStart MS01ShortyToBigTown set followingPlayer to 0 End Begin OnPackageDone MS01ShortyToBigTown setstage MS01 90 End Begin OnPackageChange MS01KitchenWaitForDialog ShortyRef.setav Aggression ShortyRef.startingAggression End Begin OnDeath setstage MS01 160 End
840SierraPetrovitaScriptscn SierraPetrovitaScript short DoOnce float Timer begin gamemode ;When set to 1, plays cooking animations for five seconds then restarts conversation with the player if ( MS05Fin.MakePie == 1 ) if ( DoOnce== 0 ) disablePlayerControls set MS05FinCook to 1 evp player.removeitem MS05NukaColaQtm 1 player.removeitem flour 1 player.removeitem vodka 1 set Timer to 25 set DoOnce to 1 endif set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 6 ) && ( DoOnce == 1 ) IMod FadeToBlackISFX set DoOnce to 2 endif if ( Timer <= 0 ) set MS05FinCook to 0 set MS05FinCookDone to 1 Set MS05Fin.MakePie to 0 Set MS05Fin.BakedPie to 1 Set DoOnce to 0 resetai endif endif end begin OnDeath if ( GetQuestRunning MS05 == 1 ) if ( GetStage MS05 >= 10 ) SetStage MS05 250 endif endif end
841SilverScriptscn SilverScript begin OnDeath if ( MQ01.FavorResolved == 1 ) AddItem Caps001 100 elseif ( MQ01.FavorResolved == 0 ) Set MQ01.FavorResolved to 1 AddItem Caps001 400 if ( GetObjectiveDisplayed MQ01 25 == 1 ) SetObjectiveCompleted MQ01 25 1 SetObjectiveDisplayed MQ01 20 1 endif endif end
842SOJabscoSCRIPTscn SOJabscoSCRIPT ref mySelf short doOnce short gutsyOnce short runOnce short ambushOnce BEGIN onHit Player set mySelf to getSelf ;// at 75% sound the alarm and two guards IF mySelf.getHealthPercentage <= .75 IF doOnce == 0 fortBJabscoRunToTerminal.enable set doOnce to 1 myself.addScriptPackage fortBJabscoUnlockPackage supremeOverlordJabscoREF.addItem WeapUniqueKnifeCombat 1 EVP ENDIF ENDIF ;// at 25% send in the Gutsy! IF mySelf.getHealthPercentage <= .25 IF gutsyOnce == 0 fortBGutsyTurnOn.enable set gutsyOnce to 1 ENDIF ENDIF END BEGIN gameMode IF fortBJabscoRunToAmbush.getDisabled != 1 && runOnce == 0 myself.addScriptPackage fortBJabscorunToAmbushPackage EvP set RunOnce to 1 ENDIF END
843SpawnTriggerSCRIPTscn SpawnTriggerSCRIPT begin onTriggerEnter Player ;disable the trigger disable end
844StarPaladinCrossSCRIPTscn StarPaladinCrossSCRIPT short HasBeenHired short WeaponOut short CombatStyleRanged short CombatStyleMelee short IsFollowingDefault short IsFollowingShort short IsFollowingLong short Waiting short DoOnce BEGIN OnCombatEND if ( GetPlayerTeammate == 1 ) resethealth restoreav perceptioncondition 100 restoreav endurancecondition 100 restoreav leftattackcondition 100 restoreav leftmobilitycondition 100 restoreav rightattackcondition 100 restoreav rightmobilitycondition 100 endif END BEGIN OnDeath if ( Followers.StarPaladinCrossHired == 1 ) set Followers.PlayerHasFollower to 0 set Followers.StarPaladinCrossHired to 0 ShowMessage FollowerMessageDeadStarPaladinCross endif END
845StatesmanHotelRoofTrigger01SCRIPTscn StatesmanHotelRoofTrigger01SCRIPT ; This trigger is triggered by the player only and disables its Linked ref. ; This trigger only gets triggered once. ref target short stage short minigunOn short explosionOn short explosionDice float timer float minigunTimer float explosionTimer ;**************************************************** Begin onLoad set minigunTimer to 10 set explosionTimer to 4 if (GetStage MS18 >= 10) && (GetStage MS18 < 30) set minigunOn to 1 set explosionOn to 1 StatesmanHotelMinigunSoundREF.enable StatesmanRoofExplosion04REF.placeatme StatesmanHotelExplosion 1 else set minigunOn to 0 set explosionTimer to 0 endif End ;**************************************************** Begin onTriggerEnter Player if (stage == 0) StatesmanHotelRoofMutant01REF.killActor StatesmanHotelRoofMutant01REF 1 StatesmanHotelRoofMutant01REF.killActor StatesmanHotelRoofMutant01REF 3 StatesmanHotelRoofMutant01REF.killActor StatesmanHotelRoofMutant01REF 5 StatesmanRoofExplosion01REF.placeatme GrenadeFragExplosion 1 set target to getLinkedRef target.disable set timer to 1.5 set minigunOn to 0 set explosionOn to 0 set stage to 1 endif End ;**************************************************** Begin gameMode if (stage == 1) if (timer <= 0) StatesmanRoofExplosion02REF.placeatme StatesmanHotelExplosion 1 StatesmanHotelRoofMutant02REF.killActor StatesmanHotelRoofMutant02REF 10 StatesmanHotelRoofMutant02REF.killActor StatesmanHotelRoofMutant02REF 7 StatesmanHotelRoofMutant02REF.killActor StatesmanHotelRoofMutant02REF 3 set timer to 3 set stage to 2 else set timer to timer - GetSecondsPassed endif elseif (stage == 2) if (timer <= 0) StatesmanRoofExplosion03REF.placeatme StatesmanHotelExplosion 1 StatesmanHotelMinigunSoundREF.disable ButcherRef.stopcombat ;safeguard to make sure the three rangers are not in combat DonovanRef.stopcombat BrickRef.stopcombat ButcherRef.equipitem Weap10mmSubmachineGun DonovanRef.equipitem WeapChineseAssaultRifle BrickRef.equipitem WeapUniqueMS18Minigun set stage to 3 else set timer to timer - GetSecondsPassed endif endif if (explosionOn == 1) if (explosionTimer <= 0) set explosionDice to (1 + (0.06 * getRandomPercent)) if (explosionDice == 1) StatesmanRoofExplosion04REF.placeatme StatesmanHotelExplosion 1 elseif (explosionDice == 2) StatesmanRoofExplosion05REF.placeatme StatesmanHotelExplosion 1 elseif (explosionDice == 3) StatesmanRoofExplosion06REF.placeatme StatesmanHotelExplosion 1 endif set explosionTimer to (0.35 + 4.0/99 * getRandomPercent) else set explosionTimer to explosionTimer - GetSecondsPassed endif endif if (minigunOn == 1) if (minigunTimer <= 0) StatesmanHotelMinigunSoundREF.disable set minigunTimer to 3 set minigunOn to 2 else set minigunTimer to minigunTimer - GetSecondsPassed endif elseif (minigunOn == 2) if (minigunTimer <=0) StatesmanHotelMinigunSoundREF.enable set minigunTimer to 4 set minigunOn to 1 else set minigunTimer to minigunTimer - GetSecondsPassed endif elseif (minigunOn == 3) StatesmanHotelMinigunSoundREF.disable set minigunOn to 0 endif End
846StatesmanRoofMutantTrigger02SCRIPTscn StatesmanRoofMutantTrigger02SCRIPT short doOnce Begin onTriggerEnter Player if doOnce == 0 if (StatesmanHotelRoofMutant01REF.getDead == 0) StatesmanHotelRoofMutant01REF.disable endif if (StatesmanHotelRoofMutant02REF.getDead == 0) StatesmanHotelRoofMutant02REF.disable endif set StatesmanRoofMutantTriggerREF.doOnce to 0 set doOnce to 1 endif End
847StatesmanRoofMutantTriggerSCRIPTscn StatesmanRoofMutantTriggerSCRIPT short doOnce Begin onTriggerEnter Player if doOnce == 0 if (StatesmanHotelRoofMutant01REF.getDead == 0) StatesmanHotelRoofMutant01REF.enable endif if (StatesmanHotelRoofMutant02REF.getDead == 0) StatesmanHotelRoofMutant02REF.enable endif set StatesmanRoofMutantTrigger02REF.doOnce to 0 set doOnce to 1 endif End
848StickyScriptscn StickyScript ;NOTE THIS NPC WILL NOT REMAIN IN FORCE SNEAK IF followingPlayer != 1 (see below) short init ;1 = initialized variables short goodbyeStage ;used to control goodbye scene in little lamplight short goodbyeTalking ;used to control goodbye scene short goodbyeSceneDone ;1 = goodbye scene is done (condition on packages) short followingPlayer ;condition on follow package, set in dialog short playerEscorting ;1 = player agreed to take him to Big Town short onHisOwn ;1 = player has told him he's not going to take him short talking ;condition on sayTo function short annoyTime ;set in init if statement in gamemode block float annoyTimer ;used to trigger annoying the player with saying things from MS01StickyHandsEscortSayTo topic while he is being escorted to Big Town short countDownToStoryAmount ;set in init "block" short countDownToStoryCount ;how many other MS01StickyHandsEscortSayTo infos get said before launching story mode (decremented in those infos) short storyMode ;used to trigger a random story, set in a MS01StickyHandsEscortSayTo info short storyStage ;used as conditions in MS10StickyHandsEscortStory topic to build his story short askedForCaps ;player asked Sticky for caps to escort him (used as condition on MS01AboutRed topic) short sayHurray ;flag set when package starts to run to Big Town (i'm not doing a SayTo in the OnPackageStart because he might be saying one of his annoying lines, so i need to do it in game mode block after testing) short ArrivedAtBigTown ;flag set when package ends, used in conditions on packages and dialog short HasBigTownTopics ;flag set when sticky can start talking like he's lived at big town (set in quest stage) short ShutUp ;0 = unset, 1 = player speech challenged him to shut up ; in case Big Town is wiped out by mutants before you bring Sticky begin OnLoad if getstageDone MS01 251 == 1 || getStageDone MS01 180 == 1 ; no more goodbye scene set goodbyeSceneDone to 1 disable endif ; if player has told him he won't escort, next load just kill him. Poor Sticky... if onHisOwn == 1 && arrivedAtBigTown == 0 kill stickyref 5 kill stickyref 7 endif end begin OnDeath set DialogueBigTown.DeadCount to DialogueBigTown.DeadCount + 1 if DialogueBigTown.DeadCount >= BigTownMaxDead ; quest failed, everybody in Big Town is dead setstage MS01 180 endif end Begin GameMode if getDisabled == 1 || GetDead == 1 return endif if init == 0 set annoyTime to 10 set countDownToStoryAmount to 3 set countDownToStoryCount to countDownToStoryAmount set init to 1 equipItem HatParty endif ;Goodbye Little Lamplight scene if goodbyeSceneDone == 0 if GetCombatTarget == player set goodbyeSceneDone to 1 elseif goodbyeTalking == 0 && goodbyeStage > 0 set goodbyeTalking to 1 ;this works because all the infos are conditioned so only one person is talking at once StickyRef.say MS01StickyGoodbyeConv PrincessRef.say MS01StickyGoodbyeConv KnickKnackRef.say MS01StickyGoodbyeConv KnockKnockRef.say MS01StickyGoodbyeConv ZipRef.say MS01StickyGoodbyeConv endif endif ;make him go into sneak mode with the player and give verbal feedback if followingPlayer == 1 || MS01.Sneak == 1 if player.IsSneaking == 1 if GetForceSneak == 0 SetForceSneak 1 if talking == 0 && ShutUp == 0 && GetDead == 0 set talking to 1 sayTo player MS01StickyHandsSneak endif endif else if GetForceSneak == 1 SetForceSneak 0 endif endif elseif GetForceSneak == 1 SetForceSneak 0 endif ;Make him randomly spout off annoying things while the player is escorting him if followingPlayer == 1 if talking == 0 && ShutUp == 0 && IsInCombat == 0 if storyMode == 0 if annoyTimer < 0 set talking to 1 sayTo player MS01StickyHandsEscortSayTo else ;annoyTimer > 0 set annoyTimer to annoyTimer - getSecondsPassed endif elseif storyMode == 1 if talking == 0 StickyRef.say MS01StickyHandsEscortStory ;start a conversation with himself to create a random story set talking to 1 endif endif endif endif if sayHurray == 1 if talking == 0 && IsInCombat == 0 sayTo player MS01StickyHandsHurrayBigTown set sayHurray to 2 endif endif End Begin SayToDone set annoyTimer to annoyTime set talking to 0 End Begin OnPackageStart MS01StickyRunToBigTown if sayHurray == 0 ;just incase he some how manages to start this package again set sayHurray to 1 endif set followingPlayer to 2 set playerEscorting to 0 End Begin OnPackageDone MS01StickyRunToBigTown set ArrivedAtBigTown to 1 addToFaction BigTownFaction 0 ;add him to the Big Town Faction End
849SuperDuperMartEmptyActivateSCRIPTscn SuperDuperMartEmptyActivateSCRIPT begin onActivate end
850SuperDuperMartIntercomScriptSCN SuperDuperMartIntercomScript ref target short DoOnce begin OnTriggerLeave Player if DoOnce == 0 SuperDuperMartIntercomREF.say SuperDuperMartTopic SuperDuperMartIntercom02REF.say SuperDuperMartTopic set target to getLinkedRef target.enable set DoOnce to 1 endif End
851SusanLancasterScriptscn SusanLancasterScript Begin OnActorEquip MS13Collar ;if she is weaing slave collar and hasn't been convinced in MS12, set variable that means she has been "dealt with" remove that flag if collar is removed ;NOTE: only set to 3 (enslaved) IF SL == 0, otherwise if you convinced her (SL == 1) in MS12, and then enslave her and then release her, the quest won't think she has been convinced. if MS12.SL == 0 set MS12.SL to 3 endif End Begin OnActorUnequip MS13Collar ;if she is weaing slave collar and hasn't been convinced in MS12, set variable that means she has been "dealt with" remove that flag if collar is removed ;NOTE: only set to 3 (enslaved) IF SL == 0, otherwise if you convinced her (SL == 1) in MS12, and then enslave her and then release her, the quest won't think she has been convinced. if MS12.SL == 3 set MS12.SL to 0 endif End Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.SL to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 ;set stage in MS13 to turn off the objective to enslave her setStage MS13 21 End
852TaftGhoulsSCRIPTscn TaftGhoulsSCRIPT ; make these guys really definitely sure to attack the outpost begin onLoad startCombat TaftBoSGuardREF end
853TaftTunnel02DummySCRIPTscn TaftTunnel02DummySCRIPT ; cell handling begin onLoad if getStage MQ05 >= 80 && getSTage MQ05 < 100 MQ05TaftVertiSFXMarker.enable endif if getStage MQ05 > 100 MQ05TaftVertiSFXMarker.disable endif end
854TakomaArtilleryLaunchedTriggerSCRIPTscn TakomaArtilleryLaunchedTriggerSCRIPT short doOnce float timer ;********************************** Begin onTriggerLeave Player if doOnce == 0 set TakomaArtillerySwitch01REF.artilleryLaunched to 0 ;condition variable used for Mutant patrol with weapons drawn set timer to 10 set doOnce to 1 ;Trigger is only set off one time endif End ;********************************** Begin onTriggerEnter Player set doOnce to 0 End ;********************************** Begin gameMode if (doOnce == 1) if (timer <=0) TakomaAtrilleryMutant01REF.evp TakomaAtrilleryMutant02REF.evp TakomaAtrilleryMutant03REF.evp TakomaBehemothREF.evp set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif endif End ;**********************************
855TakomaArtillerySwitch01SCRIPTscn TakomaArtillerySwitch01SCRIPT float timer ref actionRef ref target01 ref target02 short artilleryDice short artilleryStage short previousTarget short artilleryLaunched ;condition variable for Mutant package to patrol with weapons drawn short counter ;counts the number of times before the switch breaks short switchBroken ;0 - switch is not broken 1 - switch is broken short switchRepaired ;0 - switch is not repaired 1 - switch has been repaired short button short captureButton ;************************************ Begin onLoad setstage NQlvl 1 End ;************************************ Begin onActivate set actionRef to getActionRef if (actionRef == Player) if (switchBroken == 0) if (counter <= 4) || (switchRepaired == 1) if (artilleryStage == 0) set counter to (counter + 1) activate set timer to 2 set artilleryStage to 1 endif endif elseif (switchBroken == 1) showmessage TakomaArtillerySwitchMsg set captureButton to 1 endif endif End ;************************************ Begin gameMode if (captureButton == 1) set button to getButtonPressed if button > -1 set captureButton to 0 if (button == 1) ;Fix the switch if the player has high enough skill if (player.GetAV Science < NQlvl.artillerySwitchScienceSkillReq) showmessage TakomaArtillerySwitchLowSkillMsg NQlvl.artillerySwitchScienceSkillReq else showmessage TakomaArtillerySwitchFixMsg set switchRepaired to 1 set switchBroken to 0 TakomaArtilleryFXArc01REF.disable endif endif endif endif if (artilleryStage == 1) set artilleryStage to 2 ;need to pick two markers as targets for the artillery strike set artilleryDice to (1 + (0.06 * getRandomPercent)) if (artilleryDice == previousTarget) if (artilleryDice == 6) set artilleryDice to 1 else set artilleryDice to (artilleryDice + 1) endif set previousTarget to artilleryDice else set previousTarget to artilleryDice endif if (artilleryDice == 1) set target01 to TakomaArtilleryTarget01REF set target02 to TakomaArtilleryTarget02REF elseif (artilleryDice == 2) set target01 to TakomaArtilleryTarget02REF set target02 to TakomaArtilleryTarget03REF elseif (artilleryDice == 3) set target01 to TakomaArtilleryTarget03REF set target02 to TakomaArtilleryTarget04REF elseif (artilleryDice == 4) set target01 to TakomaArtilleryTarget04REF set target02 to TakomaArtilleryTarget05REF elseif (artilleryDice == 5) set target01 to TakomaArtilleryTarget05REF set target02 to TakomaArtilleryTarget06REF elseif (artilleryDice == 6) set target01 to TakomaArtilleryTarget06REF set target02 to TakomaArtilleryTarget01REF endif elseif (artilleryStage == 2) if (timer <= 0) target01.placeatme FXArtilleryStrike01 1 set timer to 2 set artilleryStage to 3 else set timer to (timer - GetSecondsPassed) endif elseif (artilleryStage == 3) if (timer <= 0) set artilleryLaunched to 1 TakomaAtrilleryMutant01REF.evp TakomaAtrilleryMutant02REF.evp TakomaAtrilleryMutant03REF.evp TakomaBehemothREF.evp target02.placeatme FXArtilleryStrike01 1 set timer to 2 activate ;turn switch back to red if (switchRepaired == 0) if (counter > 4) ; player has pushed the button 4 times, switch is now "broken" and wont work until repaired TakomaArtilleryFXArc01REF.enable set switchBroken to 1 endif endif set artilleryStage to 0 else set timer to (timer - GetSecondsPassed) endif endif End ;************************************
856TakomaFactoryExplosionsTriggerSCRIPTscn TakomaFactoryExplosionsTriggerSCRIPT ; This trigger sets off a couple of explosions in front of the factory sector. float timer short doOnce ;********************************* Begin onTriggerEnter Player if doOnce == 0 TakomaFactoryExplosion01REF.placeatme GrenadeFragExplosion 1 set timer to .5 set doOnce to 1 endif End ;********************************* Begin gameMode if (doOnce == 1) if (timer <= 0) TakomaFactoryExplosion02REF.placeatme GrenadeFragExplosion 1 set timer to 1 set doOnce to 2 else set timer to (timer - GetSecondsPassed) endif elseif (doOnce == 2) if (timer <= 0) TakomaFactoryExplosion03REF.placeatme GrenadeFragExplosion 1 set doOnce to 3 else set timer to (timer - GetSecondsPassed) endif endif End ;*********************************
857TakomaTrapBabyCarriageSCRIPTscn TakomaTrapBabyCarriageSCRIPT ;--------------------------------------------------------------------------------------------------------- ; The Trap should start its timer when the player is a certain distance away since this is a proximity trap. ; Should have an audible beep, ending with a higher pitched beep. ; The player can run up and activate the trap having the option to disarm it. ; If disarmed, the player can activate it again and have the option to rearm it, which automatically starts the timer again b/c the trap is a proximity trap. ;--------------------------------------------------------------------------------------------------------- short trapTriggered ;0 = default 1 = trap has been triggered 2 = trap is being rearmed as a proximity trap 3 = trap is being rearmed as a timed trap 4=trap is about to explode short trapDisarmed ;0 = trap active 1 = trap has been disarmed 2 = trap has exploded short interactAttempt ;0 = default 1 = Attempt to Disarm 2 = Rearm short PCExplosivesSkill short button float timer float bufferTimer float soundTimer float timerMax ; set to timed trap maximum (10 currently) short rewardXPOnce short XPForDisarm ;--------------------------------------------------------------------------------------------------------- Begin onLoad setStage NQlvl 1 End ;--------------------------------------------------------------------------------------------------------- Begin onActivate if IsActionRef player == 1 setVatsTarget 1 if getDestroyed == 0 set PCExplosivesSkill to player.getAV explosives if PCExplosivesSkill > NQlvl.TRAPBabySkillReq if (trapDisarmed == 0) ;ask player if he wants to disarm it ShowMessage TrapBabyCarriageWarnMsg set interactAttempt to 1 elseif (trapDisarmed == 1) ;ask player if he wants to rearm it ShowMessage TrapBabyCarriageRearmMsg set interactAttempt to 2 endif else ShowMessage TrapLowSkillExplosivesMsg NQlvl.TRAPBabySkillReq endif endif endif End ;==================================================== Begin onTriggerEnter player if (trapTriggered == 0 && trapDisarmed == 0) playSound3D OBJMegatonBombTamperArm set trapTriggered to 1 set timer to 1 endif End ;==================================================== ;--------------------------------------------------------------------------------------------------------- Begin gamemode if (interactAttempt == 1) ;attempts to disarm set button to getButtonPressed if (button > -1) set interactAttempt to 0 if (button == 1) if (PCExplosivesSkill >= NQlvl.TRAPBabySkillReq) ;message "You successfully disarm the trap." ShowMessage TrapDisarmMsg set trapDisarmed to 1 set trapTriggered to 5 ;trap has been disarmed if rewardXPOnce == 0 if NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif else ;message "You fail to disarm the trap." ;set timer of trap to explode after leaving dialog ShowMessage TrapDisarmFailMsg set trapDisarmed to 0 endif elseif (button == 0) ;don't do anything endif endif endif ;*********************************** if (interactAttempt == 2) ;rearming trap set interactAttempt to 0 set button to getButtonPressed if (button > -1) if (button == 2) ;player wants to rearm as a proximity trap ;message "You rearm as a proximity trap." ShowMessage TrapRearmProximityMsg set trapTriggered to 2 ;trap is rearmed so start buffer timer set trapDisarmed to 0 set bufferTimer to 10 elseif (button == 1) ;message "You rearm as a timed trap (10 seconds)." set timerMax to 7 ShowMessage TrapRearmTimerMsg timerMax set trapTriggered to 3 ;trap is rearmed as a timed trap set trapDisarmed to 0 elseif (button ==0) ;do nothing endif endif endif ;*********************************** if (trapDisarmed == 0) if (trapTriggered == 1) if (timer >0) set timer to (timer - GetSecondsPassed) elseif (timer<0) playSound3D WPNRifleLaserReloadInOut playsound3D QSTBabyCry set trapTriggered to 4 set timer to 3 endif endif if (trapTriggered == 2) ;trap has been rearmed as proximity so start buffer timer if (bufferTimer > 0) set bufferTimer to (bufferTimer - GetSecondsPassed) elseif (bufferTimer < 0) set trapTriggered to 0 ;buffer time is up, trap is now rearmed endif endif if (trapTriggered == 3) set timer to timerMax ;trap is now a timed trap and will explode in 10 seconds set trapTriggered to 1 endif if (trapTriggered == 4) if (timer > 0) set timer to (timer - GetSecondsPassed) elseif (timer < 0) do 1000 ;let damage stages handle explosion. set trapDisarmed to 2 ;trap has exploded endif endif endif End
858TalonHitSquadSCRIPTSCN TalonHitSquadSCRIPT short doOnce BEGIN OnLoad if doOnce == 0 set doOnce to 1 AddItem HitSquadNoteBadGuys 1 endif END
859TenpennyGateScriptscn TenpennyGateScript ;This script handles opening and closing of the Tenpenny Tower gate. These variables are set in dialog (through the intercom) and by the TenpennyTerminal short IsGateOpen ;0 = not open/opening, 1 = opened short OpenGate ;0 = don't open gate, 1 = open gate short CloseGate ;0= don't close, 1 = close gate float GateTimer ;timer Begin OnActivate ;do nothing handled in GameMode block End Begin GameMode if IsGateOpen == 0 if OpenGate == 1 setopenstate 1 set IsGateOpen to 1 set OpenGate to 0 endif elseif IsGateOpen == 1 if CloseGate == 1 setopenstate 0 set IsGateOpen to 0 set CloseGate to 0 else ;close the Gate if the player walks away if GetDistance Player > 3000 set CloseGate to 1 endif endif endif End
860TenpennyGateSwitchScriptscn TenpennyGateSwitchScript Begin OnActivate set TenpennyGateRef.OpenGate to 1 End
861TenpennyGuardScriptscn TenpennyGuardScript ;shared by all TenpennyGuardXXX actors Begin OnDeath set MS12.CountDead to MS12.CountDead + 1 End Begin OnPackageDone MS14GuardDistracted Set MS14.GuardDistracted to 2 End
862TenpennyIntercomScriptscn TenpennyIntercomScript ;The purpose of this script is to set up which security guard the player is talking to when he uses the intercom. ;The intercom is a "talking Activator" object: TenpennyIntercom ;The dialog is conditioned for the guard faction so anyone can talk through it ;The first guard who isn't dead talks through it (except the first time it's always Gustavo) ; ;Once the player is let in, I set a variable: allowedIn ;He then has a dialog choice "Let me in." which then triggers the door to open (if everyone is dead, the door doesn't close behind him when he leaves) short init ;do once Begin GameMode if init == 0 setTalkingActivatorActor ChiefGustavoRef set init to 1 endif End Begin OnActivate if IsActionRef player == 1 If dialogueTenpenny.allowedIn == 0 setTalkingActivatorActor ChiefGustavoRef activate ElseIf TenpennyGuardDay1Ref.getDead == 0 setTalkingActivatorActor TenpennyGuardDay1Ref activate Else ;the guard standing at the intercom is dead, so just open the door set DialogueTenpenny.allowedIn to 1 ;should already be set, but just incase make this variable true set TenpennyGateRef.openGate to 1 Endif endif End
863TenpennyPlayerSuiteLoadDoorScriptscn TenpennyPlayerSuiteLoadDoorScript Begin OnActivate if MS12.FeralsReleased != 0 && MS12Fin.TenpennyRepaired == 0 if IsActionRef player == 1 ShowMessage MS12TenpennyPlayerSuiteDoorMessage endif else activate endif End
864TenpennyResidentSCRIPTscn TenpennyResidentSCRIPT ;This is used to give generic Tenpenny Residents various random sandbox packages more or less every hour when they update float lastGameHour float DieRoll ;Variable05 ;1 = Urban Apparel ;2 = Boutique Le Chic ;3 = Cafe ;4 = Lounge Begin GameMode if GameHour - lastGameHour >= 1 set lastGameHour to GameHour Set DieRoll to GetRandomPercent if DieRoll <= 25 setav Variable05 1 elseif DieRoll <= 50 setav Variable05 2 elseif DieRoll <= 75 setav Variable05 3 else ; <= 100 setav Variable05 4 endif endif End
865TenpennyTowerDoorScriptscn TenpennyTowerDoorScript Begin OnActivate If IsActionRef player == 1 ;This is used to enable/disable random wandering residents: setStage DialogueTenpenny 10 endif Activate End
866TheMallExplosionsTrigger02SCRIPTscn TheMallExplosionsTrigger02SCRIPT ; This trigger sets off a bunch of explosions in no-man's land in the Mall short stage float timer ;**************************************** Begin onTriggerEnter Player if stage == 0 if (TheMallExplosionsTriggerREF.stage == 0) TheMallTalon01REF.enable TheMallExplosion01REF.placeatme TheMallMediumExplosion 1 set stage to 1 ;Trigger is only set off one time set timer to 2 set TheMallExplosionsTriggerREF.stage to 9 ;keeps the same trigger on the other side of no-man's land from triggering endif endif End ;***************************************** Begin gamemode if stage > 0 && stage < 9 if (stage == 1) if (timer <= 0) TheMallExplosion02REF.placeatme TheMallMediumExplosion 1 set stage to 2 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 2) if (timer <= 0) TheMallExplosion03REF.placeatme TheMallMediumExplosion 1 set stage to 3 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 3) if (timer <= 0) TheMallExplosion04REF.placeatme TheMallMediumExplosion 1 set stage to 4 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 4) if (timer <= 0) TheMallExplosion05REF.placeatme TheMallMediumExplosion 1 set stage to 5 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 5) if (timer <= 0) TheMallExplosion06REF.placeatme TheMallMediumExplosion 1 set stage to 6 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 6) if (timer <= 0) TheMallExplosion07REF.placeatme TheMallMediumExplosion 1 set stage to 7 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 7) if (timer <= 0) TheMallExplosion08REF.placeatme TheMallMediumExplosion 1 set stage to 8 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 8) if (timer <= 0) TheMallExplosion09REF.placeatme TheMallMediumExplosion 1 set stage to 9 else set timer to timer - GetSecondsPassed endif endif endif End
867TheMallExplosionsTriggerSCRIPTscn TheMallExplosionsTriggerSCRIPT ; This trigger sets off a bunch of explosions in no-man's land in the Mall short stage float timer ;**************************************** Begin onTriggerEnter Player if stage == 0 if (TheMallExplosionsTrigger02REF.stage == 0) TheMallTalon01REF.enable TheMallExplosion01REF.placeatme TheMallMediumExplosion 1 set stage to 1 ;Trigger is only set off one time set timer to 2 set TheMallExplosionsTrigger02REF.stage to 9 ;keeps the same trigger on the other side of no-man's land from triggering endif endif End ;***************************************** Begin gamemode if stage > 0 && stage < 9 if (stage == 1) if (timer <= 0) TheMallExplosion02REF.placeatme TheMallMediumExplosion 1 set stage to 2 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 2) if (timer <= 0) TheMallExplosion03REF.placeatme TheMallMediumExplosion 1 set stage to 3 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 3) if (timer <= 0) TheMallExplosion04REF.placeatme TheMallMediumExplosion 1 set stage to 4 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 4) if (timer <= 0) TheMallExplosion05REF.placeatme TheMallMediumExplosion 1 set stage to 5 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 5) if (timer <= 0) TheMallExplosion06REF.placeatme TheMallMediumExplosion 1 set stage to 6 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 6) if (timer <= 0) TheMallExplosion07REF.placeatme TheMallMediumExplosion 1 set stage to 7 set timer to 1.5 else set timer to timer - GetSecondsPassed endif endif if (stage == 7) if (timer <= 0) TheMallExplosion08REF.placeatme TheMallMediumExplosion 1 set stage to 8 set timer to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 8) if (timer <= 0) TheMallExplosion09REF.placeatme TheMallMediumExplosion 1 set stage to 9 else set timer to timer - GetSecondsPassed endif endif endif End
868TheMallTrenchExplosionTriggerSCRIPTscn TheMallTrenchExplosionTriggerSCRIPT ; this script checks if the player is currently in combat while in the trench and if so sets off a couple of explosions float timer short stage ;****************************************** Begin onTriggerEnter Player if (player.isInCombat == 1) if (stage == 0) TheMallTrenchExplosion01REF.placeatme GrenadeFragExplosion 1 set timer to 2 set stage to 1 endif endif End ;****************************************** Begin gameMode if stage > 0 if (player.isInCombat == 1) if (stage == 1) if (timer <= 0) TheMallTrenchExplosion02REF.placeatme GrenadeFragExplosion 1 set timer to 1.5 set stage to 2 else set timer to timer - GetSecondsPassed endif endif if (stage == 2) if (timer <= 0) TheMallTrenchExplosion03REF.placeatme GrenadeFragExplosion 1 set timer to 1.5 set stage to 3 else set timer to timer - GetSecondsPassed endif endif if (stage == 3) if (timer <= 0) TheMallTrenchExplosion04REF.placeatme GrenadeFragExplosion 1 set timer to 30 set stage to 4 else set timer to timer - GetSecondsPassed endif endif if (stage == 4) if (timer <= 0) set stage to 0 else set timer to timer - GetSecondsPassed endif endif else set stage to 0 endif endif End
869TheMallVertibirdTrigger01SCRIPTscn TheMallVertibirdTrigger01SCRIPT ; This trigger enables 1 vertibird to fly over the Capitol Building after MQ05 float timer short doOnce ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) MallVertibird01REF.enable set timer to 1 set doOnce to 1 endif End ;***************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) MallVertibird01REF.playgroup Forward 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif End
870TheMallVertibirdTrigger02SCRIPTscn TheMallVertibirdTrigger02SCRIPT ; This trigger enables 1 vertibird to fly over the Capitol Building after MQ05 float timer short doOnce ;**************************************** Begin onTriggerEnter Player if (doOnce == 0) && (getStage MQ05 >= 85) MallVertibird03REF.enable set timer to 1 set doOnce to 1 endif End ;***************************************** Begin gameMode if (doOnce == 1) if (timer <= 0) MallVertibird03REF.playgroup Forward 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif endif End
871TiffanyChengScriptscn TiffanyChengScript Begin OnDeath ;set variable on MS12Script that this resident has been "dealt with" set MS12.TC to 2 set MS12.CountDealtWith to MS12.CountDealtWith + 1 set MS12.CountDead to MS12.CountDead + 1 End
872TimebombSCRIPTSCN TimebombSCRIPT short TimebombHealed short Button short MenuDepth short PlayerMayAttempt short SetPlayerChance short MenuLevel BEGIN OnLoad if ( TimebombHealed == 0 && GetDead == 0 ) setRestrained 1 endif END begin OnDeath set DialogueBigTown.DeadCount to DialogueBigTown.DeadCount + 1 if DialogueBigTown.DeadCount >= BigTownMaxDead ; quest failed, everybody in Big Town is dead setstage MS01 180 endif end BEGIN OnActivate if ( isActionRef player == 1 ) && ( TimebombHealed == 0 ) && ( GetDead == 0 ) if ( player.GetAv Medicine < 40 ) ShowMessage TimebombLowSkillMsg elseif ( player.GetAv Medicine >= 40 ) set PlayerMayAttempt to 1 ShowMessage TimebombHelpMsg endif else activate endif END BEGIN GameMode ; simulate Big Town being wiped out by mutants if getStageDone MS01 251 == 1 if GetDisabled == 0 disable endif endif if ( TimebombHealed == 0 ) set Button to GetButtonPressed if ( Button > 0 ) if ( Button == 1 ) if ( PlayerMayAttempt == 0 ) ShowMessage TimebombKillMsg TimebombREF.kill RewardKarma -50 set TimebombHealed to 1 else ShowMessage TimebombHealMsg set DialogueBigtown.PlayerHealedTimebomb to 1 TimebombREF.SetAV Endurance 5 setRestrained 0 addScriptPackage BigTownTimebombGetUp set TimebombHealed to 1 endif elseif ( Button == 2 ) && ( PlayerMayAttempt == 1 ) ShowMessage TimebombKillMsg TimebombREF.kill RewardKarma -50 set TimebombHealed to 1 endif endif endif END
873TinkerJoeSCRIPTscn TinkerJoeSCRIPT short fightPlayer ; set to 1 after triggering combat with player short doOnce ; only armor Joe once BEGIN OnLoad if (doOnce == 0) FFER54NPC1REF.modav DamageResist 85 set doOnce to 1 endif END BEGIN OnHit player if fightPlayer == 0 set fightPlayer to 1 endif end BEGIN OnStartCombat Player if fightPlayer == 0 set fightPlayer to 1 endif END BEGIN gamemode if fightPlayer == 0 if isCombatTarget player == 1 set fightPlayer to 1 endif elseif fightPlayer == 1 set fightPlayer to 2 FFER54NPC1REF.modav DamageResist -85 setEssential RL3Follower 0 endif END
874tlHendSmokeDisableSCRIPTscn tlHendSmokeDisableSCRIPT ; This trigger is triggered by the player only and disables its Linked ref. ; This trigger only gets triggered once. ref target Begin onTriggerEnter Player IF tlHendHouseSmokeCheck.getDisabled != 1 set target to getLinkedRef target.disable ENDIF End
875tlHendSmokeEnableSCRIPTscn tlHendSmokeEnableSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target Begin onTriggerEnter Player IF tlHendHouseSmokeCheck.getDisabled != 1 set target to getLinkedRef target.enable ENDIF End
876TranqFlickerEffectScriptscn TranqFlickerEffectScript ;this script is to test the Tranquility Lane flicker Image space. Float FlickerTimerOne Float FlickerTimerTwo Float FlickerTimerThree Begin OnLoad Set FlickerTimerOne to 8 Set FlickerTimerOne to 11 Set FlickerTimerThree to 20 End Begin GameMode If FlickerTimerOne > 0 Set FlickerTimerOne to FlickerTimerOne - GetSecondsPassed else IMOD TranquilityLaneFlicker01steadyFX set FlickerTimerOne to 27 endif If FlickerTimerTwo > 0 Set FlickerTimerTwo to FlickerTimerTwo - GetSecondsPassed else IMOD TranquilityLaneFlicker02steadyFX set FlickerTimerTwo to 32 endif If FlickerTimerThree > 0 Set FlickerTimerThree to FlickerTimerThree - GetSecondsPassed else IMOD TranquilityLaneFlicker01ISFX set FlickerTimerThree to 45 endif End
877TranquilityLaneExitDoorScriptscn TranquilityLaneExitDoorScript Short IsAnimating Short HasFlicked Float Timer Begin OnActivate if ( IsActionRef Player == 1 ) if ( MQ04.Invasion == 1 ) MQ04SoldierRef1.Kill MQ04SoldierRef2.Kill MQ04SoldierRef3.Kill MQ04SoldierRef4.Kill MQ04SoldierRef5.Kill MQ04SoldierRef6.Kill MQ04SoldierRef7.Kill endif Player.RemoveItem MQ04RollingPin 1 Player.RemoveItem MQ04Undies 1 Player.RemoveItem MQ04Brochure 1 Player.RemoveItem MQ04SlasherKnife 1 Player.RemoveItem MQ04SlasherMask 1 SetLocationSpecificLoadScreensOnly 0 AutoDisplayObjectives 0 Player.Moveto MQ04PlayerPod ; #46467: When leaving Tranq. Lane, the code will try to set the player ; arrow at this door, which is bad since it doesn't have any world ; coords. Manually set the player arrow outside Smith Casey's Garage. SetLastExtDoorActivated SmithCaseyGarageExtDoor endif End Begin OnLoad Playgroup Forward 0 Set timer to 1.25 Set IsAnimating to 1 End Begin GameMode If IsAnimating == 1 If IsAnimPlaying Forward == 0 Playgroup Left 0 Set IsAnimating to 0 endif endif if HasFlicked == 0 if Timer < 0 IMOD TranquilityLaneFlicker01ISFX set HasFlicked to 1 else set Timer to Timer - GetSecondsPassed endif endIf End
878TrapBabyCarriageSCRIPTscn TrapBabyCarriageSCRIPT ;--------------------------------------------------------------------------------------------------------- ; The Trap should start it's timer when the player is a certain distance away since this is a proximity trap. ; Should have an audible beep, ending with a higher pitched beep. ; The player can run up and activate the trap having the option to disarm it. ; If disarmed, the player can activate it again and have the option to rearm it, which automatically starts the timer again b/c the trap is a proximity trap. ;--------------------------------------------------------------------------------------------------------- short trapTriggered ;0 = default 1 = trap has been triggered 2 = trap is being rearmed as a proximity trap 3 = trap is being rearmed as a timed trap 4=trap is about to explode short trapDisarmed ;0 = trap active 1 = trap has been disarmed 2 = trap has exploded short interactAttempt ;0 = default 1 = Attempt to Disarm 2 = Rearm short PCExplosivesSkill ;short neededExplosivesSkill ; how high we want the PC explosive skill to be in order to disarm trap. short button float timer float bufferTimer float soundTimer float timerMax ; set to timed trap maximum (10 currently) short rewardXPOnce short XPForDisarm ;--------------------------------------------------------------------------------------------------------- Begin onLoad setStage NQlvl 1 End ;--------------------------------------------------------------------------------------------------------- Begin onActivate if IsActionRef player == 1 setVatsTarget 1 if getDestroyed == 0 set PCExplosivesSkill to player.getAV explosives if PCExplosivesSkill > NQlvl.TRAPBabySkillReq if (trapDisarmed == 0) ;ask player if he wants to disarm it ;messagebox "This baby carriage is rigged with an explosive.", "Attempt to Disarm", "Leave it Alone" ShowMessage TrapBabyCarriageWarnMsg set interactAttempt to 1 elseif (trapDisarmed == 1) ;ask player if he wants to rearm it ;messagebox "This baby carriage has been disarmed.", "Rearm as a Proximity Trap.", "Rearm as a Timed Trap (10 seconds)", "Leave it Alone" ShowMessage TrapBabyCarriageRearmMsg set interactAttempt to 2 endif else ShowMessage TrapLowSkillExplosivesMsg NQlvl.TRAPBabySkillReq endif endif endif End ;==================================================== Begin onTriggerEnter player if (trapTriggered == 0 && trapDisarmed == 0) playSound3D OBJMegatonBombTamperArm set trapTriggered to 1 set timer to 1 endif End ;==================================================== ;--------------------------------------------------------------------------------------------------------- Begin gamemode if (interactAttempt == 1) ;attempts to disarm set interactAttempt to 0 set button to getButtonPressed if (button > -1) if (button == 1) if (PCExplosivesSkill >= NQlvl.TRAPBabySkillReq) ;message "You successfully disarm the trap." ShowMessage TrapDisarmMsg set trapDisarmed to 1 set trapTriggered to 5 ;trap has been disarmed if rewardXPOnce == 0 if NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPBabySkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif else ;message "You fail to disarm the trap." ;set timer of trap to explode after leaving dialog ShowMessage TrapDisarmFailMsg set trapDisarmed to 0 endif elseif (button == 0) ;don't do anything endif endif endif ;*********************************** if (interactAttempt == 2) ;rearming trap set interactAttempt to 0 set button to getButtonPressed if (button > -1) if (button == 2) ;player wants to rearm as a proximity trap ;message "You rearm as a proximity trap." ShowMessage TrapRearmProximityMsg set trapTriggered to 2 ;trap is rearmed so start buffer timer set trapDisarmed to 0 set bufferTimer to 10 elseif (button == 1) ;message "You rearm as a timed trap (10 seconds)." set timerMax to 7 ShowMessage TrapRearmTimerMsg timerMax set trapTriggered to 3 ;trap is rearmed as a timed trap set trapDisarmed to 0 elseif (button ==0) ;do nothing endif endif endif ;*********************************** if (trapDisarmed == 0) if (trapTriggered == 1) if (timer >0) set timer to (timer - GetSecondsPassed) elseif (timer<0) playSound3D WPNRifleLaserReloadInOut playsound3D QSTBabyCry set trapTriggered to 4 set timer to 3 endif endif if (trapTriggered == 2) ;trap has been rearmed as proximity so start buffer timer if (bufferTimer > 0) set bufferTimer to (bufferTimer - GetSecondsPassed) elseif (bufferTimer < 0) set trapTriggered to 0 ;buffer time is up, trap is now rearmed endif endif if (trapTriggered == 3) set timer to timerMax ;trap is now a timed trap and will explode in 10 seconds set trapTriggered to 1 endif if (trapTriggered == 4) if (timer > 0) set timer to (timer - GetSecondsPassed) elseif (timer < 0) do 50 ;let damage stages handle explosion. set trapDisarmed to 2 ;trap has exploded endif endif endif End
879trapBearTrapScriptscn trapBearTrapScript ;XXXXXXXXXXXXXXXXXXXXX To Do XXXXXXXXXXXXXXXXXXXXXXX ; ; ; Use DamageActorValue to cause damage ; When picked up and dropped, bear trap returns to open state ; ; Decrease trigger radius, or set up to check distance when player is close enough short skillPassed short damageVictim short disarmed ref trapVictim short legHealth short button short justActivated short rewardXPOnce01 ;short rewardXPOnce02 short XPforDisarm ;///////////////////////////////////// ; ON ENTER CELL ;///////////////////////////////////// begin OnLoad ;get the name of this trap setStage NQlvl 1 ;init trap skill requirements ; set justActivated to 0 ; set disarmed to 0 end ;///////////////////////////////////// ; ON ACTIVATE ;///////////////////////////////////// begin onActivate if IsActionRef player == 1 ;Check to see if the trap has been triggered if disarmed == 1 ShowMessage TrapBearRearmMsg set justActivated to 1 else ; check the player's science skill to see if they can disarm the trap if player.GetAV Repair >= NQlvl.TRAPBearSkillReq01 ShowMessage TrapBearDetectMsg set justActivated to 1 ;disarmed == 0, justActivated == 1 else ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPBearSkillReq01 set justActivated to 0 endIf endif endif end ;///////////////////////////////////// ; GAMEMODE ;///////////////////////////////////// BEGIN gameMode if justActivated == 1 ;Don't run anything in gameMode unless the player just activated it set button to getbuttonpressed if button > -1 set justActivated to 0 ;stop running stuff if disarmed == 1 ;Button was pressed, trap was disarmed. if button == 1 ;if they choose to rearm if player.GetAV Repair >= NQlvl.TRAPBearSkillReq02 ;Check the player's repair skill ShowMessage TrapRearmMsg ;Message "You have rearmed the trap!" set disarmed to 0 ;reset the bear trap playgroup Backward 1 ; set rewardXPOnce01 to 1 ;make sure we dont give xp twice else ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPBearSkillReq02 set justActivated to 0 endIf elseif button == 0 ;do nothing endif else ;disarmed == 0, check to see if the player wants to disarm it if button == 1 ShowMessage TrapDisarmMsg set disarmed to 1 playgroup Forward 1 if rewardXPOnce01 == 0 if NQlvl.TRAPBearSkillReq01< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPBearSkillReq01< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPBearSkillReq01< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPBearSkillReq01< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPBearSkillReq01< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce01 to 1 rewardXP XPforDisarm endif endif endif endif endif END ;///////////////////////////////////// ; When hit ;///////////////////////////////////// begin onHit if disarmed == 0 set disarmed to 1 ;open up the trap playgroup Forward 1 set rewardXPOnce01 to 1 endif end ;///////////////////////////////////// ; ON ACTOR ENTER ;///////////////////////////////////// begin onTriggerEnter ; find out who triggered the trap set trapVictim to getActionRef if trapVictim.hasPerk lightStep == 0 if disarmed == 0 set disarmed to 1 set rewardXPOnce01 to 1 playgroup Forward 1 ;trap close animation ;drop the target's health by 50 and display it trapVictim.DamageAV health 45 trapVictim.do 45 ;or damage object if not an actor ;random for which leg to disable short legToDisable set legToDisable to 1 + 0.02 * GetRandompercent if (legToDisable == 1) trapVictim.damageAV LeftMobilityCondition 50 elseif (legToDisable == 2) trapVictim.damageAV RightMobilityCondition 50 endif trapVictim.say Hit endif endif ;light step perk endif end
880TrapComputerFaceSCRIPTscn TrapComputerFaceSCRIPT ; This script should be placed on the front piece of the computer trap. It will activate the back piece if the front piece takes enough damage. ;;=======================================================;; ref myLink ;;=======================================================;; begin onActivate set myLink to getLinkedRef myLink.activate mylink 1 end ;======================================================== begin onHit set myLink to getLinkedRef mylink.activate myLink 1 end
881TrapComputerSCRIPTscn TrapComputerSCRIPT ; a computer terminal rigged with explosives. interaction with keyboard detonates the trap ; while interacting with the back of it allows the player to disarm the trap and loot components ; this script lives on the "trapComputerBack" object ;;=======================================================;; short XPforDisarm short rewardXPOnce short PCskill ; store player's explosives skill short button float timer short tripped ; states for device ; 0 = default state 1 = going to explode 2 = exploded short defuse ; states ; 0 = default 1 = attempting defuse 2 = defused 3 = re-arming 4 = re-arming stage 2 short gType ; tracks type of damage this trap should do ; 1 = frag 2 = pulse 3 = plasma ref myLink ;This points to the computer face short init ;;=======================================================;; begin onLoad if init == 0 set init to 1 set gType to 1 ; by default, trap uses a frag type grenade setStage NQlvl 1 set myLink to getLinkedRef endif end ;;=======================================================;; begin onActivate set myLink to getLinkedRef myLink.setVatsTarget 1 ;Front component now targetable in VATS if tripped == 0 && defuse == 0 ; trap is not currently or in the process of being exploded or defused if isActionRef player == 1 set PCskill to player.getAV explosives ; "The computer has been rigged to explode. It could be possible to disarm and remove the grenade. [explosives, %0.f]", PCchance, "Attempt to defuse", "Leave it Alone" if PCSkill < NQlvl.TRAPComputerSkillReq ShowMessage TrapLowSkillExplosivesMsg NQlvl.TRAPComputerSkillReq else ShowMessage TrapComputerDetectMsg ;PCchance set defuse to 1 ; set up to defuse endif else set tripped to 1 ; set up to explode placeatme FXComputerSparks set timer to 1.5 endif elseif tripped == 0 && defuse == 2 ; trap is not exploded or exploding, and has been disarmed if getActionRef == player ;"The trap could be re-armed with a grenade", "Re-arm trap","Leave it Alone" if player.getItemCount weapGrenadeFrag > 0 || player.getItemCount weapGrenadePulse > 0 || player.getItemCount weapGrenadePlasma > 0 ShowMessage TrapComputerRearmHasGrenadeMsg set defuse to 3 ; set up to re-arm else ShowMessage TrapComputerRearmNoGrenadeMsg endif else ShowMessage TrapComputerDisarmedMsg ;;not activated by the player endif elseif tripped == 0 && defuse == 3 ; trap is not exploded and being disarmed. if getActionRef == player set defuse to 4 endif endif end ;======================================================== begin onHit set myLink to getLinkedRef activate myLink 1 ;blow up if shot end ;;=======================================================;; begin gameMode if myLink == 0 set myLink to getLinkedRef endif if defuse == 1 ; procedure for dis-arming the trap set defuse to 0 set button to getbuttonpressed if button > -1 if button == 1 ;"You disarm and remove the grenade" ShowMessage TrapComputerDisarmMsg set defuse to 2 if gType == 1 player.additem weapGrenadeFrag 1 elseif gType == 2 player.additem weapGrenadePulse 1 elseif gType == 3 player.additem weapGrenadePlasma 1 endif if rewardXPOnce == 0 if NQlvl.TRAPComputerSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPComputerSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPComputerSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPComputerSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPComputerSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif elseif button == 0 ; don't do anything endif endif elseif defuse == 3 ; procedure for re-arming the trap set button to getButtonPressed if button > -1 if button == 1 ;"What type of grenade will you use to re-arm the trap?", "Frag","Pulse","Plasma","Leave it Alone" ShowMessage TrapComputerRearmGrenadeTypeMsg set defuse to 4 else ; don't do anything but ensure it stays defused set defuse to 2 endif endif endif if defuse == 4 set button to getButtonPressed if button > -1 if button == 1 if player.getItemCount WeapGrenadeFrag >= 1 player.removeItem weapGrenadeFrag 1 set gType to 1 set defuse to 0 else ;no Frag Grenades to use ShowMessage TrapNoGrenadeFragMsg set defuse to 3 endif elseif button == 2 if player.getItemCount WeapGrenadePulse >= 1 player.removeItem weapGrenadePulse 1 set gType to 2 set defuse to 0 else ;You have no Pulse Grenades to use ShowMessage TrapNoGrenadePulseMsg set defuse to 3 endif elseif button == 3 if player.getItemCount WeapGrenadePlasma >= 1 player.removeItem weapGrenadePlasma 1 set gType to 3 set defuse to 0 else ;no Plasma Grenades to use ShowMessage TrapNoGrenadePlasmaMsg set defuse to 3 endif elseif button == 0 ; do nothing set defuse to 2 endif endif endif if tripped == 1 if timer > 0 set timer to timer - getsecondspassed else if gType == 1 placeatme GrenadeFragExplosion 1, 70, 0 do 1000 elseif gType == 2 placeAtMe GrenadePulseExplosion 1, 70, 0 do 1000 elseif gType == 3 placeAtMe GrenadePlasmaExplosion 1, 70, 0 do 1000 endif set tripped to 2 endif endif end ;=======================================================- begin OnDestructionStageChange set myLink to getLinkedRef myLink.disable end
882TrapCorpseSCRIPTscn TrapCorpseSCRIPT ;--------------------------------------------------------------------------------------------------------- ; The Trap should start it's timer when the player is a certain distance away since this is a proximity trap. ; Should have an audible beep, ending with a higher pitched beep. ; The player can run up and activate the trap having the option to disarm it. ; If disarmed, the player can activate it again and have the option to rearm it, which automatically starts the timer again b/c the trap is a proximity trap. ; NOTE: Activation messages will only work if scripted NPC is dead... ;--------------------------------------------------------------------------------------------------------- short trapTriggered ;0 = default 1 = trap has been triggered 2 = trap is being rearmed as a proximity trap 3 = trap is being rearmed as a timed trap 4=trap is about to explode short trapDisarmed ;0 = trap active 1 = trap has been disarmed 2 = trap has exploded short interactAttempt ;0 = default 1 = Attempt to Disarm 2 = Rearm ; NOTE: actor value variable01 is used to track the state of a trapped (live) NPC: ; * It is set in GREETING to 1, which allows you to get the Message box the next time you activate him ; * If you successfully disarm the bomb, it is set to 2 ; * If you talk to him again, you get a one time greeting and then it is set to 3 short PCExplosivesSkill short neededExplosivesSkill ; how high we want the PC explosive skill to be in order to disarm trap. short button ref mySelf float timer float bufferTimer float soundTimer float timerMax ; set to timed trap maximum (10 currently) ;--------------------------------------------------------------------------------------------------------- Begin onLoad set mySelf to getSelf set neededExplosivesSkill to 75 End ;--------------------------------------------------------------------------------------------------------- Begin onActivate if IsActionRef player == 1 set PCExplosivesSkill to player.getAV explosives if getDead == 1 if (trapDisarmed == 0) ;ask player if he wants to disarm it ShowMessage TrapCorpseWarnMsg set interactAttempt to 1 elseif (trapDisarmed == 1) ;ask player if he wants to rearm it ShowMessage TrapCorpseRearmMsg set interactAttempt to 2 else ; trap has already gone off -- let player loot corpse Activate endif ; if I've spoken to a live NPC, variable01 is set to 1 by greeting so I can attempt to disarm the bomb elseif trapDisarmed == 0 ;ShowMessage DefaultDebugIncrement01 ;ask player if he wants to disarm it ShowMessage TrapCorpseWarnMsgLive set interactAttempt to 1 else Activate endif endif End ;--------------------------------------------------------------------------------------------------------- Begin gamemode if (interactAttempt == 3) ; triggered by dialogue, just pop the message ;ask player if he wants to disarm it ShowMessage TrapCorpseWarnMsgLive set interactAttempt to 1 endif if (interactAttempt == 1) ;attempts to disarm set button to getButtonPressed if (button > -1) set interactAttempt to 0 if (button == 0) if (PCExplosivesSkill >= neededExplosivesSkill) ;message "You successfully disarm the trap." ShowMessage TrapDisarmMsg set trapDisarmed to 1 set trapTriggered to 5 ;trap has been disarmed setav variable01 2 ; mark NPC as having been disarmed (for dialogue conditions) else ;message "You fail to disarm the trap." ;set timer of trap to explode after leaving dialog ShowMessage TrapDisarmFailMsg set trapDisarmed to 0 endif elseif (button == 1) ;don't do anything endif endif endif ;*********************************** if (interactAttempt == 2) ;rearming trap set button to getButtonPressed if (button > -1) set interactAttempt to 0 if (button == 0) ;player wants to rearm as a proximity trap ShowMessage TrapRearmProximityMsg set trapTriggered to 2 ;trap is rearmed so start buffer timer set trapDisarmed to 0 set bufferTimer to 10 elseif (button == 1) set timerMax to 10 ShowMessage TrapRearmTimerMsg timerMax set trapTriggered to 3 ;trap is rearmed as a timed trap set trapDisarmed to 0 elseif (button ==2) ;loot body Activate player elseif (button ==3) ;do nothing endif endif endif ;*********************************** if (trapDisarmed == 0) if (trapTriggered == 0) if (getdistance Player <= 400) mySelf.playSound OBJMegatonBombTamperArm set trapTriggered to 1 set timer to 1 endif endif if (trapTriggered == 1) if (timer >0) set timer to (timer - GetSecondsPassed) elseif (timer<0) mySelf.playSound WPNRifleLaserReloadInOut set trapTriggered to 4 set timer to 4 endif endif if (trapTriggered == 2) ;trap has been rearmed as proximity so start buffer timer if (bufferTimer > 0) set bufferTimer to (bufferTimer - GetSecondsPassed) elseif (bufferTimer < 0) set trapTriggered to 0 ;buffer time is up, trap is now rearmed endif endif if (trapTriggered == 3) set timer to timerMax ;trap is now a timed trap and will explode in 10 seconds set trapTriggered to 1 endif if (trapTriggered == 4) if (timer > 0) set timer to (timer - GetSecondsPassed) elseif (timer < 0) mySelf.placeatme GrenadeFragExplosion 1 ; kill me bloodily kill mySelf 1 kill mySelf 3 kill mySelf 5 kill mySelf 7 kill mySelf 10 set trapDisarmed to 2 ;trap has exploded endif endif endif End
883TrapGasCloudTriggerSCRIPTscn TrapGasCloudTriggerSCRIPT ref obj begin onTriggerEnter set obj to GetActionRef if obj.isInList TrapGasCloudList == 1 ShowWarning "Got Hit" do 100 else ShowWarning "no go" endif end
884TrapGasSCRIPTscn TrapGasSCRIPT ref enteringObject begin onHitWith ExplodesGasTrapsOnHit ;ExplodesGasTrapsOnHit is a form list that has every type of weapon fire and explosion that could potentially ignite a gas trap on contact. do 5 end begin onTriggerEnter set enteringObject to getActionRef if (enteringObject.isWeaponInList ExplodesGasTrapsOnTouch) if (enteringObject.isWeaponOut == 1) do 5 endif endif if (enteringObject.HasMagicEffect FlamerMagicEffect == 1) do 5 endif end
885TrapGenericGasValveSCRIPTscn TrapGenericGasValveSCRIPT ;--------------------------------------------------------------------------------------------------------------------------------------------- short gasValveRepaired ; 1 = gas valve has been repaired short repairAttempt ; 0 = default 1 = PC wants to try and repair the gas valve short doOnce ; 0 = gas trap has not been enabled yet - we only want the gas trap to appear once 1 = player has already let the gas out short skillNeeded ; repair skill needed to repair the gas valve short button ;--------------------------------------------------------------------------------------------------------------------------------------------- Begin onLoad if skillNeeded == 0 set skillNeeded to 35 endif set doOnce to 0 End Begin onActivate if IsActionRef player == 1 if gasValveRepaired== 0 if IsActionRef player == 1 if player.GetAv Repair < skillNeeded ShowMessage TrapLowSkillRepairMsg skillNeeded else ;ShowMessage MS10GasValveSkillMsg set repairAttempt to 1 ; set up to repair endif endif elseif gasValveRepaired == 1 && doOnce == 0 ; MS10AbandonedSewer02GasTrap01REF.enable set doOnce to 1 endif endif End Begin gameMode if repairAttempt == 1 ; procedure for repairing the gas valve set repairAttempt to 0 set button to getbuttonpressed if button > -1 if button == 0 ;ShowMessage MS10GasValveRepairMsg set gasValveRepaired to 1 ; gas valve has been repaired elseif button == 1 ; don't do anything endif endif endif End
886TrapGenericPressurePlateSCRIPTscn TrapGenericPressurePlateSCRIPT ; ; ; This script is for a generic pressure plate activator ; It should update state given whether or not an actor is standing on it ;++++++++++++++++++++++++++++++++++++++++ short armed short button short skillPassed float timer short justPressed short init ref actionRef short rewardXPOnce short XPForDisarm ;==================================================== begin OnLoad if init == 0 setStage NQlvl 1 set armed to 1 set timer to 1 set init to 1 endif end ;==================================================== ;==================================================== begin onActivate if armed == 1 ;is the trap already activated/disarmed? if isActionRef player == 1 ;can the player disarm the trap? if player.getAV Repair >= NQlvl.TRAPPlateSkillReq ShowMessage TrapPlateDetectMsg set skillPassed to 1 else ;Message "Your Repair skill is not high enough to disarm this trap." ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPPlateSkillReq endIf else endif endif end ;==================================================== ;==================================================== begin onTriggerEnter set actionRef to getActionRef if armed == 1 && justPressed == 0 && (actionRef.hasPerk LightStep == 0) playgroup Forward 1 set justPressed to 1 activate endif end ;==================================================== ;==================================================== begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapPlateDisarmMsg set armed to 0 ;disarm the trap if rewardXPOnce == 0 if NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set skillPassed to 0 ;stop running stuff endif endif ;Timer so that you can't reactivate the plate too quickly if justPressed == 1 if timer > 0 set timer to timer - getSecondsPassed else set justPressed to 0 set timer to 1 endif endif end
887TrapGenericTripwireSCRIPTscn TrapGenericTripwireSCRIPT ; ; ; This script is for a generic tripwire activator ; ;++++++++++++++++++++++++++++++++++++++++ ref self ref actionRef short armed short skillPassed short button short init short rewardXPOnce short XPForDisarm ;==================================================== begin OnLoad if init == 0 setStage NQlvl 1 set armed to 1 set skillPassed to 0 set init to 1 endif end ;==================================================== begin onHit set self to GetSelf if armed == 1 playgroup Forward 1 Activate self set armed to 0 endif end ;==================================================== begin onActivate setVatsTarget 1 if armed == 1 ;is the trap already activated/disarmed? if isActionRef player == 1 ;can the player disarm the trap? if player.getAV Repair >= NQlvl.TRAPPlateSkillReq ShowMessage TrapTripwireDetectMsg set skillPassed to 1 else ;Message "Your Repair skill is not high enough to disarm this trap." ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPPlateSkillReq endIf else ;linkTarget.activate endif endif end ;==================================================== ;==================================================== begin onTriggerEnter set self to GetSelf set actionRef to getActionRef if armed == 1 && (actionRef.hasPerk LightStep == 0) playgroup Forward 1 activate self set armed to 0 endif end ;==================================================== ==================================================== begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapTripwireDisarmMsg set armed to 0 ;disarm the trap playgroup Forward 1 if rewardXPOnce == 0 if NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPPlateSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set skillPassed to 0 ;stop running stuff endif endif end
888TrapGrenadeBunchSCRIPTscn TrapGrenadeBunchSCRIPT ; a bundle grenades tied to a tripwire short detected ;check to see if the player has activated the trap. 1=activated, 0=not activated short button ;0 = disarm, 1 = don't disarm short trapDiff ;difficulty of the trap. If the player's skill is higher, they beat the trap. ref grenade short doOnce short rewardXPOnce short XPForDisarm ;======================================== begin onLoad setStage NQlvl 1 set detected to 0 end ;======================================== begin onTrigger if doOnce != 1 set doOnce to 1 playsound3D TRPGrenadeBouquet do 5 ;damage for 5 points endIf end ;======================================== begin onActivate if getActionRef == player setVatsTarget 1 if getDestructionStage <= 1 ;this is so the player can't pick up an activated grenade and disarm if player.getAV explosives >= NQlvl.TRAPGrenadeBouquetSkillReq ;This var is set when the NQlvl stage is set to 1 ShowMessage TrapGrenadeDetectMsg ;do you want to take the grenades? set detected to 1; else ShowMessage TrapGrenadeClusterActivateLowSkillMsg NQlvl.TRAPGrenadeBouquetSkillReq endif endif elseif getActionRef != player if doOnce != 1 set doOnce to 1 playsound3D TRPGrenadeBouquet do 5 ;damage for 5 points endIf endif end ;============================================ begin onHit playsound3D TRPGrenadeBouquet end ;============================================ begin gameMode if detected == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapGrenadeHarvest ;player chose to get grenades and deactivate trap player.additem weapGrenadeFrag 3 disable if rewardXPOnce == 0 if NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set detected to 0 ;stop running stuff endif endif end
889TrapGrenadeDuctSCRIPTscn TrapGrenadeDuctSCRIPT ;This Script should cause the duct to make a noise when activated. ; ; ;====================================== short doOnce begin onActivate if isActionRef player == 0 && doOnce == 0 set doOnce to 1 playsound3D TRPGrenadeChute endif end
890TrapLaserTripwireBeamSCRIPTscn TrapLaserTripwireBeamSCRIPT ref actionRef ;begin onActivate ; showWarning "This is being activated" ; enterTrigger player ;end begin onTriggerEnter set actionRef to getActionRef if actionRef.hasPerk LightStep == 0 activate playsound3D TRPTripwireLaser endif end
891TrapLaserTripwireEmitterSCRIPTscn TrapLaserTripwireEmitterSCRIPT ; ;This controls the laser tripwire by enabling/disabling it. ;It links to the laser beam ;If activated, a skilled player can disable the beam(mid-high science skill and/or very high repair skill?) ;If damaged, it will activate the beam, thus activating the trap ;Once the player has control over it, they may reactivate the laser beam ;Activation from a remote source will toggle the emitter between an on and off state ;If the emitter is off, the beam is disabled and the player cannot turn the beam on. ;If the player tries to interact with an off emitter, they are able to disable it with a significantly lower repair skill. ; They can also rig the trap to go off when the power is turned back on. ;Damaging the emitter in the off state will result in disabling the beam ;Should be able to reactivate from remote source as well ;======================================================= ;-------------------------------------References ref beam ;This is the laser beam reference. This emitter should be linked to the associated beam ;-------------------------------------Short short hasPower ;This determines whether the emitter has power. Will be toggled when activated from remote devices like terminals short isBroken ;This gets set if the emitter takes damage. It should activate the beam, then permanently remove it. short isArmed ;This gets set to 0 if the player uses their skill to deactivate it. The player can set this back to 1 by passing a skill check again. short skillPassed ;If the player has passed the skill check, look for button press when in the game mode block. short isActive ;If this is set to 0, the emitter will never function again. short button ;button var for menus short isRigged ;If set to 1, the trap will activate the next time that the power is turned on. short init short rewardXPOnce short XPForDisarm ;======================================================= ;======================================================= begin OnLoad if init == 0 setStage NQlvl 1 ;Init global difficulty values for disarm set hasPower to 1 ;Start turned on set isBroken to 0 ;Start not broken set beam to getLinkedRef set isActive to 1 set isArmed to 1 set isRigged to 0 set init to 1 endif end ;======================================================= ;======================================================= begin onActivate if isActive == 1 if isRigged == 0 if isActionRef player == 0 ;if not broken and not activated by player, toggle power ; toggle power if hasPower == 0 set hasPower to 1 if isArmed == 1 beam.enable endif else set hasPower to 0 beam.disable endif else if hasPower == 0 ; set up low skill repair scenario if player.getAV Repair >= NQlvl.TRAPLaserLowRepairSkillReq || player.getAv Science >= NQlvl.TRAPLaserScienceSkillReq ;Do if player has sufficient skill if isArmed == 0 ShowMessage TrapLaserOffArmDetectMsg NQlvl.TRAPLaserLowRepairSkillReq NQlvl.TRAPLaserScienceSkillReq else ShowMessage TrapLaserOffDisarmDetectMsg NQlvl.TRAPLaserLowRepairSkillReq NQlvl.TRAPLaserScienceSkillReq endif set skillPassed to 1 else ;Player does not have sufficient skill ShowMessage TrapLowSkillLaserMsg NQlvl.TRAPLaserLowRepairSkillReq NQlvl.TRAPLaserScienceSkillReq endIf else ; set up high skill repair/sci scenario if player.getAV Repair >= NQlvl.TRAPLaserHighRepairSkillReq || player.getAv Science >= NQlvl.TRAPLaserScienceSkillReq ;Do if player has sufficient skill if isArmed == 0 ShowMessage TrapLaserOnArmDetectMsg NQlvl.TRAPLaserHighRepairSkillReq NQlvl.TRAPLaserScienceSkillReq else ShowMessage TrapLaserOnDisarmDetectMsg NQlvl.TRAPLaserHighRepairSkillReq NQlvl.TRAPLaserScienceSkillReq endif set skillPassed to 1 else ;Player does not have sufficient skill ShowMessage TrapLowSkillLaserMsg NQlvl.TRAPLaserHighRepairSkillReq NQlvl.TRAPLaserScienceSkillReq endIf endif endif elseif isRigged == 1 && hasPower == 0 ;if it's rigged, it can still be activated with the power off if isActionRef player == 0 ; set up for one-off explosion set hasPower to 1 beam.enable do 5 else ; show message to player that turning the power back on would trigger the trap ShowMessage TrapLaserRiggedMsg endif endif endif end ;==================================================== ;==================================================== begin onDestructionStageChange ; if hasPower == 1 ; if getDestructionStage < 2 ; beam.enable ; beam.activate player ; endif ; beam.disable ; set isActive to 0 ; endif ; set isBroken to 1 if getDestructionStage == 2 ;totally broken when it reaches stage two set isActive to 0 beam.disable ShowMessage TrapLaserDestroyed endif end ;==================================================== ;==================================================== begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 if isArmed == 1 ShowMessage TrapLaserDisabled beam.disable set isArmed to 0 if rewardXPOnce == 0 if NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPLaserHighRepairSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif else ShowMessage TrapLaserEnabled beam.enable set isArmed to 1 endif set isRigged to 0 ;In case player disables rigging elseif button == 2 && hasPower == 0 ;button 1 is pressed when power is off, player wants to rig trap set isRigged to 1 ;Trap is rigged to explode when power gets turned on ShowMessage TrapLaserRiggedMsg endif set skillPassed to 0 ;stop running stuff endif endif end ;===================================================
892TrapMaceSCRIPTscn TrapMaceSCRIPT ; this is a generic swinging mace trap script ;========================================================; short doOnce float fTrapDamage float fTrapPushBack float fTrapMinVelocity float bTrapContinuous short isActive float timer short bTrapHasHit short maceType ;To prevent lots of GetIsID calls. ; 1 = TrapBrahminCorpse01 ; 2 = TrapBrahminCorpse02 ; 3 = TrapSwingingEngine01 ; 4 = TrapSwingingIBeam01 ; 5 = TrapSwingingIBeam02 ; 6 = TrapSwingingLog01 ;========================================================; begin onLoad ; set fTrapDamage to 40 ; set fTrapPushBack to 900 ; set fTrapMinVelocity to 180 ; set bTrapContinuous to 0 ;------------Init Mace Type if GetIsID TrapBrahminCorpse01 == 1 set maceType to 1 elseif GetIsID TrapBrahminCorpse02 == 1 set maceType to 2 elseif GetIsID TrapSwingingEngine01 == 1 set maceType to 3 elseif GetIsID TrapSwingingIBeam01 == 1 set maceType to 4 elseif GetIsID TrapSwingingIBeam02 == 1 set maceType to 5 elseif GetIsID TrapSwingingLog01 == 1 set maceType to 6 endif end ;========================================================; begin onActivate set bTrapHasHit to 0 set fTrapDamage to 40 set fTrapPushBack to 800 set fTrapMinVelocity to 120 set bTrapContinuous to 0 if doOnce == 0 playgroup unequip 1 set doOnce to 1 set isActive to 1 set timer to 6 endif end begin gameMode if isActive > 0 trapUpdate if timer > 0 set timer to timer - getSecondsPassed elseif isActive == 1 set fTrapDamage to 5 set fTrapPushBack to 100 set isActive to 2 endif if bTrapHasHit == 1 if MaceType == 1 playsound3D FXMeleeTrapImpact elseif MaceType == 2 playsound3D FXMeleeTrapImpact elseif MaceType == 3 playsound3D FXMeleeTrapImpact elseif MaceType == 4 playsound3D FXMeleeTrapImpact elseif MaceType == 5 playsound3D FXMeleeTrapImpact elseif MaceType == 6 playsound3D FXMeleeTrapImpact endif set bTrapHasHit to 0 endif endif end
893TrapMailboxSCRIPTscn TrapMailboxSCRIPT ;--------------------------------------------------------------------------------------------------------- ; The Trap should start it's timer when the player is a certain distance away since this is a proximity trap. ; Should have an audible beep, ending with a higher pitched beep. ; The player can run up and activate the trap having the option to disarm it. ; If disarmed, the player can activate it again and have the option to rearm it, which automatically starts the timer again b/c the trap is a proximity trap. ;--------------------------------------------------------------------------------------------------------- short trapTriggered ;0 = default 1 = trap has been triggered 2 = trap is being rearmed as a proximity trap 3 = trap is being rearmed as a timed trap 4=trap is about to explode short trapDisarmed ;0 = trap active 1 = trap has been disarmed 2 = trap has exploded short interactAttempt ;0 = default 1 = Attempt to Disarm 2 = Rearm short PCExplosivesSkill ;short neededExplosivesSkill ; how high we want the PC explosive skill to be in order to disarm trap. short button float timer float bufferTimer float soundTimer float timerMax ; set to timed trap maximum (10 currently) short rewardXPOnce short XPForDisarm ;--------------------------------------------------------------------------------------------------------- Begin onLoad setStage NQlvl 1 End ;--------------------------------------------------------------------------------------------------------- Begin onActivate if IsActionRef player == 1 setVatsTarget 1 ;now vats targetable if getDestroyed == 0 set PCExplosivesSkill to player.getAV explosives if PCExplosivesSkill > NQlvl.TRAPMailboxSkillReq if (trapDisarmed == 0) ;ask player if he wants to disarm it ;messagebox "This baby carriage is rigged with an explosive.", "Attempt to Disarm", "Leave it Alone" ShowMessage TrapMailboxWarnMsg set interactAttempt to 1 elseif (trapDisarmed == 1) ;ask player if he wants to rearm it ;messagebox "This baby carriage has been disarmed.", "Rearm as a Proximity Trap.", "Rearm as a Timed Trap (10 seconds)", "Leave it Alone" ShowMessage TrapMailboxRearmMsg set interactAttempt to 2 endif else ShowMessage TrapLowSkillExplosivesMsg NQlvl.TRAPMailboxSkillReq endif endif endif End ;==================================================== Begin onTriggerEnter player if (trapTriggered == 0 && trapDisarmed == 0) playSound3D OBJMegatonBombTamperArm set trapTriggered to 1 set timer to 1 endif End ;==================================================== ;--------------------------------------------------------------------------------------------------------- Begin gamemode if (interactAttempt == 1) ;attempts to disarm set interactAttempt to 0 set button to getButtonPressed if (button > -1) if (button == 1) if (PCExplosivesSkill >= NQlvl.TRAPMailboxSkillReq) ;message "You successfully disarm the trap." ShowMessage TrapDisarmMsg set trapDisarmed to 1 set trapTriggered to 5 ;trap has been disarmed if rewardXPOnce == 0 if NQlvl.TRAPMailboxSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPMailboxSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPMailboxSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPMailboxSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPMailboxSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif else ;message "You fail to disarm the trap." ;set timer of trap to explode after leaving dialog ShowMessage TrapDisarmFailMsg set trapDisarmed to 0 endif elseif (button == 0) ;don't do anything endif endif endif ;*********************************** if (interactAttempt == 2) ;rearming trap set interactAttempt to 0 set button to getButtonPressed if (button > -1) if (button == 2) ;player wants to rearm as a proximity trap ;message "You rearm as a proximity trap." ShowMessage TrapRearmProximityMsg set trapTriggered to 2 ;trap is rearmed so start buffer timer set trapDisarmed to 0 set bufferTimer to 10 elseif (button == 1) ;message "You rearm as a timed trap (10 seconds)." set timerMax to 7 ShowMessage TrapRearmTimerMsg timerMax set trapTriggered to 3 ;trap is rearmed as a timed trap set trapDisarmed to 0 elseif (button ==0) ;do nothing endif endif endif ;*********************************** if (trapDisarmed == 0) if (trapTriggered == 1) if (timer >0) set timer to (timer - GetSecondsPassed) elseif (timer<0) playSound3D WPNRifleLaserReloadInOut set trapTriggered to 4 set timer to 3 endif endif if (trapTriggered == 2) ;trap has been rearmed as proximity so start buffer timer if (bufferTimer > 0) set bufferTimer to (bufferTimer - GetSecondsPassed) elseif (bufferTimer < 0) set trapTriggered to 0 ;buffer time is up, trap is now rearmed endif endif if (trapTriggered == 3) set timer to timerMax ;trap is now a timed trap and will explode in 10 seconds set trapTriggered to 1 endif if (trapTriggered == 4) if (timer > 0) set timer to (timer - GetSecondsPassed) elseif (timer < 0) do 50 set trapDisarmed to 2 ;trap has exploded endif endif endif End
894trapMineBuriedSCRIPTscn trapMineBuriedSCRIPT ; ; short skillPassed ;check to see if the player has activated the trap. 1=activated, 0=not activated short detonated short button ;======================================================; begin onLoad setStage NQlvl 1 set skillPassed to 0 end ;======================================================; begin onTriggerEnter do 1 end ;======================================================; begin onActivate if isActionRef player == 1 if player.GetAV Explosives >= NQlvl.TRAPMineSkillReq ShowMessage TrapMineDetectMsg ;do you want to take the mine? set skillPassed to 1; else ShowMessage TrapLowSkillExplosivesMsg NQlvl.TRAPMineSkillReq endif else do 1 endif end ;======================================================; begin gameMode if detonated == 0 if getDistance player <= 16 do 1 set detonated to 1 endif endif if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 0 ShowMessage TrapMineHarvest ;player chose to deactivate and harvest the mine disable player.addItem weapMineFrag 1 endif set skillPassed to 0 ;stop running stuff endif endif end ;======================================================;
895TrapMotionSensorSCRIPTscn TrapMotionSensorSCRIPT ; ; ; This script is for a motion sensor. ; It will activate whenever the player is in the trigger zone, probably on a timer. ; It can be deactivated and removed, loot is a microfusion cell (about 12 rounds) ; ;++++++++++++++++++++++++++++++++++++++++ ;XXXXXXXXXXXXXXXXXXXXxxxx To Do xxxxXXXXXXXXXXXXXXXXXX ; Figure out how to show that wire has been tripped ; Set up trigger on hit short armed short skillPassed short button ;==================================================== begin OnLoad setStage NQlvl 1 set armed to 1 set skillPassed to 0 end ;==================================================== ;==================================================== begin onActivate if armed == 1 ;is the trap already activated/disarmed? if isActionRef player == 1 ;can the player disarm the trap? if player.getAV Science >= NQlvl.TRAPSensorSkillReq ShowMessage TrapSensorDetectMsg set skillPassed to 1 else ;Message "Your Repair skill is not high enough to disarm this trap." ShowMessage TrapLowSkillScienceMsg NQlvl.TRAPSensorSkillReq endIf else ;linkTarget.activate endif endif end ;==================================================== ;==================================================== begin onTriggerEnter if armed == 1 ; playgroup Forward 1 activate set armed to 0 endif end ;==================================================== ==================================================== begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 0 ShowMessage TrapSensorDisarmMsg set armed to 0 ;disarm the trap playgroup Forward 1 endif set skillPassed to 0 ;stop running stuff endif endif end
896TRAPPitchingMachineScriptscn TRAPPitchingMachineScript ;This script runs the pitching machine. short skillPassed ;check to see if the player has activated the trap. 1=activated, 0=not activated short button ;0 = disarm, 1 = don't disarm short isArmed short isFiring short rewardXPOnce short XPForDisarm float fireInterval short ballcount short windUp ;check to see if it is starting up short init ;======================================== begin onLoad if init == 0 setStage NQlvl 1 set skillPassed to 0 set isFiring to 0 set isArmed to 1 set ballcount to 12 ;number of balls to shoot -12 set fireInterval to 0.50 ;about 20 frames set init to 1 endif end ;======================================== ;======================================== begin onActivate if isArmed == 1 if getActionRef == player if player.getAV repair >= NQlvl.TRAPPitchingSkillReq ;This var is set when the NQlvl stage is set to 1 ShowMessage TrapPitchingDetectMsg ;do you want to take the grenades? set skillPassed to 1; else ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPPitchingSkillReq endif else set isFiring to 1 set isArmed to 0 playgroup left 1 ;startup animation ; set windup to 1 endIf endif end ;============================================ begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapDisarmMsg set isArmed to 0 ;disarm the trap if rewardXPOnce == 0 if NQlvl.TRAPPitchingSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPPitchingSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPPitchingSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPPitchingSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPPitchingSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set skillPassed to 0 ;stop running stuff endif endif if isFiring == 1 if ballcount > 0 ;check to make sure there are enough balls ;wait, fire if fireInterval > 0 set fireInterval to fireInterval - GetSecondsPassed else playgroup forward 0 ;looping run animation set ballcount to ballcount -1 FireWeapon TrapBaseball set fireInterval to 0.5 endif else set isFiring to 0 playgroup right 0 ;end animation, ends looping sound. endif endif end
897TrapShotgunSCRIPTscn TrapShotgunSCRIPT ; ;This script runs the shotgun trap. If activated by a remote source, it shoud fire indefinitely. ;The player can loot some shotgun shells if able to deactivate it. ; ;VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV short armed short button short skillPassed short init short doOnce short rewardXPOnce short XPForDisarm ;==================================================== begin OnLoad setStage NQlvl 1 if init == 0 set armed to 1 set init to 1 endif end ;==================================================== ;==================================================== begin onActivate if armed == 1 ;is the trap already activated/disarmed? if isActionRef player == 1 ;can the player disarm the trap? if player.getAV Repair >= NQlvl.TRAPShotgunSkillReq ShowMessage TrapShotgunDetectMsg set skillPassed to 1 else ;Message "Your Repair skill is not high enough to disarm this trap." ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPShotgunSkillReq endIf else if doOnce == 0 fireWeapon WeapShotgunCombat set doOnce to 1 endif endif endif end ;==================================================== ;==================================================== begin gameMode if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapDisarmMsg set armed to 0 ;disarm the trap if rewardXPOnce == 0 if NQlvl.TRAPShotgunSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPShotgunSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPShotgunSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPShotgunSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPShotgunSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif placeatme shotgunTrapShell01 1 player.additemHealthpercent weapshotgunCombat 1 .14 player.additem ammoMicrofusionCell 10 player.additem ammoShotgunShell 4 disable endif set skillPassed to 0 ;stop running stuff endif endif end
898TrapSidewalkGrateSCRIPTscn TrapSidewalkGrateSCRIPT ; this grate swings open when stepped on or activated. ;========================================================; short doOnce ;========================================================; begin onTriggerEnter if doOnce == 0 playgroup unequip 1 playsound3D TRPTrapdoor set doOnce to 1 endif end ;========================================================; begin onActivate if doOnce == 0 playgroup unequip 1 playsound3D TRPTrapdoor set doOnce to 1 endif end
899TrapToiletSCRIPTscn TrapToiletSCRIPT ; ;This script runs the electrified toilet trap. ;The player should get shocked a few seconds after activating this ; ;VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV float timer short armed short triggered short skillPassed ; set if the player passes skill check. short button ; pressed button short init short rewardXPOnce short XPForDisarm ;==================================================== begin OnLoad if init == 0 setStage NQlvl 1 set armed to 1 set triggered to 0 set timer to 1 set init to 1 endif end ;==================================================== ;==================================================== begin onActivate if armed == 1 ;is the trap already activated/disarmed? if isActionRef player != 1 set triggered to 1 activate ; playSound3D TRPToilet else if player.getAV repair < NQlvl.TRAPToiletSkillReq ShowMessage TrapLowSkillRepairMsg NQlvl.TRAPToiletSkillReq else ShowMessage TrapToiletDetectMsg set skillPassed to 1 ; set up to defuse endif endif endif end ;==================================================== ;==================================================== begin gameMode if triggered == 1 ;shock the player after time has passed. if timer > 0 set timer to timer - GetSecondsPassed else player.damageAV health 25 player.say Hit playSound3D TRPToilet imod TrapToiletShockISFX ; player.pushactoraway player 1 set triggered to 0 set timer to 1 endif endif if skillPassed == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapDisarmMsg set armed to 0 ;disarm the trap player.additem ammoMicroFusionCell 35 disable if rewardXPOnce == 0 if NQlvl.TRAPToiletSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPToiletSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPToiletSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPToiletSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPToiletSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set skillPassed to 0 ;stop running stuff endif endif end
900TrigCapitolBuildingBehemothHide01SCRIPTscn TrigCapitolBuildingBehemothHide01SCRIPT Begin onTriggerEnter Player if ( CapitolBehemothREF.IsInCombat == 1 ) if ( CapitolBehemothREF.GetCombatTarget == Player ) CapitolBehemothREF.setav Variable01 1 CapitolBehemothREF.evp endif endif End Begin onTriggerLeave Player CapitolBehemothREF.setav Variable01 0 CapitolBehemothREF.evp End
901TrigCapitolBuildingBehemothHide02SCRIPTscn TrigCapitolBuildingBehemothHide02SCRIPT Begin onTriggerEnter Player if ( CapitolBehemothREF.IsInCombat == 1 ) if ( CapitolBehemothREF.GetCombatTarget == Player ) CapitolBehemothREF.setav Variable02 1 CapitolBehemothREF.evp endif endif End Begin onTriggerLeave Player CapitolBehemothREF.setav Variable02 0 CapitolBehemothREF.evp End
902TrigCapitolBuildingBehemothHide03SCRIPTscn TrigCapitolBuildingBehemothHide03SCRIPT Begin onTriggerEnter Player if ( CapitolBehemothREF.IsInCombat == 1 ) if ( CapitolBehemothREF.GetCombatTarget == Player ) CapitolBehemothREF.setav Variable03 1 CapitolBehemothREF.evp endif endif End Begin onTriggerLeave Player CapitolBehemothREF.setav Variable03 0 CapitolBehemothREF.evp End
903TrigCapitolBuildingBehemothHide04SCRIPTscn TrigCapitolBuildingBehemothHide04SCRIPT Begin onTriggerEnter Player if ( CapitolBehemothREF.IsInCombat == 1 ) if ( CapitolBehemothREF.GetCombatTarget == Player ) CapitolBehemothREF.setav Variable04 1 CapitolBehemothREF.evp endif endif End Begin onTriggerLeave Player CapitolBehemothREF.setav Variable04 0 CapitolBehemothREF.evp End
904TrigGeorgetownMutantDisableScriptscn TrigGeorgetownMutantDisableScript ; ; ; begin onTriggerEnter player if GeorgetownMissileMutant01.getDead == 0 GeorgetownMissileMutant01.disable endif if GeorgetownMinigunMutant01.getDead == 0 GeorgetownMinigunMutant01.disable endif end
905TrigGeorgetownMutantEnableScriptscn TrigGeorgetownMutantEnableScript ; ; ; begin onTriggerEnter player GeorgetownMissileMutant01.enable GeorgetownMinigunMutant01.enable end
906TrigJohnnyWesStopSCRIPTscn TrigJohnnyWesStopSCRIPT Begin onTriggerEnter Player set JohnnyWesREF.shootingStage to 0 End
907TrigJohnnyWesTarget01SCRIPTscn TrigJohnnyWesTarget01SCRIPT short DoOnce ; assuming this should only trigger once -- KMK Begin onTriggerEnter Player if DoOnce == 0 set DoOnce to 1 set JohnnyWesREF.shootingStage to 2 endif End
908TrigJohnnyWesTarget02SCRIPTscn TrigJohnnyWesTarget02SCRIPT short DoOnce ; assuming this should only trigger once -- KMK Begin onTriggerEnter Player if DoOnce == 0 set DoOnce to 1 set JohnnyWesREF.shootingStage to 4 endif End
909TrigJohnnyWesTarget03SCRIPTscn TrigJohnnyWesTarget03SCRIPT short DoOnce ; assuming this should only trigger once -- KMK Begin onTriggerEnter Player if DoOnce == 0 set DoOnce to 1 set JohnnyWesREF.shootingStage to 6 endif End
910TrigJohnnyWesTarget04SCRIPTscn TrigJohnnyWesTarget04SCRIPT short DoOnce ; assuming this should only trigger once -- KMK Begin onTriggerEnter Player if DoOnce == 0 set DoOnce to 1 set JohnnyWesREF.shootingStage to 8 endif End
911TrigMS18Ambush01SCRIPTscn TrigMS18Ambush01SCRIPT ; This script handles the Ambush scene in StatesmanHotel01 at the end of MS18 short startAmbush short doOnce ;************************************************************** Begin onLoad if (getStage MS18 < 40) || (getStage MS18 >= 100) StatesmanHotelMutantSpawnerREF.enable endif End ;************************************************************** Begin onTriggerEnter Player if doOnce == 0 If (getStage MS18 >=40) StatesmanHotelMutantSpawnerREF.disable MS18AmbushMutantsEnablerREF.enable ;enable the Ambush Mutants in StatesmanHotel01 set startAmbush to 1 MS18MutantAmbush01REF.evp MS18MutantAmbush02REF.evp MS18MutantAmbush03REF.evp MS18MutantAmbush04REF.evp MS18MutantAmbushGuard01REF.evp set doOnce to 1 endif endif End ;**************************************************************
912TrigPlayerDisableSCRIPTscn TrigPlayerDisableSCRIPT ; This trigger is triggered by the player only and disables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.disable set doOnce to 1 ;Trigger is only set off one time endif End
913TrigPlayerEnableSCRIPTscn TrigPlayerEnableSCRIPT ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target short doOnce Begin onTriggerEnter Player if doOnce == 0 set target to getLinkedRef target.enable set doOnce to 1 ;Trigger is only set off one time endif End
914TrigRHSSettlerDeathScriptscn TrigRHSSettlerDeathScript ; This trigger is triggered by the player only and enables its Linked ref. ; This trigger only gets triggered once. ref target short trigOnce short runTimer short stage float timer begin onTriggerEnter Player if trigOnce == 0 set trigOnce to 1 set target to getLinkedRef target.enable target.PlaySound3D WPNRifleHuntingFire3D set timer to 0.35 set runTimer to 1 endif end begin GameMode if runTimer == 1 if timer > 0 set timer to timer - GetSecondsPassed else if stage == 0 target.kill set timer to 0.4 set stage to 1 elseif stage == 1 target.PlaySound3D WPNRifleHuntingFire3D set runTimer to 0 endif endif endif end
915TulipSCRIPTSCN TulipSCRIPT BEGIN OnDeath set DialogueUnderworld.TulipDead to 1 END
916TurretFrenzySCRIPTscn TurretFrenzySCRIPT ; frenzies turret on load begin onLoad damageAV brainCondition 100 end
917UncleRoeSCRIPTscn UncleRoeSCRIPT short GreetPlayer ;used as condition of MS02UncleRoeGreetPlayer package BEGIN OnDeath if (getStage MS02 >= 1 && getStage MS02 < 200) setStage MS02 50 endif END
918UnderworldCarolsPlaceFrontDoorSCRIPTSCN UnderworldCarolsPlaceFrontDoorSCRIPT BEGIN OnActivate if ( IsActionRef Player == 1 ) if ( GetCurrentTime >= 18 ) && ( GetCurrentTime <= 23 ) UnderworldCarolsCustomer01.enable UnderworldCarolsCustomer02.enable UnderworldCarolsCustomer03.enable activate elseif ( GetCurrentTime >= 0 ) && ( GetCurrentTime <= 7 ) UnderworldCarolsCustomer01.enable UnderworldCarolsCustomer02.enable UnderworldCarolsCustomer03.enable activate else UnderworldCarolsCustomer01.disable UnderworldCarolsCustomer02.disable UnderworldCarolsCustomer03.disable activate endif else activate endif END
919UnderworldNinthCircleRadioSCRIPTscn UnderworldNinthCircleRadioSCRIPT short IsOn BEGIN OnLoad set IsOn to 1 END BEGIN OnActivate if ( IsOn == 1 ) set IsOn to 0 activate if ( DialogueUnderworld.AhzrukhalDead == 0 ) && ( CharonREF.CharonKillAhzrukhalSceneStart == 0 ) if ( GetDistance AhzrukhalREF <= 420 ) if ( IsActionREF player == 1) AhzrukhalREF.SayTo Player UnderworldAhzurkhalRadioChatter AhzrukhalREF.AddScriptPackage UnderworldAhzrukhalActivateRadio endif endif endif elseif ( IsOn == 0 ) set IsOn to 1 activate if ( DialogueUnderworld.AhzrukhalDead == 0 ) && ( CharonREF.CharonKillAhzrukhalSceneStart == 0 ) if ( GetDistance AhzrukhalREF <= 420 ) AhzrukhalREF.evp if ( IsActionREF player == 1) AhzrukhalREF.SayTo Player UnderworldAhzurkhalRadioChatter endif endif endif endif END
920UtlDoorBigSciencePassScriptscn UtlDoorBigSciencePassScript ; If the player has 67% Science ability, they can get through the door short passSkill Begin onActivate set passSkill to 67 ;change this number to change the skill requirement if (IsActionRef player == 1) if player.getav science >= passSkill ;change science to something else for a different skill pass ShowMessage DoorOpenedScienceMsg passSkill ;be sure to make new messages if changing the required skill activate else ShowMessage DoorOpenFailedScienceMsg passSkill endif endif End
921V106AppearingHallwaySCRIPTscn V106AppearingHallwaySCRIPT BEGIN OnTriggerEnter Player IF getSelf == V106AppearingHallwayTrig0 ApplyIMageSpaceModifier vault106HallucinationISFX V106AppearingHallwayA0.setPos z -1 V106AppearingHallwayA0.disable 1 disable ENDIF IF getSelf == V106AppearingHallwayTrig1 V106AppearingHallwayA1.moveTo V106AppearingHallwayF1 0 0 -1 V106AppearingHallwayA1.disable 1 disable ENDIF IF getSelf == V106AppearingHallwayTrig2 V106AppearingHallwayA2.moveTo V106AppearingHallwayF2 0 0 -1 V106AppearingHallwayA2.disable 1 disable ENDIF IF getSelf == V106AppearingHallwayTrig3 V106AppearingHallwayA3.moveTo V106AppearingHallwayF3 0 0 -1 V106AppearingHallwayA3.disable 1 disable ENDIF IF getSelf == V106AppearingHallwayEnd rimod vault106HallucinationISFX disable ENDIF END
922V106DadSCRIPTscn V106DadSCRIPT short Walker3Killed ;// if the player hurts the hallucination BEGIN ONHIT player ;THE SINGLE FATHER WALKER IF getIsReference vault106FatherWalker1B == 1 ;turn off the imagespacemod rimod vault106HallucinationISFX ENDIF ;// THE TRIPLE FATHER WALKER ;// if one of the walkers is killed, shut off his xmarker IF getIsReference v106FatherWalker3A == 1 v106FatherWalker3AXMRK.disable ELSEIF getIsReference v106FatherWalker3B == 1 v106FatherWalker3BXMRK.disable ELSEIF getIsReference v106FatherWalker3C == 1 v106FatherWalker3CXMRK.disable ENDIF ;// if the player manages to shoot all 3, make sure we kill the image mod IF v106FatherWalker3AXMRK.getDisabled == 1 && v106FatherWalker3BXMRK.getDisabled == 1 && v106FatherWalker3CXMRK.getDisabled == 1 rimod vault106HallucinationISFX ENDIF disable PMS puffOfSmokeVanish END ;// if the player tries to activate the hallucination BEGIN ONACTIVATE if IsActionRef player == 1 disable PMS puffOfSmokeVanish ;THE SINGLE FATHER WALKER IF getIsReference vault106FatherWalker1B == 1 ;turn off the imagespacemod rimod vault106HallucinationISFX ENDIF ;THE TRIPLE FATHER WALKER IF getIsReference v106FatherWalker3A == 1 || getIsReference v106FatherWalker3B == 1 || getIsReference v106FatherWalker3C == 1 set Walker3Killed to Walker3Killed + 1 ;if all three are hit kill the imod IF Walker3Killed == 3 rimod vault106HallucinationISFX ENDIF ENDIF endif END
923V106FlashbackHallSCRIPTscn V106FlashbackHallSCRIPT BEGIN OnTriggerEnter Player IF getSelf == V106FlashbackHallStartA player.moveTo V106HallwaySwapCleanArrive ApplyIMageSpaceModifier vault106HallucinationISFX ENDIF IF getSelf == V106FlashbackHallEndA player.moveTo V106HallwaySwapRuinedArrive rImod vault106HallucinationISFX ;turn the stuff off disable V106FlashbackHallStartA.disable ENDIF IF getSelf == V106FlashbackHallEndB ; V106bFlashbackHallRuined.enable ENDIF END
924Vault101ControlPodScriptscn Vault101ControlPodScript short mode begin onActivate ; if the player tries to activate if (IsActionRef player == 1 ) if (mode ==0) ; message "This control pod is locked." elseif ( mode == 1 ) ; unlocked, player can now activate it playgroup Left 0 set mode to 2 endif endif ; remotely activated if ( IsActionRef DemoVault101Terminal01REF == 1 ) && (mode == 0) playgroup Forward 0 set mode to 1 endif end begin gameMode if (mode == 2) && (isAnimPlaying == 0) VaultKlaxon02REF.playgroup Forward 0 VaultKlaxon03REF.playgroup Forward 0 VaultKlaxonLight01REF.playgroup Forward 0 VaultKlaxonLight02REF.playgroup Forward 0 ;Demo: Set door guards to alerted state ; set Vault101SecurityDoor1Ref.alerted to 1 ; set Vault101SecurityDoor2Ref.alerted to 1 set mode to 3 Vault101aGearDoor02REF.activate player endif end
925Vault106AmataHallHitSCRIPTscn Vault106AmataHallHitSCRIPT BEGIN OnHit disable PMS puffOfSmokeVanish END BEGIN OnActivate disable PMS puffOfSmokeVanish END
926Vault106AmataHallSCRIPTscn Vault106AmataHallSCRIPT ref triggerRef BEGIN OnTriggerEnter Player .disable ApplyIMageSpaceModifier vault106HallucinationISFX V106AmataHEA.enable V106AmataHEB.enable V106AmataHEC.enable Vault106BAmataHallDOOR.setOpenState 4 END
927vault106BossRoomiModsSCRIPTscn vault106BossRoomiModsSCRIPT BEGIN onTriggerEnter player IF vault106CBossPhaseOneMarker.getDisabled != 1 && vault106BossRoomiModsOn.getDisabled == 1 ApplyIMageSpaceModifier vault106HallucinationISFX vault106BossRoomiModsOn.enable ENDIF IF Vault106CBossPhaseTwoMarker.getDisabled != 1 && vault106BossRoomiModsOn.getDisabled == 1 ApplyIMageSpaceModifier vault106HallucinationISFX vault106BossRoomiModsOn.enable ENDIF END
928Vault106CBossCloneBaseSCRIPTscn Vault106CBossCloneBaseSCRIPT short respawnBoss BEGIN OnHit ;// puff of smoke and turn him off PMS PuffOfSmoke disable set respawnBoss to respawnBoss + 1 IF Vault106CBossCloneSpawnA.getDisabled == 0 Vault106CBossCloneSpawnA.disable ELSEIF Vault106CBossCloneSpawnA.getDisabled == 1 IF Vault106CBossCloneSpawnB.getDisabled == 0 Vault106CBossCloneSpawnB.disable ELSEIF Vault106CBossCloneSpawnB.getDisabled == 1 Vault106CBossRef.enable rimod vault106HallucinationISFX ENDIF ENDIF END
929Vault106CBossFatherBaseSCRIPTscn Vault106CBossFatherBaseSCRIPT ref mySelf BEGIN OnHit Player set mySelf to getSelf ;// do the first split //; IF Vault106CBossPhaseOneMarker.getDisabled == 1 && mySelf.getHealthPercentage < 0.80 && Vault106GasMaskOnXMRK.getDisabled == 1 ;// Imagespace on! ApplyIMageSpaceModifier vault106HallucinationISFX Vault106CWallyMackRef.moveTo Vault106CBossCloneSpawnA Vault106CWallyMackRef.enable Vault106CPaulHannonRef.moveTo Vault106CBossCloneSpawnB Vault106CPaulHannonRef.enable Vault106CButchRef.moveTo Vault106CBossCloneSpawnC Vault106CButchRef.enable Vault106CBossPhaseOneMarker.moveTo mySelf Vault106CBossPhaseOneMarker.enable PMS PuffOfSmokeVanish disable ENDIF ;// cloak of invisibility //; IF Vault106CBossPhaseTwoMarker.getDisabled == 1 IF mySelf.getHealthPercentage < 0.45 && Vault106GasMaskOnXMRK.getDisabled == 1 ;// Imagespace on! ApplyIMageSpaceModifier vault106HallucinationISFX addspell stealthBoyInvisibilitySpell Vault106CBossPhaseTwoMarker.enable ENDIF ENDIF END BEGIN onDeath removeSpell stealthBoyInvisibilitySpell rimod vault106HallucinationISFX ; stop the mods from coming back vault106cBossRoomModController.disable END
930Vault106CBossFightFacesSCRIPTscn Vault106CBossFightFacesSCRIPT short doOncePhaseOne short doOncePhaseTwo BEGIN onTriggerEnter Player ApplyIMageSpaceModifier vault106HallucinationISFX ;;the Vault106CBossFather was in a test cell ;;Vault106CBossFather.matchRace player ;;Vault106CBossFather.matchFaceGeometry player 100 ;;Vault106CBossFather.enable END BEGIN gameMode IF Vault106GasMaskOnXMRK.getDisabled != 1 IF Vault106CBossPhaseOneMarker.getDisabled != 1 && Vault106CBossPhaseTwoMarker.getDisabled == 1 IF doOncePhaseOne == 0 Vault106CWallyMackRef.enable Vault106CButchRef.enable Vault106CPaulHannonRef.enable set doOncePhaseOne to 1 ENDIF ELSEIF Vault106CBossPhaseOneMarker.getDisabled != 1 && Vault106CBossPhaseTwoMarker.getDisabled != 1 IF doOncePhaseTwo == 0 Vault106CBossRef.sms PuffOfSmokeVanish set doOncePhaseTwo to 1 ENDIF ENDIF ENDIF END
931Vault106CUpsideDownRoomSCRIPTscn Vault106CUpsideDownRoomSCRIPT BEGIN onTriggerEnter Player ;flip the room back Vault106CUpsideDownRoomOn.disable END
932vault106FatherWalk1DoorCloseSCRIPTscn vault106FatherWalk1DoorCloseSCRIPT ; set to 1 when player triggers short npcTriggered ref attachedDoor begin onTriggerEnter ;if the player hasnt done it before... if isActionRef player != 1 && npcTriggered == 0 set npcTriggered to 1 set attachedDoor to getLinkedRef attachedDoor.setOpenState 0 endif end
933vault106FatherWalk1SCRIPTscn vault106FatherWalk1SCRIPT ; set to 1 when player triggers short playerTriggered begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawnzors vault106FatherWalker1B.enable ApplyIMageSpaceModifier vault106HallucinationISFX endif end
934vault106FatherWalk3SCRIPTscn vault106FatherWalk3SCRIPT ; set to 1 when player triggers short playerTriggered begin onTriggerEnter Player ;if the player hasnt done it before... if playerTriggered == 0 set playerTriggered to 1 ;spawn the SuperMutant and start him running v106FatherWalker3A.enable v106FatherWalker3B.enable v106FatherWalker3C.enable ApplyIMageSpaceModifier vault106HallucinationISFX endif end
935Vault106GasMaskSCRIPTscn Vault106GasMaskSCRIPT short maskON BEGIN onEquip Player set maskON to 1 Vault106GasMaskOnXMRK.enable rimod vault106HallucinationISFX END BEGIN onUnEquip Player IF Vault106CBossPhaseOneMarker.getDisabled != 1 set maskON to 0 ApplyIMageSpaceModifier vault106HallucinationISFX Vault106GasMaskOnXMRK.disable ENDIF END
936Vault106HEEndSCRIPTscn Vault106HEEndSCRIPT BEGIN onTriggerEnter V106AmataHEA V106AmataHEA.disable V106AmataHEB.disable V106AmataHEC.disable END
937vault106MushRoomSignsOfLifeSCRIPTscn vault106MushRoomSignsOfLifeSCRIPT short init short timer ; set to 1 when player triggers short playerTriggered begin onTriggerEnter Player ;if the player hasnt done it before... IF isActionRef player == 1 && playerTriggered == 0 set playerTriggered to 1 V106SignsOfLifeFather0.enable V106SignsOfLifeFather1.enable V106SignsOfLifeFather2.enable ;start the timer V106SignsOfLifeXMRK.enable ApplyIMageSpaceModifier vault106HallucinationISFX ;turn on the new puter Vault106AHallucinationTerminalTERM.enable Vault106AHallucinationTerminalRegularXMRK.disable ENDIF end BEGIN gameMode if V106SignsOfLifeXMRK.getDisabled == 0 ; Has the timer been set up already? if init == 0 ;set the timer value, count down 25 seconds set timer to 450 set init to 1 ;The timer was set up already, lets count down! else ; We still have some time left... if timer > 0 set timer to timer - getSecondsPassed else ;kill the fathers V106SignsOfLifeFather0.disable V106SignsOfLifeFather1.disable V106SignsOfLifeFather2.disable ;stop the timer switch V106SignsOfLifeXMRK.disable ;kill the imod rIMod vault106HallucinationISFX Vault106AHallucinationTerminalTERM.disable Vault106AHallucinationTerminalRegularXMRK.enable endif endIf endIf END
938Vault106OverseerOfficeDisableSCRIPTscn Vault106OverseerOfficeDisableSCRIPT BEGIN OnTriggerEnter Player vault106OverseerREF.disable Vault106OverseerOfficeRef.disable rimod vault106HallucinationISFX END
939Vault106OverseerOfficeSCRIPTscn Vault106OverseerOfficeSCRIPT BEGIN OnTriggerEnter Player vault106OverseerREF.enable ApplyIMageSpaceModifier vault106HallucinationISFX END
940Vault87GasTrapKillFawkesSCRIPTscn Vault87GasTrapKillFawkesSCRIPT short doOnce ref enteringActor BEGIN onTriggerEnter MQ08FawkesRef set enteringActor to getActionRef IF enteringActor == MQ08FawkesRef MQ08FawkesRef.kill RewardKarma -100 disable ELSE enteringActor.kill disable ENDIF END
941Vault87GasTrapKillSCRIPTscn Vault87GasTrapKillSCRIPT short init short timer ref enteringActor ref mySelf BEGIN onTriggerEnter set enteringActor to getActionRef IF enteringActor == MQ08FawkesRef MQ08FawkesRef.kill player disable ELSE enteringActor.kill ENDIF END BEGIN gameMode if getDisabled == 0 ; Has the timer been set up already? if init == 0 ;set the timer value, count down 5 seconds set timer to 5 set init to 1 ;// The timer was set up already, lets count down! else ; //We still have some time left... if timer > 0 set timer to timer - getSecondsPassed else disable endif endIf endIf END
942Vault87TrapGasSCRIPTscn Vault87TrapGasSCRIPT ref enteringObject begin onHitWith ExplodesGasTrapsOnHit ;ExplodesGasTrapsOnHit is a form list that has every type of weapon fire and explosion that could potentially ignite a gas trap on contact. do 5000 end begin onTriggerEnter set enteringObject to getActionRef if (enteringObject.isWeaponInList ExplodesGasTrapsOnTouch) if (enteringObject.isWeaponOut == 1) do 5000 endif endif if (enteringObject.HasMagicEffect FlamerMagicEffect == 1) do 5000 endif end
943vault92bFlameJetTimerSCRIPTscn vault92bFlameJetTimerSCRIPT float timer short init short flameOnce BEGIN gameMode IF vault92bFlameJetTimer.getDisabled == 0 ; Has the timer been set up already? IF init == 0 ;set the timer value, count down 4 seconds set timer to 4 set init to 1 ;////////////////////////////////////////////////////// ;close the doors and flip the lights ;////////////////////////////////////////////////////// lightVault92SecurityLightC.disable lightVault92SecurityLightB.disable lightVault92KillingLightA.enable lightVault92KillingLightB.enable ;close and lock the doors doorVault92SecurityDoorA.lock doorVault92SecurityDoorB.lock doorVault92SecurityDoorA.setOpenState 0 doorVault92SecurityDoorB.setOpenState 0 ;////////////////////////////////////////////////////// ;I spit hot fire! ;////////////////////////////////////////////////////// vault92bFlameJetLeft.FireWeapon WeapFlamer vault92bFlameJetLeftA.FireWeapon WeapFlamer vault92bFlameJetLeftB.FireWeapon WeapFlamer vault92bFlameJetRight.FireWeapon WeapFlamer vault92bFlameJetRightA.FireWeapon WeapFlamer vault92bFlameJetRightB.FireWeapon WeapFlamer ;The timer was set up already, lets count down! ELSE ; We still have some time left... IF timer > 0 set timer to timer - getSecondsPassed ELSE ;////////////////////////////////////////////////////// ;Flip the lights ;////////////////////////////////////////////////////// lightVault92KillingLightA.disable lightVault92KillingLightB.disable lightVault92SecurityLightB.enable lightVault92SecurityLightC.enable vault92bFlameJetTimer.disable set init to 0 set flameOnce to 0 ENDIF IF flameOnce == 0 && timer > 1 && timer < 2 set flameOnce to 1 vault92bFlameJetLeft.FireWeapon WeapFlamer vault92bFlameJetLeftA.FireWeapon WeapFlamer vault92bFlameJetLeftB.FireWeapon WeapFlamer vault92bFlameJetRight.FireWeapon WeapFlamer vault92bFlameJetRightA.FireWeapon WeapFlamer vault92bFlameJetRightB.FireWeapon WeapFlamer ENDIF ENDIF ENDIF END
944vault92bWhiteNoiseTimersSCRIPTscn vault92bWhiteNoiseTimersSCRIPT float timerWhiteNoise short initWhiteNoise BEGIN gameMode ;///////////////////////////////////////////////////// ;THE TIMER FOR THE WHITE NOISE/FRENZY ;///////////////////////////////////////////////////// if vault92bMirelurkFrenzyXMRK.getDisabled == 1 ; Has the timer been set up already? if initWhiteNoise == 0 ;set the timer value, count down 10 seconds set timerWhiteNoise to 10 set initWhiteNoise to 1 ;we've started, turn on the noise vault92bWhiteNoiseMensDorm.enable vault92bWhiteNoiseWomensDorm.enable vault92bWhiteNoiseTestLab.enable ;commence the headsplosions! vault92MirelurkWomensDormA.KillActor vault92MirelurkWomensDormA 1 vault92MirelurkWomensDormB.KillActor vault92MirelurkWomensDormB 1 vault92MirelurkMensDormA.KillActor vault92MirelurkMensDormA 1 vault92bMirelurkHallA.KillActor vault92bMirelurkHallA 1 vault92bMirelurkHallB.KillActor vault92bMirelurkHallB 1 vault92bMirelurkTestLabA.KillActor vault92bMirelurkTestLabA 1 vault92bMirelurkTestLabB.KillActor vault92bMirelurkTestLabB 1 vault92bMirelurkBar.KillActor vault92bMirelurkBar 1 ;The timer was set up already, lets count down! else ; We still have some time left... if timerWhiteNoise > 0 set timerWhiteNoise to timerWhiteNoise - getSecondsPassed else vault92bMirelurkFrenzyXMRK.enable set initWhiteNoise to 0 ;turn off the sounds vault92bWhiteNoiseMensDorm.disable vault92bWhiteNoiseWomensDorm.disable vault92bWhiteNoiseTestLab.disable endif endIf endIf END
945VaultDoorSCRIPTscn VaultDoorSCRIPT begin onActivate if (IsActionRef player == 1) ShowMessage GenericDoorActivatedElsewhereMsg else Activate endif end
946VendorMegatonBrassLanternSCRIPTscn VendorMegatonBrassLanternSCRIPT ; Animate Container then open menu float timer short on BEGIN onActivate if ( on == 0 ) playgroup forward 1 set on to 1 set timer to .6 ;If Leo Stahl is alive and nearby, have him yell at the player if ( LeoStahlREF.GetDistance Player < 210 ) && ( LeoStahlREF.GetDead == 0 ) LeoStahlREF.SayTo Player MegLeoStahlFridge endif endif END BEGIN gameMode if ( on == 1 ) && ( timer <= 0 ) Activate Player set on to 0 playgroup backward 1 endif if ( timer > 0 ) set timer to timer - getSecondsPassed endif END
947VendorMerchantContainerScriptscn VendorMerchantContainerScript ;NOTE: requires container to animate, which is the sign that the player has the key to open it short doOnce ref mySelf ref myVendorChest ;float removeAmmoPercent ;how much percent of ammo to remove when transfering contents of chest (to prevent player from getting super rich) ; replaced with global: VendorRemoveAmmoPercent short ammoCount ;float removeStimpakPercent ;how much percent of ammo to remove when transfering contents of chest (to prevent player from getting super rich) ; replaced with global: VendorRemoveStimpakPercent short StimpakCount Begin GameMode if doOnce == 0 ;add a pencil if there isn't one so it doesn't look empty if getItemCount pencil01 == 0 addItem pencil01 1 endif if IsAnimPlaying == 1 set mySelf to getSelf set myVendorChest to getLinkedRef ;REMOVE SOME STANDARD AMMO FROM MERCHANT CONTAINER set ammoCount to myVendorChest.getItemCount Ammo556mm * VendorRemoveAmmoPercent myVendorChest.removeItem Ammo556mm ammoCount set ammoCount to myVendorChest.getItemCount Ammo10mm * VendorRemoveAmmoPercent myVendorChest.removeItem Ammo10mm ammoCount set ammoCount to myVendorChest.getItemCount AmmoMicroFusionCell * VendorRemoveAmmoPercent myVendorChest.removeItem AmmoMicroFusionCell ammoCount set ammoCount to myVendorChest.getItemCount AmmoSmallEnergyCell * VendorRemoveAmmoPercent myVendorChest.removeItem AmmoSmallEnergyCell ammoCoun