Initial commit. Updated release archive.

This commit is contained in:
Jaysyn904
2024-06-20 15:47:42 -04:00
parent d14b20cb85
commit e49d03aa23
6897 changed files with 6107848 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// lmpperfmisc2
// Miscellaneous functions for the Performer NPC's.
// Split off from lmpperfmisc because adding the generic include file slows down
// compiling immensely.
#include "nw_i0_generic"
#include "lmpperfmisc"
void AttackCreature(object oTarget)
{
if (oTarget != OBJECT_INVALID) {
ClearAllActions();
AdjustReputation(oTarget, OBJECT_SELF, -100);
SetIsTemporaryEnemy(oTarget);
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
DetermineCombatRound(oTarget);
}
}
void BothAttackThief()
{
object oThief = GetLocalObject(OBJECT_SELF, "lmpPerformThief");
if (oThief != OBJECT_INVALID && !GetIsDM(oThief)) {
ClearAllActions();
object oOther= GetOtherGuy();
if (oOther != OBJECT_INVALID)
AssignCommand(oOther, AttackCreature(oThief));
ActionMoveToObject(oThief, /*bRun*/TRUE, /*fRange*/5.0);
ActionDoCommand(AttackCreature(oThief));
}
}
void MakePerformersAttackThief(object oThief)
{
if (oThief != OBJECT_INVALID) {
object oPerf1 = GetObjectByTag("lmpPerformer1");
SetLocalObject(oPerf1, "lmpPerformThief", oThief);
AssignCommand(oPerf1, BothAttackThief());
}
}