Made sure Halloween skeletons are equipping their weapon

Made sure Halloween skeletons are equipping their weapon.  Cleaned extra script calls in NPC AI.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904 2024-10-28 16:42:06 -04:00
parent d9e8a25bbf
commit c929e2ff75
40 changed files with 455 additions and 539 deletions

@ -6357,7 +6357,7 @@
},
"Version": {
"type": "dword",
"value": 511
"value": 512
},
"Width": {
"type": "int",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -102,5 +102,4 @@ void main()
{
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT));
}
}
}

@ -51,8 +51,4 @@ void main()
{
SignalEvent(OBJECT_SELF, EventUserDefined(1003));
}
}
}

@ -27,4 +27,4 @@ void main()
if(GetSpawnInCondition(NW_FLAG_DISTURBED_EVENT)) {
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DISTURBED));
}
}
}

@ -1,327 +0,0 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT9
/*
* Default OnSpawn handler with XP1 revisions.
* This corresponds to and produces the same results
* as the default OnSpawn handler in the OC.
*
* This can be used to customize creature behavior in three main ways:
*
* - Uncomment the existing lines of code to activate certain
* common desired behaviors from the moment when the creature
* spawns in.
*
* - Uncomment the user-defined event signals to cause the
* creature to fire events that you can then handle with
* a custom OnUserDefined event handler script.
*
* - Add new code _at the end_ to alter the initial
* behavior in a more customized way.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/11/2002
//:://////////////////////////////////////////////////
//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript
#include "x0_i0_anims"
// #include "x0_i0_walkway" - in x0_i0_anims
#include "x0_i0_treasure"
#include "x2_inc_switches"
void main()
{
// ***** Spawn-In Conditions ***** //
// * REMOVE COMMENTS (// ) before the "Set..." functions to activate
// * them. Do NOT touch lines commented out with // *, those are
// * real comments for information.
// * This causes the creature to say a one-line greeting in their
// * conversation file upon perceiving the player. Put [NW_D2_GenCheck]
// * in the "Text Seen When" field of the greeting in the conversation
// * file. Don't attach any player responses.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// * Same as above, but for hostile creatures to make them say
// * a line before attacking.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// * This NPC will attack when its allies call for help
// *
// SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// * If the NPC has the Hide skill they will go into stealth mode
// * while doing WalkWayPoints().
// *
// SetSpawnInCondition(NW_FLAG_STEALTH);
//--------------------------------------------------------------------------
// Enable stealth mode by setting a variable on the creature
// Great for ambushes
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// * Same, but for Search mode
// *
// SetSpawnInCondition(NW_FLAG_SEARCH);
//--------------------------------------------------------------------------
// Make creature enter search mode after spawning by setting a variable
// Great for guards, etc
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE)
{
SetSpawnInCondition(NW_FLAG_SEARCH);
}
// * This will set the NPC to give a warning to non-enemies
// * before attacking.
// * NN -- no clue what this really does yet
// *
// SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// * Separate the NPC's waypoints into day & night.
// * See comment on WalkWayPoints() for use.
// *
// SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
// * If this is set, the NPC will appear using the "EffectAppear"
// * animation instead of fading in, *IF* SetListeningPatterns()
// * is called below.
// *
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// * This will cause an NPC to use common animations it possesses,
// * and use social ones to any other nearby friendly NPCs.
// *
// SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable immobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE)
{
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
}
// * Same as above, except NPC will wander randomly around the
// * area.
// *
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//--------------------------------------------------------------------------
// Enable mobile ambient animations by setting a variable
// See x2_inc_switches for more information about this
//--------------------------------------------------------------------------
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE)
{
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
}
// **** Animation Conditions **** //
// * These are extra conditions you can put on creatures with ambient
// * animations.
// * Civilized creatures interact with placeables in
// * their area that have the tag "NW_INTERACTIVE"
// * and "talk" to each other.
// *
// * Humanoid races are civilized by default, so only
// * set this flag for monster races that you want to
// * behave the same way.
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// * If this flag is set, this creature will constantly
// * be acting. Otherwise, creatures will only start
// * performing their ambient animations when they
// * first perceive a player, and they will stop when
// * the player moves away.
// SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
// * Civilized creatures with this flag set will
// * randomly use a few voicechats. It's a good
// * idea to avoid putting this on multiple
// * creatures using the same voiceset.
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// * Creatures with _immobile_ ambient animations
// * can have this flag set to make them mobile in a
// * close range. They will never leave their immediate
// * area, but will move around in it, frequently
// * returning to their starting point.
// *
// * Note that creatures spawned inside interior areas
// * that contain a waypoint with one of the tags
// * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically
// * have this condition set.
// SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
// **** Special Combat Tactics *****//
// * These are special flags that can be set on creatures to
// * make them follow certain specialized combat tactics.
// * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE.
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// * Ambusher
// * Will go stealthy/invisible and attack, then
// * run away and try to go stealthy again before
// * attacking anew.
// SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
// * attackers.
// SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// **** Escape Commands ***** //
// * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME.
// * NOTE2: Not clear that these actually work. -- NN
// * Flee to a way point and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN);
// * Flee to a way point and do not return.
// *
// SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE);
// * Teleport to safety and do not return.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE);
// * Teleport to safety and return a short time later.
// *
// SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN);
// ***** CUSTOM USER DEFINED EVENTS ***** /
/*
If you uncomment any of these conditions, the creature will fire
a specific user-defined event number on each event. That will then
allow you to write custom code in the "OnUserDefinedEvent" handler
script to go on top of the default NPC behaviors for that event.
Example: I want to add some custom behavior to my NPC when they
are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create
a new user-defined script that has something like this in it:
if (GetUserDefinedEventNumber() == 1006) {
// Custom code for my NPC to execute when it's damaged
}
These user-defined events are in the range 1001-1007.
*/
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
// SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// * Fire User Defined Event 1002
// *
// SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT);
// * Fire User Defined Event 1005
// *
// SetSpawnInCondition(NW_FLAG_ATTACK_EVENT);
// * Fire User Defined Event 1006
// *
SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// * Fire User Defined Event 1008
// *
// SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT);
// * Fire User Defined Event 1003
// *
// SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT);
// * Fire User Defined Event 1004
// *
// SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT);
// ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** //
// * Goes through and sets up which shouts the NPC will listen to.
// *
SetListeningPatterns();
// * Walk among a set of waypoints.
// * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk
// * among them in order.
// * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there
// * and return to it after combat.
//
// * Optional Parameters:
// * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
//
// * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also
// * create waypoints with the tags "WN_" + NPC Tag + "_##"
// * and those will be walked at night. (The standard waypoints
// * will be walked during the day.)
// * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag.
WalkWayPoints();
//* Create a small amount of treasure on the creature
if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) &&
(GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) )
{
CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF);
}
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
// * If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
// * Give the create a random name.
// * If you create a script named x3_name_gen in your module, you can
// * set the value of the variable X3_S_RANDOM_NAME on OBJECT_SELF inside
// * the script to override the creature's default name.
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_RANDOMIZE_NAME) == TRUE)
{
ExecuteScript("x3_name_gen",OBJECT_SELF);
string sName = GetLocalString(OBJECT_SELF,"X3_S_RANDOM_NAME");
if ( sName == "" )
{
sName = RandomName();
}
SetName(OBJECT_SELF,sName);
}
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
}

@ -0,0 +1,87 @@
//::///////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://////////////////////////////////////////////
#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
void main()
{
// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
//SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// This will set the listening pattern on the NPC to attack when allies call
//SetSpawnInCondition(NW_FLAG_STEALTH);
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that NPCs using this form of ambient animations will not move to other NPCs.
SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// SPECIAL BEHAVIOR SECTION
/*
The following section outlines the various special behaviors that can be placed on a creature. To activate one of the special
behaviors:
1. Comment in SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
2. Comment in one other special behavior setting (ONLY ONE).
*/
//SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
//SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE); //Creature will only attack those that close within 5m and are not friends,
//Rangers or Druids.
//SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);//Creature will flee those that close within 7m if they are not friends,
//Rangers or Druids.
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
}

@ -30,12 +30,8 @@ void main()
object oSkelly;
object oPC = GetFirstObjectInArea(oArea);
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -NOT NEEDED
//: Don't spawn skeletons from skeletons or commoners
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || nCommoner > 0)
return;
//:: Get average PC level for area
//:: Cycle through PCs in Area
@ -77,9 +73,9 @@ void main()
//:: Spawn Skeleton.
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
LevelMob(oSkelly, nAveragePCLevel);
DelayCommand(0.1f, ActionDoLevelUp(oSkelly, nAveragePCLevel));
//:: Assign Weapon
//:: Assign Weapon
int nResult = d6(1);
int nStackSize = 1; // Create 1 items;
string sItem;
@ -113,7 +109,7 @@ void main()
//:: Apply VFX & Attack
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly);
}
}
@ -124,8 +120,8 @@ void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
{
if (GetItemInSlot(nSlot) != oItem)
{
ClearAllActions();
ActionEquipItem(oItem, nSlot);
DelayCommand(1.0, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
//ClearAllActions();
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
DelayCommand(0.3, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
}
}

@ -1,5 +1,15 @@
#include "prc_inc_util"
int LevelMob(object oCreature, int iLevels);
int GetPackage(int iClass);
void ActionDoLevelUp(object oCreature, int iLevels);
void ActionDoLevelUp(object oCreature, int iLevels)
{
LevelMob(oCreature, iLevels);
}
int LevelMob(object oCreature, int iLevels)
{
@ -25,7 +35,7 @@ while (iIndex <= iLevels)
}
//Force Rest to mem spells
ForceRest(oCreature);
PRCForceRest(oCreature);
//Give more treasure to be lvl appropriate
//rem this out cuz too much code is running and getting error
@ -161,4 +171,4 @@ switch (iClass)
return iPackage;
}
//:: void main (){}

@ -1,9 +1,5 @@
#include "nwnx_player"
//Created By Guile 5/5/08
//:: NWNxEE / 60 lvl support by Jaysyn & HA
//IMPORTANT////////////////////////////////////////////////////////////////////
//This is an include not an actual script (It has prototype functions in it!)
//Function which you can use in any script!! Just.....

@ -1,16 +0,0 @@
//::///////////////////////////////////////////////
//:: Name x2_def_endcombat
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default Combat Round End script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("nw_c2_default3", OBJECT_SELF);
}

@ -0,0 +1,180 @@
//::///////////////////////////////////////////////
//:: Name x2_def_heartbeat
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default Heartbeat script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
#include "prc_inc_spells"
/*
Swarm, Berzerker Wasp: 10 HD ar_berzwasp001
Swarm, Berzerker Wasp: 14 HD ar_berzwasp002
Swarm, Locust: 08 HD ds_locustswarm01
Swarm, Mini Kank: 04 HD ds_minkankswrm01
Swarm, Reptilian Bat: 04 HD ds_repbatswrm001
*/
void FollowTarget(string sTargetTag, float fDistance);
void FollowTarget(string sTargetTag, float fDistance)
{
object oTarget = GetObjectByTag(sTargetTag);
if (GetIsObjectValid(oTarget))
{
vector vTargetPosition = GetPosition(oTarget);
vector vCurrentPosition = GetPosition(OBJECT_SELF);
float fDistanceToTarget = VectorMagnitude(vTargetPosition - vCurrentPosition);
// Move to the target if the distance is greater than the desired follow distance
if (fDistanceToTarget > fDistance)
{
AssignCommand(OBJECT_SELF, ActionMoveToObject(oTarget, TRUE, fDistance));
}
}
}
void main()
{
//:: Declare major variables
object oNPC = OBJECT_SELF;
object oArea = GetArea(oNPC);
string sResRef = GetResRef(oNPC);
string sAreaResRef = GetResRef(oArea);
int nTrampleScore = (GetLocalInt(oNPC, "TRAMPLER") + GetHasFeat(FEAT_CENTAUR_TRAMPLE, oNPC));
int nChargeScore = (GetLocalInt(oNPC, "CHARGER") +
GetHasFeat(FEAT_MINOTAUR_CHARGE, oNPC) +
GetHasFeat(FEAT_ACROBATIC_CHARGE, oNPC) +
GetHasFeat(FEAT_SHIELD_CHARGE ,oNPC) +
GetHasFeat(FEAT_POWERFUL_CHARGE, oNPC) +
GetHasFeat(FEAT_GREATER_POWERFUL_CHARGE, oNPC) +
GetHasFeat(FEAT_RHINO_TRIBE_CHARGE, oNPC) +
GetHasFeat(FEAT_FURIOUS_CHARGE, oNPC) +
GetHasFeat(FEAT_RECKLESS_CHARGE, oNPC) +
GetHasFeat(FEAT_COBALT_CHARGE, oNPC));
int nBullRushScore = (GetLocalInt(oNPC, "BULLRUSHER") +
GetHasFeat(FEAT_IMPROVED_BULLRUSH, oNPC) +
GetHasFeat(FEAT_RAMPAGING_BULL_RUSH, oNPC) +
GetHasFeat(5241, oNPC) + //:: Expert Bull Rush
GetHasFeat(5247, oNPC)); //:: Superior Bull Rush
int iAwesomeBlow = GetHasFeat(FEAT_AWESOME_BLOW, oNPC);
int iOverrun = GetHasFeat(FEAT_IMPROVED_OVERRUN, oNPC);
//:: Run Various Combat Maneuver Heartbeats
if(iOverrun)
{
if (GetLocalInt(oNPC, "OverrrunCooldown") != 1)
{
if(DEBUG) DoDebug( "x2_def_heartbeat: Creature w/ Overrun Detected");
DelayCommand(0.0f, ExecuteScript("overrunner_hb", oNPC));
}
else
if(DEBUG) DoDebug("x2_def_heartbeat: Overrun is on cooldown.");
}
if(iAwesomeBlow)
{
if (GetLocalInt(oNPC, "AwesomeBlowCooldown") != 1)
{
if(DEBUG) DoDebug("x2_def_heartbeat: Creature w/ Awesome Blow Detected");
DelayCommand(0.0f, ExecuteScript("awesomeblow_hb", oNPC));
}
else
if(DEBUG) DoDebug("x2_def_heartbeat: Awesome Blow is on cooldown.");
}
if(nTrampleScore)
{
if (GetLocalInt(oNPC, "TrampleCooldown") != 1)
{
if(DEBUG) DoDebug("x2_def_heartbeat: Trampler Detected");
DelayCommand(0.0f, ExecuteScript("trampler_hb", oNPC));
}
else
if(DEBUG) DoDebug("x2_def_heartbeat: Trample is on cooldown.");
}
if(nChargeScore)
{
if (GetLocalInt(oNPC, "ChargeCooldown") != 1)
{
if(DEBUG) DoDebug("x2_def_heartbeat: Charger Detected");
DelayCommand(0.0f, ExecuteScript("charger_hb", oNPC));
}
else
if(DEBUG) DoDebug("x2_def_heartbeat: Charge is on cooldown.");
}
if(nBullRushScore)
{
if (GetLocalInt(oNPC, "BullRushCooldown") != 1)
{
if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rusher Detected");
DelayCommand(0.0f, ExecuteScript("bullrusher_hb", oNPC));
}
else
if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rush is on cooldown.");
}
//:: Runs Malevolent Spirit HB
if (sResRef == "malev_spirit001" )
{
ExecuteScript("i420_ghost_hb", oNPC);
}
//:: Runs Mini-kank swarm HB
if (sResRef == "ds_minkankswrm01" )
{
ExecuteScript("cr_minikank_hb", oNPC);
}
//:: Runs Berzerker Wasp swarm HB
if (sResRef == "ar_berzwasp001" || sResRef == "ar_berzwasp002" )
{
ExecuteScript("cr_berzwasp_hb", oNPC);
}
//:: Runs special swarm HB
if (sResRef == "ds_repbatswrm001" || sResRef == "ds_locustswarm01")
{
ExecuteScript("cr_locust_hb", oNPC);
}
//: Handles NPCs that spawn in captivity. (Sand Raiders Quest)
if (sResRef == "npc_milos" || sResRef == "npc_flaron" || sResRef == "npc_alia")
{
if ((sAreaResRef == "alt_altaruk") || (sAreaResRef == "alt_wavircoster"))
{
SetLocalInt(oNPC, "FREED_NPC", 1);
}
if(GetLocalInt(oNPC, "FREED_NPC") == 0)
{
ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 7.0);
}
}
//:: Make NPC followers follow the NPC (Sand Raiders Quest)
if ((sAreaResRef != "alt_altaruk") && (sAreaResRef != "alt_wavircoster"))
{
if (sResRef == "npc_flaron" || sResRef == "npc_alia")
{
if(GetLocalInt(oNPC, "FREED_NPC") == 1)
{
FollowTarget("NPC_MILOS", 1.0f);
}
}
}
ExecuteScript("nw_c2_default1", oNPC);
}

@ -1,16 +0,0 @@
//::///////////////////////////////////////////////
//:: Name x2_def_ondeath
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default OnDeath script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
}

@ -575,7 +575,7 @@ void main()
ms_Nomenclature(OBJECT_SELF);
//:: Execute PRC OnSpawn script.
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -Not needed
//Post Spawn event requeste
@ -583,8 +583,9 @@ void main()
{
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
}
//
NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Good Morning Ascension.", "The Madman");
// I don't think this should be here
//NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Good Morning Ascension.", "The Madman");
//
}

@ -237,55 +237,55 @@
},
"ScriptAttacked": {
"type": "resref",
"value": "nw_c2_default5"
"value": "x2_def_attacked"
},
"ScriptDamaged": {
"type": "resref",
"value": "nw_c2_default6"
"value": "x2_def_ondamage"
},
"ScriptDeath": {
"type": "resref",
"value": "nw_c2_default7"
"value": "x2_def_ondeath"
},
"ScriptDialogue": {
"type": "resref",
"value": "nw_c2_default4"
"value": "x2_def_onconv"
},
"ScriptDisturbed": {
"type": "resref",
"value": "nw_c2_default8"
"value": "x2_def_ondisturb"
},
"ScriptEndRound": {
"type": "resref",
"value": "nw_c2_default3"
"value": "x2_def_endcombat"
},
"ScriptHeartbeat": {
"type": "resref",
"value": "nw_c2_default1"
"value": "x2_def_heartbeat"
},
"ScriptOnBlocked": {
"type": "resref",
"value": "nw_c2_defaulte"
"value": "x2_def_onblocked"
},
"ScriptOnNotice": {
"type": "resref",
"value": "nw_c2_default2"
"value": "x2_def_percept"
},
"ScriptRested": {
"type": "resref",
"value": "nw_c2_defaulta"
"value": "x2_def_rested"
},
"ScriptSpawn": {
"type": "resref",
"value": "nw_c2_default9"
"value": "x2_def_spawn"
},
"ScriptSpellAt": {
"type": "resref",
"value": "nw_c2_defaultb"
"value": "x2_def_spellcast"
},
"ScriptUserDefine": {
"type": "resref",
"value": "nw_c2_defaultd"
"value": "x2_def_userdef"
},
"SkillList": {
"type": "list",

@ -248,55 +248,55 @@
},
"ScriptAttacked": {
"type": "resref",
"value": "nw_c2_default5"
"value": "x2_def_attacked"
},
"ScriptDamaged": {
"type": "resref",
"value": "nw_c2_default6"
"value": "x2_def_ondamage"
},
"ScriptDeath": {
"type": "resref",
"value": "nw_c2_default7"
"value": "x2_def_ondeath"
},
"ScriptDialogue": {
"type": "resref",
"value": "nw_c2_default4"
"value": "x2_def_onconv"
},
"ScriptDisturbed": {
"type": "resref",
"value": "nw_c2_default8"
"value": "x2_def_ondisturb"
},
"ScriptEndRound": {
"type": "resref",
"value": "nw_c2_default3"
"value": "x2_def_endcombat"
},
"ScriptHeartbeat": {
"type": "resref",
"value": "nw_c2_default1"
"value": "x2_def_heartbeat"
},
"ScriptOnBlocked": {
"type": "resref",
"value": "nw_c2_defaulte"
"value": "x2_def_onblocked"
},
"ScriptOnNotice": {
"type": "resref",
"value": "nw_c2_default2"
"value": "x2_def_percept"
},
"ScriptRested": {
"type": "resref",
"value": "nw_c2_defaulta"
"value": "x2_def_rested"
},
"ScriptSpawn": {
"type": "resref",
"value": "nw_c2_default9"
"value": "x2_def_spawn"
},
"ScriptSpellAt": {
"type": "resref",
"value": "nw_c2_defaultb"
"value": "x2_def_spellcast"
},
"ScriptUserDefine": {
"type": "resref",
"value": "nw_c2_defaultd"
"value": "x2_def_userdef"
},
"SkillList": {
"type": "list",

@ -230,55 +230,55 @@
},
"ScriptAttacked": {
"type": "resref",
"value": "x2_def_attacked"
"value": "nw_c2_default5"
},
"ScriptDamaged": {
"type": "resref",
"value": "x2_def_ondamage"
"value": "nw_c2_default6"
},
"ScriptDeath": {
"type": "resref",
"value": "x2_def_ondeath"
"value": "nw_c2_default7"
},
"ScriptDialogue": {
"type": "resref",
"value": "x2_def_onconv"
"value": "nw_c2_default4"
},
"ScriptDisturbed": {
"type": "resref",
"value": "x2_def_ondisturb"
"value": "nw_c2_default8"
},
"ScriptEndRound": {
"type": "resref",
"value": "x2_def_endcombat"
"value": "nw_c2_default3"
},
"ScriptHeartbeat": {
"type": "resref",
"value": "x2_def_heartbeat"
"value": "nw_c2_default1"
},
"ScriptOnBlocked": {
"type": "resref",
"value": "x2_def_onblocked"
"value": "nw_c2_defaulte"
},
"ScriptOnNotice": {
"type": "resref",
"value": "x2_def_percept"
"value": "nw_c2_default2"
},
"ScriptRested": {
"type": "resref",
"value": "x2_def_rested"
"value": "nw_c2_defaulta"
},
"ScriptSpawn": {
"type": "resref",
"value": "x2_def_spawn"
"value": "nw_c2_default9"
},
"ScriptSpellAt": {
"type": "resref",
"value": "x2_def_spellcast"
"value": "nw_c2_defaultb"
},
"ScriptUserDefine": {
"type": "resref",
"value": "x2_def_userdef"
"value": "nw_c2_defaultd"
},
"SkillList": {
"type": "list",

@ -237,55 +237,55 @@
},
"ScriptAttacked": {
"type": "resref",
"value": "x2_def_attacked"
"value": "nw_c2_default5"
},
"ScriptDamaged": {
"type": "resref",
"value": "x2_def_ondamage"
"value": "nw_c2_default6"
},
"ScriptDeath": {
"type": "resref",
"value": "x2_def_ondeath"
"value": "nw_c2_default7"
},
"ScriptDialogue": {
"type": "resref",
"value": "x2_def_onconv"
"value": "nw_c2_default4"
},
"ScriptDisturbed": {
"type": "resref",
"value": "x2_def_ondisturb"
"value": "nw_c2_default8"
},
"ScriptEndRound": {
"type": "resref",
"value": "x2_def_endcombat"
"value": "nw_c2_default3"
},
"ScriptHeartbeat": {
"type": "resref",
"value": "x2_def_heartbeat"
"value": "nw_c2_default1"
},
"ScriptOnBlocked": {
"type": "resref",
"value": "x2_def_onblocked"
"value": "nw_c2_defaulte"
},
"ScriptOnNotice": {
"type": "resref",
"value": "x2_def_percept"
"value": "nw_c2_default2"
},
"ScriptRested": {
"type": "resref",
"value": "x2_def_rested"
"value": "nw_c2_defaulta"
},
"ScriptSpawn": {
"type": "resref",
"value": "x2_def_spawn"
"value": "nw_c2_default9"
},
"ScriptSpellAt": {
"type": "resref",
"value": "x2_def_spellcast"
"value": "nw_c2_defaultb"
},
"ScriptUserDefine": {
"type": "resref",
"value": "x2_def_userdef"
"value": "nw_c2_defaultd"
},
"SkillList": {
"type": "list",

@ -170,6 +170,101 @@
}
]
},
"MemorizedList5": {
"type": "list",
"value": [
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
}
]
},
"MemorizedList6": {
"type": "list",
"value": [
@ -268,96 +363,6 @@
"MemorizedList7": {
"type": "list",
"value": [
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
"type": "word",
"value": 188
},
"SpellFlags": {
"type": "byte",
"value": 1
},
"SpellMetaMagic": {
"type": "byte",
"value": 1
}
},
{
"__struct_id": 3,
"Spell": {
@ -417,7 +422,12 @@
"type": "byte",
"value": 0
}
},
}
]
},
"MemorizedList8": {
"type": "list",
"value": [
{
"__struct_id": 3,
"Spell": {
@ -426,7 +436,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -441,7 +451,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -456,7 +466,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -476,7 +486,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -491,7 +501,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -506,7 +516,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -521,7 +531,7 @@
},
"SpellFlags": {
"type": "byte",
"value": 1
"value": 0
},
"SpellMetaMagic": {
"type": "byte",
@ -897,7 +907,7 @@
"FirstName": {
"type": "cexolocstring",
"value": {
"0": "Gerater Beholder Mage",
"0": "Greater Beholder Mage",
"id": 90374
}
},

Binary file not shown.