Aantioch_Infernum/_module/nss/prc_pwondeath.nss
Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

39 lines
1009 B
Plaintext

//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT7
/*
Default OnDeath event handler for NPCs.
Adjusts killer's alignment if appropriate and
alerts allies to our death.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
#include "give_custom_exp"
#include "x2_inc_compon"
#include "x0_i0_spawncond"
void main()
{
if( GetLocalInt( OBJECT_SELF, "AlreadyDyingEXP" ) == 1 )
{
return;
}
////xp script stuff////
if( !GetIsPC( OBJECT_SELF ))
{
give_custom_exp( GetLastKiller(), OBJECT_SELF, 0 );
}
if (GetLastKiller() != OBJECT_SELF)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(99000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY), OBJECT_SELF);
return;
}
}