Mission Script Overview

Bookmarks:
Mission 20
Mission 21
Mission 22
Mission 23
Mission 24


Missions 20 and 22


PDXHQ01

FirstFrame

// Change alliances if the player works for WorldCorp

when ALLIED_WC=TRUE
    set bNoAlarm=FALSE for "LobbyCamera" AND "LabEntranceCamera" AND "ElevatorCamera"
    change alliance
for "Krissy" towards "Player" to -1.000000
    change alliance for "Evil" towards "Player" to -1.000000
    change alliance for "Winquman" towards "Player" to -1.000000
    change alliance for "Jonas" towards "Player" to -1.000000
    set bInWorld=TRUE for all "PDXGuard"

Timer

// Cause King Kashue to attack the player if he kills an ally in the PDX HQ
when ALLIED_PDX=TRUE AND "Winquman" OR "Jonas" OR "Evil" OR "Krissy" is dead
    play PM_Kashue_KilledFriend
    change alliance for "Krissy" towards "Player" to -1.000000
    change alliance for "Evil" towards "Player" to -1.000000
    change alliance for "Jonas" towards "Player" to -1.000000
    change alliance for "Winquman" towards "Player" to -1.000000
    set bInWorld=TRUE for "KingKashue_Attack"
    set bLocked=TRUE for "PDXMainDoor" AND destroy triggers with tags "Exit1Trigger" AND "Exit2Trigger"

PDXHQ02


FirstFrame

// Change alliances if the player works for WorldCorp
when ALLIED_WC=TRUE
    set bInWorld=FALSE for "KingKashue" AND bInWorld=TRUE for "KingKashue_Patrolling"
    set
bNoAlarm=FALSE for "ElevatorCamera" AND "LeisureRoomCamera" AND "GhandOfficeCamera"
    change alliance for "Ghand" towards "Player" to -1.000000

FCDowntown

FirstFrame

// Make Abom hostile if you're Goat-aligned
when ALLIED_CULT_GOAT=TRUE
    change alliance for "Abomnation" towards "Player" to -1.000000

// Close the Fan-Fic Store if the player has killed Walton or Chris
when Chris_Dead=TRUE OR Walton_Dead=TRUE 
    set bInWorld=FALSE for "Walton" AND "Chris" AND "FanFicCustomer"
    set bLocked=TRUE for "FanFicStoreDoor"
// Otherwise, move Walton randomly around the Fan Fic Shop
else randomly teleport "Walton" to "WaltonUpstairs" AND set Walton_Upstairs=TRUE (expire 23)
                        teleport "Walton" to "WaltonDownstairs" AND set Walton_Downstairs=TRUE (expire 23)

// Spawn random Llama attackers if you're Goat-aligned
when ALLIED_CULT_GOAT=TRUE AND no actors tagged "AttackGroup_Llama01" OR "AttackGroup_Llama02" OR "AttackGroup_Llama03" are present
    set bInWorld=TRUE for "AttackGroup_Llama01" OR "AttackGroup_Llama02" OR "AttackGroup_Llama03"

// Spawn random Goat attackers if you're Llama-aligned
when ALLIED_CULT_LLAMA=TRUE AND no actors tagged "AttackGroup_Goat01" OR "AttackGroup_Goat02" OR "AttackGroup_Goat03" are present
    set bInWorld=TRUE for "AttackGroup_Goat01" OR "AttackGroup_Goat02" OR "AttackGroup_Goat03"

// Move Walton randomly around the Fan Fic Shop
randomly teleport "Walton" to "WaltonUpstairs" AND set Walton_Upstairs=TRUE (expire 21)
               teleport "Walton" to "WaltonDownstairs" AND set Walton_Downstairs=TRUE (expire 21)

FCCorporate

FirstFrame

// Lock the PDX doors when player is WC aligned
when ALLIED_WC=TRUE
    set bLocked=TRUE for "PDXHQDoors"

PreTravel

// Close Raving's Weapon Shop if the player has killed both Raving and Andreus
when Andreus_Dead=TRUE AND Raving_Dead=TRUE
    set bLocked=TRUE for "WeaponShopDoor"

FCCorpSewers

Timer

// Trestkon smells... no really, he does:
when player enters waterzone
    set Trestkon_Stinks=TRUE (expiration 21 in mission 20, 23 in mission 22)

FCSlums

FirstFrame

// Close the Voodoo Shop if the player has killed Yardbomb

when Yardbomb_Dead=TRUE
    set bLocked=TRUE for "VoodooShopDoor"


WeaponShop

FirstFrame

// Make sure that Raving and some thugs attack the player if he returns after killing Andreus
when Andreus_Dead=TRUE AND Raving_Dead=FALSE
    set bInWorld=FALSE for "Raving" AND bInWorld=TRUE for "Raving_Angry" AND bInWorld=TRUE for "RavingThug"

// Make sure that Andreus attacks the player if he returns after killing Raving
when Raving_Dead=TRUE AND Andreus_Dead=FALSE
    set bInWorld=FALSE for "Andreus" AND bInWorld=TRUE for "Andreus_Angry"

GoatCity

FirstFrame

// Make everybody hostile when the player is allied to the Llamas
when ALLIED_CULT_LLAMA=TRUE
    change alliance for everybody towards "Player" to -1.000000

GoatTemplae

Timer

// Make all templars run to Athena's apartment if the alarm there is sounded

LlamaTemple

FirstFrame

// Make Silver appear when the player has helped him escape from WC
when SD_Escaped=TRUE
    set bInWorld=TRUE for "Silver"

// Make everybody hostile when the player is allied to the Goats
when ALLIED_CULT_GOAT=TRUE
    change alliance for everybody towards "Player" to -1.000000

WCFloor1

FirstFrame

// OMG, you rescued SD! Now everybody is pissed at you
when SD_Escaped=TRUE
    change alliance for "WCSecurity" towards "Player" to -1.000000
    set bNoAlarm=FALSE for all security cameras

// Serialize the sublevel keypad and hatch
when WCHQ_SublevelKeypadHatch_Open=TRUE
    set bLocked=FALSE for "SublevelKeypadHatch"
when WCHQ_SublevelKeypad_Open=TRUE
    set "SublevelKeypad" to bypassed

PreTravel


// Take the player to the easter egg ending if he's killed Scara
when Scara_Dead=TRUE
    open 25_Whoopass.dx

// Serialize the sublevel keypad and hatch
when SublevelKeypadHatch is unlocked
    set WCHQ_SublevelKeypadHatch_Open=TRUE
when SublevelKeypad has been hacked
    set WCHQ_SublevelKeypad_Open=TRUE

WCFloor2

FirstFrame

// OMG, you rescued SD! Now everybody is pissed at you
when SD_Escaped=TRUE
    change alliance for "WCSecurity" towards "Player" to -1.000000
    set bNoAlarm=FALSE for all security cameras

// Serialize the sublevel keypad and hatch
when WCHQ_SublevelKeypadHatch_Open=TRUE
    set bLocked=FALSE for "SublevelKeypadHatch"
when WCHQ_SublevelKeypad_Open=TRUE
    set "SublevelKeypad" to bypassed

// If you're PDX-aligned, Evil will send you a message:
when ALLIED_PDX=TRUE
    play PM_Evil_Spyware

PreTravel

// Take the player to the easter egg ending if he's killed Scara
when Scara_Dead=TRUE
    open 25_Whoopass.dx

// Serialize the sublevel keypad and hatch
when SublevelKeypadHatch is unlocked
    set WCHQ_SublevelKeypadHatch_Open=TRUE
when SublevelKeypad has been hacked
    set WCHQ_SublevelKeypad_Open=TRUE

WCFloor3

FirstFrame

// OMG, you rescued SD! Now everybody is pissed at you
when SD_Escaped=TRUE
    change alliance for "WCSecurity" towards "Player" to -1.000000
    set bNoAlarm=FALSE for all security cameras

// Serialize the sublevel keypad and hatch
when WCHQ_SublevelKeypadHatch_Open=TRUE
    set bLocked=FALSE for "SublevelKeypadHatch"
when WCHQ_SublevelKeypad_Open=TRUE
    set "SublevelKeypad" to bypassed

PreTravel

// Serialize the sublevel keypad and hatch
when SublevelKeypadHatch is unlocked
    set WCHQ_SublevelKeypadHatch_Open=TRUE
when SublevelKeypad has been hacked
    set WCHQ_SublevelKeypad_Open=TRUE

WCFloor4

FirstFrame

// OMG, you rescued SD! Now everybody is pissed at you
when SD_Escaped=TRUE
    change alliance for "WCSecurity" towards "Player" to -1.000000
    set bNoAlarm=FALSE for all security cameras
    set bLocked=TRUE for "Scara_Office_Door"

// Serialize the sublevel keypad and hatch
when WCHQ_SublevelKeypadHatch_Open=TRUE
    set bLocked=FALSE for "SublevelKeypadHatch"
when WCHQ_SublevelKeypad_Open=TRUE
    set "SublevelKeypad" to bypassed

PreTravel

// Serialize the sublevel keypad and hatch
when SublevelKeypadHatch is unlocked
    set WCHQ_SublevelKeypadHatch_Open=TRUE
when SublevelKeypad has been hacked
    set WCHQ_SublevelKeypad_Open=TRUE

WCSublevel

FirstFrame

// Send a message from That Guy if you're allied to WC
when ALLIED_WC=TRUE
    play PM_TG_Sublevel1
// If you're not WC-aligned, make TG hostile
else 

    change alliance
for "ThatGuy" towards "Player" to -1.000000

    
// Knock out the test subject in the lab cells
set "TakeOutBum" to unconscious

// Serialize the sublevel keypad and hatch
when WCHQ_SublevelKeypadHatch_Open=TRUE
    set bLocked=FALSE for "SublevelKeypadHatch"
when WCHQ_SublevelKeypad_Open=TRUE
    set "SublevelKeypad" to bypassed

PreTravel

// Serialize the sublevel keypad and hatch
when SublevelKeypadHatch is unlocked
    set WCHQ_SublevelKeypadHatch_Open=TRUE
when SublevelKeypad has been hacked
    set WCHQ_SublevelKeypad_Open=TRUE

Mission 20

20_PhasApartment

FirstFrame

// Play the introductory infolink message
play PM_PhasDirect

Timer

// Remove the player's gear when Phas confiscates it
when Phas_HasWeapons=TRUE
    Remove the player's inventory

20_PDXHQ01


FirstFrame

// Move King Kashue to Evil's office after the spyware mission

when
QC_MAIN_WCSpyware=TRUE AND QR_MAIN_ShadowCode=FALSE
    set bInWorld=TRUE for "KingKashue_Evil"

// Move King Kashue back after the server complex
when QC_MAIN_ShadowCode=TRUE AND QR_MAIN_Firestaff=FALSE
    set bInWorld=FALSE for "KingKashue_Evil"

// Spawn some stuff for the player in the armoury for the firestaff mission
when QC_MAIN_ShadowCode=TRUE
    spawn TNMItems.WeaponFatRifle at "FatRifleSpawn"
    spawn DeusEx.Lockpick at "LockpickSpawn"
    spawn DeusEx.BioelectricCell at "BiocellSpawn"
    spawn TNMItems.AmmoFatRifle" at "FatCanisterSpawn"

// Spawn a new aug for the player when he's completed WCSpyware
when QC_MAIN_WCSpyware=TRUE
    spawn TNMItems.AugCannisterSS at "JonasAugSpawn"

// Close the aug container if it's open
when mover with tag "AugContainerField" is open (keypoint "1")
    close "AugContainerField" (move to keypoint "0")

PreTravel

// Count bodies and store result
when KillCount_PDXDone=FALSE
    store number of carcasses in flag KillCount_PDXFloor1

20_PDXHQ02

FirstFrame

// Make datacube with Despot's password appear when the player needs to find Despot
when
Kylie_TOLD_Despot=TRUE
    set bInWorld=TRUE for "DespotOfficeDatacube"

// Move King Kashue to Evil's office after the spyware mission
when
QC_MAIN_WCSpyware=TRUE AND QR_MAIN_ShadowCode=FALSE
    set bInWorld=FALSE for "KingKashue"

// Move King Kashue back after the server complex
when QC_MAIN_ShadowCode=TRUE AND QR_MAIN_Firestaff=FALSE
    set bInWorld=TRUE for "KingKashue"

PreTravel

// Count bodies and store result
when KillCount_PDXDone=FALSE
    store number of carcasses in flag KillCount_PDXFloor2

20_Despot

FirstFrame

// Count bodies
when KillCount_PDXDone=FALSE

   
// Award Massacre Award
    when
KillCount_PDXFloor1 plus KillCount_PDXFloor2 is 5
        award player 200 skillpoints: "Massacre Award"

    // Identify player as a killer 
    when KillCount_PDXFloor1 plus KillCount_PDXFloor2 is 3
        set Killer_PDX=TRUE

    // Award Pacifist Award
    when KillCount_PDXFloor1 plus KillCount_PDXFloor2 is 0
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_PDXDone=TRUE

20_FCDowntown

FirstFrame

// Prevent the player from re-entering after trying to kill Phasmatis

when Phas_HasWeapons=TRUE
    set bLocked=TRUE for "PhasApartmentDoor"
    // And give the player his stuff back
    Return all items to the player's inventory.
    set Phas_HasWeapons=FALSE

// Send menacing message from the opposing cult after the first cult quest
when QC_CULT_FindTheGoats=TRUE
    play PM_DT_Bustedj00
when QC_CULT_GetThePlans=TRUE
    play PM_Abom_Bustedj00

// Handle the awards for the goat city mission
when player has arrived from 20_GoatCity AND QC_CULT_DrainTheMelk=TRUE AND KillCount_GoatCityDone=FALSE

    // Award Massacre Award
    when KillCount_GoatCity is X // All pawns on the map
        award player 200 skillpoints: "Massacre Award"

    // Identify the player as a killer
    when KillCount_GoatCity is X // A fraction of the pawns on the map
        set Killer_Goats=TRUE

    // Award Pacifist Award
    when KillCount_GoatCity is 0
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_GoatCityDone=TRUE (expiration 21)

// Handle the awards for the llama temple mission
when player has arrived from 20_LlamaTemple AND QC_CULT_DestroyTheTablets=TRUE AND KillCount_LlamaTempleDone=FALSE

    // Award Massacre Award
    when KillCount_LlamaTemple is X // All pawns on the map
        award player 200 skillpoints: "Massacre Award"

    // Identify the player as a killer
    when KillCount_LlamaTemple is X // A fraction of the pawns on the map
        set Killer_Goats=TRUE

    // Award Pacifist Award
    when KillCount_LlamaTemple is 0
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_LlamaTempleDone=TRUE (expiration 21)

Timer

// Make Abom return to his post when the BG is dead
when BoardGuest1_Dead=TRUE
    set Orders to "Patrolling" for "Abomnation"
    set OrderTag to "AbomPatrolPoint" for "Abomnation"

// Return Abom to his post when he has given you the first mission
when QR_CULT_FindTheGoats=TRUE
    set Orders to "Patrolling" for "Abomnation"
    set OrderTag to "AbomPatrolPoint" for "Abomnation"
    // And after a while, play the PM from DT
    wait 120 seconds AND THEN play PM_DT_MeetMe

// Set a flag when all N00Bz are killed
when number of living actors tagged "N00B" is 0
    set N00Bz_Dead=TRUE
    if Master_Kale_Dead=TRUE
        play
PM_Firewall_KilledEveryone
    else
        play PM_Firewall_KilledGang

PreTravel

// Close Sol's if anybody there has been killed
when Killer_Sols=TRUE
    set bLocked=TRUE for "SolsDoor"

// Clean up after the first mission
when stuff
    when QC_SUB_N00Bz=TRUE
        when Master_Kale_Dead=TRUE OR N00Bz_Dead=TRUE
           
set bInWorld=TRUE for "N00BFirewalls"
        when Master_Kale_Dead=FALSE
            delete "Master_Kale"
        when N00Bz_Dead=FALSE
            delete all actors with tag "N00B"
    else
        when N00Bz_Dead=FALSE
            kill all actors with tag "N00B"
        when Master_Kale_Dead=FALSE
            kill "Master_Kale"
       
set bInWorld=TRUE for "N00BFirewalls"
    when QC_SUB_LlamaRescue=TRUE
        delete "LlamaHostage"
    else
        kill "LlamaHostage"
    delete all actors with tag "GoatKidnapper"

// Fix the ATM

// Count bodies
store number of carcasses in flag KillCount_FCDowntown

20_FCCorporate

FirstFrame

// Open the doors to Despot's apartment if that's where you're coming from
when player is travelling from 20_Despot
    open "DespotMover"
    set bInitiallyActive=TRUE for "DespotMoverTrigger"

// Make Kaigen and the WC bots hostile if you're PDX- aligned
when ALLIED_PDX=TRUE
    change alliance for "Kaigen" towards "Player" to -1.000000
    change alliance for "WCHQPatrolBot" towards "Player" to -1.000000

// Handle the awards for the WCHQ mission
when player has arrived from 20_WCFloor1 OR 20_WCFloor2 AND QC_MAIN_WCSpyware=TRUE AND KillCount_WCHQDone=FALSE

    // Award Massacre Award
    when
KillCount_WCFloor1 plus KillCount_WCFloor2 plus KillCount_WCFloor3 X // All pawns in the maps
        award player 200 skillpoints: "Massacre Award"

    // Award Pacifist Award
    when KillCount_WCFloor1 plus KillCount_WCFloor2 plus KillCount_WCFloor3 is 0
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_WCHQDone=TRUE

PreTravel

// Close the PartyZone if anybody there has been killed
when Killer_PZ=TRUE
    set bLocked=TRUE for "PartyZoneDoor"

// Count bodies
store number of carcasses in flag KillCount_FCCorporate

20_FCSlums

FirstFrame

// Remove the mechanic and spawn the datacube at the silos and open the gate when it's time to go to DXI

when QR_MAIN_Firestaff=TRUE
    set bInWorld=FALSE for "SiloMechanic" AND set bInWorld=TRUE for "SiloMechanicDatacube" AND open "SiloGate"

PreTravel

// Count bodies
store number of carcasses in flag KillCount_FCSlums

20_SolsBar

FirstFrame

// Handle the awards for the DXO mission
when player has arrived from 20_DXO AND HAS_Newsscript=TRUE AND KillCount_DXODone=FALSE

    // Award Massacre Award
    when KillCount_DXO is 4
        award player 200 skillpoints: "Massacre Award"

    // Identify the player as a killer
    when KillCount_DXO is 2
        set Killer_DXO=TRUE

    // Award Pacifist Award
    when KillCount_DXO is 0
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_DXODone=TRUE (expiration 21)

PreTravel

// Count bodies
when number of carcasses is 1 or more
    set Killer_Sols=TRUE

20_DXO

PreTravel

// Count bodies and store result
when KillCount_DXODone=FALSE
    store number of carcasses in flag KillCount_DXO

20_Partyzone

FirstFrame

// Knock the drunk guy out
set "PZDrunk" to unconscious

PreTravel

// Count bodies
when number of carcasses is 1 or more
    set Killer_PZ=TRUE

20_VoodooShop

FirstFrame

// Spawn DT when he wants to meet the player
when QR_CULT_FindTheGoats=TRUE
    set bInWorld=TRUE for "DarkTemplar_VoodooShop"

20_WeaponShop

PreTravel

// Identify the player as a filthy thieving bastard so he can be mercilessly PUNISHED at a later time
when player is carrying a weapon he hasn't paid for
    set StoleFromWeaponShop=TRUE

20_GoatCity

FirstFrame

// Make sure DT appears when he's supposed to and says the right things
when QC_CULT_GetThePlans=TRUE
    set bInWorld=TRUE for "DarkTemplar"
    set DT_IsInGoatCity=TRUE

PreTravel

// Count bodies and store result
when KillCount_GoatCityDone=FALSE
    store number of carcasses in flag KillCount_GoatCity

20_LlamaTemple

FirstFrame

// Spawn the key to the tunnel door and make the door pickable when the player has the quest
when QR_CULT_DestroyTheTablets=TRUE
   
spawn DeusEx.NanoKey at "TunnelKeySpawn" WITH Description="Llamarian tunnels password" AND ItemName="Password" AND KeyID="LlamaTunnelDoorKey"
    set bPickable=TRUE for "LlamaTunnelDoor"

PreTravel

// Count bodies and store result
when KillCount_LlamaTempleDone=FALSE
    store number of carcasses in flag KillCount_LlamaTemple

20_WCFloor1

Timer

// Send the player an angry message from Kashue if he kills SD
when Silver_Dead=TRUE AND QC_MAIN_SaveSD=FALSE AND SD_KilledAnyway=FALSE
    play PM_KilledSD

// Send the player an angry message from Scara if he saves SD
when QC_MAIN_SaveSD=TRUE
    play PM_SavedSD

// Reset the necessary flags and send a PM from both if the player kills SD after saving him
when Silver_Dead=TRUE AND QC_MAIN_SaveSD=TRUE
    play PM_SavedThenKilledSD

PreTravel

// Count bodies
when KillCount_WCDone=FALSE
    store number of carcasses in flag KillCount_WCFloor1

20_WCFloor2

Timer

// Handle the completion of both objectives in the WC Spyware mission
when WCHQ_SpywarePlaced=TRUE AND WCHQ_ESFDisabled=TRUE
    play PM_Evil_SpywarePlaced

PreTravel

// Count bodies
when KillCount_WCDone=FALSE
    store number of carcasses in flag KillCount_WCFloor2

20_WCFloor3

Timer

// Handle the completion of both objectives in the WC Spyware mission
when WCHQ_SpywarePlaced=TRUE AND WCHQ_ESFDisabled=TRUE
    play PM_Evil_SpywarePlaced

PreTravel

// Count bodies
when KillCount_WCDone=FALSE
    store number of carcasses in flag KillCount_WCFloor3

20_WCFloor4

FirstFrame

// Spawn a new aug for the player when he's completed GetNewsscript
when QC_MAIN_GetNewsscript=TRUE
    spawn TNMItems.AugCannisterSS at "FireplaceAugSpawn"

// Close the fireplace safe if it's open
when mover with tag "Fireplace_Safe" is open (keypoint "2")
    trigger "Fireplace_Events"

20_WCSublevel

FirstFrame

// Handle all the stuff that's supposed to happen if Slicer escapes on his own
when QC_MAIN_KillPhas=TRUE
    set bInWorld=FALSE for "Slicer" AND if WCPrisonGuard_Dead=FALSE set bInWorld=FALSE for " WCPrisonGuard" AND bInWorld=TRUE for "WCPrisonGuardCorpse"
    open "SlicerCellDoor"

Timer

// Allow the player to spawn the Quad Launcher after inserting both the plans and the codes
when Quad_PlansInserted=TRUE AND Quad_CodesInserted=TRUE
    set Quad_ReadyToSpawn=TRUE

// Create the Quad Launcher when the time is right
when MS_SpawnQuadLauncher=TRUE
    spawn TNMItems.WeaponQdRocket at "QuadLauncherSpawnPoint" // And if you can, apply some cool effects first, like lighting coming off of it
    delete HAS_QuadLauncherPlans AND HAS_ConstructionCodes AND Quad_PlansInserted AND Quad_CodesInserted AND Quad_ReadyToSpawn AND MS_SpawnQuadLauncher

20_ ServerComplex01

FirstFrame

// Move ManInBlack around according to why the player is here

when
ALLIED_PDX=TRUE
    set bInWorld=TRUE for " MiB_Lobby"
when ALLIED_WC=TRUE
    set bInWorld=TRUE for " MiB_Mainframe"

Mission 21

21_DXI_FrontEnd

FirstFrame

// Start the intro cinematic
trigger "StartMissionCinematic"

// Handle awards from the mission 20 city maps
when KillCount_Mission20Done=FALSE

    // Award total massacre award
    when
KillCount_FCDowntown plus KillCount_FCCorporate plus KillCount_FCSlums is X // The total number of pawns in the city
        award player 800 skillpoints: "Psychotic Mass-Murderer Extravaganza!"

    // Identify the player as an asshole
    when number of carcasses plus KillCount_FCDowntown plus KillCount_FCCorporate is X or more // A fraction of the pawns in the city
        set Killer_FC=TRUE

    set KillCount_Mission20Done=TRUE

21_DXI_MCR

FirstFrame

// Determine whether to spawn ZeroPresence or Slicer
when ALLIED_PDX=TRUE
    set bInWorld=TRUE for "Zero"
when ALLIED_WC=TRUE
    set bInWorld=TRUE for "Slicer"

Mission 22

22_FCDowntown

FirstFrame

// Determine which bulletins to spawn
when Killer_PDX=TRUE OR Killer_FC=TRUE
    set bInWorld=TRUE for "KillerBulletin"
    // Remove some of the random citizens if the player is a killer
    set bInWorld=FALSE for X pawns tagged "GenericPawn"
else when
ALLIED_WC=TRUE
    set bInWorld=TRUE for "WCBulletin"
else set bInWorld=TRUE for "PDXBulletin"

// Handle the awards for the goat templae mission
when player has arrived from 20_GoatCity AND QC_CULT_KillAthena=TRUE AND KillCount_GoatCityDone=FALSE

    // Award Massacre Award
    when KillCount_GoatCity plus KillCount_GoatTemplae1 plus KillCount_GoatTemplae2 is X // All pawns on the maps
        award player 200 skillpoints: "Massacre Award"

    // Identify the player as a killer
    when KillCount_GoatCity plus KillCount_GoatTemplae1 plus KillCount_GoatTemplae2 is X // A fraction of the pawns on the maps
        set Killer_Goats=TRUE

    // Award Pacifist Award
    when KillCount_GoatCity plus KillCount_GoatTemplae1 plus KillCount_GoatTemplae2 is 1 // Athena
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

   
set KillCount_GoatCityDone=TRUE (expiration 23)

// Handle the awards for the llama temple mission
when player has arrived from 20_LlamaTemple AND QC_CULT_KillBeefman=TRUE AND KillCount_LlamaTempleDone=FALSE

    // Award Massacre Award
    when KillCount_LlamaTemple is X // All pawns on the map
        award player 200 skillpoints: "Massacre Award"

    // Identify the player as a killer
    when KillCount_LlamaTemple is X // A fraction of the pawns on the map
        set Killer_Llamas=TRUE

    // Award Pacifist Award
    when KillCount_LlamaTemple is 1 // Beefman
        award player 200 skillpoints: "Pacifist Award"

    // Award Stealth Award
    when player hasn't been spotted
        award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

    set KillCount_LlamaTempleDone=TRUE (expiration 23)

Timer

// Handle the completion of the Sol quest
when 4 actors tagged "SolBomber" are killed
    set QC_SUB_KillBombers=TRUE AND add goal:

Name: SolBombing
Text: You have disposed of the men who bombed Sol's Bar. Alpha will appreciate this news.

22_FCCorporate

FirstFrame

// Determine which bulletins to spawn
when Killer_PDX=TRUE OR Killer_FC=TRUE
    set bInWorld=TRUE for "KillerBulletin"
    // Remove some of the random citizen if the player is a killer
    set bInWorld=FALSE for X pawns tagged "GenericPawn"
else when
ALLIED_WC=TRUE
    set bInWorld=TRUE for "WCBulletin"
else set bInWorld=TRUE for "PDXBulletin"

// Spawn Raving's thugs if the player has stolen from him (but only if Raving is still alive)
when StoleFromWeaponShop=TRUE AND Raving_Dead=FALSE
    set bInWorld=TRUE for "RavingThug"

22_FCSlums

FirstFrame

// Determine which bulletins to spawn

when Killer_PDX=TRUE OR Killer_FC=TRUE
    set bInWorld=TRUE for "KillerBulletin"
    // Remove some of the random citizen if the player is a killer
    set bInWorld=FALSE for X pawns tagged "GenericPawn"
else when
ALLIED_WC=TRUE
    set bInWorld=TRUE for "WCBulletin"
else set bInWorld=TRUE for "PDXBulletin"

// Spawn WC Thugs or Firewalls depending on player alliance
when ALLIED_PDX=TRUE
    set bInWorld=TRUE for "WCThug"
when ALLIED_WC=TRUE
    set bInWorld=TRUE for "PDXFirewall"

// Put a big ol' WC logo over the Voodoo Shop sign if the player advised Yardie to sell
when Yardbomb_AdvisedToSell=TRUE
    set bLocked=TRUE for "VoodooShopDoor" AND open "VoodooShopWCSign"

Timer

// Remove Fender2k1 and Madmax when the player restores power to the subway
when QC_SUB_SubwayPower=TRUE
    set bInWorld=FALSE for "Fender2k1" AND bInWorld=FALSE for "Madmax"

// Spawn Midashand when the player gets the info out of Kevo

when QC_MAIN_KidnapKevo=TRUE
    set bInWorld=TRUE for "Midashand"

22_WCFloor1

FirstFrame

// Make Kylie appear when the player is looking for ZP
when QR_SUB_FindZP=TRUE
   
set bInWorld=TRUE for "Kylie"

22_DXO

PreTravel

// Remove Kevo when he's released
when Kevo_Free=TRUE
    set bInWorld=FALSE for "Kevo"

// Identify the player as a killer
when 4 carcasses are present
    set Killer_DXO=TRUE

22_GoatCity

FirstFrame

// Spawn DT in the city if the player didn't do the last quest
when QC_CULT_DestroyTheTablets=FALSE
    set bInWorld=TRUE for "DarkTemplar_City"

// Spawn ZeroPresence when the player has received the mission to find him
when QR_SUB_FindZP=TRUE and QC_SUB_FindZP=FALSE
    set bInWorld=TRUE for "Zero"

PreTravel

// Remove ZeroPresence when his mission is done
when QC_SUB_FindZP=TRUE
    set bInWorld=FALSE for "Zero"

22_LlamaTemple

PreTravel

// Count bodies and store result
when KillCount_LlamaTempleDone=FALSE
    store number of carcasses in flag KillCount_LlamaTemple

22_GoatTemplae

PreTravel

// Count bodies and store result
when KillCount_GoatTemplae1Done=FALSE
    store number of carcasses in flag KillCount_GoatTemplae1

22_GoatTemplaeInt

FirstFrame

// Spawn DT in the templae if the player did the last quest
when QC_CULT_DestroyTheTablets=TRUE
    set bInWorld=TRUE for "DarkTemplar"

PreTravel

// Count bodies and store result
when KillCount_GoatTemplae2Done=FALSE
    store number of carcasses in flag KillCount_GoatTemplae2

22_DXEditing

Timer

// Abort the mission if the player kills somebody
when 1 corpse is present
    play PM_Wolfy_KilledGuard

Mission 23

23_ABIExterior

FirstFrame

// Spawn Ricemanu if the player is WorldCorp-aligned
when ALLIED_WC=TRUE
    set bInWorld=TRUE for "Ricemanu"

Timer

// Play a datalink message if Ricemanu is killed
when Rice_Dead=TRUE
    play PM_RiceDies

23_ABIRuins

FirstFrame

// Determine whether to spawn ZP plus henchmen, Slicer, or none of the above
when ALLIED_PDX=TRUE AND Zero_Dead=FALSE
    set bInWorld=TRUE for "Zero" AND "ZPHenchman"
    set bInWorld=FALSE for "RicePlatoonCorpse" // Remove the corpses of Ricemanu's patrol because ZP was there to help them
    set ABIBossFight=TRUE
when ALLIED_WC=TRUE AND Slicer_Dead=FALSE
    set bInWorld=TRUE for "Slicer" AND ABIBossFight=TRUE

Timer

// If ZP kills the player, move the player to the prison cell and set the up the captivity sequence
when Player.IsInState(Dying) AND KillerBindName="Zero"
    Cut to black
    teleport player to "PlayerCellSpawnPoint" AND set player health to 25
    move the player's inventory to the guard room
    set bInWorld=TRUE for "WCRicePlatoon" AND "WCCellGuard" // Spawn the prison guards
    set bInWorld=FALSE for "Zero" AND "ZPHenchman" // Remove ZP and any of his henchmen who've survived
    Fade in
    play
PM_EvilPrisonCell

PreTravel

// Award Massacre Award
when X carcasses are present
    award player 200 skillpoints: "Massacre Award"

// Award Pacifist Award
when X carcasses are present // X = The number of carcasses present at the beginning of the mission
    award player 200 skillpoints: "Pacifist Award"

// Award Stealth Award
when player hasn't been spotted
    award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

23_ABILabs

FirstFrame

// Turn all WC personnel friendly if the player is WC-aligned
when ALLIED_WC=TRUE
    change alliance for "WCCommando" towards "Player" to 1.000000
    change alliance for "WCCommando02" towards "Player" to 1.000000
    change alliance for "OfficeHallWC" towards "Player" to 1.000000
    change alliance for "CubiclesWC" towards "Player" to 1.000000
    change alliance for "ResearchHallWC" towards "Player" to 1.000000
    change alliance for "Commando05" towards "Player" to 1.000000
    change alliance for "LoadingBayWC" towards "Player" to 1.000000
    change alliance for "MIB" towards "Player" to 1.000000
    change alliance for "SecurityBot2WC" towards "Player" to 1.000000
    change alliance for "SecurityBot3WC" towards "Player" to 1.000000

Timer

 // Turn all ABI personnel neutral if the player allies himself with Ryan
when ALLIED_Ryan=TRUE
    change alliance for "ABIEliteGuard" towards "Player" to 0.000000
    change alliance for "OfficeHallABI" towards "Player" to 0.000000
    change alliance
for "CubiclesABI" towards "Player" to 0.000000
    change alliance
for "ResearchHallABI" towards "Player" to 0.000000
    change alliance for "LoadingBayABI" towards "Player" to 0.000000
    change alliance for "SpiderBot" towards "Player" to 0.000000
    change alliance for "SecurityBot2ABI" towards "Player" to 0.000000
    change alliance for "MilitaryBotABI" towards "Player" to 0.000000

// Make note if the player manages to clear out the loading bay
when 21 actors tagged "LoadingBayABI" are killed AND ALLIED_WC=TRUE
    play PM_ScaraClearLoadingBay

PreTravel

// Award Massacre Award
when X carcasses are present
    award player 200 skillpoints: "Massacre Award"

// Award Pacifist Award
when X carcasses are present // X = The number of carcasses present at the beginning of the mission
    award player 200 skillpoints: "Pacifist Award"

// Award Stealth Award
when player hasn't been spotted
    award player 300 skillpoints: "Stealth Award" // This is in addition to the Pacifist Award

Mission 24

24_SpaceStation01


FirstFrame

// Spawn Kylie at the docks if the player destroys the l33ts
when ALLIED_WC=TRUE AND QC_MAIN_DestroyLeets=TRUE
    set bInWorld=TRUE for "Kylie_Dock"

24_SpaceStation02

FirstFrame

// Spawn Kylie at the Narcissus terminal if the player is PDX-aligned
when
ALLIED_PDX=TRUE
    set
bInWorld=TRUE for "Kylie_Narcissus"