Initial Upload
Initial Upload
This commit is contained in:
50
_module/nss/celest_ondeath.nss
Normal file
50
_module/nss/celest_ondeath.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
#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));
|
||||
}
|
||||
////////planar
|
||||
object oKiller = GetLastKiller();
|
||||
if(GetAlignmentGoodEvil(oKiller)== ALIGNMENT_GOOD)
|
||||
{
|
||||
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 50);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
if( !GetIsPC( OBJECT_SELF ) )
|
||||
give_custom_exp( GetLastKiller(), OBJECT_SELF, 0 );
|
||||
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user