Page 1 of 1

Macro to stop casting when <## Health

PostPosted: Mon Aug 31, 2015 9:51 pm
by Aeneren
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

Re: Macro to stop casting when <## Health

PostPosted: Mon Aug 31, 2015 10:03 pm
by Geigerkind
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

Re: Macro to stop casting when <## Health

PostPosted: Mon Aug 31, 2015 10:25 pm
by Aeneren
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

Re: Macro to stop casting when <## Health

PostPosted: Mon Aug 31, 2015 10:31 pm
by Geigerkind
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.

Re: Macro to stop casting when <## Health

PostPosted: Tue Sep 01, 2015 6:41 pm
by Rhoen
thank you for the information, I need to try this out.