Rune_PRC8/_module/nss/oai_default8.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

39 lines
887 B
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Olander's AI
// nw_c2_default8
// by Don Anderson
// dandersonru@msn.com
//
// OnDisturbed
// Original Script by Bioware
//
////////////////////////////////////////////////////////////////////////////////
#include "oai_inc_ai"
void main()
{
object oTarget = GetLastDisturbed();
// If we've been disturbed and are not already fighting,
// attack our disturber.
if (GetIsObjectValid(oTarget) && !GetIsFighting(OBJECT_SELF))
{
if(OAI_GetIsAlly(oTarget))
{
ClearAllActions(TRUE);
OAI_DetermineCombatRound();
}
OAI_DetermineCombatRound(oTarget);
}
// Send the disturbed flag if appropriate.
if(GetSpawnInCondition(NW_FLAG_DISTURBED_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DISTURBED));
}
}