Aschbourne_PRC8/_module/nss/_spider_death.nss
Jaysyn904 5d27edafba Major update
Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system.  Added PC deleter.  Added ACP 4.1.  Full compile.  Updated release archive.
2024-09-16 23:40:48 -04:00

57 lines
1.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Default:On Death
//:: NW_C2_DEFAULT7
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Shouts to allies that they have been killed
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
object CreatePlaceable(string sObject, location lPlace, float fDuration);
void CreatePlaceable2();
void main()
{
ExecuteScript("prc_npc_death", OBJECT_SELF);
if (Random(1000)< (5*GetHitDice(OBJECT_SELF))+10 )
{
object oTemp = CreatePlaceable("temporaryplaceho",GetLocation(OBJECT_SELF),180.0);
AssignCommand(oTemp,DelayCommand(120.0,CreatePlaceable2()));
}
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
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);
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(GetAreaFromLocation(GetLocation(OBJECT_SELF)), EventUserDefined(1007));
}
}
object CreatePlaceable(string sObject, location lPlace, float fDuration)
{
object oPlaceable = CreateObject(OBJECT_TYPE_PLACEABLE,sObject,lPlace,FALSE);
if (fDuration != 0.0)
DestroyObject(oPlaceable,fDuration);
return oPlaceable;
}
void CreatePlaceable2()
{
CreatePlaceable("spidersnest",GetLocation(OBJECT_SELF),0.0);
return;
}