Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
44
_module/nss/mod_ondeath.nss
Normal file
44
_module/nss/mod_ondeath.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// mod_ondeath
|
||||
// written by: eyesolated
|
||||
// written at: Jan. 30, 2004
|
||||
//
|
||||
// Notes: Placeholder for the module-wide OnPlayerDeath Event
|
||||
|
||||
|
||||
///////////
|
||||
// Includes
|
||||
//
|
||||
#include "datetime_inc"
|
||||
#include "chr_inc"
|
||||
#include "chr_death_inc"
|
||||
#include "nwnx_object"
|
||||
///////////////////////
|
||||
// Function Declaration
|
||||
//
|
||||
|
||||
////////////////
|
||||
// Function Code
|
||||
//
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastPlayerDied();
|
||||
object oLastHostileActor = GetLastHostileActor();
|
||||
|
||||
if (GetLocalInt(oLastHostileActor, "FACTION_SPARRING_MODE"))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPC);
|
||||
NWNX_Object_SetCurrentHitPoints(oPC, 1);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,SupernaturalEffect(EffectKnockdown()),oPC,RoundsToSeconds(2));
|
||||
return;
|
||||
}
|
||||
|
||||
// Drop the player's backpack if he isn't in a safe location
|
||||
object oNoFugue = GetNearestObjectByTag("noFugue", oPC);
|
||||
if (!GetIsObjectValid(oNoFugue))
|
||||
chr_Drop_Backpack(oPC);
|
||||
|
||||
// Call Death
|
||||
chr_Death_OnDeath(oPC, oLastHostileActor);
|
||||
}
|
||||
Reference in New Issue
Block a user