At the moment I am fiddling with the movement code basically I am trying to code in some auto avoidance of aggro mobs. What I have right now is something like this.
Code: Select all
Sub CheckPossibleAggro
/declare NearestMobID int inner
/varset NearestMobID ${NearestSpawn[npc radius 150 notid ${CurrentTargetID}].ID}
/if ((${NearestMobID}>0)&&(${NearestMobID}!=${CurrentNearestMobID})) {
/varset CurrentNearestMobID ${NearestMobID}
/target npc id ${CurrentNearestMobID}
/consider
}
/return
What this should do is find the nearest mob that is within 150 units and isnt the mob I am heading to and then con it. To prevent multiple cons each time the sub is called the last target is remebered in CurrentNearestMobID.
Now I want to do something if the mob is going to aggro i.e. scowls. So I set up an event like this.
Code: Select all
#event CheckBadCon "#1#scowls at you, ready to attack#*#"
Sub Event_CheckBadCon(string Line,string MobName)
/echo ${MobName} Aggro mob detected
/return
Any thought on this or a better way of doing it ?


