Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 18:13:22 -04:00
parent 684ef76c20
commit 499aba4eb3
5734 changed files with 4843758 additions and 0 deletions

View 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));
}
}
}