Script, drop, and aesthetic changes

This commit is contained in:
EpicValor
2023-09-01 20:34:06 -05:00
parent eb5060ffdd
commit bd99c2aee1
56 changed files with 1961 additions and 666 deletions

View File

@@ -126,7 +126,7 @@ void main()
SetLocalObject(oArea, "DOA" +sTag, OBJECT_SELF);
if(GetCurrentHitPoints(OBJECT_SELF) <= -10)
if(GetCurrentHitPoints(OBJECT_SELF) <= -30)
{
SetDidDie(TRUE, OBJECT_SELF);
SetHenchmanDying(OBJECT_SELF, FALSE);

View File

@@ -23,14 +23,10 @@
//:: 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"
//#include "x0_i0_walkway" - in x0_i0_anims
//#include "x0_i0_treasure"
void main()
{
@@ -45,7 +41,7 @@ void main()
// * in the "Text Seen When" field of the greeting in the conversation
// * file. Don't attach any player responses.
// *
// SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
// * Same as above, but for hostile creatures to make them say
// * a line before attacking.
@@ -61,28 +57,10 @@ void main()
// *
// 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
@@ -103,30 +81,13 @@ void main()
// * 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);
//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);
//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.
@@ -138,7 +99,7 @@ void main()
// * 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);
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// * If this flag is set, this creature will constantly
// * be acting. Otherwise, creatures will only start
@@ -151,7 +112,7 @@ void main()
// * 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);
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// * Creatures with _immobile_ ambient animations
// * can have this flag set to make them mobile in a
@@ -174,17 +135,17 @@ void main()
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// 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);
//SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
@@ -236,7 +197,7 @@ void main()
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
// SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// * Fire User Defined Event 1002
// *
@@ -248,7 +209,7 @@ void main()
// * Fire User Defined Event 1006
// *
SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
// * Fire User Defined Event 1008
// *
@@ -286,43 +247,12 @@ void main()
// * 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);
}
//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);
//DelayCommand(0.5, ExecuteScript("random_drop", OBJECT_SELF));
//ExecuteScript("random_drop",OBJECT_SELF);
//ExecuteScript("prc_npc_death", OBJECT_SELF);
}

View File

@@ -21,7 +21,7 @@
void main()
{
ExecuteScript("random_drop", OBJECT_SELF);
ExecuteScript("prc_npc_damaged", OBJECT_SELF);
object oDamager = GetLastDamager();

View File

@@ -323,6 +323,6 @@ void main()
SetName(OBJECT_SELF,sName);
}
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
//ExecuteScript("prc_pwonspawn", OBJECT_SELF);
DelayCommand(10.5, ExecuteScript("npc_sit_stay", OBJECT_SELF));
}

View File

@@ -18,9 +18,16 @@ void main()
// * Fire User Defined Event 1001 in the OnHeartbeat
// *
SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
SetCombatCondition(X0_COMBAT_FLAG_RANGED);
SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
WalkWayPoints();
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
//ExecuteScript("random_drop",OBJECT_SELF);
DelayCommand(10.0, ExecuteScript("random_drop", OBJECT_SELF));
}