#include "in_g_cutscene" #include "cleanup" #include "cutscene_ch1" void Spawn(string sRes, object sWaypoint) { location lTarget = GetLocation(sWaypoint); object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, sRes, lTarget); } void CSvoice3(float oDelay, object oSelf, int iSet) { int iVoice; float oDice; switch (iSet) { case 1: iVoice = VOICE_CHAT_ATTACK;break; case 2: iVoice = VOICE_CHAT_BATTLECRY1;break; case 3: iVoice = VOICE_CHAT_BATTLECRY2;break; case 4: iVoice = VOICE_CHAT_BATTLECRY3;break; case 5: iVoice = VOICE_CHAT_THREATEN;break; case 6: iVoice = VOICE_CHAT_CHEER;break; case 7: iVoice = VOICE_CHAT_CUSS;break; case 8: iVoice = VOICE_CHAT_FLEE;break; case 9: iVoice = VOICE_CHAT_GOODBYE;break; case 10: iVoice = VOICE_CHAT_THANKS;break; case 11: iVoice = VOICE_CHAT_WEAPONSUCKS;break; case 12: iVoice = VOICE_CHAT_LAUGH;break; case 13: iVoice = VOICE_CHAT_HELLO;break; case 14: iVoice = VOICE_CHAT_FOLLOWME;break; case 15: iVoice = VOICE_CHAT_GOODIDEA;break; case 16: iVoice = VOICE_CHAT_REST;break; case 17: iVoice = VOICE_CHAT_YES;break; } DelayCommand(oDelay, AssignCommand(oSelf, PlayVoiceChat(iVoice))); } void CSstart(int oNum, object oPC) { object oMod = GetModule(); object oStarfall=GetObjectByTag("starfall2"); object oWP1=GetWaypointByTag("starfall_cswp"); object oWP2=GetWaypointByTag("pc_cswp"); object oWP3=GetWaypointByTag("test_wp"); object oWP4=GetWaypointByTag("love_wp1"); object oWP5=GetWaypointByTag("fw_portal_wp"); object oGate = GetObjectByTag("arena_gate"); effect eEffect = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION); effect eEffect3 = EffectVisualEffect(VFX_FNF_PWSTUN); effect eEffect2 = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION); float oDelay1 = 5.0; // congrats float oDelay2 = 12.0; // hit & miss float oDelay3 = 17.0; // hit % float oDelay4 = 20.0; // damage float oDelay7 = 26.0; // performance float oDelay8 = 32.0; // points float oDelay5 = 39.0; // present you with... float oDelay6 = 48.0; // you'll enjoy float oDelay9 = 40.0; // spawn reward float oDelay10 = 48.0; //run to player float oDelay9a = 51.5; //starfall dissapear effect float oDelay9b = 52.0; //starfall port float oDelay11 = 54.5; //Greet NPC float oDelay12 = 54.0; //Greet PC float oDelay13 = 40.0; //intro float oDelay14 = 40.0; //PC: I'm.... float oDelay15 = 40.0; //NPC: I know who... float oDelay16 = 40.0; //NPC: follwow me float oDelay17 = 40.0; //PC: good idea float oDelay18 = 40.0; // float oDelay20 = 90.0; // string sSFtalk1, sSFtalk2,sSFtalk3,sSFtalk4,sSFtalk5,sSFtalk6,sSFtalk7, sSFtalk7a, sSFtalk8,sSFtalk9,sSFtalk10; int iSwing = GetLocalInt(oPC, "pc_SFswing"); int iHit = GetLocalInt(oPC, "pc_SFhit"); int iDam = GetLocalInt(oPC, "pc_SFdam"); int aScore = GetLocalInt(oPC, "a_score"); int oMode = GetLocalInt(oMod, "gamemode"); int iAv; float fPerc; int iPerc; int tScore; if (iHit!=0){iAv = iDam / iHit; } else {iAv = 0;} if (iSwing!=0){fPerc = (IntToFloat(iHit) / IntToFloat(iSwing))*100;} else {fPerc = 0.0;} iPerc = FloatToInt(fPerc); tScore = iPerc * iAv+1000; if (tScore!=0){aScore+=tScore;} else {aScore += 0;} string sOpponent; int iMode = GetLocalInt(oMod, "gamemode"); if (iMode==1){sOpponent = "Mephisto";} else{sOpponent = "Starfall";} SetLocalInt(oPC, "a_score", aScore); sSFtalk1 = "Congratulations, "+GetName(oPC)+ "! In an amazing feat of prowess, you have defeated "+sOpponent+", the Master of Champions!"; sSFtalk2 = "During the duel, you took "+IntToString(iSwing)+" swings and landed "+IntToString(iHit)+" blows."; sSFtalk3 = IntToString(iPerc)+"% of your attacks were effective against "+sOpponent+"."; sSFtalk4 = "You dealt a total of "+IntToString(iDam)+" damage with an average of "+IntToString(iAv)+" per hit."; sSFtalk5 = "I now present you with your prize"; sSFtalk6 = "Hail "+GetName(oPC)+", the new Master of Champions and guardian of the Phoenix Rod!"; if (iPerc>=0) {sSFtalk7 = "Your performance against "+sOpponent+" was one of little or no skill "; } if (iPerc>10) {sSFtalk7 = "Your performance against "+sOpponent+" was one of very low skill "; } if (iPerc>20) {sSFtalk7 = "Your performance against "+sOpponent+" was one of average skill "; } if (iPerc>30) {sSFtalk7 = "Your performance against "+sOpponent+" was one of moderate skill "; } if (iPerc>40) {sSFtalk7 = "Your performance against "+sOpponent+" was one of high skill "; } if (iPerc>50) {sSFtalk7 = "Your performance against "+sOpponent+" was one of very high skill "; } if (iPerc>60) {sSFtalk7 = "Your performance against "+sOpponent+" was one of impressive skill "; } if (iPerc>70) {sSFtalk7 = "Your performance against "+sOpponent+" was one of superior skill "; } if (iPerc>80) {sSFtalk7 = "Your performance against "+sOpponent+" was one of incredible skill "; } if (iPerc>90) {sSFtalk7 = "Your performance against "+sOpponent+" was one of supreme skill "; } if (iAv>=0) {sSFtalk7a = "and almost no power!"; } if (iAv>10) {sSFtalk7a = "and very low power!"; } if (iAv>20) {sSFtalk7a = "and low power!"; } if (iAv>30) {sSFtalk7a = "and average power!"; } if (iAv>50) {sSFtalk7a = "and threatening power!"; } if (iAv>70) {sSFtalk7a = "and overwhelming power!"; } if (iAv>100) {sSFtalk7a = "and formidible power!"; } if (iAv>110) {sSFtalk7a = "and incredible power!"; } if (iAv>120) {sSFtalk7a = "and supreme power!"; } if (iAv>150) {sSFtalk7a = "and devastating power!"; } sSFtalk7+=sSFtalk7a; sSFtalk8 = "You have been awarded a special bonus of "+IntToString(tScore)+" championship points, giving you a grand total of "+IntToString(aScore)+" points"; GestaltFace(0.0, oStarfall, 0.0, 2, oWP2); GestaltSpeak(oDelay1, oStarfall, sSFtalk1, ANIMATION_FIREFORGET_VICTORY1); GestaltSpeak(oDelay2, oStarfall, sSFtalk2, ANIMATION_NONE); GestaltSpeak(oDelay3, oStarfall, sSFtalk3, ANIMATION_NONE); GestaltSpeak(oDelay4, oStarfall, sSFtalk4, ANIMATION_NONE); GestaltSpeak(oDelay7, oStarfall, sSFtalk7, ANIMATION_NONE); GestaltSpeak(oDelay8, oStarfall, sSFtalk8, ANIMATION_NONE); GestaltSpeak(oDelay5, oStarfall, sSFtalk5, ANIMATION_FIREFORGET_BOW); GestaltSpeak(oDelay6, oStarfall, sSFtalk6, ANIMATION_FIREFORGET_VICTORY2); GestaltFace(oDelay5+4.0, oPC, 0.0, 2, oWP3); CSvoice3(oDelay9+3.0, oPC, 10); DelayCommand(oDelay9, Reward(oPC, 8)); DelayCommand(oDelay9a, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oWP1))); DelayCommand(oDelay9a+0.1, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, GetLocation(oWP1))); DelayCommand(oDelay9a+0.2, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect3, GetLocation(oWP1))); DestroyObject(oStarfall, oDelay9a+0.5); GestaltActionAnimate(oDelay11, oPC, ANIMATION_FIREFORGET_VICTORY3); CSvoice3(oDelay11, oPC, 6); } void CutScene3 (int oNum, object oPC) { object oMod = GetModule(); object oStarfall; int iMode = GetLocalInt(oMod, "gamemode"); string sSpawn; SetLocalInt(oPC, "cutscene_on",0); SetLocalInt(oMod, "duel_on", 0); SetLocalInt(oMod, "d1", 0); SetLocalInt(oMod, "d2", 0); SetLocalInt(oMod, "d2a", 0); SetLocalInt(oMod, "d3", 0); SetLocalInt(oMod, "d4", 0); SetLocalInt(oMod, "d5", 0); SetLocked(GetObjectByTag("arena_gate"), FALSE); object oArea = GetArea(oPC); object oNPC; object oWP1=GetWaypointByTag("starfall_cswp"); object oWP2=GetWaypointByTag("pc_cswp"); object oWP3=GetWaypointByTag("test_wp"); object oWP4=GetWaypointByTag("love_wp1"); object oWP5=GetWaypointByTag("fw_portal_wp"); object oGate = GetObjectByTag("arena_gate"); SetLocalInt(oMod, "chest_here", 0); CleanArea(oPC); CreateItemOnObject("reward_key", oPC); effect eEffect = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION); effect eEffect3 = EffectVisualEffect(VFX_FNF_PWSTUN); effect eEffect2 = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION); GestaltStartCutscene(oPC, "",TRUE,TRUE,TRUE,TRUE,2); GestaltCameraFade(0.0, oPC, FADE_IN,FADE_SPEED_SLOW); GestaltPlayMusic(0.0, oArea, TRUE, TRACK_HOTU_BATTLE_LARGE); GestaltActionMove(0.0,oPC, oWP2, TRUE, 0.0, 5.0); GestaltFace(6.0, oPC, 0.0, 2, oWP1); DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oWP1))); DelayCommand(4.1, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, GetLocation(oWP1))); DelayCommand(4.2, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect3, GetLocation(oWP1))); if (iMode==1){sSpawn = "starfall3";} else{sSpawn = "starfall2";} DelayCommand(4.5, Spawn(sSpawn, oWP1)); DelayCommand(6.0, CSstart(oNum, oPC)); SetLocalFloat(oPC,"fCameraDirection",120.0); SetLocalFloat(oPC,"fCameraRange",18.0); SetLocalFloat(oPC,"fCameraPitch",60.0); GestaltCameraMove (0.0, 120.0,18.0,60.0, 300.0, 20.0,60.0, 10.0,30.0,oPC); GestaltCameraMove (10.0, 300.0,20.0,60.0, 325.0,22.0,60.0, 5.0,30.0,oPC); GestaltCameraMove (15.0, 325.0,22.0,60.0, 330.0,17.0,60.0, 5.0,30.0,oPC); GestaltCameraMove (20.0, 330.0,17.0,60.0, 345.0,12.0,75.0, 4.0,30.0,oPC); GestaltCameraFade (62.0, oPC, FADE_OUT, FADE_SPEED_SLOW, 3.0); GestaltStopCutscene (65.0, oPC); DelayCommand(66.0, MusicBackgroundChangeDay(GetArea(oPC), 0)); DelayCommand(66.0, MusicBackgroundChangeNight(GetArea(oPC), 0)); DelayCommand(67.0, MusicBackgroundStop(GetArea(oPC))); } //void main () {}