This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Focus macro question
Post Reply
Return to board index
Post by
AssultTank
Okay, I'm currently using this macro
#showtooltip Polymorph
/cast Polymorph
Right now I have to target, set a focus manually, then cast, which eats up time which I need to be using to get back to the fight.
I was hoping to try to make it so that it would check to see if I had a focus and if it did, cast on the focus, otherwise, use my target and set that as focus.
I tried to figure it out myself, but nothing I tried worked, it either didn't set the target as focus, or reset the focus no matter the target.
Is what I'm asking even possible?
Post by
296835
This post was from a user who has deleted their account.
Post by
AssultTank
Damn, that macro works just like I wanted, thank you so much.
Post by
Wikipedia
#showtooltip
/stopcasting
/clearfocus
/focus
/cast Polymorph
A lil' prettier
;)
Post by
pelf
Hmm, I think that
/target
and
/focus
respect the redirection of the conditional block that evaluates to true if you don't explicitly specify a unit target. If that's the case, then...
/focus
...is equivalent to...
/focus focus
...which isn't what we want, I don't think.
Post by
296835
This post was from a user who has deleted their account.
Post by
Wikipedia
Hmm, I think that
/target
and
/focus
respect the redirection of the conditional block that evaluates to true if you don't explicitly specify a unit target. If that's the case, then...
/focus
...is equivalent to...
/focus focus
...which isn't what we want, I don't think.
I'm pretty sure that's not the case.
/focus <parameter> target
and
/focus <parameter>
Are equivalent, as why would you focus-target your focus...? To focus a target's target you don't use
/focus
you'd use
/focus targettarget
But I might be lost, haven't played for a while...
Post by
HighFive
Hi.
SecureCmdList = function(msg)
if ( msg == "" ) then
FocusUnit();
else
local action, target = SecureCmdOptionParse(msg);
if ( action ) then
if ( not target or target == "focus" ) then
target = action;
end
FocusUnit(target);
end
end
end
Post by
296835
This post was from a user who has deleted their account.
Post by
pelf
That's what I thought. If you have a redirection in your conditionals, the target becomes the target of the redirection.
Post by
HighFive
Unless it's the focus:
SecureCmdList = function(msg)
if ( msg == "" ) then
FocusUnit();
else
local action, target = SecureCmdOptionParse(msg);
if ( action ) then
if ( not target or
target == "focus"
) then
target = action;
end
FocusUnit(target);
end
end
end
Post by
pelf
And I assume that FocusUnit defaults to "target" if target is nil or empty. Alright. I'm not sure why they excepted that single unit.
I'm pretty sure that's not the case.
/focus <parameter> target
and
/focus <parameter>
Are equivalent, as why would you focus-target your focus...? To focus a target's target you don't use
/focus
you'd use
/focus targettarget
But I might be lost, haven't played for a while...
That's not my point. My point was that
generally
when you do not specify an argument to /target or /focus, the unit that is acted upon is either
target
or the unit contained as a conditional in the conditional block that evaluates to true first.
/focus
If raid1 is alive, then you're going to focus raid1, if raid one is dead, then you're going to focus your target even though you didn't specify it. In fact, it looks like if I ran this...
/focus
If the first conditional block is true, then it's going to focus raid1 instead of what was actually passed to the /focus command.
The issue that I did not assess correctly was that there's a special condition that defines specific behavior when the
focus
unit is the unit that is returned from SecureCmdOptionParse as the target of the condition that passed.
Post by
303379
This post was from a user who has deleted their account.
Post by
Wikipedia
Wikipedia, condition returns "true" if you don't have focused target. Why don't you read about macro conditionals and syntax here:
http://www.wowpedia.org/HOWTO:_Make_a_Macro
?
Don't get cocky.
I've just always belived that '/focus' wouldn't be that retarded. And '' would just mean that if you don't have a focus then '/focus'.
Post by
HighFive
And I assume that FocusUnit defaults to "target" if target is nil or empty. Alright. I'm not sure why they excepted that single unit.
To allow for this behavior, of course. They did the same for the /target and /petattack, too.
I don't know why it doesn't prioritize the action above target. That seems like the sensible thing to do to me.
Post by
SirPunky
If we are here I want to show you my Hex macro:
#showtooltip
/focus
/stopmacro
/cast Hex
Thank you!
Post by
pelf
And I assume that FocusUnit defaults to "target" if target is nil or empty. Alright. I'm not sure why they excepted that single unit.
To allow for this behavior, of course. They did the same for the /target and /petattack, too.
I don't know why it doesn't prioritize the action above target. That seems like the sensible thing to do to me.
Just seems a bit opaque to me. How would anyone know to expect that for focus redirections it would default to target? I'm not really asking you, of course. Just posing the question to the air.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.