Fixed randomized commoner dialog & rumors

Fixed randomized commoner dialog & rumors
This commit is contained in:
Jaysyn904
2023-09-05 21:39:54 -04:00
parent 2f9f5fe435
commit 7f697d7467
79 changed files with 256 additions and 22 deletions

View File

@@ -19,6 +19,11 @@
void main()
{
//:: Set dialog variable for rumor system
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
// Randomize Skin Tone
rnd_skin(OBJECT_SELF);
@@ -100,10 +105,6 @@ 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)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them

View File

@@ -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(60) + 1));
}

View File

@@ -1,4 +1,4 @@
void main()
{
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
DelayCommand(0.0f, SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1));
}

View File

@@ -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(60)+1);
int nVal = StringToInt(sParam);
@@ -15,5 +18,6 @@ int StartingConditional()
DeleteLocalInt(oSelf, "iRumor");
return TRUE;
}
return FALSE;
}

View File

@@ -17,6 +17,6 @@ void main()
ExecuteScript("nw_c2_default8", OBJECT_SELF);
//:: Execute the PRC NPC OnDisturbed script
ExecuteScript("prc_npc_blocked", OBJECT_SELF);
ExecuteScript("prc_npc_disturb", OBJECT_SELF);
}