I'm looking for a way to well, automate the autoattack. ;)
Let me explain it. This was basicly during the Nefarian phase 1 learning time. There are (were) so many targets and you have to switch these targets so fast, that more than often you use tab to select the next target.
Then, if you have selected a new target, your melee attack won't start automatically. You either have to rightclick the target, use an ability, use a macro with /cast Attack or /script AttackTarget();.
In the heat of the fight I often don't have the time to rightclick a target, neither do I want to assign a button just to start autoattack, and most times I do not have enough energy/rage to use an ability which would trigger autoattack, so therefore the only solution I saw was using a macro.
Yet the problem is that /cast Attack as well as /script AttackTarget(); is a *toggle*, meaning if you use it twice, it will *stop* autoattacking again.
Therefore a macro with these commands isn't viable, since hammering the backstab button will lose a signifcant amount of white damage due to the attack just stops.
I then came across the
IsAttacking addon.
It checks if you are already attacking a target and offers some script commands to start/stop attacking.
The macro I now use is
/script if (UnitMana("player")>59) then CastSpellByName("Backstab(Rank 9)") end; if (not IsAttacking()) then AttackOn(); end;
Basically it checks if I have enough energy to cast backstab, and if not, it checks if I am already actually attacking that target and if not, it triggers autoattack.
I works most of the times, but there are some times when just won't. It will execute the ability, but then it will simply stop autoattacking the target.
I suspect this behaviour is due to lag spikes and that the client doesn't recognize in time that I am attacking the target. Yet I am unsure on how to solve this issue.
What I would like to now, is anyone of you using a similar type of macro to automate the autoattack, and if yes, how does it look like?
Or how could I rewrite the macro so that such erroneous behaviour doesn't occur?