If focus is dead/missing, set focus to mouseover

Hi. I’m trying to make a macro that does this:

  • if focus exists and is alive, do nothing
  • otherwise, if my mouseover is alive and harm, set that as my focus
  • my current target should not change when pressing the macro

I tried this:

/focus [@focus,harm,nodead][@mouseover,harm,nodead]

But it doesn’t work. It changes my focus to target, even if I have an existing focus

I also tried this:

/target [@mouseover,harm,nodead]
/focus [@focus,dead][@focus,noexists][@focus,noharm]
/targetlasttarget [@mouseover,harm,nodead]

It almost works… but if my mouseover is my current target, it will change my target, which I don’t want. I want my target to remain the same after pressing the macro

I finally tried this:

/cleartarget
/focus [@focus,harm,nodead][@mouseover,harm,nodead]
/targetlasttarget

I could have sworn it worked. But after reloading the game, I am seeing the focus change to my current target, even if I already have a focus

Is there any way to do this?

/stopmacro [@focus,exists,nodead]
/focus [@mouseover,harm,nodead]
1 Like

Been playing for years and never knew about stopmacro. This does the job perfectly. Thanks!