void main() { object oPC = GetPCSpeaker(); object oTarget; oTarget = GetObjectByTag("CLOAKTOWERCARETAKER"); int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget)); effect eEffect; eEffect = EffectDamage(1000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL); ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, OBJECT_SELF); 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)); }