View Single Post
Old 08-28-2006, 04:20 PM   #2
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
The scripts (part 1)

Above mentioned scripts that have no source available in scripts.bif:

a_holoworld.nss
Code:
// ST: a_holoworld.nss (003EBO_s.rim)
#include "k_inc_hawk"

void main() {
    SetHologramWorld();
}

check_party_gui.nss
Code:
// ST: check_party_gui.nss (003EBO_s.rim)

#include "k_inc_hawk"

void ExitEbonHawk() {
    int nDest = GetGlobalNumber("003EBO_RETURN_DEST");
    string sDest;
    
    switch (nDest) {
        case 0:  sDest = "106PER";      break;
        case 1:  sDest = "201TEL";      break;
        case 2:  sDest = "262TEL";      break;
        case 3:  sDest = "301NAR";      break;
        case 4:  sDest = "401DXN";      break;
        case 5:  sDest = "601DAN";      break;
        case 6:  sDest = "701KOR";      break;
        case 7:  sDest = "801DRO";      break;
        case 8:  sDest = "IN_TRANSIT";  break;
        case 9:  sDest = "901MAL";      break;
        case 10: sDest = "IN_TRANSIT";  break;
        default: sDest = "ERROR";
    }
    
    if (sDest == "ERROR")
        AurPostString("EBO ERROR: No module sepcified!", 5, 15, 10.0);
    else if (sDest == "IN_TRANSIT")
        AurPostString("Flying through space, wooooooooo!", 5, 15, 10.0);
    else
        StartNewModule(sDest, "WP_from_ebonhawk");  
}

void main() {
    SetGlobalFadeIn();
    int nParam = GetRunScriptVar();
    
    if (!nParam) {
        object oPC = GetFirstPC();
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_from_outside"))));   
    }
    else {
        SetGlobalBoolean("003_PARTY_SPAWN", FALSE);
        ExitEbonHawk();
    }
}
tr_leave_ehawk.nss
Code:
// ST: tr_leave_ehawk.nss (003EBO_s.rim)

#include "k_inc_hawk"

void ExitToDxunOnderon();
void ExitToKorriban();
void DoEbo004ExitHawk();

void main() {
    object oEnter = GetEnteringObject();
    
    // ST: Merged tr_leave_ehawk from 003EBO and 004EBO so they both
    //     work if put in Override.
    if (GetTag(GetArea(oEnter)) == "004EBO") {
        DoEbo004ExitHawk();
        return; 
    }
    
    SetNPCSelectability(NPC_KREIA, TRUE);
    SetNPCSelectability(NPC_ATTON, TRUE);
        
    if (oEnter == GetFirstPC()) {
        // ST: In combat
        if (GetGlobalNumber("003_IN_COMBAT") == 1) {
            BarkString(OBJECT_INVALID, 135165); 
            return;
        }       
        // ST: In space
        else if (GetGlobalNumber("003EBO_RETURN_DEST") == 8) {
            BarkString(OBJECT_INVALID, 129942); 
            return;         
        }
        // ST: Landed on Dxun
        else if (GetGlobalNumber("003EBO_RETURN_DEST") == 4) {
            SetGlobalFadeOut();
            SetFadeUntilScript();
            AurPostString("Leaving the hawk", 15, 22, 10.0);
            DelayCommand(1.0, ExitToDxunOnderon());
        }   
        // ST: Landed on Korriban       
        else if (GetGlobalNumber("003EBO_RETURN_DEST") == 6) {
            SetGlobalFadeOut();
            SetFadeUntilScript();
            AurPostString("Leaving the hawk", 15, 22, 10.0);
            DelayCommand(1.0, ExitToKorriban());
        }
        else {
            SetGlobalFadeOut();
            SetFadeUntilScript();   
            ShowPartySelectionGUI("check_party_gui", -1, -1, TRUE);     
        }           
    }
}

void ExitToDxunOnderon () {
    if (GetGlobalBoolean("401_FIRST_ENTER") && (GetGlobalNumber("502OND_End_First") > 0)) {
        AurPostString("Atton is selectable", 5, 19, 10.0);
        SetNPCSelectability(NPC_ATTON, TRUE);
    }
    else {
        SetNPCSelectability(NPC_ATTON, FALSE);
        AurPostString("Atton is NOT selectable", 5, 19, 10.0);
    }   
    AurPostString("Showing party selection", 5, 20, 10.0);
    ShowPartySelectionGUI("check_party_gui"); 
}

void ExitToKorriban() {
    SetNPCSelectability(NPC_KREIA, FALSE);
    AurPostString("Kreia is NOT selectable", 5, 19, 10.0);
    AurPostString("Showing party selection", 5, 20, 10.0);
    ShowPartySelectionGUI("check_party_gui");   
}

void DoEbo004ExitHawk() {
    if (GetEnteringObject() == GetFirstPC()) {
        int nDest = GetGlobalNumber("003EBO_RETURN_DEST");
        string sDest;
        
        switch (nDest) {
            case 0:  sDest = "106PER"; break;
            case 1:  sDest = "201TEL"; break;
            case 2:  sDest = "262TEL"; break;
            case 3:  sDest = "301NAR"; break;
            case 4:  sDest = "401DXN"; break;
            case 5:  sDest = "601DAN"; break;
            case 6:  sDest = "701KOR"; break;
            case 7:  sDest = "801DRO"; break;
            case 8:  sDest = "ERROR";  break;
            case 9:  sDest = "901MAL"; break;
            case 10: sDest = "ERROR";  break;
            default: sDest = "ERROR";
        }
        
        if (sDest == "ERROR")
            AurPostString("EBO ERROR: No module sepcified!", 5, 15, 10.0);
        else
            StartNewModule(sDest, "WP_from_ebonhawk");
    }
}

a_galaxymap.nss
Code:
// ST: a_galaxymap.nss (003EBO_s.rim)

#include "k_inc_hawk"

void main() {
    if (GetGlobalNumber("003EBO_Atton_Talk") <= 4) {
        object oPC = GetFirstPC();
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));   
        return;
    }
    else if (GetGlobalNumber("003EBO_RETURN_DEST") == 4) {
        if (GetGlobalNumber("502OND_End_First") == 0) {
            object oPC = GetFirstPC();
            AssignCommand(oPC, ClearAllActions());
            AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));          
            return;
        }
    }
    else if (GetGlobalNumber("003_IN_COMBAT") == 1) {
        object oPC = GetFirstPC();
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));           
        return;
    }
    
    int nWorld = 0;
    for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; ++nWorld) {
        SetPlanetAvailable(nWorld, FALSE);
        SetPlanetSelectable(nWorld, FALSE); 
    }
    
    if (GetGlobalNumber("900MAL_Open") == 1) {
        for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; nWorld++) {
            int nPlanet = nWorld;
            SetPlanetAvailable(nPlanet, TRUE);
            
            if (nWorld == PLANET_MALACHOR_V) 
                SetPlanetSelectable(nPlanet, TRUE); 
        }       
    }
    else if (GetGlobalNumber("262TEL_Escape_Telos") == 1) {
        for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; nWorld++) {
            int nPlanet = nWorld;
            
            if (nWorld != PLANET_MALACHOR_V) {
                SetPlanetAvailable(nPlanet, TRUE);
                if (nWorld != PLANET_PERAGUS) 
                    SetPlanetSelectable(nPlanet, TRUE);                 
            }
        }
        
        if (GetGlobalNumber("401DXN_Visited") == 0) {
            SetPlanetAvailable(PLANET_DXUN, FALSE);
            SetPlanetSelectable(PLANET_DXUN, FALSE);    
        }
        else {
            SetPlanetSelectable(PLANET_ONDERON, FALSE);
        }       
    }
    else {
        SetPlanetAvailable(PLANET_HARBINGER, TRUE);
        SetPlanetSelectable(PLANET_HARBINGER, TRUE);    
        SetPlanetAvailable(PLANET_PERAGUS, TRUE);
        SetPlanetSelectable(PLANET_PERAGUS, FALSE);                                 
    }
    
    SetPlanetAvailable(PLANET_TELOS, FALSE);
    SetPlanetSelectable(PLANET_TELOS, FALSE);
    SetPlanetAvailable(PLANET_M4_78, FALSE);
    SetPlanetSelectable(PLANET_M4_78, FALSE);   
    SetPlanetAvailable(PLANET_EBON_HAWK, FALSE);
    SetPlanetSelectable(PLANET_EBON_HAWK, FALSE);   

    int nPlanet = GetCurrentPlanet();
    
    if ((GetGlobalNumber("003EBO_BACKGROUND") == 8) || (GetGlobalNumber("003EBO_BACKGROUND") == 10)) {
        nPlanet = PLANET_EBON_HAWK;
        SetPlanetAvailable(PLANET_EBON_HAWK, TRUE); 
    }
    
    SetPlanetSelectable(nPlanet, FALSE);
    ShowGalaxyMap(nPlanet);

}

k_003ebo_enter.nss (part 1/2)
Code:
// ST: k_003ebo_enter.nss (003EBO_s.rim)

#include "k_inc_hawk"

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Globals used to identify cutscenes:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CUTSCENE_NONE                   = 0;

int CUTSCENE_CUT_ATTON_T3_PAZAAK_1  = 1;
int CUTSCENE_CUT_ATTON_T3_PAZAAK_2  = 2;
int CUTSCENE_CUT_ATTON_T3_ARGUE     = 3;
int CUTSCENE_CUT_ATTON_MAID_FIGHT   = 4;
int CUTSCENE_CUT_ATTON_KREIA_OFF    = 5;
int CUTSCENE_CUT_ATTON_KREIA_GIVE   = 6;
int CUTSCENE_CUT_ATTON_KREIA_TAKE   = 7;
int CUTSCENE_CUT_ATTON_BAO_PLAYER   = 8;

int CUTSCENE_CUT_BAO_CONFRONT_KRE   = 10;
int CUTSCENE_CUT_BAO_REMOTE_1       = 11;
int CUTSCENE_CUT_BAO_REMOTE_2       = 12;
int CUTSCENE_CUT_BAO_REMOTE_3       = 13;
int CUTSCENE_CUT_BAO_T3             = 14;
int CUTSCENE_CUT_BAO_HK47_1         = 15;
int CUTSCENE_CUT_BAO_HK47_2         = 16;
int CUTSCENE_CUT_BAO_G0T0_1         = 17;
int CUTSCENE_CUT_BAO_G0T0_2         = 18;
int CUTSCENE_CUT_BAO_MALACHOR       = 19;
int CUTSCENE_CUT_BAO_VS_MAND_1      = 20;
int CUTSCENE_CUT_BAO_VS_MAND_2      = 21;

int CUTSCENE_CUT_DISC_PLAYER_MED    = 30;
int CUTSCENE_CUT_ATTON_DISC_1       = 31;
int CUTSCENE_CUT_ATTON_DISC_2       = 32;
int CUTSCENE_CUT_ATTON_DISC_3       = 33;
int CUTSCENE_CUT_DISC_TELOS         = 34;
int CUTSCENE_CUT_DISC_WORLD_1       = 35;
int CUTSCENE_CUT_DISC_WORLD_2       = 36;
int CUTSCENE_CUT_DISC_FORCE         = 37;
int CUTSCENE_DISC_REVAN             = 38;

int CUTSCENE_CUT_G0T0_HK47_1        = 40;
int CUTSCENE_CUT_G0T0_REMOTE_1      = 41;
int CUTSCENE_CUT_G0T0_REMOTE_2      = 42;

int CUTSCENE_KREIA_ATTACKS_T3       = 50;
int CUTSCENE_CUT_KREIA_MAID_1       = 51;
int CUTSCENE_CUT_KREIA_MAID_2       = 52;
int CUTSCENE_CUT_KREIA_DISC_1       = 53;
int CUTSCENE_CUT_KREIA_DISC_2       = 54;
int CUTSCENE_CUT_KREIA_DISC_3       = 55;

int CUTSCENE_CUT_MIRA_MAID          = 60;

int CUTSCENE_CUT_T3_VS_HK47         = 71;
int CUTSCENE_CUT_T3_DISC_HOLO       = 72;

int CUTSCENE_CUT_VISAS_VS_MAID      = 80;
int CUTSCENE_VISAS_ARRIVES          = 81;

int CUTSCENE_CUT_MSG_FROM_KELBORN   = 90;
int CUTSCENE_CUT_FIRST_ATTON        = 91;
int CUTSCENE_CUT_SECOND_ATTON       = 92;
int CUTSCENE_CUT_BAODUR_LIGHTSABER  = 93;

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Function prototypes:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RunCutscene(int nScene);
void DoCutscenes();
void TriggerCutscenes();
void UpdateSomeNumbers();
void DelayedFadeIn(float fDelay, float fWait, float fLength);

int PlanetCount();
int GetIsAvailable(int nNPC);
int GetInfluenceDiff(int nNPC1, int nNPC2);
int CheckNPCLevel(int nNPC);
int CheckNPCSkill(int nNPC, int nType);

object GetAndMoveNPCToWaypoint(int nNPC, string sTag);
object GetAndMovePUPToWaypoint(int nPUP, string sTag);

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Main function
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void main() {
    object oEnter = GetEnteringObject();
    
    if (oEnter == GetFirstPC()) {
        SetNPCSelectability(NPC_KREIA, TRUE);
        SetNPCSelectability(NPC_ATTON, TRUE);
        
        SetBackground();
        SetHologramWorld();
        
        if (GetLoadFromSaveGame()) {
            DelayCommand(1.0, RebuildPartyTable());
            return;
        }

        object oDoor = GetObjectByTag("CargoDoor");
        AssignCommand(oDoor, ActionOpenDoor(oDoor));
        
        ClearPlayerParty();
        ClearEbonHawk();
        
        SetGlobalBoolean("003_cutscene_mode", TRUE);
        SetGlobalBoolean("003_PARTY_SPAWN", TRUE);
        
        SpawnAllAvailablePartyMembers();
        UpdateSomeNumbers();
        DelayCommand(1.0, DoCutscenes());
    }
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Increase some globals. Don't know why this is a function.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void UpdateSomeNumbers() {
    if (GetGlobalNumber("003EBO_G0T0_BAO_2") == 1) {
        SetGlobalNumber("003EBO_G0T0_BAO_2", 2);
    }
    if (GetGlobalNumber("003EBO_ATTDISC_COUNT") == 1) {
        SetGlobalNumber("003EBO_ATTDISC_COUNT", 2);
    }
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Trigger Ebon Hawk cutscenes. Wrapper for Dxun arrival.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DoCutscenes() {
    object oPC = GetFirstPC();
    
    if (GetGlobalNumber("401DXN_STARTED") == 2) {
        SetGlobalNumber("401DXN_STARTED", 3);
        
        object oAtton = GetObjectByTag("Atton");
        object oKreia = GetObjectByTag("Kreia");
        object oMira  = GetObjectByTag("Mira"); 
        object oExile = GetFirstPC();           
        
        AssignCommand(oAtton, ClearAllActions());
        AssignCommand(oKreia, ClearAllActions());
        AssignCommand(oMira,  ClearAllActions());
        AssignCommand(oExile, ClearAllActions());
        
        AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_kreia_dxn"))));
        AssignCommand(oExile, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_dxn"))));
        if (GetIsObjectValid(oMira)) 
            AssignCommand(oMira, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_mira_dxn"))));
            
        DelayCommand(0.2, AssignCommand(oAtton, ActionStartConversation(oExile, "attond", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));  
        return;
    }
    else if (GetGlobalNumber("401DXN_STARTED") == 4) {
        SetGlobalNumber("401DXN_STARTED", 5);
        
        object oAtton = GetObjectByTag("Atton");
        object oKreia = GetObjectByTag("Kreia");
        object oMira  = GetObjectByTag("Mira"); 
        object oExile = GetFirstPC();   
        
        AssignCommand(oAtton, ClearAllActions());
        AssignCommand(oKreia, ClearAllActions());
        AssignCommand(oMira,  ClearAllActions());
        AssignCommand(oExile, ClearAllActions());
        
        AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_kreia_dxn"))));
        AssignCommand(oExile, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_dxn"))));
        if (GetIsObjectValid(oMira)) 
            AssignCommand(oMira, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_mira_dxn"))));     
        
        DelayCommand(0.2, AssignCommand(oAtton, ActionStartConversation(oExile, "attond", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));                  
        return;
    }
    else if (GetGlobalBoolean("003_PARTY_SPAWN") && GetGlobalBoolean("003_cutscene_mode")) {
        AssignCommand(oPC, ClearAllActions());
        
        if (GetGlobalNumber("003_IN_COMBAT") == 0) {
            AssignCommand(oPC, TriggerCutscenes());
        }
    }
    else {
        AurPostString("ON 003 ENTER: SHOULD NOT BE HITTING THIS!  REPORT TO ANTHONYD.", 5, 14, 10.0);
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, TriggerCutscenes());
    }   
}


// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Determine which cutscene to trigger.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TriggerCutscenes() {
    SetGlobalFadeOut();
    SetFadeUntilScript();
    
    int nScene;
    
    if (!GetGlobalBoolean("CUT_FIRST_ATTON")
        && (GetIsAvailable(NPC_T3_M4)
        && GetIsAvailable(NPC_ATTON) 
        && GetIsAvailable(NPC_KREIA))
        && (GetGlobalNumber("003EBO_Atton_Talk") == 0))
    {
        AurPostString("CS: 003EBO_Atton_Talk == 0", 5, 15, 5.0);
        SetGlobalBoolean("CUT_FIRST_ATTON", TRUE);
        nScene = CUTSCENE_CUT_FIRST_ATTON;
    }
    else if (GetIsAvailable(NPC_ATTON) 
        &&  !GetIsAvailable(NPC_VISAS)
        &&  GetGlobalBoolean("003EBO_VISAS_ARRIVES")
        &&  (GetGlobalNumber("262TEL_Escape_Telos") == 1)
        &&  (PlanetCount() >= 2)) 
    {
        AurPostString("CS: VISAS ARRIVES", 5, 15, 5.0);
        SetGlobalBoolean("003EBO_VISAS_ARRIVES", FALSE);
        SetGlobalBoolean("003EBO_CLEANUP_VISAS", TRUE);
        SetGlobalNumber("003_IN_COMBAT", 1);
        nScene = CUTSCENE_VISAS_ARRIVES;
    }
    else if (!GetGlobalBoolean("CUT_BAODUR_LIGHTSABER")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  (GetGlobalNumber("262TEL_Escape_Telos") == 1))
    {
        AurPostString("CS: BAODUR LIGHTSABER", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAODUR_LIGHTSABER", TRUE);
        nScene = CUTSCENE_CUT_BAODUR_LIGHTSABER;
    }
    else if (!GetGlobalBoolean("CUT_SECOND_ATTON")
        &&  GetGlobalBoolean("CUT_FIRST_ATTON")
        &&  GetIsAvailable(NPC_T3_M4)
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetGlobalNumber("262TEL_CNPC_Freed") == 0)
        &&  ((GetGlobalNumber("003EBO_Atton_Talk") == 1) || (GetGlobalNumber("003EBO_Atton_Talk") == 2)))
    {
        AurPostString("CS: 262TEL_CNPC_Freed == 0", 5, 15, 5.0);
        SetGlobalBoolean("CUT_SECOND_ATTON", TRUE);
        nScene = CUTSCENE_CUT_SECOND_ATTON;
    }
    else if (!GetGlobalBoolean("CUT_MSG_FROM_KELBORN")
        &&  GetIsAvailable(NPC_T3_M4)
        &&  GetGlobalNumber("502OND_End_First")
        &&  ((GetGlobalNumber("403DXN_Return_Trigger") == 3) || (GetGlobalNumber("000_Jedi_Found") > GetGlobalNumber("403DXN_Return_Trigger"))))
    {
        AurPostString("CS: MESSAGE FROM KELBORN", 5, 15, 5.0);
        SetGlobalBoolean("CUT_MSG_FROM_KELBORN", TRUE);
        nScene = CUTSCENE_CUT_MSG_FROM_KELBORN;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_T3_PAZAAK_1")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  (GetGlobalNumber("003EBO_ATTON_T3_START") == 1)
        &&  (GetGlobalNumber("003EBO_T3_Pazaak") == 0))
    {
        AurPostString("CS: ATTON T3 PAZAAK", 5, 15, 5.0);
        SetGlobalNumber("003EBO_ATTON_T3_START", 2);
        SetGlobalBoolean("CUT_ATTON_T3_PAZAAK_1", TRUE);
        nScene = CUTSCENE_CUT_ATTON_T3_PAZAAK_1;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_T3_PAZAAK_2")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  (GetGlobalNumber("003EBO_T3_Pazaak") == 1))
    {
        AurPostString("CS: ATTON T3 PAZAAK 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_T3_PAZAAK_2", TRUE);
        nScene = CUTSCENE_CUT_ATTON_T3_PAZAAK_2;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_T3_ARGUE")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  ((GetInfluence(NPC_T3_M4) >= 75) || (GetInfluence(NPC_T3_M4) <= 25)))
    {
        AurPostString("CS: ATTON T3 ARGUE", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_T3_ARGUE", TRUE);
        SetGlobalNumber("003EBO_T3_Atton", 1);
        nScene = CUTSCENE_CUT_ATTON_T3_ARGUE;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_MAID_FIGHT")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_HANDMAIDEN)
        &&  (GetGlobalNumber("003EBO_Handmaid_Fight") == 1)
        &&  (GetGlobalNumber("003EBO_Atton_Hand") == 0))
    {
        AurPostString("CS: ATTON HANDMAIDEN FIGHT", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_MAID_FIGHT", TRUE);
        nScene = CUTSCENE_CUT_ATTON_MAID_FIGHT;
    }
    else if (!GetGlobalBoolean("CUT_VISAS_VS_MAID")
        &&  GetIsAvailable(NPC_VISAS)
        &&  GetIsAvailable(NPC_HANDMAIDEN)
        &&  (GetGlobalNumber("003EBO_Visas_Hand") == 0)
        &&  (GetInfluenceDiff(NPC_VISAS, NPC_HANDMAIDEN) >= 15)
        &&  GetGlobalBoolean("000_PLAYER_GENDER"))
    {
        AurPostString("CS: VISAS HANDMAIDEN ARGUE", 5, 15, 5.0);
        SetGlobalBoolean("CUT_VISAS_VS_MAID", TRUE);
        nScene = CUTSCENE_CUT_VISAS_VS_MAID;
    }
    else if (!GetGlobalBoolean("CUT_MIRA_MAID")
        &&  GetIsAvailable(NPC_MIRA)
        &&  GetIsAvailable(NPC_HANDMAIDEN)
        &&  GetIsAvailable(NPC_VISAS)
        &&  (GetGlobalNumber("003EBO_Visas_Hand") == 1)
        &&  (GetGlobalNumber("003EBO_Mira_Hand") == 0))
    {
        AurPostString("CS: MIRA HANDMAIDEN TALK", 5, 15, 5.0);
        SetGlobalBoolean("CUT_MIRA_MAID", TRUE);
        nScene = CUTSCENE_CUT_MIRA_MAID;
    }
    else if (!GetGlobalBoolean("CUT_KREIA_MAID_1")
        &&  GetIsAvailable(NPC_VISAS)
        &&  GetIsAvailable(NPC_HANDMAIDEN)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetGlobalNumber("003EBO_Visas_Hand") == 1)
        &&  (GetInfluenceDiff(NPC_VISAS, NPC_HANDMAIDEN) >= 30))
    {
        AurPostString("CS: KREIA HANDMAIDEN DS 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_KREIA_MAID_1", TRUE);
        nScene = CUTSCENE_CUT_KREIA_MAID_1;
    }
    else if (!GetGlobalBoolean("CUT_KREIA_MAID_2")
        &&  GetIsAvailable(NPC_VISAS)
        &&  GetIsAvailable(NPC_HANDMAIDEN)
        &&  GetIsAvailable(NPC_KREIA)
        && (GetGlobalNumber("003EBO_Visas_Hand") == 2)
        &&  (GetInfluenceDiff(NPC_VISAS, NPC_HANDMAIDEN) >= 45))
    {
        AurPostString("CS: KREIA HANDMAIDEN DS 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_KREIA_MAID_2", TRUE);
        nScene = CUTSCENE_CUT_KREIA_MAID_2;
    }
    else if (!GetGlobalBoolean("CUT_G0T0_HK47_1")
        &&  GetIsAvailable(NPC_G0T0)
        &&  GetIsAvailable(NPC_HK_47)
        &&  (GetGlobalNumber("003EBO_Goto_HK47") == 0))
    {
        AurPostString("CS: GOTO HK 47 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_G0T0_HK47_1", TRUE);
        nScene = CUTSCENE_CUT_G0T0_HK47_1;
    }   
    else if (!GetGlobalBoolean("CUT_G0T0_REMOTE_1")
        &&  GetIsAvailable(NPC_G0T0)
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  (GetGlobalNumber("003EBO_G0t0_Remote") == 0))
    {
        AurPostString("CS: GOTO REMOTE 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_G0T0_REMOTE_1", TRUE);
        nScene = CUTSCENE_CUT_G0T0_REMOTE_1;
    }
    else if (!GetGlobalBoolean("CUT_G0T0_REMOTE_2")
        &&  GetIsAvailable(NPC_G0T0)
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  (GetGlobalNumber("003EBO_G0t0_Remote") == 1)
        &&  (GetGlobalNumber("000_Jedi_Found") > 2))
    {
        AurPostString("CS: GOTO REMOTE 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_G0T0_REMOTE_2", TRUE);
        nScene = CUTSCENE_CUT_G0T0_REMOTE_2;
    }   
    else if (!GetGlobalBoolean("CUT_T3_VS_HK47")
        &&  GetIsAvailable(NPC_HK_47)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  (GetGlobalNumber("003EBO_HK47_T3") == 0))
    {
        AurPostString("CS: T3 HK47 CONFRONTATION", 5, 15, 5.0);
        SetGlobalBoolean("CUT_T3_VS_HK47", TRUE);
        nScene = CUTSCENE_CUT_T3_VS_HK47;
    }
    else if (!GetGlobalBoolean("CUT_DISC_PLAYER_MED")
        &&  GetIsAvailable(NPC_MIRA)
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Disciple_Med") == 1)
        &&  (GetGlobalNumber("003EBO_Meditate_Event") == 0))
    {
        AurPostString("CS: DISCIPLE PLAYER MEDITATE", 5, 15, 5.0);
        SetGlobalBoolean("CUT_DISC_PLAYER_MED", TRUE);
        nScene = CUTSCENE_CUT_DISC_PLAYER_MED;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_DISC_1")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  GetIsAvailable(NPC_ATTON)
        &&  (GetGlobalNumber("003EBO_Disciple_Atton") == 0)
        &&  (GetInfluenceDiff(NPC_DISCIPLE, NPC_ATTON) >= 15))
    {
        AurPostString("CS: DISCIPLE ATTON FIGHT 1", 5, 15, 5.0);
        SetGlobalNumber("003EBO_ATTDISC_COUNT", 1);
        SetGlobalBoolean("CUT_ATTON_DISC_1", TRUE);
        nScene = CUTSCENE_CUT_ATTON_DISC_1;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_DISC_2")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  GetIsAvailable(NPC_ATTON)
        &&  (GetGlobalNumber("003EBO_Disciple_Atton") == 1) 
        &&  (GetInfluenceDiff(NPC_DISCIPLE, NPC_ATTON) >= 30)
        &&  (GetGlobalNumber("003EBO_ATTDISC_COUNT") == 2))
    {
        AurPostString("CS: DISCIPLE ATTON FIGHT 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_DISC_2", TRUE);
        nScene = CUTSCENE_CUT_ATTON_DISC_2;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_DISC_3")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  GetIsAvailable(NPC_ATTON)
        &&  (GetGlobalNumber("003EBO_T3_Disciple") == 1)
        &&  (GetGlobalNumber("003EBO_Disciple_Atton") < 3))
    {
        AurPostString("CS: DISCIPLE ATTON FIGHT 3", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_DISC_3", TRUE);
        nScene = CUTSCENE_CUT_ATTON_DISC_3;
    }
    else if (!GetGlobalBoolean("CUT_T3_DISC_HOLO")
        &&  GetIsAvailable(NPC_T3_M4)
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("000_Jedi_Found") > 2)
        &&  (GetGlobalNumber("003EBO_Disciple_Atton") == 2)
        &&  (GetGlobalNumber("003EBO_T3_Disciple") == 0))
    {
        AurPostString("CS: T3 DISCIPLE HOLOGRAM", 5, 15, 5.0);
        SetGlobalBoolean("CUT_T3_DISC_HOLO", TRUE);
        nScene = CUTSCENE_CUT_T3_DISC_HOLO;
    }
    else if (FALSE && !GetGlobalBoolean("CUT_DISC_TELOS")) 
    {
        AurPostString("CS: DISCIPLE CONTACTS TELOS", 5, 15, 5.0);
        SetGlobalBoolean("CUT_DISC_TELOS", TRUE);
        nScene = CUTSCENE_CUT_DISC_TELOS;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_KREIA_OFF")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetGlobalNumber("003EBO_Atton_End") == 1))
    {
        AurPostString("CS: ATTON TELLS KREIA OFF", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_KREIA_OFF", TRUE);
        nScene = CUTSCENE_CUT_ATTON_KREIA_OFF;
    }
    else if (!GetGlobalBoolean("CUT_ATTON_KREIA_GIVE")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetInfluenceDiff(NPC_DISCIPLE, NPC_ATTON) >= 50)
        &&  (GetGlobalNumber("003EBO_Disciple_Atton") == 3))
    {
        AurPostString("CS: ATTON GIVES UP PLAYER KREIA", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_KREIA_GIVE", TRUE);
        nScene = CUTSCENE_CUT_ATTON_KREIA_GIVE;
    }
    else if (FALSE && !GetGlobalBoolean("CUT_ATTON_KREIA_TAKE"))
    {
        AurPostString("CS: ATTON KREIA TAKE OFF", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_KREIA_TAKE", TRUE);
        nScene = CUTSCENE_CUT_ATTON_KREIA_TAKE;
    }
    else if (!GetGlobalBoolean("CUT_BAO_CONFRONT_KRE")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetGoodEvilValue(GetFirstPC()) < 30)
        &&  ((GetInfluence(NPC_BAO_DUR) > 80) || (GetInfluence(NPC_BAO_DUR) < 20)))
    {
        AurPostString("CS: BAODUR CONFRONTS KREIA", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_CONFRONT_KRE", TRUE);
        nScene = CUTSCENE_CUT_BAO_CONFRONT_KRE;
    }
    else if (!GetGlobalBoolean("CUT_DISC_WORLD_1")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  GetIsAvailable(NPC_KREIA)
        &&  (GetGlobalNumber("003EBO_Disciple_Event") == 0)
        &&  (PlanetCount() >= 2))
    {
        AurPostString("CS: DISCIPLE STUDIES WORLDS 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_DISC_WORLD_1", TRUE);
        nScene = CUTSCENE_CUT_DISC_WORLD_1;
    }
    else if (!GetGlobalBoolean("CUT_DISC_WORLD_2")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Disciple_Event") == 1)
        &&  (PlanetCount() >= 4))
    {
        AurPostString("CS: DISCIPLE STUDIES WORLDS 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_DISC_WORLD_2", TRUE);
        nScene = CUTSCENE_CUT_DISC_WORLD_2;
    }   
    else if (!GetGlobalBoolean("CUT_DISC_FORCE")
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Disciple_Event") == 2)
        &&  (GetGlobalNumber("003EBO_Kreia_Disciple") == 3))
    {
        AurPostString("CS: DISCIPLE PLAYER FORCE RESONANCE", 5, 15, 5.0);
        SetGlobalBoolean("CUT_DISC_FORCE", TRUE);
        nScene = CUTSCENE_CUT_DISC_FORCE;
    }
    else if (!GetGlobalBoolean("CUT_KREIA_DISC_1")
        &&  GetIsAvailable(NPC_KREIA)
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Kreia_Disciple") == 0))
    {
        AurPostString("CS: KREIA VS DISCIPLE 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_KREIA_DISC_1", TRUE);
        nScene = CUTSCENE_CUT_KREIA_DISC_1;
    }
    else if (!GetGlobalBoolean("CUT_KREIA_DISC_2")
        &&  GetIsAvailable(NPC_KREIA)
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Kreia_Disciple") == 1))
    {
        AurPostString("CS: KREIA VS DISCIPLE 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_KREIA_DISC_2", TRUE);
        nScene = CUTSCENE_CUT_KREIA_DISC_2;
    }   
    else if (!GetGlobalBoolean("CUT_KREIA_DISC_3")
        &&  GetIsAvailable(NPC_KREIA)
        &&  GetIsAvailable(NPC_DISCIPLE)
        &&  (GetGlobalNumber("003EBO_Kreia_Disciple") == 2))
    {
        AurPostString("CS: KREIA VS DISCIPLE 3", 5, 15, 5.0);
        SetGlobalBoolean("CUT_KREIA_DISC_3", TRUE);
        nScene = CUTSCENE_CUT_KREIA_DISC_3;
    }   
    else if (!GetGlobalBoolean("CUT_ATTON_BAO_PLAYER")
        &&  GetIsAvailable(NPC_ATTON)
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  (GetGlobalBoolean("000_PLAYER_GENDER") == FALSE)
        &&  (GetInfluence(NPC_ATTON) >= 60))
    {
        AurPostString("CS: ATTON PLAYER BAODUR", 5, 15, 5.0);
        SetGlobalBoolean("CUT_ATTON_BAO_PLAYER", TRUE);
        nScene = CUTSCENE_CUT_ATTON_BAO_PLAYER;
    }
    else if (!GetGlobalBoolean("CUT_BAO_REMOTE_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        && (GetIsAvailable(NPC_T3_M4)
        &&  GetIsAvailable(NPC_G0T0) 
        &&  GetIsAvailable(NPC_HK_47)))
    {
        AurPostString("CS: BAODUR UPGRADE REMOTE 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_REMOTE_1", TRUE);
        nScene = CUTSCENE_CUT_BAO_REMOTE_1;
    }
    else if (!GetGlobalBoolean("CUT_BAO_REMOTE_2")
        &&  GetGlobalBoolean("CUT_BAO_REMOTE_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  (CheckNPCLevel(NPC_BAO_DUR) > 8))
    {
        AurPostString("CS: BAODUR UPGRADE REMOTE 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_REMOTE_2", TRUE);
        nScene = CUTSCENE_CUT_BAO_REMOTE_2;
    }
    else if (!GetGlobalBoolean("CUT_BAO_REMOTE_3")
        &&  GetGlobalBoolean("CUT_BAO_REMOTE_2")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  (CheckNPCLevel(NPC_BAO_DUR) > 10))
    {
        AurPostString("CS: BAODUR UPGRADE REMOTE 3", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_REMOTE_3", TRUE);
        nScene = CUTSCENE_CUT_BAO_REMOTE_3;
    }   
    else if (!GetGlobalBoolean("CUT_BAO_T3")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_T3_M4)
        &&  (GetGlobalNumber("262TEL_Escape_Telos") == 1))
    {
        AurPostString("CS: BAODUR UPGRADE T3", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_T3", TRUE);
        nScene = CUTSCENE_CUT_BAO_T3;
    }
    else if (!GetGlobalBoolean("CUT_BAO_HK47_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_HK_47)
        &&  (GetGlobalNumber("000_HK47_Joined") == 1))
    {
        AurPostString("CS: BAODUR UPGRADE HK47 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_HK47_1", TRUE);
        SetGlobalNumber("000_BAODUR_CS_LEVEL", CheckNPCLevel(NPC_BAO_DUR));
        nScene = CUTSCENE_CUT_BAO_HK47_1;
    }
    else if (!GetGlobalBoolean("CUT_BAO_HK47_2")
        &&  GetGlobalBoolean("CUT_BAO_HK47_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_HK_47)   
        &&  (CheckNPCLevel(NPC_BAO_DUR) > GetGlobalNumber("000_BAODUR_CS_LEVEL"))
        &&  (CheckNPCSkill(NPC_BAO_DUR, SKILL_REPAIR) > 15))
    {
        AurPostString("CS: BAODUR UPGRADE HK47 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_HK47_2", TRUE);
        nScene = CUTSCENE_CUT_BAO_HK47_2;
    }
    else if (!GetGlobalBoolean("CUT_BAO_G0T0_1")
        &&  GetIsAvailable(NPC_BAO_DUR) 
        &&  GetIsAvailable(NPC_G0T0))
    {
        AurPostString("CS: BAODUR UPGRATE GOTO 1", 5, 15, 5.0);
        SetGlobalNumber("003EBO_G0T0_BAO_2", 1);
        SetGlobalBoolean("CUT_BAO_G0T0_1", TRUE);
        nScene = CUTSCENE_CUT_BAO_G0T0_1;
    }
    else if (!GetGlobalBoolean("CUT_BAO_G0T0_2")
        &&  GetGlobalBoolean("CUT_BAO_G0T0_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_G0T0)
        &&  (GetGlobalNumber("003EBO_G0T0_BAO_2") == 2))
    {
        AurPostString("CS: BAODUR UPGRADE GOTO 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_G0T0_2", TRUE);
        nScene = CUTSCENE_CUT_BAO_G0T0_2;
    }
    else if (!GetGlobalBoolean("CUT_BAO_MALACHOR")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_CANDEROUS)
        &&  (GetInfluence(NPC_BAO_DUR) > 85))
    {
        AurPostString("CS: BAODUR MALACHOR TALK influence = " + IntToString(GetInfluence(NPC_BAO_DUR)), 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_MALACHOR", TRUE);
        nScene = CUTSCENE_CUT_BAO_MALACHOR;
    }
    else if (!GetGlobalBoolean("CUT_BAO_VS_MAND_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_CANDEROUS))
    {
        AurPostString("CS: BAODUR VS MANDALORE 1", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_VS_MAND_1", TRUE);
        nScene = CUTSCENE_CUT_BAO_VS_MAND_1;
    }
    else if (!GetGlobalBoolean("CUT_BAO_VS_MAND_2")
        &&  GetGlobalBoolean("CUT_BAO_VS_MAND_1")
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_CANDEROUS)
        &&  (GetInfluence(NPC_BAO_DUR) > 85)
        &&  (GetInfluence(NPC_CANDEROUS) > 75))
    {
        AurPostString("CS: BAODUR VS MANDALORE 2", 5, 15, 5.0);
        SetGlobalBoolean("CUT_BAO_VS_MAND_2", TRUE);
        nScene = CUTSCENE_CUT_BAO_VS_MAND_2;
    }
    else {
        AurPostString("CS: NO PENDING CUTSCENE", 5, 15, 5.0);
        nScene = CUTSCENE_NONE;
    }
    
    RunCutscene(nScene);
}
Note: This script is continued in the below post. It's too long to fit into a single forum post.

Last edited by stoffe; 09-16-2007 at 03:17 PM.
stoffe is offline   you may: quote & reply,