Fixed corrupted module
Fixed corrupted module.
This commit is contained in:
@@ -8,7 +8,7 @@ int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if (GetHitDice(oPC) > 2) return FALSE;
|
||||
if (GetHitDice(oPC) > 1) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -32,39 +32,6 @@
|
||||
|
||||
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;
|
||||
|
||||
@@ -72,6 +39,10 @@ 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.
|
||||
@@ -86,14 +57,11 @@ 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)))
|
||||
@@ -128,8 +96,6 @@ 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.
|
||||
@@ -180,7 +146,6 @@ void main()
|
||||
// Short non-respond
|
||||
SetLocalTimer(AI_TIMER_SHOUT_IGNORE_ANYTHING_SAID, 6.0);
|
||||
|
||||
|
||||
// Attack the enemy!
|
||||
ClearAllActions();
|
||||
DetermineCombatRound(oShouter);
|
||||
@@ -193,4 +158,3 @@ void main()
|
||||
// Fire End of Dialogue event
|
||||
FireUserEvent(AI_FLAG_UDE_ON_DIALOGUE_EVENT, EVENT_ON_DIALOGUE_EVENT);
|
||||
}
|
||||
|
||||
|
@@ -16,28 +16,6 @@
|
||||
|
||||
#include "J_INC_OTHER_AI"
|
||||
|
||||
|
||||
//DMFI CODE ADDITIONS*****************************
|
||||
void SafeFaction(object oCurrent, object oAttacker)
|
||||
{
|
||||
AssignCommand(oAttacker, ClearAllActions());
|
||||
AssignCommand(oCurrent, ClearAllActions());
|
||||
// * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oAttacker) <= 10)
|
||||
{ SetLocalInt(oAttacker, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oAttacker);
|
||||
}
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oAttacker) <= 10)
|
||||
{ SetLocalInt(oAttacker, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oAttacker);
|
||||
}
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oAttacker) <= 10)
|
||||
{ SetLocalInt(oAttacker, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oAttacker);
|
||||
}
|
||||
}
|
||||
//END DMFI CODE ADDITIONS*************************
|
||||
|
||||
void main()
|
||||
{
|
||||
// Pre-attacked-event. Returns TRUE if we interrupt this script call.
|
||||
|
Reference in New Issue
Block a user