Script fixes, additions, and area changes
This commit is contained in:
@@ -17,6 +17,10 @@ object oPC = GetEnteringObject();
|
||||
{
|
||||
effect eKill = EffectDeath(TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oPC);
|
||||
|
||||
ExecuteScript("lose_xp_quest_oc",oPC);
|
||||
DelayCommand(1.75, PopUpDeathGUIPanel(oPC, FALSE, TRUE));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ SendMessageToPC(oPC,"User Details Recorded");
|
||||
if(nInt==1)
|
||||
{
|
||||
ExecuteScript("lose_xp_quest_oc",oPC);
|
||||
DelayCommand(1.75, PopUpDeathGUIPanel(oPC, FALSE, TRUE));
|
||||
//DelayCommand(1.75, PopUpDeathGUIPanel(oPC, FALSE, TRUE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,50 +1,10 @@
|
||||
void Stolen(object oPlayer)
|
||||
{
|
||||
object oStolen = GetFirstItemInInventory(oPlayer);
|
||||
while (oStolen != OBJECT_INVALID)
|
||||
{
|
||||
if (GetStolenFlag(oStolen) == TRUE)
|
||||
{
|
||||
SetDroppableFlag(oStolen,TRUE);
|
||||
}
|
||||
oStolen = GetNextItemInInventory(oPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
void Skull(object oPlayer)
|
||||
{
|
||||
object oPlayer = GetLastPlayerDied();
|
||||
object oArea = GetArea(oPlayer);
|
||||
vector vDead= GetPosition(oPlayer);
|
||||
float fFace = GetFacing(oPlayer);
|
||||
|
||||
vector vNew;
|
||||
vNew.x=vDead.x+1.0;
|
||||
vNew.y=vDead.y+1.0;
|
||||
vNew.z=vDead.z;
|
||||
object oItem = GetItemPossessedBy(oPlayer, "skullball");
|
||||
if (GetIsObjectValid(oItem))
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
location lLoc = Location( oArea, vNew, fFace);
|
||||
CreateObject(OBJECT_TYPE_ITEM,"skullball", lLoc);
|
||||
}
|
||||
}
|
||||
#include "nw_i0_plot"
|
||||
void main()
|
||||
{
|
||||
object oPlayer = GetLastPlayerDied();
|
||||
SetLocalInt(oPlayer, "PCDead", 1);
|
||||
|
||||
string sArea = GetTag(GetArea(oPlayer));
|
||||
if (sArea == "TheStadium") Skull(oPlayer);
|
||||
|
||||
if (sArea == "DrowDungeon")
|
||||
{
|
||||
SetLocalInt(oPlayer,"dungeon_died",1);
|
||||
}
|
||||
|
||||
Stolen(oPlayer);
|
||||
|
||||
AssignCommand(oPlayer, ClearAllActions());
|
||||
AssignCommand(oPlayer, SurrenderToEnemies());
|
||||
@@ -58,7 +18,8 @@ SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 74, oPlayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SurrenderToEnemies();
|
||||
DelayCommand(3.0,ExecuteScript("prc_ondeath",oPlayer));
|
||||
AssignCommand(GetLastPlayerDying(), ClearAllActions());
|
||||
AssignCommand(GetLastPlayerDying(),SpeakString( "I Dying"));
|
||||
PopUpGUIPanel(GetLastPlayerDying(),GUI_PANEL_PLAYER_DEATH);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,13 @@ object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetCurrentHitPoints(oPC)<=0)
|
||||
{
|
||||
effect eKill = EffectDeath(TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oPC);
|
||||
PopUpGUIPanel(GetLastPlayerDied(),GUI_PANEL_PLAYER_DEATH);
|
||||
}
|
||||
|
||||
if (GetItemPossessedBy(oPC, "playershandbook")!= OBJECT_INVALID)
|
||||
return;
|
||||
CreateItemOnObject("playershandbook", oPC);
|
||||
@@ -14,4 +21,5 @@ if (GetItemPossessedBy(oPC, "emotewand")!= OBJECT_INVALID)
|
||||
return;
|
||||
CreateItemOnObject("emotewand", oPC);
|
||||
GiveGoldToCreature(oPC, 230);
|
||||
|
||||
}
|
||||
|
@@ -9,5 +9,5 @@
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_ondeath", OBJECT_SELF);
|
||||
ExecuteScript("_ondeath", OBJECT_SELF);
|
||||
//ExecuteScript("_ondeath", OBJECT_SELF);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//:: npc_sit_stay
|
||||
//:://////////////////////////////////////////////
|
||||
/*Goes on the OnSpawn and OnConversation script of the NPC that you want to stay <span class="highlight">seated</span>*/
|
||||
|
||||
#include "nw_i0_spells"
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
@@ -49,11 +49,14 @@ void main()
|
||||
//BeginConversation();
|
||||
//}
|
||||
ClearAllActions();
|
||||
int nChair = 1;
|
||||
int nChair = 50;
|
||||
string sMyTagName = GetTag(OBJECT_SELF);
|
||||
string sSittableTagName = "CHAIR";
|
||||
object oChair = GetNearestObjectByTag(sSittableTagName, OBJECT_SELF, nChair);
|
||||
object oChair = GetRandomObjectByTag(sSittableTagName, 99.0);
|
||||
ActionMoveToObject (oChair, FALSE);
|
||||
ActionSit(oChair);
|
||||
|
||||
}
|
||||
DelayCommand(GetRandomDelay(180.0, 240.0), ExecuteScript("npc_sit_chair", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//:: npc_sit_stay
|
||||
//:://////////////////////////////////////////////
|
||||
/*Goes on the OnSpawn and OnConversation script of the NPC that you want to stay <span class="highlight">seated</span>*/
|
||||
|
||||
#include "nw_i0_spells"
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
@@ -53,8 +53,10 @@ void main()
|
||||
int nChair = 1;
|
||||
string sMyTagName = GetTag(OBJECT_SELF);
|
||||
string sSittableTagName = "CHAIR_" + sMyTagName;
|
||||
object oChair = GetNearestObjectByTag(sSittableTagName, OBJECT_SELF, nChair);
|
||||
object oChair = GetRandomObjectByTag(sSittableTagName, 99.0);
|
||||
ActionMoveToObject (oChair, FALSE);
|
||||
ActionSit(oChair);
|
||||
}
|
||||
DelayCommand(GetRandomDelay(30.0, 60.0), ExecuteScript("npc_sit_stay", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//:: npc_sit_stay
|
||||
//:://////////////////////////////////////////////
|
||||
/*Goes on the OnSpawn and OnConversation script of the NPC that you want to stay <span class="highlight">seated</span>*/
|
||||
|
||||
#include "nw_i0_spells"
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
@@ -53,8 +53,10 @@ void main()
|
||||
int nChair = 1;
|
||||
string sMyTagName = GetTag(OBJECT_SELF);
|
||||
string sSittableTagName = "Woodenbench";
|
||||
object oChair = GetNearestObjectByTag(sSittableTagName, OBJECT_SELF, nChair);
|
||||
object oChair = GetRandomObjectByTag(sSittableTagName, 99.0);
|
||||
ActionMoveToObject (oChair, FALSE);
|
||||
ActionSit(oChair);
|
||||
}
|
||||
DelayCommand(GetRandomDelay(180.0, 240.0), ExecuteScript("npc_sit_woodenbe", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
327
_module/nss/nw_c2_highai.nss
Normal file
327
_module/nss/nw_c2_highai.nss
Normal file
@@ -0,0 +1,327 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: 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);
|
||||
}
|
||||
SetAILevel (OBJECT_SELF, 3);
|
||||
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
|
||||
}
|
26
_module/nss/nw_o0_dying.nss
Normal file
26
_module/nss/nw_o0_dying.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dying Script
|
||||
//:: NW_O0_DEATH.NSS
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This script handles the default behavior
|
||||
that occurs when a player is dying.
|
||||
DEFAULT CAMPAIGN: player dies automatically
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent Knowles
|
||||
//:: Created On: November 6, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
/* AssignCommand(GetLastPlayerDying(), ClearAllActions());
|
||||
AssignCommand(GetLastPlayerDying(),SpeakString( "I Dying"));
|
||||
PopUpGUIPanel(GetLastPlayerDying(),GUI_PANEL_PLAYER_DEATH);
|
||||
*/
|
||||
// * April 14 2002: Hiding the death part from player
|
||||
effect eDeath = EffectDeath(FALSE, FALSE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, GetLastPlayerDying());
|
||||
}
|
@@ -20,14 +20,14 @@ void main()
|
||||
// *
|
||||
//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);
|
||||
//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 ***** //
|
||||
DelayCommand(10.0, ExecuteScript("random_drop", OBJECT_SELF));
|
||||
DelayCommand(5.0, ExecuteScript("random_drop", OBJECT_SELF));
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ void main()
|
||||
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
//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.
|
||||
|
||||
@@ -105,7 +105,7 @@ void main()
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
|
||||
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)
|
||||
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.
|
||||
|
116
_module/nss/re_comspawn_sitb.nss
Normal file
116
_module/nss/re_comspawn_sitb.nss
Normal file
@@ -0,0 +1,116 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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 "ms_name_inc"
|
||||
#include "rnd_commoner_inc"
|
||||
#include "NW_O2_CONINCLUDE"
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Randomize Skin Tone
|
||||
rnd_skin(OBJECT_SELF);
|
||||
|
||||
// Randomize Head & Hair color
|
||||
rnd_head(OBJECT_SELF);
|
||||
|
||||
// Randomize Tattoos
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
|
||||
// Randomize Clothing
|
||||
rnd_clothes(OBJECT_SELF);
|
||||
|
||||
// Randomize Last Name Usage
|
||||
int bNameChance = d100() > 33;
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", bNameChance);
|
||||
|
||||
int nOneName = GetLocalInt(OBJECT_SELF,"SINGLE_NAME");
|
||||
if (nOneName = 1)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", 0);
|
||||
}
|
||||
|
||||
//Calls the Random Name Generator
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
// 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_SLEEP);
|
||||
//Creatures that spawn in during the night will be asleep.
|
||||
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
|
||||
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
|
||||
//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.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
// Interacts with placeables + More civilized actions. See Readme.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
// Will use random voicechats during animations, if Civilized
|
||||
|
||||
// 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.)
|
||||
|
||||
// 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) *****************************************************************************************
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
|
||||
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
|
||||
DelayCommand(10.5, ExecuteScript("npc_sit_woodenbe", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
116
_module/nss/re_comspawn_sitc.nss
Normal file
116
_module/nss/re_comspawn_sitc.nss
Normal file
@@ -0,0 +1,116 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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 "ms_name_inc"
|
||||
#include "rnd_commoner_inc"
|
||||
#include "NW_O2_CONINCLUDE"
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Randomize Skin Tone
|
||||
rnd_skin(OBJECT_SELF);
|
||||
|
||||
// Randomize Head & Hair color
|
||||
rnd_head(OBJECT_SELF);
|
||||
|
||||
// Randomize Tattoos
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
|
||||
// Randomize Clothing
|
||||
rnd_clothes(OBJECT_SELF);
|
||||
|
||||
// Randomize Last Name Usage
|
||||
int bNameChance = d100() > 33;
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", bNameChance);
|
||||
|
||||
int nOneName = GetLocalInt(OBJECT_SELF,"SINGLE_NAME");
|
||||
if (nOneName = 1)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", 0);
|
||||
}
|
||||
|
||||
//Calls the Random Name Generator
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
// 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_SLEEP);
|
||||
//Creatures that spawn in during the night will be asleep.
|
||||
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
|
||||
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
|
||||
//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.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
// Interacts with placeables + More civilized actions. See Readme.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
// Will use random voicechats during animations, if Civilized
|
||||
|
||||
// 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.)
|
||||
|
||||
// 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) *****************************************************************************************
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
|
||||
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
|
||||
DelayCommand(10.5, ExecuteScript("npc_sit_chair", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
116
_module/nss/re_comspawn_sits.nss
Normal file
116
_module/nss/re_comspawn_sits.nss
Normal file
@@ -0,0 +1,116 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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 "ms_name_inc"
|
||||
#include "rnd_commoner_inc"
|
||||
#include "NW_O2_CONINCLUDE"
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Randomize Skin Tone
|
||||
rnd_skin(OBJECT_SELF);
|
||||
|
||||
// Randomize Head & Hair color
|
||||
rnd_head(OBJECT_SELF);
|
||||
|
||||
// Randomize Tattoos
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
|
||||
// Randomize Clothing
|
||||
rnd_clothes(OBJECT_SELF);
|
||||
|
||||
// Randomize Last Name Usage
|
||||
int bNameChance = d100() > 33;
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", bNameChance);
|
||||
|
||||
int nOneName = GetLocalInt(OBJECT_SELF,"SINGLE_NAME");
|
||||
if (nOneName = 1)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NAME_TYPE", 0);
|
||||
}
|
||||
|
||||
//Calls the Random Name Generator
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
// 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_SLEEP);
|
||||
//Creatures that spawn in during the night will be asleep.
|
||||
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
|
||||
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
|
||||
//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.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
// Interacts with placeables + More civilized actions. See Readme.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
// Will use random voicechats during animations, if Civilized
|
||||
|
||||
// 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.)
|
||||
|
||||
// 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) *****************************************************************************************
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
|
||||
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
|
||||
DelayCommand(10.5, ExecuteScript("npc_sit_stay", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user