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,356
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 08-12-13, 10:38 AM  
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1176
File comments: 26
Uploads: 6
Very awesome addon I've always wanted something like this for my paladin (hammer of the righteous/crusader strike)!
Report comment to moderator  
Reply With Quote
Unread 08-13-13, 12:40 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
WHHHHHHHHHHHHHHHHHHHHHHHHHAT. I like.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 08-15-13, 01:08 PM  
Elenya
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
This is sweet as! Nicely done
Report comment to moderator  
Reply With Quote
Unread 08-26-13, 05:17 PM  
Resike
A Pyroguard Emberseer
AddOn Author - Click to view AddOns

Forum posts: 1290
File comments: 246
Uploads: 12
This sounds awsome.
Report comment to moderator  
Reply With Quote
Unread 09-12-13, 08:18 AM  
Enkidu
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
Sweeping Strikes.

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!
Report comment to moderator  
Reply With Quote
Unread 09-12-13, 03:24 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
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.
Report comment to moderator  
Reply With Quote
Unread 09-14-13, 06:35 PM  
Gello
A Molten Giant
AddOn Author - Click to view AddOns

Forum posts: 521
File comments: 582
Uploads: 75
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.
Report comment to moderator  
Reply With Quote
Unread 09-16-13, 03:09 PM  
Enkidu
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
This is perfect, thank you!
Report comment to moderator  
Reply With Quote
Unread 03-05-15, 03:04 PM  
kaiden
A Murloc Raider
 
kaiden's Avatar

Forum posts: 7
File comments: 41
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?
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
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 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-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-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, 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
Post A Reply



Category Jump: