Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(7 Kb)
Download
Updated: 06-23-15 07:49 AM
Pictures
File Info
Compatibility:
Fury of Hellfire (6.2)
Updated:06-23-15 07:49 AM
Created:08-11-13 03:13 PM
Downloads:1,083
Favorites:30
MD5:
6.2

Spell Toggle

Version: 1.0.7
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.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)


Archived Files (7)
File Name
Version
Size
Author
Date
1.0.6
7kB
Gello
06-04-15 04:37 PM
1.0.6
19kB
Gello
06-03-15 09:17 PM
1.0.5
7kB
Gello
02-24-15 06:12 AM
1.0.4
7kB
Gello
10-14-14 06:31 AM
1.0.2
7kB
Gello
09-14-13 06:32 PM
1.0.1
6kB
Gello
09-11-13 10:01 AM
1.0.0
6kB
Gello
08-11-13 03:13 PM


Post A Reply Comment Options
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.
infernalaura is offline Report comment to moderator  
Reply With Quote
Unread 06-04-15, 04:33 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline 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.
infernalaura is offline Report comment to moderator  
Reply With Quote
Unread 06-03-15, 05:59 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline 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.
infernalaura is offline Report comment to moderator  
Reply With Quote
Unread 06-03-15, 03:15 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline 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.
infernalaura is offline Report comment to moderator  
Reply With Quote
Unread 06-03-15, 02:57 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline Report comment to moderator  
Reply With Quote
Unread 06-01-15, 07:58 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline 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.
infernalaura is offline Report comment to moderator  
Reply With Quote
Unread 03-05-15, 03:19 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
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.
Gello is offline Report comment to moderator  
Reply With Quote
Unread 03-05-15, 03:04 PM  
kaiden
A Murloc Raider
 
kaiden's Avatar

Forum posts: 5
File comments: 29
Uploads: 0
Is there a way to Toggle Macros? I dont think the addon supports it but would it be a feature that would be possible?
kaiden is offline Report comment to moderator  
Reply With Quote
Unread 09-16-13, 03:09 PM  
Enkidu
A Kobold Labourer

Forum posts: 0
File comments: 57
Uploads: 0
This is perfect, thank you!
Enkidu is offline Report comment to moderator  
Reply With Quote
Unread 09-14-13, 06:35 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
1.0.2 just posted has the ability to toggle one spell on/off as Enkidu suggested.

Any users of a previous version: if your macro icons are the red ? icon after updating, remove the #show or #showtooltip in your macro if you want this addon to handle the icon changing. For some uses it's preferable that this addon not mess with a macro's icon (like when the toggle spell is a cooldown to be turned on/off). Starting with this update if a macro begins with a #show/#showtooltip and the macro also contains a /cast, this addon will cease to mess with the icon.
Gello is offline Report comment to moderator  
Reply With Quote
Unread 09-12-13, 03:24 PM  
Gello
A Scalebane Royal Guard
AddOn Author - Click to view AddOns

Forum posts: 446
File comments: 399
Uploads: 106
Re: Sweeping Strikes.

Originally Posted by Enkidu
Is it possible to make a global toggle for Sweeping Strikes using this mod?
I would like to hit a button that 'binds' Sweeping Strikes to any consequent button press until I hit it again, to maintain it up the whole time.
Is this possible with the mod currently? Could the mod be changed to support it?

Could be much more convenient than paging and having pages over pages of macros.

Thank you!
That could be useful and it wouldn't be too tough. I can make "nothing" be an option. It would be useful for like tying bloodbath or other cooldowns to rotation abilities when out soloing, and turning them off for raid bosses.

It can "sort of" support it now, only the UI won't save a toggle until you have two spells defined. In the meantime if you want to play around with it, copy this to chat:

/run PickupSpell(76268)

(if you're a warrior this is the armor skill passive ability--other classes or low levels will need to pickup another passive) and drop it in one of the two spell slots, then sweeping strikes in the other.

The annoying bit is the icon will reflect the current toggle spell: sweeping strikes or amor skills. I'll make this addon not attempt icon changes if there's a #show/#showtooltip in the macro.

It's a nice suggestion thanks! No guarantees but I'll try and find time to make the changes this weekend.
Gello is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: