Macro to stop casting when <## Health

Macro to stop casting when <## Health

by Aeneren » Mon Aug 31, 2015 9:51 pm

Hello all,

Looking thru several sites for useful Macro's and got an idea from a Life Tap Macro i found.

My idea is to Have Warlock AOE Spell Hellfire be activated if Casters health is above certain ## (this i have working) now just need for said spell to turn off.. so far this is what i have if anyone can offer any advice or suggestions would appreciate it.

Code: Select all
/run if(UnitHealth("player") > 900) then CastSpellByName("Hellfire(Rank 3)") end


Thanks again if anyone has suggestion

Aeneren
60 Warlock
Clan Thunder
Aeneren
Tester
 

Re: Macro to stop casting when <## Health

by Geigerkind » Mon Aug 31, 2015 10:03 pm

You cant automatically abort the cast if you reach certain hp, but you can spam the button and make something like this:

Code: Select all
if (GLOBAL1 == nil) then GLOBAL1=GetTime()-1 end if GLOBAL1 >= GetTime() then SpellStopCasting(); GLOBAL1=GetTime()-1; else CM:Cast("Holy Light"); GLOBAL1 = GetTime()+2.5; end


This is my healing macro for example. It cancels the spellcast if you press it or casts it. Avoiding the some issues as well with it. But I hope you get how you can add mechanics like this to your macro.

To make it simple for your macro, you could do something like:

Code: Select all
/run if(UnitHealth("player") > 900) then CastSpellByName("Hellfire(Rank 3)") else SpellStopCasting() end


cheers
My Addons:
DPSMate - A combat analyzation tool (/viewtopic.php?f=63&t=38042)
Vanilla Consolidated Buff-Frames (/viewtopic.php?f=63&t=18189)
Modified Power Auras (/viewtopic.php?f=63&t=18251)
User avatar
Geigerkind
Senior Sergeant
Senior Sergeant
 

Re: Macro to stop casting when <## Health

by Aeneren » Mon Aug 31, 2015 10:25 pm

Thanks for the Reply...... tried the SpellStopCasting() and it didnt work, Hellfire took me all way down to 200hp

As my knowledge of writing Script is very limited could you break down your Healing script somehow and give a explination of its parts

Aeneren
Aeneren
Tester
 

Re: Macro to stop casting when <## Health

by Geigerkind » Mon Aug 31, 2015 10:31 pm

For the second macro: As I said it is not automatically. You have to spam click hellfire for this. You wont get being automatically.

The Idea behind the first macro is to have an efficient spellcast/Spellstop. Because if you just have an macro like:

Code: Select all
/Script SpellStopCast()
/cast Fireball


You will cast it right again if the global cooldown is finished. The first macro just adds a custom global cooldown to prevent this behavior.
My Addons:
DPSMate - A combat analyzation tool (/viewtopic.php?f=63&t=38042)
Vanilla Consolidated Buff-Frames (/viewtopic.php?f=63&t=18189)
Modified Power Auras (/viewtopic.php?f=63&t=18251)
User avatar
Geigerkind
Senior Sergeant
Senior Sergeant
 

Re: Macro to stop casting when <## Health

by Rhoen » Tue Sep 01, 2015 6:41 pm

thank you for the information, I need to try this out.
User avatar
Rhoen
Senior Sergeant
Senior Sergeant
 


Return to Addons & macros