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

@ -11169,7 +11169,7 @@
}, },
"Version": { "Version": {
"type": "dword", "type": "dword",
"value": 94 "value": 95
}, },
"Width": { "Width": {
"type": "int", "type": "int",

View File

@ -9957,7 +9957,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -9984,7 +9984,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10011,7 +10011,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10038,7 +10038,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10065,7 +10065,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10092,7 +10092,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10119,7 +10119,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10146,7 +10146,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10173,7 +10173,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",
@ -10200,7 +10200,7 @@
"__struct_id": 0, "__struct_id": 0,
"Key": { "Key": {
"type": "cexostring", "type": "cexostring",
"value": "iDialogue" "value": "iDialogueNum"
}, },
"Value": { "Value": {
"type": "cexostring", "type": "cexostring",

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.

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.

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.

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.

View File

@ -19,6 +19,11 @@
void main() 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 // Randomize Skin Tone
rnd_skin(OBJECT_SELF); rnd_skin(OBJECT_SELF);
@ -100,10 +105,6 @@ void main()
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***************************************************************************************** // 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. 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 // 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() 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() 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() int StartingConditional()
{ {
object oSelf = OBJECT_SELF; object oSelf = OBJECT_SELF;
string sParam = GetScriptParam("iRumorNum");
int nCheck = GetLocalInt(oSelf, "iRumor"); string sParam = GetScriptParam("iRumourNum");
if (!nCheck) // if no random value yet int nCheck = GetLocalInt(oSelf, "iRumor");
//:: Set a random value if var doesn't exist
if (!nCheck)
SetLocalInt(oSelf, "iRumor", Random(60)+1); SetLocalInt(oSelf, "iRumor", Random(60)+1);
int nVal = StringToInt(sParam); int nVal = StringToInt(sParam);
@ -15,5 +18,6 @@ int StartingConditional()
DeleteLocalInt(oSelf, "iRumor"); DeleteLocalInt(oSelf, "iRumor");
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }

View File

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

Binary file not shown.

View File

@ -800,5 +800,81 @@
"Wis": { "Wis": {
"type": "byte", "type": "byte",
"value": 10 "value": 10
},
"xAppearance_Head": {
"type": "word",
"value": 8
},
"xArmorPart_RFoot": {
"type": "word",
"value": 1
},
"xBodyPart_Belt": {
"type": "word",
"value": 0
},
"xBodyPart_LBicep": {
"type": "word",
"value": 1
},
"xBodyPart_LFArm": {
"type": "word",
"value": 1
},
"xBodyPart_LFoot": {
"type": "word",
"value": 1
},
"xBodyPart_LHand": {
"type": "word",
"value": 1
},
"xBodyPart_LShin": {
"type": "word",
"value": 1
},
"xBodyPart_LShoul": {
"type": "word",
"value": 0
},
"xBodyPart_LThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Neck": {
"type": "word",
"value": 1
},
"xBodyPart_Pelvis": {
"type": "word",
"value": 1
},
"xBodyPart_RBicep": {
"type": "word",
"value": 1
},
"xBodyPart_RFArm": {
"type": "word",
"value": 1
},
"xBodyPart_RHand": {
"type": "word",
"value": 1
},
"xBodyPart_RShin": {
"type": "word",
"value": 1
},
"xBodyPart_RShoul": {
"type": "word",
"value": 0
},
"xBodyPart_RThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Torso": {
"type": "word",
"value": 1
} }
} }

View File

@ -773,5 +773,81 @@
"Wis": { "Wis": {
"type": "byte", "type": "byte",
"value": 12 "value": 12
},
"xAppearance_Head": {
"type": "word",
"value": 1
},
"xArmorPart_RFoot": {
"type": "word",
"value": 1
},
"xBodyPart_Belt": {
"type": "word",
"value": 0
},
"xBodyPart_LBicep": {
"type": "word",
"value": 1
},
"xBodyPart_LFArm": {
"type": "word",
"value": 1
},
"xBodyPart_LFoot": {
"type": "word",
"value": 1
},
"xBodyPart_LHand": {
"type": "word",
"value": 1
},
"xBodyPart_LShin": {
"type": "word",
"value": 1
},
"xBodyPart_LShoul": {
"type": "word",
"value": 0
},
"xBodyPart_LThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Neck": {
"type": "word",
"value": 1
},
"xBodyPart_Pelvis": {
"type": "word",
"value": 1
},
"xBodyPart_RBicep": {
"type": "word",
"value": 1
},
"xBodyPart_RFArm": {
"type": "word",
"value": 1
},
"xBodyPart_RHand": {
"type": "word",
"value": 1
},
"xBodyPart_RShin": {
"type": "word",
"value": 1
},
"xBodyPart_RShoul": {
"type": "word",
"value": 0
},
"xBodyPart_RThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Torso": {
"type": "word",
"value": 1
} }
} }

View File

@ -822,5 +822,81 @@
"Wis": { "Wis": {
"type": "byte", "type": "byte",
"value": 12 "value": 12
},
"xAppearance_Head": {
"type": "word",
"value": 1
},
"xArmorPart_RFoot": {
"type": "word",
"value": 1
},
"xBodyPart_Belt": {
"type": "word",
"value": 0
},
"xBodyPart_LBicep": {
"type": "word",
"value": 1
},
"xBodyPart_LFArm": {
"type": "word",
"value": 1
},
"xBodyPart_LFoot": {
"type": "word",
"value": 1
},
"xBodyPart_LHand": {
"type": "word",
"value": 1
},
"xBodyPart_LShin": {
"type": "word",
"value": 1
},
"xBodyPart_LShoul": {
"type": "word",
"value": 0
},
"xBodyPart_LThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Neck": {
"type": "word",
"value": 1
},
"xBodyPart_Pelvis": {
"type": "word",
"value": 1
},
"xBodyPart_RBicep": {
"type": "word",
"value": 1
},
"xBodyPart_RFArm": {
"type": "word",
"value": 1
},
"xBodyPart_RHand": {
"type": "word",
"value": 1
},
"xBodyPart_RShin": {
"type": "word",
"value": 1
},
"xBodyPart_RShoul": {
"type": "word",
"value": 0
},
"xBodyPart_RThigh": {
"type": "word",
"value": 1
},
"xBodyPart_Torso": {
"type": "word",
"value": 1
} }
} }