Aantioch_Infernum/_module/nss/nw_c2_default7_g.nss
EpicValor 53c7bdc99a Script, cosmetic, and vendor changes
Changed death script for goblins to not blow up in chunks
Changed secret door vfx to blend in with the great oak better
added recall device for convenience and added it vendors
2023-08-10 22:22:44 -05:00

51 lines
1.6 KiB
Plaintext

#include "x0_i0_spawncond"
#include "give_custom_exp"
void main()
{
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
// If we're a good/neutral commoner,
// adjust the killer's alignment evil
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
// Call to allies to let them know we're dead
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
// NOTE: the OnDeath user-defined event does not
// trigger reliably and should probably be removed
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
//effect eBsplat = EffectVisualEffect(VFX_COM_CHUNK_RED_LARGE,TRUE);
//location lLoc = GetLocation(OBJECT_SELF);
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eBsplat,lLoc);
//////////////////////////////////////////////////////////
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;
}
ExecuteScript("prc_npc_death", OBJECT_SELF);
}