View Single Post
Old 08-28-2006, 05:20 PM   #3
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
The scripts (part 2)

Note: This script is continued from the above post. It's too long to fit into a single forum post.

k_003ebo_enter.nss (part 2/2)
Code:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Setup and run the specified cutscene.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RunCutscene(int nScene) {
    object oPC = GetFirstPC();
    
    if (CUTSCENE_NONE == nScene) {
        AurPostString("CS: SPAWNING PARTY NO_PENDING_CUTSCENE", 5, 17, 5.0);
        SetGlobalBoolean("003_cutscene_mode", FALSE);
        ResetEbonHawk();
        DelayedFadeIn(0.0, 1.0, 1.0);
    }
    else if (nScene == CUTSCENE_CUT_BAODUR_LIGHTSABER) { 
        AurPostString("CS: BAODUR LIGHTSABER", 5, 17, 5.0);
        object oBao = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_4");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToObject(GetObjectByTag("WP_player_cut_7")));
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baosaber", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_FIRST_ATTON) { 
        AurPostString("CS: FIRST ATTON EBO CUT SCENE", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_gspawn_atton");
        object oT3M4  = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_7");
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_6");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_6"))));
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "003Atton", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_SECOND_ATTON) { 
        AurPostString("CS: SECOND ATTON EBO CUT SCENE", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_7");
        object oT3M4  = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_7");
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_6");
        
        SetGlobalNumber("003EBO_BACKGROUND", 10);
        SetBackground();
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_6"))));   
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "003Atton", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));   
    }
    else if (nScene == CUTSCENE_VISAS_ARRIVES) { 
        AurPostString("CS: PLAYING SCENE VISAS_ARRIVES", 5, 17, 5.0);
        int i = 0;
        object oNPC;
        
        for(i = 0; i < 12; ++i) {
            oNPC = GetObjectByTag(GetNPCTag(i));
            SetMinOneHP(oNPC, TRUE);
        }       
        
        SetGlobalBoolean("VISAS_ARRIVES_CONV", TRUE);
        object oVisas = CreateObject(OBJECT_TYPE_CREATURE, "visascut", GetLocation(GetObjectByTag("wp_visas_sp")));
        AssignCommand(oVisas, ClearAllActions());
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oVisas, ActionStartConversation(oPC, "", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));   
    }
    else if (nScene == CUTSCENE_CUT_MSG_FROM_KELBORN) {
        AurPostString("CS: PLAYING SCENE MESSAGE_FROM_KELBORN", 5, 17, 5.0);
        object oT3M4  = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_6");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToObject(GetObjectByTag("WP_player_cut_4")));
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oT3M4, ActionStartConversation(oPC, "t3kelbrn", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));    
    }
    else if ((nScene == CUTSCENE_CUT_ATTON_T3_PAZAAK_1) 
        ||   (nScene == CUTSCENE_CUT_ATTON_T3_PAZAAK_2) 
        ||   (nScene == CUTSCENE_CUT_ATTON_T3_ARGUE)) 
    { 
        AurPostString("CS: PLAYING SCENE ATTON_T3_PAZAAK_1 or 2 or ARGUE", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_1");
        object oT3M4  = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_2");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_1"))));       
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oT3M4, ActionStartConversation(oPC, "Attt3", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_ATTON_MAID_FIGHT) { 
        AurPostString("CS: PLAYING SCENE ATTON_HANDMAIDEN_FIGHT", 5, 17, 5.0);
        object oAtton  = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_2");
        object oMaiden = GetAndMoveNPCToWaypoint(NPC_HANDMAIDEN, "WP_maid_cut_1");
        object oInvis  = GetObjectByTag("MaidInvis"); 
        
        AssignCommand(oInvis, ClearAllActions());
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oInvis, ActionStartConversation(oPC, "atthand", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if ((nScene == CUTSCENE_CUT_ATTON_KREIA_OFF)  
        ||   (nScene == CUTSCENE_CUT_ATTON_KREIA_GIVE)
        ||   (nScene == CUTSCENE_CUT_ATTON_KREIA_TAKE))
    {
        AurPostString("CS: PLAYING SCENE ATTON_TELLS/GIVESUP/TAKEOFF", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_5");
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_3");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "Attkreia", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_ATTON_BAO_PLAYER) { 
        AurPostString("CS: PLAYING SCENE ATTON_BAODUR_PLAYER", 5, 17, 5.0);
        object oAtton  = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_6");
        object oBao    = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_2");
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_3");
        object oT3M4   = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_5");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "baoatt_p", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_CONFRONT_KRE) { 
        AurPostString("CS: PLAYING SCENE BAODUR_CONFRONT_KREIA", 5, 17, 5.0);
        object oBao   = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_1");
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_3"); 
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baokreia", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_REMOTE_1) { 
        object oBao    = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_3");
        object oDroid;
        if (GetIsAvailable(NPC_G0T0)) 
            oDroid = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_extra_1");
        else if (GetIsAvailable(NPC_HK_47))
            oDroid = GetAndMoveNPCToWaypoint(NPC_HK_47, "WP_extra_1");
        else if (GetIsAvailable(NPC_T3_M4)) 
            oDroid = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_extra_1");
            
        AssignCommand(oPC, ClearAllActions());
        object oWP = GetObjectByTag("WP_player_extra");
        if (GetIsObjectValid(oWP)) {
            location lLoc = GetLocation(oWP);
            AssignCommand(oPC, ActionJumpToLocation(lLoc));
        }
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baorem1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_REMOTE_2) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_REMOTE_2", 5, 17, 5.0);
        object oBao    = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_3");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baorem2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));          
    }
    else if (nScene == CUTSCENE_CUT_BAO_REMOTE_3) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_REMOTE_3", 5, 17, 5.0);
        object oBao = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_3");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baorem3", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_T3) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_T3", 5, 17, 5.0);
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oT3M4 = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_patient_cut");
        
        AssignCommand(oPC, ClearAllActions());
        object oWP = GetObjectByTag("WP_player_extra");
        if (GetIsObjectValid(oWP)) {
            location lLoc = GetLocation(oWP);
            AssignCommand(oPC, ActionJumpToLocation(lLoc));
        }
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "bao_t3", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_HK47_1) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_HK47_1", 5, 17, 5.0);
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oHK47 = GetAndMoveNPCToWaypoint(NPC_HK_47, "WP_patient_cut");
        
        DelayedFadeIn(0.0, 1.0, 1.0);   
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baohk_1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_HK47_2) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_HK47_2", 5, 17, 5.0);
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oHK47 = GetAndMoveNPCToWaypoint(NPC_HK_47, "WP_patient_cut");
        
        DelayedFadeIn(0.0, 1.0, 1.0);   
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "baohk_2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_G0T0_1) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_G0T0_1", 5, 17, 5.0);
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oGoto = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_patient_cut");
        
        DelayedFadeIn(0.0, 1.0, 1.0);   
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "bao_g0_1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_G0T0_2) { 
        AurPostString("CS: PLAYING SCENE BAODUR_UPGRADE_G0T0_2", 5, 17, 5.0);
        object oBao    = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_3");
        object oGoto   = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_patient_cut");
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_4");
        
        DelayedFadeIn(0.0, 1.0, 1.0);   
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "bao_g0_2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_MALACHOR) { 
        AurPostString("CS: PLAYING SCENE BAODUR_MALACHOR_TALK", 5, 17, 5.0);
        object oBao    = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_baodur_cut_4");
            
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_7"))));
        DelayedFadeIn(0.0, 1.0, 1.0);   
        DelayCommand(1.0, AssignCommand(oBao, ActionStartConversation(oPC, "bao_malv", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_BAO_VS_MAND_1) { 
        AurPostString("CS: PLAYING SCENE BAODUR_VS_MAND_1", 5, 17, 5.0);
        object oCand = GetAndMoveNPCToWaypoint(NPC_CANDEROUS, "WP_disc_cut_1");
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_disc_cut_1");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        AssignCommand(oPC, ClearAllActions());
        DelayCommand(1.0, AssignCommand(oCand, ActionStartConversation(oPC, "mand1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_BAO_VS_MAND_2) { 
        AurPostString("CS: PLAYING SCENE BAODUR_VS_MAND_2", 5, 17, 5.0);
        object oCand = GetAndMoveNPCToWaypoint(NPC_CANDEROUS, "WP_disc_cut_1");
        object oBao  = GetAndMoveNPCToWaypoint(NPC_BAO_DUR, "WP_disc_cut_1");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oCand, ActionStartConversation(oPC, "mand2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_DISC_PLAYER_MED) { 
        AurPostString("CS: PLAYING SCENE DISC_PLAYER_MEDITATE", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_3");
        object oMira  = GetAndMoveNPCToWaypoint(NPC_MIRA, "WP_mira_cut_2");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_1");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_2"))));
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "Disc4", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if ((nScene == CUTSCENE_CUT_ATTON_DISC_1) || (nScene == CUTSCENE_CUT_ATTON_DISC_2)) { 
        AurPostString("CS: PLAYING SCENE DISC_ATTON_FIGHT_1OR2", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_4");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_2"); 
        
        SetLockOrientationInDialog(oAtton, TRUE);
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "003Disci", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_ATTON_DISC_3) { 
        AurPostString("CS: PLAYING SCENE DISC_ATTON_FIGHT_3", 5, 17, 5.0);
        object oAtton = GetAndMoveNPCToWaypoint(NPC_ATTON, "WP_atton_cut_2");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_4"); 
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oAtton, ActionStartConversation(oPC, "003Disci", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_DISC_TELOS) { 
        AurPostString("CS: DISC_CONTACTS_TELOS doesn't exist", 5, 17, 5.0);
    }
    else if (nScene == CUTSCENE_CUT_DISC_WORLD_1) { 
        AurPostString("CS: PLAYING SCENE DISC_STUDY_WORLD_1", 5, 17, 5.0);
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_3");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_5");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_3"))));   
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oDisc, ActionStartConversation(oPC, "Disc1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_DISC_WORLD_2) { 
        AurPostString("CS: PLAYING SCENE DISC_STUDY_WORLD_2", 5, 17, 5.0);
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_5");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_5"))));   
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oDisc, ActionStartConversation(oPC, "Disc2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_DISC_FORCE) { 
        AurPostString("CS: PLAYING SCENE DISC_RESONANCE_FORCE", 5, 17, 5.0);
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_5");
        
        AssignCommand(oPC, ClearAllActions());
        AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_player_cut_5"))));   
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oDisc, ActionStartConversation(oPC, "Disc3", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_DISC_REVAN) { 
        AurPostString("CS: DISC_REVAN doesn't exist", 5, 17, 5.0);
    }
    else if (nScene == CUTSCENE_CUT_G0T0_HK47_1) { 
        AurPostString("CS: PLAYING SCENE G0T0_HK47_1", 5, 17, 5.0);
        object oGoto = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_g0t0_cut_1");
        object oHK47 = GetAndMoveNPCToWaypoint(NPC_HK_47, "WP_hk47_cut_1");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oGoto, ActionStartConversation(oPC, "g0t0hk47", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_G0T0_REMOTE_1) { 
        AurPostString("CS: PLAYING SCENE G0T0_REMOTE_1", 5, 17, 5.0);
        object oGoto   = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_g0t0_cut_2");    
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_1");
    
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oGoto, ActionStartConversation(oPC, "G0T0rem1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_G0T0_REMOTE_2) { 
        AurPostString("CS: PLAYING SCENE G0T0_REMOTE_2", 5, 17, 5.0);
        object oGoto   = GetAndMoveNPCToWaypoint(NPC_G0T0, "WP_g0t0_cut_3");    
        object oRemote = GetAndMovePUPToWaypoint(PUP_SENSORBALL, "WP_remote_cut_2");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oGoto, ActionStartConversation(oPC, "G0T0rem1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_KREIA_ATTACKS_T3) { 
        AurPostString("CS: PLAYING SCENE KREIA_ATTACKS_T3", 5, 17, 5.0);
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_1");
        object oT3M4  = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_1");
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "kreia", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_KREIA_MAID_1) { 
        AurPostString("CS: PLAYING SCENE KREIA_HANDMAIDEN_DS_1", 5, 17, 5.0);
        object oKreia   = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_2");
        object oMaiden  = GetAndMoveNPCToWaypoint(NPC_HANDMAIDEN, "WP_maid_cut_4");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "krehand", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_KREIA_MAID_2) { 
        AurPostString("CS: PLAYING SCENE KREIA_HANDMAIDEN_DS_2", 5, 17, 5.0);
        object oKreia   = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_3");
        object oMaiden  = GetAndMoveNPCToWaypoint(NPC_HANDMAIDEN, "WP_maid_cut_5");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "krehand2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }                       
    else if (nScene == CUTSCENE_CUT_KREIA_DISC_1) { 
        AurPostString("CS: PLAYING SCENE KREIA_VS_DISC_1", 5, 17, 5.0);
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_4");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_6"); 

        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "kredisc1", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_KREIA_DISC_2) { 
        AurPostString("CS: PLAYING SCENE KREIA_VS_DISC_2", 5, 17, 5.0);
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_3");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_7"); 

        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "kredisc2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_KREIA_DISC_3) { 
        AurPostString("CS: PLAYING SCENE KREIA_VS_DISC_3", 5, 17, 5.0);
        object oKreia = GetAndMoveNPCToWaypoint(NPC_KREIA, "WP_kreia_cut_5");
        object oDisc  = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_5"); 

        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oKreia, ActionStartConversation(oPC, "kredisc3", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }
    else if (nScene == CUTSCENE_CUT_MIRA_MAID) { 
        AurPostString("CS: PLAYING SCENE MIRA_HANDMAIDEN_TALK", 5, 17, 5.0);
        object oMira   = GetAndMoveNPCToWaypoint(NPC_MIRA, "WP_mira_cut_1");
        object oMaiden = GetAndMoveNPCToWaypoint(NPC_HANDMAIDEN, "WP_maid_cut_3");
        object oVisas  = GetAndMoveNPCToWaypoint(NPC_VISAS, "WP_visas_cut_1");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oMira, ClearAllActions()));
        DelayCommand(1.0, AssignCommand(oMira, ActionStartConversation(oPC, "mirvisha", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
        
    }
    else if (nScene == CUTSCENE_CUT_T3_VS_HK47) { 
        AurPostString("CS: PLAYING SCENE T3_HK47_CONFRONT", 5, 17, 5.0);
        object oT3M4 = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_3");
        object oHK47 = GetAndMoveNPCToWaypoint(NPC_HK_47, "WP_hk47_cut_2");
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oT3M4, ActionStartConversation(oPC, "hk47t3m4", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_T3_DISC_HOLO) { 
        AurPostString("CS: PLAYING SCENE T3_DISC_HOLO", 5, 17, 5.0);
        object oT3M4 = GetAndMoveNPCToWaypoint(NPC_T3_M4, "WP_t3m4_cut_4");
        object oDisc = GetAndMoveNPCToWaypoint(NPC_DISCIPLE, "WP_disc_cut_3");  
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oDisc, ActionStartConversation(oPC, "t3disc", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
    }   
    else if (nScene == CUTSCENE_CUT_VISAS_VS_MAID) { 
        AurPostString("CS: PLAYING SCENE VISAS_HANDMAIDEN_ARGUE", 5, 17, 5.0);
        object oMaiden = GetAndMoveNPCToWaypoint(NPC_HANDMAIDEN, "WP_maid_cut_2");
        object oVisas  = GetAndMoveNPCToWaypoint(NPC_VISAS, "WP_visas_cut_1");  
        
        DelayedFadeIn(0.0, 1.0, 1.0);
        DelayCommand(1.0, AssignCommand(oMaiden, ActionStartConversation(oPC, "vishand", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));   
    }   
    else { 
        AurPostString("CUTSCENE: SHOULD NOT BE HITTING THIS!  REPORT TO ANTHONYD.", 5, 17, 10.0);
        SetGlobalBoolean("003_cutscene_mode", FALSE);
        ResetEbonHawk();
        AssignCommand(oPC, ClearAllActions());
        DelayedFadeIn(0.0, 1.0, 1.0);
    }   
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - Identical to one found in k_align_movie.
//     Returns the number of visited planets.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int PlanetCount() {
    int i = 0;
    if( GetGlobalBoolean("201_First_Enter") )
        i++;
    if( GetGlobalBoolean("301_First_Enter") )
        i++;
    if( GetGlobalBoolean("401_First_Enter") )
        i++;
    if( GetGlobalBoolean("501_First_Enter") )
        i++;
    if( GetGlobalBoolean("601_First_Enter") )
        i++;
    if( GetGlobalBoolean("701_First_Enter") )
        i++;
    return i;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - Check if a NPC has joined the party.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int GetIsAvailable(int nNPC) {
    int bTest = GetNPCSelectability(nNPC);  
    if ((bTest == TRUE) || (bTest == 0))
        return TRUE;
    else
        return FALSE;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - returns difference between two party members
//     influence with the player.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int GetInfluenceDiff(int nNPC1, int nNPC2) {
    int nInf1 = GetInfluence(nNPC1);
    int nInf2 = GetInfluence(nNPC2);
    
    return (nInf1 - nInf2);
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - return character level of specified party member.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CheckNPCLevel(int nNPC) {
    object oNPC = GetObjectByTag(GetNPCTag(nNPC));
    
    if (GetIsObjectValid(oNPC)) {
        int nLevel = GetHitDice(oNPC);
        return nLevel;
    }
    return 0;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility Returns the points in a skill a party member has.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CheckNPCSkill(int nNPC, int nType) {
    object oNPC = GetObjectByTag(GetNPCTag(nNPC));
    int nSkill = 0;
    
    if (GetIsObjectValid(oNPC)) {
        nSkill = GetSkillRank(nType, oNPC);
    }
    return nSkill;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - a completely unnessecary wrapper. Fade from black.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DelayedFadeIn(float fDelay, float fWait, float fLength) {
    DelayCommand(fDelay, SetGlobalFadeIn(fWait, fLength));
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - move party member to specified waypoint and return
//     object reference to the party member if successful.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
object GetAndMoveNPCToWaypoint(int nNPC, string sTag) {
    object oNPC = GetObjectByTag(GetNPCTag(nNPC));
    object oWP  = GetObjectByTag(sTag);
    
    if (GetIsObjectValid(oWP)) {
        AssignCommand(oNPC, ClearAllActions());
        AssignCommand(oNPC, ActionJumpToLocation(GetLocation(oWP)));
        return oNPC;
    }
    else {
        AurPostString("INVALID WAYPOINT FOR CUTSCENE", 15, 20, 10.0);
        return OBJECT_INVALID;
    }
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ST: Utility - move Puppet to specified waypoint and return an
//               object reference to the puppet if successful.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
object GetAndMovePUPToWaypoint(int nPUP, string sTag) {
    object oPUP = GetObjectByTag(GetPuppetTag(nPUP));
    object oWP  = GetObjectByTag(sTag);
    
    if (GetIsObjectValid(oWP)) {
        AssignCommand(oPUP, ClearAllActions());
        AssignCommand(oPUP, ActionJumpToLocation(GetLocation(oWP)));
        return oPUP;
    }
    else {
        AurPostString("INVALID WAYPOINT FOR CUTSCENE", 15, 20, 10.0);
        return OBJECT_INVALID;
    }
}

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