2025/07/15 Update
Added PEPS AI. Updated module name. Set all henchmen to have a random race &/or class based name using a custom version of Markshire's Nomeclature scripts, as well as appearance. Set Constructs, Undead, Outsiders & Elementals to not require food or drink. Full compile.
This commit is contained in:
@@ -28,33 +28,46 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
#include "x0_i0_anims"
|
||||
#include "x2_inc_switches"
|
||||
#include "ms_name_inc"
|
||||
#include "mmd_inc_random"
|
||||
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
object oNPC = OBJECT_SELF;
|
||||
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(oNPC,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
SignalEvent(oNPC,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
ms_Nomenclature(oNPC);
|
||||
|
||||
DelayCommand(0.0f, rnd_skin(oNPC));
|
||||
DelayCommand(0.0f, rnd_head(oNPC));
|
||||
DelayCommand(0.0f, rnd_pheno(oNPC));
|
||||
DelayCommand(0.0f, rnd_tattoo(oNPC));
|
||||
DelayCommand(0.0f, rnd_height(oNPC));
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
int nNumber = GetLocalInt(oNPC,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
ExecuteScript("nw_c2_default9", oNPC);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
SignalEvent(oNPC,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user