Initial Commit
Initial Commit
This commit is contained in:
26
_module/nss/henchscout.nss
Normal file
26
_module/nss/henchscout.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "hench_i0_assoc"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oRealMaster = GetRealMaster();
|
||||
object oClosest = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY,
|
||||
oRealMaster, 1);
|
||||
if (GetIsObjectValid(oClosest) && GetDistanceBetween(oClosest, oRealMaster) <= henchMaxScoutDistance)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, sHenchScoutingFlag, TRUE);
|
||||
SetLocalObject(OBJECT_SELF, sHenchScoutTarget, oClosest);
|
||||
ClearAllActions();
|
||||
if (CheckStealth())
|
||||
{
|
||||
SetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH, TRUE);
|
||||
}
|
||||
ActionMoveToObject(oClosest, FALSE, 1.0);
|
||||
ActionMoveToObject(oClosest, FALSE, 1.0);
|
||||
ActionMoveToObject(oClosest, FALSE, 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF,sHenchScoutingFlag);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user