Initial commit. Updated release archive.
This commit is contained in:
68
_module/nss/globed5.nss
Normal file
68
_module/nss/globed5.nss
Normal file
@@ -0,0 +1,68 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Default On Attacked
|
||||
//:: NW_C2_DEFAULT5
|
||||
//:: 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()
|
||||
{
|
||||
if(!GetFleeToExit())
|
||||
{
|
||||
if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS))
|
||||
{
|
||||
if(!GetIsObjectValid(GetAttemptedAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
if(GetIsObjectValid(GetLastAttacker()))
|
||||
{
|
||||
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
|
||||
{
|
||||
//AdjustReputation(GetLastAttacker(), OBJECT_SELF, -100);
|
||||
SetSummonHelpIfAttacked();
|
||||
DetermineSpecialBehavior(GetLastAttacker());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetArea(GetLastAttacker()) == GetArea(OBJECT_SELF))
|
||||
{
|
||||
SetSummonHelpIfAttacked();
|
||||
DetermineCombatRound();
|
||||
}
|
||||
}
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
//Shout that I was attacked
|
||||
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Put a check in to see if this attacker was the last attacker
|
||||
//Possibly change the GetNPCWarning function to make the check
|
||||
SetSpawnInCondition(NW_FLAG_SET_WARNINGS, FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ActivateFleeToExit();
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1005));
|
||||
}
|
||||
effect vfx = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
|
||||
//after applying the effect, I apply the actual spell just to add some flayvah
|
||||
ActionCastSpellAtObject(SPELL_GHOSTLY_VISAGE, OBJECT_SELF, METAMAGIC_EXTEND, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
|
||||
// End The relevant stuff
|
||||
}
|
Reference in New Issue
Block a user