//:://///////////////////////////////////////////// //:: Name x2_def_ondeath //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Default OnDeath script */ //::////////////////////////////////////////////// //:: Created By: Keith Warner //:: Created On: June 11/03 //:://////////////////////////////////// Lucifers mistress / Gate Keeper #include "spawner" #include "x0_i0_petrify" #include "loot" #include "rank" void main() { object oPC = GetLastKiller(); object oMod = GetModule(); object oP1 = GetObjectByTag("pool1"); object oP2 = GetObjectByTag("pool2"); object oP3 = GetObjectByTag("fountain1"); object oP4 = GetObjectByTag("fountain2"); object oLever1 = GetObjectByTag("pool_lever"); object oLever2 = GetObjectByTag("fount_lever"); object oSpawner = GetObjectByTag("spawner"); effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY); int oChest; int iKilled = GetLocalInt(oPC, "iKilled"); int oLife = GetLocalInt(oPC, "lives"); int nInt2=GetLocalInt(oMod, "d2"); int nInt3=GetLocalInt(oMod, "d4"); int nInt5=GetLocalInt(oMod, "d5"); int nInt4=GetLocalInt(oMod, "d2a"); int nInt6=GetLocalInt(oMod, "d3"); int oExploit = GetLocalInt(oMod, "xcheck"); int iMode = GetLocalInt(oMod, "gamemode"); SetLocalInt(oMod, "gr_xx", 0); SetLocalInt(oMod, "sw_lm", 0); SetLocalInt(oMod, "ch_lm", 0); int nInt; if (oExploit!=1) { LastHit(); if (GetLocalInt(oMod, "hwar_on")==1) { DelayCommand(3.0, HolyScore(OBJECT_SELF)); } if ((nInt2!=1)&&(nInt3!=1)&&(nInt4!=1)&&(nInt5!=1)&&(nInt6!=1)) { AssignCommand(oPC, ClearAllActions()); DelayCommand(1.5, AssignCommand(oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY2))); iKilled=iKilled+1; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); DeathStats(oPC); FloatingTextStringOnCreature("Victory", oPC); SetLocalInt(oPC, "bossdead", 1); if (GetLocalInt(oMod, "hwar_on")!=1) { TombSpawn(OBJECT_SELF, oPC); CreateGold(OBJECT_SELF, 12000); } } if(nInt2==1) { QuickRestore(oPC); ++iKilled; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); SetLocalInt(oMod, "d2_complete", 1); if (iMode==1) {AddJournalQuestEntry("boss2_0", 1, oPC, FALSE, FALSE);} else{AddJournalQuestEntry("boss2", 1, oPC, FALSE, FALSE);} DelayCommand(6.0, AssignCommand(oPC, PlaySound("sce_neutral"))); DelayCommand(6.0, FloatingTextStringOnCreature("W I N N E R", oPC)); SetLocked(GetObjectByTag("arena_gate"), FALSE); AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); AssignCommand(oLever1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); AssignCommand(oLever2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); RemoveEffectOfType(oP1, GetEffectType(eEffect)); RemoveEffectOfType(oP2, GetEffectType(eEffect)); RemoveEffectOfType(oP3, GetEffectType(eEffect)); RemoveEffectOfType(oP4, GetEffectType(eEffect)); SetLocalInt(oMod, "fountain_state", 0); SetLocalInt(oMod, "pool_state", 0); SetLocalInt(oMod, "challenge", 0); SetLocalInt(oPC, "cutscene_on", 1); SetLocalInt(oMod, "cutscene_flag", 0); } if ((nInt4==1)||(nInt5==1)||(nInt6==1)||(nInt3==1)) { ++iKilled; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); ++oLife; SetLocalInt(oPC, "lives", oLife); Message(2.4, "Bonus Life Granted", oPC); PCEffect(3.5, VFX_IMP_SUPER_HEROISM, oPC); DelayCommand(2.5, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2))); if ((nInt3!=1)&&(nInt5!=1)&&(nInt6!=1)) {BattleRest(oPC);} int oGameMode = GetLocalInt(oMod, "gamemode"); if (oGameMode==1) { DelayCommand( 9.8, spawner (oPC, "thor", 0)); } else { DelayCommand( 9.8, spawner (oPC, "lord", 0)); } DoEffect(9.8,VFX_FNF_PWKILL, "monster_wp"); } } AssignCommand(oPC, PlaySound("vs_nzeliepm_dead")); object oTarget= OBJECT_SELF; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oTarget)); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIRESTORM), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIRESTORM), GetLocation(oTarget)); //if (nInt != OBJECT_TYPE_WAYPOINT) //ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_WAIL_O_BANSHEES), oTarget); //else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, //EffectVisualEffect(VFX_FNF_WAIL_O_BANSHEES), GetLocation(oTarget)); ExecuteScript("nw_c2_default7", OBJECT_SELF); }