View Full Version : Focus Checking Question
Shadrach
02-20-2008, 10:44 AM
Using focus for the basis of most of macros, I've been unable to find something that checks 'what' my focus is set to.
Basically, I would like to set a macro on 3 hunters I'm running that follows: [If I'm the focus] Hunter's Mark; Otherwise target=focustarget
Looking over the conditionals at WoWWiki, there were some things that were close but not quite what I was looking for. I was wondering if 'player' could be used for the test. While modifier:shift checks for the shift button being pressed, would 'focus:player' work at all? (I figure it's not likely).
Has anyone else run into this, or do you all just have regularly assigned rolls to specific toons?
Thanks for your time.
aetherg
02-20-2008, 12:02 PM
Can you explain in more detail what you want your macro to do? I'm not really clear what the target=focustarget part of the Hunter's Mark thing is supposed to do.
If your just trying to get your assisting toons to target what you have targeted and put a hunters mark on them then try:
/target [target=focustarget]
/cast hunter's mark
You can't put "conditionals" such as "otherwise" in your macro's, but like Aeth said, I'm not sure what your trying to do there.
aetherg
02-20-2008, 03:07 PM
Yeah if you're trying to place a hunter's mark on whatever you have targeted, do:
/cast [target=focustarget] Hunter's Mark
Even if you have yourself focused, that still works fine. If you want something more like "if I have a hostile target, cast hunter's mark on it, otherwise cast it on my focus's target", you can do this:
/cast [harm,nodead] Hunter's Mark; [target=focustarget] Hunter's Mark
But I'm not sure exactly what you want to do.
Shadrach
02-20-2008, 03:08 PM
Sorry if I wasn't clear, the above stuff was more notional, rather than syntactically correct.
What I'm trying to do is change the function of a macro based on who has focus at the time.
For instance: With Focus set to H1 (H1 == Hunter1), when I push the '3' key, H1 casts Hunter's Mark, while the others (H2&H3) to set '/target focustarget'
However, if I change the Focus (either when someone dies, or I decide H2 needs to be the leader, after the focus change, H2 would cast the Hunter's Mark, while H1 & H3 would '/target focustarget'
Basically that when a hunter detected that he was the focus, he would cast hunter's mark while everyone else assisted off of him.
More Pseudo-Code like:
/cast [<if player is the focus>] Hunter's Mark; <if player is not the focus> target focustarget
I'm getting the idea, that the above conditional will not be possible, and that I'll have to have set assigned roles based on the character or enable row/role switching upon focus changes using Bongos or something. I've been seeing that there are a limited number of conditionals, and didn't happen to notice any 'equalities', and any that seemed to use the keyword 'player' seemed to be setting the target=player for self buffs/healing.
I was hoping that there might be some equality check for 'player==focus' that might fall in the form of 'player:focus' somewhat like the 'modifier:shift' test.
Thank you for your time.
-S
Nepida
02-20-2008, 04:14 PM
You can sometimes check if you are the focus/target of the macro. If you are in a party, the "party" conditional will be true for all party members but yourself, same with "raid".
BobGnarly
02-20-2008, 04:48 PM
Each line in the macro has to be homogeneous wrt the effect. IOW, you can't either cast hunters mark or assist because the root of the command is either "/cast" or "/assist", etc.
I also don't think there is any way to make the kind of decision you are looking for. I wish there was, cause I'd like to do a similar thing with party leader.
Assuming the non-focus party members don't have a target, and assuming the focus has itself as focus (is that even possible), you might be able to do something like:
/cast [harm] Hunter's Mark
/target focustarget
So the cast won't happen for anybody but the focus (since they don't have a target), and everybody will target the focus target (including the focus).
I'm sure you know this, but you can also get away from having to "/target focustarget" by just putting [target=focustarget] in your attack/cast macros. If you do this, and if you are running keyclone, you can just put hunter's mark on the 3 key on each client and put "3" in the do-not-pass list. I do something similar in a couple of places in my setup.
BobGnarly
02-20-2008, 04:50 PM
You can sometimes check if you are the focus/target of the macro. If you are in a party, the "party" conditional will be true for all party members but yourself, same with "raid".I'm not sure I follow you, but I'm interested in this possibility. What are the conditions in which I can use a "party" conditional and NOT have it return true for myself (given that I am in the party, of course).
Shadrach
02-20-2008, 05:19 PM
Thank you both for ideas pertaining to this. I'm very new to multi-boxing and keyclone, so I thank you for all your advice. I had decided against using [target=focustarget] for a couple of reason:
Firstly, I didn't want to have to make a macro for every attack to do that (I'm probably missing something simple).
Secondly, I wanted the flexibility to have a non-leader toon begin attacking a possible adding Mob. (Once again, most likely my rookie thoughts and I'm missing the bigger picture)
Ughmahedhurtz
02-21-2008, 04:52 PM
You cannot do conditionals in macros outside of the ones blizzard provides. You can do some witchery to sort of "blunt force" check things by just stacking the commands so the most important one fails last (if that makes sense) but that's as close as you can get to what I think you're trying to do.
http://www.wowwiki.com/HOWTO:_Make_a_Macro#Conditionals
What I'm trying to do is change the function of a macro based on who has focus at the time.
For instance: With Focus set to H1 (H1 == Hunter1), when I push the '3' key, H1 casts Hunter's Mark, while the others (H2&H3) to set '/target focustarget'
However, if I change the Focus (either when someone dies, or I decide H2 needs to be the leader, after the focus change, H2 would cast the Hunter's Mark, while H1 & H3 would '/target focustarget'
Basically that when a hunter detected that he was the focus, he would cast hunter's mark while everyone else assisted off of him.
More Pseudo-Code like:
/cast [<if player is the focus>] Hunter's Mark; <if player is not the focus> target focustarget
I wonder if it is possible to do this
/cast [harm] Hunter's Mark --obviously your main targets enemy
/target [noharm][noexists][dead] focustarget --if any of thos are true, it should target your focus target, and if it is not going to work try: /assist [noharm][noexists][dead] focustarget
beyond that I don't know, but best of luck :D
I posted a reply here earlier, but it seems to have disappeared! Maybe something related to the update. Anyway, I try again. :)
You can test whether focus exists or not. If you clear focus on your leader whenever you switch leaders, you can probably use a macro like this.
/target [target=focustarget, exists]
/stopmacro [target=focus, exists]
/cast Hunter's Mark
BobGnarly
02-22-2008, 05:48 PM
Thank you both for ideas pertaining to this. I'm very new to multi-boxing and keyclone, so I thank you for all your advice. I had decided against using [target=focustarget] for a couple of reason:
Firstly, I didn't want to have to make a macro for every attack to do that (I'm probably missing something simple).
Secondly, I wanted the flexibility to have a non-leader toon begin attacking a possible adding Mob. (Once again, most likely my rookie thoughts and I'm missing the bigger picture)Re-adding this, got lost in the forum transitions.
Yes, you do have to make a macro for each character, but you can simplify that process by setting everything up on one account (use the "global" macros, not char specific ones), then just copy the macro cache file over the each other account directory and the macros will be there automatically on the rest of your accounts. I actually wrote a DOS batch file just to update these so it's pretty painless.
Here's something that could help you with your second issue:
/cast [harm] [target=focustarget,harm] Spell Name
which basically says "cast on my current target, if it can be harmed, otherwise assist my focus and cast on its target (if it can be harmed)". I use this approach to do what you're talking about and it works pretty well. It's good to put that last "harm" in, otherwise that client will be stuck on a "glowing hand" icon waiting for you to target something, since you didn't have a valid target for the cast. Using the harm conditional will just fail the cast if it can't cast on the target.
I've worked up a way to do this type of targeting without using focus or /assist that I will be writing up in a few days, once I have a chance to use it a little and make sure it works in most scenarios. Might keep an eye out for it, could be of interest to you.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.