Initial upload
Initial upload
This commit is contained in:
24
_module/nss/aw_dimdoor.nss
Normal file
24
_module/nss/aw_dimdoor.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
void JumpToWeakestEnemy(object oTarget)
|
||||
{
|
||||
object oTargetVictim = GetFactionMostDamagedMember(oTarget);
|
||||
if ((GetDistanceToObject(oTargetVictim) > 4.0) && (GetObjectSeen(oTargetVictim) == TRUE))
|
||||
{
|
||||
ClearAllActions();
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF));
|
||||
DelayCommand(0.3,ActionJumpToObject(oTargetVictim));
|
||||
DelayCommand(0.1,ActionAttack(oTargetVictim));
|
||||
}
|
||||
}
|
||||
void main()
|
||||
{
|
||||
if (GetUserDefinedEventNumber() == 1003)
|
||||
{
|
||||
if ((Random(100) < 50) || ( (GetCurrentHitPoints() / GetMaxHitPoints()) * 100 < 50) )
|
||||
{
|
||||
JumpToWeakestEnemy(GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user