Aschbourne_PRC8/_module/nss/nw_c2_default8.nss

30 lines
860 B
Plaintext
Raw Permalink Normal View History

//:://////////////////////////////////////////////////
2024-06-14 10:48:20 -04:00
//:: NW_C2_DEFAULT8
/*
Default OnDisturbed event handler for NPCs.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
2024-06-14 10:48:20 -04:00
#include "nw_i0_generic"
2024-06-14 10:48:20 -04:00
void main()
{
ExecuteScript("prc_npc_disturb", OBJECT_SELF);
2024-06-14 10:48:20 -04:00
object oTarget = GetLastDisturbed();
// If we've been disturbed and are not already fighting,
// attack our disturber.
if (GetIsObjectValid(oTarget) && !GetIsFighting(OBJECT_SELF)) {
DetermineCombatRound(oTarget);
2024-06-14 10:48:20 -04:00
}
// Send the disturbed flag if appropriate.
if(GetSpawnInCondition(NW_FLAG_DISTURBED_EVENT)) {
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DISTURBED));
2024-06-14 10:48:20 -04:00
}
}