generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
80
_module/nss/oai_default7.nss
Normal file
80
_module/nss/oai_default7.nss
Normal file
@@ -0,0 +1,80 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NPC On Death
|
||||
// nw_c2_default7
|
||||
// by Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// There are now 4 Separate XP Systems You can use =).
|
||||
/*
|
||||
Module Slider Set to 0
|
||||
1) My PW XP System (NO Powerlevelling and NO Party Restrictions)
|
||||
2) Knat's PWFXP v2.0 (Nice System with a bunch a configs)
|
||||
3) ScrewTape's DMG XP System (Very Nice DMG XP System)
|
||||
|
||||
Module Slider Set to Desired Level
|
||||
4) Bioware Default
|
||||
|
||||
Make all the settings in the system you will be using. Each is completely
|
||||
separate and can not be used together. Just 'flip' the switches below.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include "oai_inc_ai"
|
||||
#include "x2_inc_compon"
|
||||
#include "x0_i0_spawncond"
|
||||
//#include "prc_inc_clsfunc"
|
||||
|
||||
void main ()
|
||||
{
|
||||
object oMod = GetModule();
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oTarget = GetLastKiller();
|
||||
|
||||
//Trolls
|
||||
if(GetBattleCondition(OAI_ROLE_TROLL))
|
||||
{
|
||||
if(!TrollDeath()) return;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
//: CUSTOM DEATH ADDITONS BELOW HERE
|
||||
|
||||
|
||||
//Custom Scripts you Need to Execute
|
||||
ExecuteScript("oai_cust_death", OBJECT_SELF);
|
||||
|
||||
|
||||
//: CUSTOM DEATH ADDITONS ABOVE HERE
|
||||
/******************************************************************************/
|
||||
|
||||
//Is it an Illusion?
|
||||
if(GetLocalInt(oNPC, "OAI_ILLUSION_DC") > 0 && GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(BreakIllusion(oTarget)) {}
|
||||
}
|
||||
|
||||
//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);
|
||||
|
||||
//FOF: Sparks a RETREAT_CHECK among allies upon death via a shout.
|
||||
if(GetLocalInt(OBJECT_SELF,"FIGHT_OR_FLIGHT") == 1 && GetLocalInt(OBJECT_SELF,"RETREATED") == 0)
|
||||
{
|
||||
//The int is to help make sure dead creatures lying on
|
||||
//the ground are not counted toward f_OurCR.
|
||||
SetLocalInt(OBJECT_SELF,"FOF_DEAD",1);
|
||||
SpeakString("RETREAT_CHECK",TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
|
||||
//Not Reliable....but left for probers =)
|
||||
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
|
||||
{
|
||||
SignalEvent(oNPC, EventUserDefined(1007));
|
||||
}
|
||||
craft_drop_items(oTarget);
|
||||
|
||||
//Process Dead Creatures
|
||||
ExecuteScript("oai_proc_dead", oNPC);
|
||||
}
|
||||
Reference in New Issue
Block a user