I’m trying to modify the Necfarm.mac posted in the depot so that it doesn’t flood target messages to SOE, I read elsewhere in these forums they could see that and I want to be as unobtrusive as possible.
Code: Select all
Sub FindTarget
| routine to find the closest, non-engaged mob from our list
| returns nothing, but TargetedMobID will be set to the mob to engage. Keeps looking until it finds a target.
:StartFindTarget
| reset the distance and ID of closest mob
/if n @HaveTarget!=1 {
/varset ClosestMobDist cHuntDistance
/varset TargetedMobID 0
/varset HaveTarget 0
/varset InvalidTargetID 0
}
| go thru the list of mobs we want to hunt and find the closest one that isn't being engaged.
/for MobArrayIndex 1 to @MobArraySize
/varset TargetedMobID $searchspawn ("@MobArray(@MobArrayIndex),range:@ClosestMobDist,nopcnear:cAntiKSRadius,notid:@InvalidTargetID")
/echo I found this ID# @TargetedMobID
| check to make sure we targeted something
|/if n @TargetedMobID==0 /goto :SkipMob
| if the target is not full life, someone else is probably fighting it, skip it
/echo $spawn(@TargetedMobID,hp,pct)
/if $spawn(@TargetedMobID,hp,pct)!=100 {
/varset InvalidTargetID @TargetedMobID
/goto :SkipMob
}
| see if this mob is closer than the last mob we checked
/varset ClosestMobDist $spawn(@TargetedMobID,distance)
/varset InvalidTargetID 0
/varset HaveTarget 1
:SkipMob
/next MobArrayIndex
| if we didn't find a target, start over
/if n @HaveTarget!=1 /goto :StartFindTarget
:EndFindTarget
/return
[MacroQuest] I found this ID# 2582
[MacroQuest] 100
Couldnt parse ‘$searchs
(“@MobArray(@MobArrayIndex),range:@ClosestMobDist,nopcnear:30,notid:@InvalidTargetID")
The movement is initiated but the above just scrolls across the MQ window.
Little help for the Village Idiot?

