Village idiot needs lots'o help

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

DekeFentle
a lesser mummy
a lesser mummy
Posts: 48
Joined: Wed Oct 22, 2003 1:41 pm

Village idiot needs lots'o help

Post by DekeFentle » Tue Nov 11, 2003 9:16 pm

Hope I finally landed this in the right topic. :?

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
Not sure where I’m doing wrong here (not even real sure what I'm doing right) this is what I get back in the MQ window…

[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? :shock:
Revelation 6:8

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Tue Nov 11, 2003 9:25 pm

try removing the space between searchspawn and the ( ..