Conditional remaining health macro

Hello,

As a Brewmaster monk, I would like to make the “Touch of death” spell only usable if my target has less remaining health than my maximum health.

I’ve been digging a little bit and it seems that I can make the condition easily with LUA code, however I cannot cast a spell with LUA code (protected function).

So I have two questions :
Is it possible to have a conditional macro using LUA condition followed by a macro action ?
Something like
/run if UnitHealthMax(“player”) > UnitHealth(“target”) then /cast Touch of death

Or is it possible to check [UnitHealthMax(“player”) > UnitHealth(“target”)] only using basic macro language ?
Something like
/cast [unithealthmaxplayer > unithealthtarget] Touch of death

Of course, any other suggestion is welcome !

Thanks for your help,

Kind regards

Not possible.

No, macros cannot make decisions and execute them for you.

Make a weakaura icon that pops up or plays a sound when something has less health than you. You’ll know to use it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.