Added BESIE, MS Moneclature

Added BESIE, Markshire's Nomeclature & started initial setup for commoners in Baleas.
This commit is contained in:
Jaysyn904
2021-09-01 23:42:36 -04:00
parent ca4bfe9834
commit ae152d0814
673 changed files with 363454 additions and 26630 deletions

View File

@@ -32,6 +32,39 @@
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();
string sSpoken = GetMatchedSubstring(0);
// 2008.05.25 tsunami282 - removed for NWN 1.69 (no longer needed)
//DMFI CODE ADDITIONS BEGIN HERE
// if (GetIsPC(oShouter) || GetIsDM(oShouter) || GetIsDMPossessed(oShouter))
// {
// ExecuteScript("dmfi_voice_exe", OBJECT_SELF);
// }
if (nMatch == -1 && GetIsPC(oShouter) &&(GetLocalInt(GetModule(), "dmfi_AllMute") || GetLocalInt(OBJECT_SELF, "dmfi_Mute")))
{
SendMessageToAllDMs(GetName(oShouter) + " is trying to speak to a muted NPC, " + GetName(OBJECT_SELF) + ", in area " + GetName(GetArea(OBJECT_SELF)));
SendMessageToPC(oShouter, "This NPC is muted. A DM will be here shortly.");
return;
}
//DMFI CODE ADDITIONS END HERE
// Pre-conversation-event. Returns TRUE if we interrupt this script call.
if(FirePreUserEvent(AI_FLAG_UDE_ON_DIALOGUE_PRE_EVENT, EVENT_ON_DIALOGUE_PRE_EVENT)) return;
@@ -39,10 +72,6 @@ void main()
if(GetAIOff()) return;
// Declarations
int nMatch = GetListenPatternNumber();
object oShouter = GetLastSpeaker();
string sSpoken = GetMatchedSubstring(0);
// We can ignore everything under special cases - EG no valid shouter,
// we are fleeing, its us, or we are not in the same area.
// - We break out of the script if this happens.
@@ -57,11 +86,14 @@ void main()
return;
}
// Conversation if not a shout.
if(nMatch == -1)
{
// * Don't speak when dead. 1.4 change (an obvious one to make)
if(CanSpeak())
{
// Make sure it is a PC and we are not fighting.
if(!GetIsFighting() && (GetIsPC(oShouter) || GetIsDMPossessed(oShouter)))
@@ -96,6 +128,8 @@ void main()
(!GetHasEffect(EFFECT_TYPE_DEAF) || GetObjectSeen(oShouter)))
{
if(GetIsFriend(oShouter) || GetFactionEqual(oShouter))
{
// If they are a friend, not a PC, and a valid number, react.
// In the actual RespondToShout call, we do check to see if we bother.
@@ -146,6 +180,7 @@ void main()
// Short non-respond
SetLocalTimer(AI_TIMER_SHOUT_IGNORE_ANYTHING_SAID, 6.0);
// Attack the enemy!
ClearAllActions();
DetermineCombatRound(oShouter);
@@ -158,3 +193,4 @@ void main()
// Fire End of Dialogue event
FireUserEvent(AI_FLAG_UDE_ON_DIALOGUE_EVENT, EVENT_ON_DIALOGUE_EVENT);
}