Cleaned up and enhanced badlands area
jaysyn got the rumormill convo working updated all the npcs that use it
This commit is contained in:
90
_module/nss/nw_c2_defaul4.nss
Normal file
90
_module/nss/nw_c2_defaul4.nss
Normal file
@@ -0,0 +1,90 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: NW_C2_DEFAULT4
|
||||
/*
|
||||
Default OnConversation event handler for NPCs.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 12/22/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_generic"
|
||||
|
||||
void main()
|
||||
{
|
||||
// * if petrified, jump out
|
||||
if (GetHasEffect(EFFECT_TYPE_PETRIFY, OBJECT_SELF) == TRUE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// * If dead, exit directly.
|
||||
if (GetIsDead(OBJECT_SELF) == TRUE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// See if what we just 'heard' matches any of our
|
||||
// predefined patterns
|
||||
int nMatch = GetListenPatternNumber();
|
||||
object oShouter = GetLastSpeaker();
|
||||
|
||||
if (nMatch == -1)
|
||||
{
|
||||
// Not a match -- start an ordinary conversation
|
||||
if (GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
ClearActions(CLEAR_NW_C2_DEFAULT4_29);
|
||||
BeginConversation();
|
||||
}
|
||||
else
|
||||
// * July 31 2004
|
||||
// * If only charmed then allow conversation
|
||||
// * so you can have a better chance of convincing
|
||||
// * people of lowering prices
|
||||
if (GetHasEffect(EFFECT_TYPE_CHARMED) == TRUE)
|
||||
{
|
||||
ClearActions(CLEAR_NW_C2_DEFAULT4_29);
|
||||
BeginConversation();
|
||||
}
|
||||
}
|
||||
// Respond to shouts from friendly non-PCs only
|
||||
else if (GetIsObjectValid(oShouter)
|
||||
&& !GetIsPC(oShouter)
|
||||
&& GetIsFriend(oShouter))
|
||||
{
|
||||
object oIntruder = OBJECT_INVALID;
|
||||
// Determine the intruder if any
|
||||
if(nMatch == 4)
|
||||
{
|
||||
oIntruder = GetLocalObject(oShouter, "NW_BLOCKER_INTRUDER");
|
||||
}
|
||||
else if (nMatch == 5)
|
||||
{
|
||||
oIntruder = GetLastHostileActor(oShouter);
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedAttackTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedSpellTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actually respond to the shout
|
||||
RespondToShout(oShouter, nMatch, oIntruder);
|
||||
}
|
||||
|
||||
// Send the user-defined event if appropriate
|
||||
if(GetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DIALOGUE));
|
||||
}
|
||||
}
|
@@ -1,13 +1,30 @@
|
||||
void main()
|
||||
{
|
||||
object oPC=GetObjectByTag("Prostitute");
|
||||
object oPC = OBJECT_SELF;
|
||||
|
||||
ClearAllActions();
|
||||
AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2));
|
||||
DelayCommand(3.0, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 3.0, 2.0)));
|
||||
DelayCommand(3.0, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(5.0, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1)));
|
||||
DelayCommand(8.5, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3)));
|
||||
DelayCommand(11.0, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 3.0, 2.0)));
|
||||
DelayCommand(14.5, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(13.0, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3)));
|
||||
DelayCommand(3.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 2.0, 2.0)));
|
||||
DelayCommand(3.1, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(5.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(5.6, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(6.2, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(6.7, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_WORSHIP, 2.0, 2.0)));
|
||||
DelayCommand(8.7, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 6.0, 3.0)));
|
||||
DelayCommand(11.7, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(11.7, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_STEAL)));
|
||||
DelayCommand(12.6, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(12.6, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(13.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(13.6, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(14.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_SPASM, 1.0, 3.0)));
|
||||
DelayCommand(17.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_GET_LOW, -1.0, 3.0)));
|
||||
DelayCommand(20.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(20.6, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(21.1, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(21.6, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(22.1, AssignCommand(oPC, PlayVoiceChat(VOICE_CHAT_LAUGH)));
|
||||
DelayCommand(22.2, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(31.2, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_GREETING)));
|
||||
|
||||
}
|
||||
|
@@ -19,6 +19,11 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Set dialog variable for rumor system
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 1);
|
||||
|
||||
// Randomize Skin Tone
|
||||
rnd_skin(OBJECT_SELF);
|
||||
|
||||
@@ -67,7 +72,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.
|
||||
|
||||
@@ -100,12 +105,8 @@ void main()
|
||||
|
||||
// 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)
|
||||
//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.
|
||||
|
@@ -65,9 +65,9 @@ void main()
|
||||
//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_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.
|
||||
|
||||
@@ -102,7 +102,7 @@ void main()
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 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)
|
||||
|
@@ -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.
|
||||
|
||||
@@ -102,7 +102,7 @@ void main()
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 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)
|
||||
|
@@ -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.
|
||||
|
||||
@@ -102,10 +102,10 @@ void main()
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 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.
|
||||
|
@@ -71,10 +71,10 @@ void main()
|
||||
//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);
|
||||
//SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
// Interacts with placeables + More civilized actions. See Readme.
|
||||
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
//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.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
DelayCommand(0.0f, SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1));
|
||||
DelayCommand(0.0f, SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 1));
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(13) + 1);
|
||||
DelayCommand(0.0f, SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1));
|
||||
}
|
||||
|
@@ -3,10 +3,13 @@
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oSelf = OBJECT_SELF;
|
||||
string sParam = GetScriptParam("iRumorNum");
|
||||
int nCheck = GetLocalInt(oSelf, "iRumor");
|
||||
if (!nCheck) // if no random value yet
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
string sParam = GetScriptParam("iRumourNum");
|
||||
int nCheck = GetLocalInt(oSelf, "iRumor");
|
||||
|
||||
//:: Set a random value if var doesn't exist
|
||||
if (!nCheck)
|
||||
SetLocalInt(oSelf, "iRumor", Random(13)+1);
|
||||
|
||||
int nVal = StringToInt(sParam);
|
||||
@@ -15,5 +18,6 @@ int StartingConditional()
|
||||
DeleteLocalInt(oSelf, "iRumor");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user