PWE_PRC8/_module/nss/portal_destruct.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

26 lines
709 B
Plaintext

void main()
{
effect Suicide;
if (
GetLastSpell()== SPELL_GREATER_DISPELLING ||
GetLastSpell()== SPELL_DISMISSAL ||
GetLastSpell()== SPELL_LESSER_PLANAR_BINDING ||
GetLastSpell()== SPELL_GREATER_PLANAR_BINDING ||
GetLastSpell()== SPELL_PLANAR_BINDING ||
GetLastSpell()== SPELL_MORDENKAINENS_DISJUNCTION
)
{
Suicide=EffectDeath(TRUE,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,Suicide,OBJECT_SELF);
//after destroyed, award exp
object oPC = GetFirstPC();
while (GetIsObjectValid(oPC) == TRUE)
{
GiveXPToCreature(oPC,1000);
oPC = GetNextPC();
}
}
}