Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
49
_module/nss/jw_assoc_phys.nss
Normal file
49
_module/nss/jw_assoc_phys.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Associate On Attacked
|
||||
//:: NW_CH_AC5
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If already fighting then ignore, else determine
|
||||
combat round
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
|
||||
if(!GetAssociateState(NW_ASC_IS_BUSY))
|
||||
{
|
||||
SetCommandable(TRUE);
|
||||
if(!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
|
||||
{
|
||||
if(!GetIsObjectValid(GetAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
if(GetIsObjectValid(GetLastAttacker()))
|
||||
{
|
||||
if(GetAssociateState(NW_ASC_MODE_DEFEND_MASTER))
|
||||
{
|
||||
if(!GetIsObjectValid(GetLastAttacker(GetMaster())))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1005));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user