//:://///////////////////////////////////////////// //:: Name x2_def_ondeath //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Default OnDeath script */ //::////////////////////////////////////////////// //:: Created By: Keith Warner //:: Created On: June 11/03 //::////////////////////////////////////////////// #include "rank" #include "spawner" void main() { object oPC = GetLastKiller(); object oMod = GetModule(); object oTarget= OBJECT_SELF; int nInt; int iKilled = GetLocalInt(oPC, "iKilled"); LastHit(); iKilled=iKilled+1; SetLocalInt(oPC, "iKilled", iKilled); GetRank(oPC); DeathStats(oPC); 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)); int sw1 = GetLocalInt(oMod, "sw_hw"); int sw2 = GetLocalInt(oMod, "sw_dr"); int sw3 = GetLocalInt(oMod, "sw_bl"); int sw4 = GetLocalInt(oMod, "sw_pf"); int sw5 = GetLocalInt(oMod, "sw_df"); int sw6 = GetLocalInt(oMod, "sw_pm"); int sw7 = GetLocalInt(oMod, "sw_bm"); int sw8 = GetLocalInt(oMod, "sw_lm"); int sw9 = GetLocalInt(oMod, "sw_ll"); if ((sw1==0)&&(sw2==0)&&(sw3==0)&&(sw4==0)&&(sw5==0)&&(sw6==0) &&(sw7==0)&&(sw8==0)&&(sw9==0)) { SetLocked(GetObjectByTag("arena_gate"), FALSE); } }