If it's a spell that's not available until certain conditions are met {examples - Templar's Verdict can only be used with 3 holy power, Hammer of Wrath can't be used unless the target is 25% HP or less} you can just add it in as a priority or step and the game won't be able to cast it if it's not available.
For spells with a cast time that proc instant like Lava Burst and Mind Spike, you can use a stopcasting macro as a step or priority.
Code:
/stopcasting
/cast Lava burst
But as they say, "macros can't make decisions for you". You can't create a macro, addon or button that will only do X if Y buff/debuff/etc occurs.
Connect With Us