Target selection

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

Wendel
a lesser mummy
a lesser mummy
Posts: 58
Joined: Wed Jul 24, 2002 1:48 am

Target selection

Post by Wendel » Wed Apr 28, 2004 1:08 am

I'm looking for some ideas on how to solve a certian problem.

Basically I want my tank to go through the mobs in a certain radius, and if he comes across a certain one, let's say "A Moss Snake" he will select that one first, if he doesn't find that mob, he then looks for "A large rat", if he doesn't find a rat he then targets the closest mob and mobs on.

I'm lost for the best way to do this, any help would be much appreciated.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Apr 28, 2004 4:13 am

rtfm alert

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Wed Apr 28, 2004 8:36 am

This is an example that worked in the old MQ2Param days

Code: Select all

/varset MobRange 300000
      /for counter 1 to @FarmListLast 
         /target nopcnear 60 radius 800 npc "@FarmList(@counter)" 
         /delay 5
         /if n $target(distance)<@MobRange {
            /varset MobRange $target(distance)
            /varset CloseMob @counter
         } 
      /next counter
      /target nopcnear 60 radius 800 npc "@FarmList(@CloseMob)"
      /delay 5
No promises but it's place to start