I am trying to write a macro that will automatically target whatever my focus (the tank) has targeted. However, I also need it to allow me to switch targets to other mobs as necessary for misdirects or trash mobs the tank is not necessarily targeting. What I want is this: When I have no target it should automatically target the tanks target, but if I need to switch to something other than the tanks target, it should keep my new target until the mob is dead. I know many of you will say I should just tab target and forget about this type of macro. But sometimes in the heat of an encounter I have tabbed and pulled mobs unnecessarily.
This is what I have thus far:
/cast [harm]Cobra Shot
/cast Cobra Shot
This almost does what I want it to do. It does allow me to switch from the tanks target to whatever I choose to target myself, but only for one shot and then it goes straight back to the tanks target. I need it to stay on what I switch to until that mob is dead and then return to the “assist”. What do i need to add to the “/cast [harm]Cobra Shot” that will stay on my target until dead?