Simple Focus Target Macro, need help!

I’m trying to recreate some functionality I once had with a very easy focus macro. All this does is create or remove the focus; it won’t do any other actions.

X is an NPC I want to focus. Here are the things I want to do when I press this button:

  1. If I’m targeting X and I have no focus, make X my focus

  2. If I’m targeting X and X is already my focus, clear focus

  3. If I’m targeting another NPC besides X, and X is my focus, automatically target my focus (X)

  4. If I’m targeting nothing, and X is my focus, automatically target my focus (X)

Is such a thing possible, WITHOUT using modifiers (shift/alt/ctrl)?

Can’t do #2 & 3. You can only test if your focus is an enemy or ally. You can’t test if it’s a specific unit, this includes testing if your target is your focus.

/focus [@focus,noexists]
/target [@focus]

Dang… okay, thank you! :slight_smile: