Jump to content
Ike

[AddOn] CastModifier - TBC and above like Conditionals for /cast macros

Recommended Posts

Hi,

 

I would like to introduce you to my AddOn 'CastModifier', which allows you to use Conditionals inside your /cast macros. This allows you to write some fairly advanced macros in a very compact manner, without the need to learn Lua! Here are some examples:

 

 

 
In addition, this AddOn also allows you to use Conditionals inside your "/target" macros and adds the new "/petattack" chat command with full Conditionals support!
 

A list of every available Conditional, including its parameters, extra remarks, and a how-to-install tutorial can be found on the AddOn's Github page.

 

Github Page

 

 

 

I greatly appreciate any feedback and any ideas for additional features that may improve this AddOn!

 

Cheers,

Ike

Share this post


Link to post
Share on other sites

Excellent addon, i'm currently giving it a try.

 

One question though, i'm trying to do a mouseover taunt macro with appropriate stance switch.

 

How would i add a mouseover conditional to this macro (which works fine) : 

/cast [stance:2] Taunt;  Defensive Stance
Edited by Skipadawoop

Share this post


Link to post
Share on other sites

You just add @unitid into the brackets. In this case, @mouseover since you want to cast on your mouseover target.

/cast [stance:2 @mouseover] Taunt; Defensive Stance

You can read it as "When you are in stance 2, cast the following on your mouseover target: Taunt. Otherwise, cast Defensive Stance."

 

I'd go even a step further and add "harm" as well. This makes sure that there will be no error messages when your mouseover target isn't something you can attack, like a player.

/cast [stance:2 @mouseover harm] Taunt; Defensive Stance

When you are in stance 2 and your mouseover target is hostile, cast Taunt. Otherwise, cast Defensive Stance.

 

This should do the trick!

Share this post


Link to post
Share on other sites

You just add @unitid into the brackets. In this case, @mouseover since you want to cast on your mouseover target.

/cast [stance:2 @mouseover] Taunt; Defensive Stance

You can read it as "When you are in stance 2, cast the following on your mouseover target: Taunt. Otherwise, cast Defensive Stance."

 

I'd go even a step further and add "harm" as well. This makes sure that there will be no error messages when your mouseover target isn't something you can attack, like a player.

/cast [stance:2 @mouseover harm] Taunt; Defensive Stance

When you are in stance 2 and your mouseover target is hostile, cast Taunt. Otherwise, cast Defensive Stance.

 

This should do the trick!

 

Thanks ! 

By the way, would it be possible to do a macro to cast battle stance , charge, and cast defensive stance once it's done ? 

Share this post


Link to post
Share on other sites

I'm glad you guys are liking this Addon!

 

Thanks ! 

By the way, would it be possible to do a macro to cast battle stance , charge, and cast defensive stance once it's done ? 

/cast [combat stance:1] Defensive Stance; [stance:1] Charge; Battle Stance

Untested, but this should work. When in combat and in Battle Stance, switch to Defensive Stance. When not in combat and in Battle Stance, go ahead and Charge. If neither just go into Battle Stance.

Share this post


Link to post
Share on other sites

Yes, there is. It's not very pretty but it works:

/run if nil then CastSpellByName("Innervate") end

This enables cooldown and range tracking. Tooltips not so much, though, but I believe SuperMacro takes care of that. Just replace "Innervate" with your spell's name (and don't remove the "double quotes").

 

Edit:
Put this line at the beginning of your macro

Edited by Ike

Share this post


Link to post
Share on other sites

Is there a way to write conditionals for combat? My old macros don't work with this addon enabled so I need something to: 

 

/cast Freezing trap or if [player = incombat] cast feign death. 

 

I can't seem to get this to work.

 

Love the mouseover support though! Thank you

Share this post


Link to post
Share on other sites

Little update:

  • Fixed a bug that happened in conjunction with SuperMacro, where the entire Macro wouldn't be executed after the first line.
  • Fixed a bug that sometimes caused the wrong target to be re-targeted.

 

Make sure to re-download the Addon!

 

 

 

 

 



Thanks.

 

Also, is there a reason why spells with lower ranks in the macro can't be executed? not sure why

But you can!

/cast [myhp<30] Life Tap(rank 1) ; Life Tap

This one, for example, works just fine!

 

 



Is there a way to write conditionals for combat? My old macros don't work with this addon enabled so I need something to: 

 

/cast Freezing trap or if [player = incombat] cast feign death. 

 

I can't seem to get this to work.

 

Love the mouseover support though! Thank you

Check out the Documentation! There you'll find everything you need and then some!

/cast [combat] Feign Death; Freezing Trap

Share this post


Link to post
Share on other sites

No worries. I guess this is somewhat advanced to someone who's never done anything like this before. I'm glad to help, so don't be afraid to ask questions!

Share this post


Link to post
Share on other sites

Thanks for your help i appreciate it.

 

In regards to channeled spells, in this case for blizzard, it was possible in later expansions to make a macro to stop the big green circle from being toggled on and off while spamming, is this also possible? because i can't seem to get it to work with /cast !Blizzard

 

to be more precise, the reticle area is this https://streamable.com/dvvjq

 

Appreciate your time.

Edited by Melodyx

Share this post


Link to post
Share on other sites

Hmm... I am testing the @mouseover and it works fine but it does not work with Grid, although it is in the compatibility list. 

Share this post


Link to post
Share on other sites

So if I wanted to make a macro that would use Mortal Strike, and also use Heroic Strike if Rage is over 80, I would do:

 

/cast [mypower>80] Heroic Strike; Mortal Strike

Correct?

Edited by gotmilk0112

Share this post


Link to post
Share on other sites
14 hours ago, Rayaleith said:

Hmm... I am testing the @mouseover and it works fine but it does not work with Grid, although it is in the compatibility list. 

Thank you for reporting this bug! Should be fixed.

12 hours ago, gotmilk0112 said:

So if I wanted to make a macro that would use Mortal Strike, and also use Heroic Strike if Rage is over 80, I would do:

 

/cast [mypower>80] Heroic Strike; Mortal Strike

Correct?

 
 
 
 

Almost. You can read your macro as "If I have more than 80% rage, cast Heroic Strike. If I have less than that, cast Mortal Strike". So only one of the two will be cast. If you always want to cast Mortal Strike and additionally Heroic Strike, you'd need something like this:

/cast [mypower>80] Heroic Strike
/cast Mortal Strike

 

If I have more than 80% rage, cast Heroic Strike. Alway cast Mortal Strike

Edited by Ike

Share this post


Link to post
Share on other sites

hi! any chance to make with this addon spammable macro for shapeshift?

like in tbc

/cast [stance:1] Feral Charge

or

/cast !Bear Form

 

i bind Bear form to "mouse scroll down", Cat form to "mouse scroll up", and when server start lag, sometimes i scroll it twice, what takes me back to caster form :(

thank you.

Share this post


Link to post
Share on other sites

The easiest way to do this would be like this:

/cast [stance:0] Bear Form

This will cast Bear Form when you're not shapeshifted.

Edited by Ike
typo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×