Download
(7Kb)
Download
Updated: 08-29-17 04:34 AM
Pictures
File Info
Compatibility:
Shadows of Argus (7.3.0)
Updated:08-29-17 04:34 AM
Created:08-11-13 03:13 PM
Downloads:4,349
Favorites:32
MD5:

Spell Toggle

Version: 1.0.11
by: Gello [More]

This small addon allows you to set up macros to cast a spell or toggle the spell it casts.

What this addon does

There are sometimes spells we macro for situations that don't have a [condition]. For instance, warriors fighting one mob will use Heroic Strike, or fighting ten mobs will use Cleave instead. Battle Shout if no Death Knight in the group, Commanding Shout otherwise. Monks might use Tiger Palm if in melee range, or Crackling Jade Lightning at a distance. Warlocks might use Curse of Elements in PVE, or Curse of Exhaustion in PVP. etc

Modifier keys like Alt+ Ctrl+ and Shift+ are useful for doubling up more than one spell onto a macro. But it can get mildly tedious hitting those extra keys to cast alternate spells for long stretches. It's even more tedious to muck around with action bars when a DK joins the group or you queue for a BG.

This addon allows you to double up spells onto macros without requiring a modifier to cast the alternate spell every time. You set up a toggle (either a separate macro or the same macro) to alternate which spell the macro will cast.

How to use

You can bring up the UI by entering /spelltoggle or /st into chat.

Hopefully the UI is self explanatory, but for each toggle you need to give it a name and the spell(s) it's going to toggle.

Once saved, you can now use the /click commands in place of /cast to cast or toggle the spell. You can copy-paste them from the bottom of the UI to your macro if you want.

For instance, if you've been using this macro:

/cast [mod:alt] Commanding Shout; Battle Shout
It casts Commanding Shout if Alt is held, and Battle Shout otherwise.

To turn this into a toggle, open /spelltoggle, click New and give it any name like "Shout". Then drag Battle Shout and Commanding Shout from your spellbook to their slots on the UI. Then click Save.

Now to cast the shout:
/click Shout:Cast
To toggle to the other shout:
/click Shout:Toggle
Just about anything you can do with /cast you can do with /click. Some examples:

To cast the current shout, unless Alt is down when it will toggle to the other shout:
/click [mod:alt] Shout:Toggle; Shout:Cast
To always do a shout even while toggling:
/click [mod:alt] Shout:Toggle
/click Shout:Cast
To cast the current shout, unless the macro is right-clicked, then toggle:
/click [btn:2] Shout:Toggle; Shout:Cast
A toggle with one spell

In addition to toggling between two spells, you can now toggle one spell on or off.

Some people macro cooldown spells to cast with other abilities. For instance:
#showtooltip Colossus Smash
/cast Bloodbath
/cast Colossus Smash
which is fine for trash or soloing, but you probably want greater control when Bloodbath is used for raid bosses. You can set up a toggle with only one spell and use this addon to toggle the spell on or off:
#showtooltip Colossus Smash
/click [mod] Bloodbath:Toggle; Bloodbath:Cast
/cast Colossus Smash
Now when you're out soloing you can have Bloodbath cast alongside Colossus Smash. When you join a raid you can toggle Bloodbath off to use the cooldown separately for more control.

If you want the spell to be active by default, make it your primary spell and leave the secondary spell slot empty.
If you want the spell to be disabled by default, make it your secondary spell and leave the primary spell slot emtpy.

Knowing what spell a toggle will cast

Because it's often not obvious what spells are enabled when they're buried into larger macros, there's an option at the bottom of each toggle to tell you what will cast when you toggle the spell.

When you log in or reload, the first spell of each toggle will be the first spell loaded.

Multiple toggles in one macro

You can also have multiple toggles for multiple cooldowns in one macro:
#showtooltip Colossus Smash
/click [mod] BerserkerRage:Toggle; BerserkerRage:Cast
/click [mod] Recklessness:Toggle; Recklessness:Cast
/click [mod] Bloodbath:Toggle; Bloodbath:Cast
/click [mod] SkullBanner:Toggle; SkullBanner:Cast
/cast Colossus Smash
and remember you can have separate macros to cast and toggle to make things simpler:

Cast a bunch of cooldowns (if toggled on) in addition to Colossus Smash:
#showtooltip Colossus Smash
/click BerserkerRage:Cast
/click Recklessness:Cast
/click Bloodbath:Cast
/click SkullBanner:Cast
/cast Colossus Smash
Toggle whether all those cooldowns will attempt to fire when you use the above macro:
/click BerserkerRage:Toggle
/click Recklessness:Toggle
/click Bloodbath:Toggle
/click SkullBanner:Toggle
Toggling more than two spells

If you're interested in alternating more than two spells in a macro, you might want to check out the addon Select, which lets you cast from a list of spells that you can change by right-clicking the macro. Spell Toggle is more suitable for toggling spells in the heat of combat without needing to right-click anything.

If you've read this far

If you've read this far and you're asking yourself: "Why? This seems unnecessary." That's fine. This is an alternate style of keybinding I've been using for years. Occasionally someone on the official forums will ask how to do this, and I figured it was time to write a UI so anyone can set it up without lua knowledge. I don't expect this to have widespread appeal.

1.0.11 8/29/17 toc update for 7.3
1.0.10 3/28/17 toc update for 7.2
1.0.9 10/24/16 toc update for 7.1
1.0.8 7/16/16 toc update for 7.0
1.0.7 6/23/15 toc update for 6.2
1.0.6 for real 6/4/15 uploaded actual spell toggle 1.0.6 instead of another addon by mistake woops!
1.0.6 6/3/15 temporary fix for client-side bug caused by SetMacroSpell of unknown spells: red ? icons will be your "Armor Skills" icon instead when a spell is not available
1.0.5 2/24/15 toc update for 6.1
1.0.4 10/14/14 6.0 patch
1.0.3 7/21/14 update for WoD: support for 120+18 macros
1.0.2 9/14/13
ability to save toggles with only one spell (to turn a spell on/off)
if a toggle shares a macro with a /cast and a #showtooltip, it will not force its own icon
option to tell you what will cast when you toggle
1.0.1 9/11/13 toc update for 5.4
1.0.0 8/11/13 initial release
Optional Files (0)


Post A Reply Comment Options
Unread 01-10-23, 04:55 AM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Re: Wrath Classic

Originally Posted by Dridzt
Just a note that I'm still using this, it's not dead.

It works as is on Wrath Classic Live (3.4.0) at time of posting.

It only needs a minor dust off for 3.4.1 (currently on PTR) and it will continue working on that client as well.

The fix needed is simply updating the .text parentkey to .Text (lowercase t to uppercase T)
I did it in a conditional so it keeps working in 3.4.0 until 3.4.1 goes live. (if <widget>.Text then <widget>.Text:<blah> else <widget>.text:<blah>)

Select (the addon) needed similar changes (in more places) for the .text / .Text parentkey change as well a smarter detection of client version (3.4.1 folds a bunch of API into C_Container like the 10.x client)
Thanks for the heads up. I don't know if I'll have time to look this coming weekend but I'll definitely take a look before the patch. (Unless it's next Tuesday )
Report comment to moderator  
Reply With Quote
Unread 01-09-23, 07:18 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1359
File comments: 829
Uploads: 55
Wrath Classic

Just a note that I'm still using this, it's not dead.

It works as is on Wrath Classic Live (3.4.0) at time of posting.

It only needs a minor dust off for 3.4.1 (currently on PTR) and it will continue working on that client as well.

The fix needed is simply updating the .text parentkey to .Text (lowercase t to uppercase T)
I did it in a conditional so it keeps working in 3.4.0 until 3.4.1 goes live. (if <widget>.Text then <widget>.Text:<blah> else <widget>.text:<blah>)

Select (the addon) needed similar changes (in more places) for the .text / .Text parentkey change as well a smarter detection of client version (3.4.1 folds a bunch of API into C_Container like the 10.x client)
Last edited by Dridzt : 01-09-23 at 07:40 AM.
Report comment to moderator  
Reply With Quote
Unread 06-27-16, 08:09 AM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by Sorcelator
Hey this is just what I was looking for. Is there anyway though you can add an option to disable the chat toggle log? I'm currently toggling like 6 spells at once (shifting from damage spells to healing spells as a shaman) and it gets a little noisy in chat.

Keep it up, love it so far!
Open up the window (/st or /spelltoggle) and go down and edit each toggle and uncheck 'Tell me what will cast on toggle' circled in red here:



Then the toggles should happen quietly.
Report comment to moderator  
Reply With Quote
Unread 06-26-16, 03:53 PM  
Sorcelator
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Hey this is just what I was looking for. Is there anyway though you can add an option to disable the chat toggle log? I'm currently toggling like 6 spells at once (shifting from damage spells to healing spells as a shaman) and it gets a little noisy in chat.

Keep it up, love it so far!
Report comment to moderator  
Reply With Quote
Unread 06-04-15, 04:36 PM  
infernalaura
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Originally Posted by Gello
Originally Posted by infernalaura
Is there any change I need to make for the latest patch work cause it seem like I still have that ? Icon for my Maul Toggle.

Edit : Actually nevermind you made an error in the upload. You uploaded Select 1.0.6 instead of SpellToggle.
lol god dammit. I get those two mixed up so much sorry.

Uploading new one in moments.
Lolll it's okay ... I though I was getting nuts for a moment not seeing the change and also not seeing the code change between my old file and the new one until I realise the file I was downloading was Select.
Report comment to moderator  
Reply With Quote
Unread 06-04-15, 04:33 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by infernalaura
Is there any change I need to make for the latest patch work cause it seem like I still have that ? Icon for my Maul Toggle.

Edit : Actually nevermind you made an error in the upload. You uploaded Select 1.0.6 instead of SpellToggle.
lol god dammit. I get those two mixed up so much sorry.

Uploading new one in moments.
Report comment to moderator  
Reply With Quote
Unread 06-04-15, 04:08 PM  
infernalaura
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Is there any change I need to make for the latest patch work cause it seem like I still have that ? Icon for my Maul Toggle.

Edit : Actually nevermind you made an error in the upload. You uploaded Select 1.0.6 instead of SpellToggle.
Last edited by infernalaura : 06-04-15 at 04:27 PM.
Report comment to moderator  
Reply With Quote
Unread 06-03-15, 05:59 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by infernalaura
Hmmm it's the only thing I use this as a toggle for many many other macro that I don't bother too much about the icon.

I have a Macro that goes

/cast Mangle
/click Maul:Cast

for Lacerate, Thrash etc...

The idea is when I know I will have alot of rage I right click the Toggle and then spam my other button to use Maul every 3 sec when I am starving then I right click it again so it stop. The "problem" is before WoD I would right click it would show Maul icon telling me it's on ... and when It wasn't on it was the ? icon and it was reliable but now I can't really check this I have to remember if I pressed it or not. If I forgot then I have to tap it a few time for the addon to tell me in chat if it's on or not.

In all honesty this is a silly example the real purpose of the macro is an On/Off Switch I have a Dominos bar next to my TMW Icon that is lock and big enough with only this macro on. I am using Clique to make a custom macro when I press Shift+F that does the /click Maul:Toggle. It's mainly a display for me to know when it's on or off so I don't try and spam my active mitigation again Maul really.
That's fine. I'll try to think of some solutions. I fear this won't be a quick fix unfortunately.

edit: I've isolated the problem to being if a SetMacroSpell is ever cleared (set to "" or a spell you don't know), then the client will cease to respect the spell set to the macro even after further SetMacroSpells set it to a proper value.

So the problem will occur for spell toggles of only one spell, and for spells that you cease to know (changing spec and then toggling to a spell you don't know).

The temporary fix going up tonight will replace the red ? icon for the "Armor Skills" icon. I'll post a bug report on the official bug forum and pray it's fixed.
Last edited by Gello : 06-03-15 at 09:13 PM.
Report comment to moderator  
Reply With Quote
Unread 06-03-15, 04:31 PM  
infernalaura
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Hmmm it's the only thing I use this as a toggle for many many other macro that I don't bother too much about the icon.

I have a Macro that goes

/cast Mangle
/click Maul:Cast

for Lacerate, Thrash etc...

The idea is when I know I will have alot of rage I right click the Toggle and then spam my other button to use Maul every 3 sec when I am starving then I right click it again so it stop. The "problem" is before WoD I would right click it would show Maul icon telling me it's on ... and when It wasn't on it was the ? icon and it was reliable but now I can't really check this I have to remember if I pressed it or not. If I forgot then I have to tap it a few time for the addon to tell me in chat if it's on or not.

In all honesty this is a silly example the real purpose of the macro is an On/Off Switch I have a Dominos bar next to my TMW Icon that is lock and big enough with only this macro on. I am using Clique to make a custom macro when I press Shift+F that does the /click Maul:Toggle. It's mainly a display for me to know when it's on or off so I don't try and spam my active mitigation again Maul really.
Last edited by infernalaura : 06-03-15 at 05:49 PM.
Report comment to moderator  
Reply With Quote
Unread 06-03-15, 03:15 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by infernalaura
Well sorry for the delay I was trying without some addon that modify my action bar and what not.

Code:
/click [button:2] Maul:Toggle
/click Maul:Cast
This is the Macro with the default Icon.

and the Spell Toggle is the First Spell being Empty and the Second spell being Maul.
That wasn't a delay that was an instant response, thanks! Looking into it now.

edit: I'm able to reproduce this and I know the cause. When you incarnate the client is updating all actionbar buttons and it's trying to be helpful and updating the maul macro but it's not respecting the spell set onto the macro.

Can you post the rest of the macro? Or does the macro have only those two lines?

I ask because I think the best fix is to choose another spell to be the macro's icon, probably something else in the macro. I'm assuming this is something you toggle on when out soloing, and it's tied with other spells? If you use #showtooltip and there's a /cast in the macro, then this addon ceases to touch the icon and the client will take control.

I can do a refresh of macro icons when buffs change but imho the cure would be worse than the symptom. Its processing time to handle this issue would eclipse all other functions of the addon by several orders of magnitude.
Last edited by Gello : 06-03-15 at 04:08 PM.
Report comment to moderator  
Reply With Quote
Unread 06-03-15, 03:11 PM  
infernalaura
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Well sorry for the delay I was trying without some addon that modify my action bar and what not.

Code:
/click [button:2] Maul:Toggle
/click Maul:Cast
This is the Macro with the default Icon.

and the Spell Toggle is the First Spell being Empty and the Second spell being Maul.
Report comment to moderator  
Reply With Quote
Unread 06-03-15, 02:57 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by infernalaura
I am using this addon alot on my druid for Bear form on a toggle for Maul. The problem is after Shapeshifting or using Incarnation the icon lose it's texture and become the default interogation mark.
Can you post the macro? I'm not able to reproduce this with a feral spec and shred going in/out of incarnation. If you post the macro I can switch to guardian and try it. But since it's been many years since I've played a druid (looked back and forth through spellbook like 8 times before realizing maul is a guardian-only spell lol) I'm not exactly sure what I should be looking for.

edit: I thought this was the thread for Select woops. I'm still not sure exactly what's involved. Is something toggling with Maul or is it just a toggle with Maul only (to turn off and on)?

If you have #showtooltip and another /cast in your macro then Spell Toggle should not touch the macro icon.
Last edited by Gello : 06-03-15 at 03:02 PM.
Report comment to moderator  
Reply With Quote
Unread 06-01-15, 07:58 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by infernalaura
I was wondering if you were still working on this addon and if you do if there is a way to resolve the icon Texture of Macro after shapeshift.

I am using this addon alot on my druid for Bear form on a toggle for Maul. The problem is after Shapeshifting or using Incarnation the icon lose it's texture and become the default interogation mark.

It's a little bit of an issue cause I have a button on my bar that when I have maul on should display the maul icon and when it's off it should be the interogation mark.
I didn't know it was an issue, thanks for bringing it up. I'll take a look at it this week with my druid.
Report comment to moderator  
Reply With Quote
Unread 06-01-15, 05:32 PM  
infernalaura
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
I was wondering if you were still working on this addon and if you do if there is a way to resolve the icon Texture of Macro after shapeshift.

I am using this addon alot on my druid for Bear form on a toggle for Maul. The problem is after Shapeshifting or using Incarnation the icon lose it's texture and become the default interogation mark.

It's a little bit of an issue cause I have a button on my bar that when I have maul on should display the maul icon and when it's off it should be the interogation mark.
Report comment to moderator  
Reply With Quote
Unread 03-05-15, 03:19 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
Originally Posted by kaiden
Is there a way to Toggle Macros? I dont think the addon supports it but would it be a feature that would be possible?
No macros, sorry.

If/when Blizzard ever gives us SetMacroIcon then I'll look into it.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: