/target macro problem

wickedone

New member
Joined
Jan 31, 2017
Messages
6
Reaction score
6
Points
3
Hi im trying to set up a macro for my cleric to target my warrior. When I click it he targets himself. Their names are similar and i believe thats what the issue is. Let's say my warrior is named warrior so my cleric is named warriorheals. Is there a way to differentiate the two? I have tried /target warrior, /target "warrior", /target 'warrior'. I have also tried some things with targets and roles but I can't figure it out.
 
  • Like
Reactions: EQDAB
Interesting problem. I can think of a few different ways to try and get around the name being a substring of the others name.

Knowing nothing about your setup and what you are trying to do I'm going to throw out some ideas.

1. In your macro use the "ID" of the target instead of the name
2. Place the warrior on the clerics XTarget list and use ${Me.XTarget[X]}
3. Get fancy with /alert and ${Spawn[ ]} to exclude the cleric

Using the id and alerts

/declare WarID int
/alert 1 warriorheals
/varset WarID ${Spawn[warrior noalert 1].ID}
/target id ${WarID}

Another issue you may run into is having your warrior generic name match a spawn filter like "tank" so instead of it thinking you searching for a specific name it thinks you want a class type

If you PM me with the specific names and the code you are using I'll see if there is anything that pops out.

Or use discord.
 
  • Like
Reactions: EQDAB and wickedone
I had that issue in my macros, targeting by name gets you whatever name is closer, be PC name, PC name corpse, familiar or summoned banker, peddler, etc ... depending on the context you can find work around always more or less easily, for me the ideal thing would be to be able to allow /target to work as strict search or substring (both are handy) or to have an additional option to indicate the type of target (PC, NPC ... ) but that probably means mq2 core changes that are most likely not worth the hassle because as said you can circumvent the problems on your own
 
  • Like
Reactions: EQDAB and wickedone
Since /target is detoured, it takes any spawn search criteria. You can do what you want various ways, here are a couple - I am assuming your cleric named warriorheals is trying to target the warrior named warrior and finds the closest mob (yourself) first, and you need to force it:

/tar warrior class warrior
/tar warrior notid ${Me.ID}

htw
 
  • Like
Reactions: EQDAB and wickedone
I remember having over 12 accounts that started w similar name what a pain that was
the class and notid ${Me.ID} looks like it would definatly help a ton
 
  • Like
Reactions: EQDAB and wickedone
Thanks everyone for your replies. I am a total newbie when it comes to this stuff. I guess I should have given more details and said I was just trying to set up a social for targeting, following and assisting with eqbc. I don't know where or how to use these suggestions but after talking to Dewey i think we got it. I should be able to use a /bca or /bct to have my toons //keypress f2. I have spent the last 2 or 3 days searching forums trying to figure stuff out with mq2 and trying to figure out how to play and set up my toons. Jumping back into a bunch of 105 toons is all a little overwhelming and my head is spinning but with some patience i will get there. Thanks again!
 
  • Like
Reactions: EQDAB