//:://///////////////////////////////////////////// //:: Name x2_def_ondeath //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Default OnDeath script */ //::////////////////////////////////////////////// //:: Created By: Keith Warner //:: Created On: June 11/03 //::///////////////////////////////////Thor Death #include "x0_i0_petrify" #include "spawner" #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"); effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY); int nInt3=GetLocalInt(oMod, "d5"); int nInt4=GetLocalInt(oMod, "d2a"); int oExploit = GetLocalInt(oMod, "xcheck"); int nInt; int iKilled = GetLocalInt(oPC, "iKilled"); int oChest; int iMode = GetLocalInt(oMod, "gamemode"); SetLocalInt(oMod, "gr_xx", 0); SetLocalInt(oMod, "sw_ll", 0); SetLocalInt(oMod, "ch_ll", 0); if (oExploit!=1) { LastHit(); if (GetLocalInt(oMod, "hwar_on")==1) { DelayCommand(3.0, HolyScore(OBJECT_SELF)); } if ((nInt3!=1)&&(nInt4!=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, 15000); } } if(nInt3==1) { QuickRestore(oPC); iKilled=iKilled+1; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); SetLocalInt(oMod, "d5_complete", 1); 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(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(oPC, "cutscene_on", 1); SetLocalInt(oMod, "cutscene_flag", 0); if (iMode==1) {AddJournalQuestEntry("boss6_0", 1, oPC, FALSE, FALSE);} else{AddJournalQuestEntry("boss6", 1, oPC, FALSE, FALSE);} } if(nInt4==1) { iKilled=iKilled+1; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); SetLocalInt(oMod, "d2a_complete", 1); 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(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(oPC, "cutscene_on", 1); SetLocalInt(oMod, "cutscene_flag", 0); if (iMode==1) {AddJournalQuestEntry("boss3_0", 1, oPC, FALSE, FALSE);} else{AddJournalQuestEntry("boss3", 1, oPC, FALSE, FALSE);} } } if (oExploit==1) { SetLocked(GetObjectByTag("arena_gate"), FALSE); 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); object oSpawner = GetObjectByTag("spawner"); AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); 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)); AssignCommand(oPC, PlaySound("vs_nzorxxxm_vict")); ExecuteScript("nw_c2_default7", OBJECT_SELF); }