2024-03-11 23:44:08 -04:00
|
|
|
//::///////////////////////////////////////////////
|
|
|
|
//:: NW_C2_DIMDOOR.nss
|
|
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
|
|
//:://////////////////////////////////////////////
|
|
|
|
/*
|
|
|
|
Creature randomly hops around
|
|
|
|
to enemies during combat.
|
|
|
|
*/
|
|
|
|
//:://////////////////////////////////////////////
|
|
|
|
//:: Created By: Brent
|
|
|
|
//:: Created On: January 2002
|
|
|
|
//::///////////////////////////////////////////////
|
|
|
|
|
|
|
|
void JumpToWeakestEnemy(object oTarget)
|
|
|
|
{
|
|
|
|
object oTargetVictim = GetFactionMostDamagedMember(oTarget);
|
|
|
|
// * won't jump if closer than 4 meters to victim
|
|
|
|
if ((GetObjectSeen(oTargetVictim) == TRUE))
|
|
|
|
{
|
|
|
|
|
|
|
|
ActionAttack(oTargetVictim);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void main()
|
|
|
|
{
|
2024-03-12 21:27:23 -04:00
|
|
|
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
|
|
|
|
|
2024-03-11 23:44:08 -04:00
|
|
|
// * During Combat try teleporting around
|
|
|
|
if (GetUserDefinedEventNumber() == 1003)
|
|
|
|
{
|
|
|
|
|
|
|
|
// JumpToWeakestEnemy(GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|