View Full Version : Focus dependant casting
Vicker
09-26-2015, 10:52 PM
I would like a macro to do the following:
If I have a focus, cast spell #1 on my target.
If I do not have a focus, cast spell #2 on my target.
That is to say, I would like to cast a different spell on my target, depending on whether or not I have a focus. Is there any way to do this?
MiRai
09-27-2015, 10:36 AM
I'm almost positive there is no way to cast a specific spell on your current target, based on whether or not you have a focus set. The best that you can do is to check if a target exists, and then cast a spell on that same target.
Ughmahedhurtz
09-27-2015, 02:59 PM
You could probably fake this with a gimpy sort of multi-step macro. Just set up step 1 to "hang" or fail if you have no focus, and step 2 will work if you have a target. THen just have that key rotate back and forth every other keyup/keydown. Would be highly dependent on how things fail, though; might end up being too much trouble with regards to targeting things.
JohnGabriel
09-27-2015, 05:32 PM
Actually this is very easy.
/cast [@focus, exists] spell1
/cast [@target, exists] spell2
Macros fall through to the first castable spell. Just tested and works fine.
MiRai
09-27-2015, 05:48 PM
Actually this is very easy.
/cast [@focus, exists] spell1
/cast [@target, exists] spell2
Macros fall through to the first castable spell. Just tested and works fine.
He didn't say that he wanted to cast on his focus, just that he wanted to cast a specific spell at his current target based upon whether he had a focus target or not. However, if that's the case, then your macro can be shortened to:
/use [@focus,exists]spell;spell
JohnGabriel
09-27-2015, 06:43 PM
Right you are, I read that too fast. My bad.
But this sounds like much more fun than actually play WoW right now, I decided to put a bunch of thought into it and came up with two possible solutions.
Idea#1:
First I created a macro and placed it on an action bar.
/cast spell 1
Now the main macro is this:
/click [@focus, exists] MultiBarLeftButton1
/stopmacro [@focus,exists]
/cast spell 2
If you have a focus it casts spell 1 and if you have no focus it casts spell 2. Change MultiBarLeftButton1 to the button you place the first macro.
Idea#2:
Create two action bars, one filled with the spells you want to cast when you have a focus, the other filled with the spells you want to cast without a focus, then you use these macros to set/clear focus.
/setfocus
/changeactionbar 2
/clearfocus
/changeactionbar 1
MiRai
09-27-2015, 07:26 PM
That's interesting... I was under the impression that /click couldn't handle conditionals. Did you try that one out to verify?
Vicker
09-27-2015, 08:06 PM
That's a very elegant solution, John! I hadn't thought of putting conditions on /click. I'll try that out tonight.
If it turns out that MiRai's suspicion is correct and that /click can't handle conditions, I've come up with another idea that I can try. I'll have more to say after I have a chance to try these things in game.
JohnGabriel
09-27-2015, 08:42 PM
That's interesting... I was under the impression that /click couldn't handle conditionals. Did you try that one out to verify?
Confirmed working on my pali. Found no problems, even switches spells if you remove/add a focus while in combat.
I checked the /click description here and it says it allows all the regular macro options:
http://wow.gamepedia.com/MACRO_click
MiRai
09-27-2015, 10:27 PM
Confirmed working on my pali. Found no problems, even switches spells if you remove/add a focus while in combat.
I checked the /click description here and it says it allows all the regular macro options:
http://wow.gamepedia.com/MACRO_click
Well, that's fantastic. :)
Vicker
09-28-2015, 06:23 AM
Indeed it is. I started using this macro tonight and it does exactly what I need. Thanks a bunch, John!
JohnGabriel
09-28-2015, 04:07 PM
Maybe I'm imagining things but it kindof seems sneaky, like a weird if/then/else statement. I bet they can also be stacked, calling multiple /clicks.
What if we also added /setfocus and /clearfocus to the macros and changed the spells cast while in combat, getting around /castsequence hangs. Macros cant be changed in combat but the focus can.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.