Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Public Discussion

Reply
 
LinkBack Thread Tools
Old 07/26/06, 8:26 AM   #1
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
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?


Offline
Reply With Quote
Old 07/26/06, 8:32 AM   #2
Falcon24
Soda Popinski
 
Goblin Mage
 
Mal'Ganis
Why not just use 't'? I'm pretty sure it is by default assigned to toggle auto-attack.

It's not automated but it's easier than waiting for a special/right clicking, and it's within easy reach of wasd.

United States Offline
Reply With Quote
Old 07/26/06, 8:32 AM   #3
Lactose
Don Lactose
 
Lactose's Avatar
 
Tauren Hunter
 
Talnivarr (EU)
I think you could place Auto Attack on a bar you're not showing, say page 4, slot 5 (each page has 12 slots, so slot 5 on page 4 would be slot 41), then do something similar to...

/script if (not IsActive(41)) then CastSpellByName("Auto Attack"); end

Can't remember the syntax, so might not work if you copy it directly :P

Look, Lactose, we'd rather you didn't eradicate the whole human race.
- Sam & Max

Offline
Reply With Quote
Old 07/26/06, 8:33 AM   #4
Lactose
Don Lactose
 
Lactose's Avatar
 
Tauren Hunter
 
Talnivarr (EU)
Because clicking T toggles Auto Attack off if it's active, making it non-spammable if what you want to do is start Auto Attack the moment something spawns.

Look, Lactose, we'd rather you didn't eradicate the whole human race.
- Sam & Max

Offline
Reply With Quote
Old 07/26/06, 8:35 AM   #5
Brissa
Not enough rage
 
Brissa's Avatar
 
Gnome Warrior
 
Argent Dawn (EU)
Im using a floater in DAB where i have put my attack command, I assign the floater whatever ID (for example 10) i want and hide it.
I then make my MS macro like this:
/script if (IsCurrentAction(10) == nill) then AttackTarget(); end
/cast Mortal Strike(Rank 4)

This will check if button ID 10 is performing its function (attacking) and start autoattacking if it isnt.

Offline
Reply With Quote
Old 07/26/06, 8:45 AM   #6
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
/script if (IsCurrentAction(10) == nill) then AttackTarget(); end

I just tried this macro, yet it also toggles the autoattack. If autoattack is on, it will switch it off again if I use the same macro again.


***edit
Forget about this, first have to find the actual ID of this button. ;)


Offline
Reply With Quote
Old 07/26/06, 8:49 AM   #7
dreadnor
Von Kaiser
 
Murloc Warrior
 
Archimonde
Although I dont understand why, the following line does the job perfectly and you don't need to have auto attck on any of your bars.
/script if (not isCurrentAction(1)) then AttackTarget();end

Offline
Reply With Quote
Old 07/26/06, 8:54 AM   #8
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
Ok,
/script if (IsCurrentAction(13) == nil) then AttackTarget(); end
seems to work for me. Have to test it under raid conditions though.

Note that you have a typing error there, shouldn't it be nil instead of nill?


Although I dont understand why, the following line does the job perfectly and you don't need to have auto attck on any of your bars.
/script if (not isCurrentAction(1)) then AttackTarget();end
Doesn't work for me, it delivers
Error: [string "if (not isCurrentAction(1)) then AttackTarg..."]:1: attempt to call global `isCurrentAction' (a nil value)

Do you have autoattack bind to your 1st key? :)


Offline
Reply With Quote
Old 07/26/06, 9:19 AM   #9
Malan
Mike Tyson
 
Malan's Avatar
 
Malan
Tauren Shaman
 
No WoW Account
There's a mod called DefendYourself that will automatically engage AutoAttack whenever you have been attacked. You can just bind a macro to the on/off function to disengage it when you dont want that on. Its an intelligent mod and will ignore crowd controlled targets, neutral targets, can be set to ignore opposite faction, etc.

http://ui.worldofwar.net/ui.php?id=2388

United States Offline
Reply With Quote
Old 07/26/06, 9:26 AM   #10
Deathwing
Bald Bull
 
Deathwing's Avatar
 
Orc Warrior
 
Black Dragonflight
I've heard that DefendYourself can be a resource hog. And in times the OP specifically mentioned, like phase 1 nef, the only way to get the mob to attack you is to attack it...otherwise it's bee-lining for healers.

I use almost the same thing Brissa does. But instead of putting it on my MS/BT ability, I just use that first line and then assign the floater to my middle mouse button. I'm not 100% sure, but I think there' an added bonus that if you don't have a target and use this macro, it will select the closest enemy as well. Great for things like suppression room, where your FPS is so low you can't click target anyway.

Offline
Reply With Quote
Old 07/26/06, 9:28 AM   #11
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
Actually I used DefendYourself, about a year ago is that if I remember correctly.
Yet it will only start autoattack if you are attacked yourself, doesn't it?

Anyway, I will keep it in mind (does it still rotate yourself to face the enemy, or was that prohibited by Blizzard? ;)), incase the solution posted here doesn't work out for me.


Offline
Reply With Quote
Old 07/26/06, 11:12 AM   #12
kharen
Don Flamenco
 
Blood Elf Paladin
 
The Venture Co (EU)
if you use DUF, it has a flag that tracks whether autoattack is on:
/script if not DL_ATTACKING then AttackTarget() end

An equivalent if you use the regular unit frames is:
/script if not PlayerFrame.inCombat then AttackTarget() end

Offline
Reply With Quote
Old 07/26/06, 12:50 PM   #13
Kalman
Super Macho Man
 
Kalman's Avatar
 
<>
Orc Shaman
 
No WoW Account
Originally Posted by kharen
An equivalent if you use the regular unit frames is:
/script if not PlayerFrame.inCombat then AttackTarget() end
Fails to work on multi-target fights and boss fights where the player is always in combat.

The attack icon placed on an action slot,

if (not isCurrentAction(xx)) then UseAction(xx) technique is the best one I know of.

Melador> Incidentally, these last few pages are why people hate lawyers.
Viator> I really don't want to go all Kalman here.
Bury> Just imagine what the world would be like if you used your powers for good.

Clearly law school has done wonders for me.

United States Offline
Reply With Quote
Old 07/26/06, 1:23 PM   #14
roq
Piston Honda
 
Troll Rogue
 
Uther
Originally Posted by Kalman
Originally Posted by kharen
An equivalent if you use the regular unit frames is:
/script if not PlayerFrame.inCombat then AttackTarget() end
Fails to work on multi-target fights and boss fights where the player is always in combat.

The attack icon placed on an action slot,

if (not isCurrentAction(xx)) then UseAction(xx) technique is the best one I know of.
Yes this one works just fine. Kalman gave it to me a few weeks ago... and i have had no problems since.

Offline
Reply With Quote
Old 07/26/06, 1:26 PM   #15
Malan
Mike Tyson
 
Malan's Avatar
 
Malan
Tauren Shaman
 
No WoW Account
Originally Posted by sp00n
Actually I used DefendYourself, about a year ago is that if I remember correctly.
Yet it will only start autoattack if you are attacked yourself, doesn't it?

Anyway, I will keep it in mind (does it still rotate yourself to face the enemy, or was that prohibited by Blizzard? ;)), incase the solution posted here doesn't work out for me.
No it won't rotate you anymore, mods have no access to keybind calls for movement. And yah, it only starts attacking if you're being attacked yourself. Combine that with one of these scripts however to start attacking if not already doing so and you've got all your bases covered. Of course you'll still want to have access to the attack toggle so that you can stop auto attack manually.

United States Offline
Reply With Quote
Old 07/26/06, 1:53 PM   #16
kharen
Don Flamenco
 
Blood Elf Paladin
 
The Venture Co (EU)
Fails to work on multi-target fights and boss fights where the player is always in combat.
Always used to work fine for me (even in multi-target fights and bosses), although it's been a while since i used the default frames... (PlayerFrame.inCombat seemed to indicate whether autoattack was active, while UnitAffectingCombat worked to see if you were combat flagged or not). Always thought it was rather confusing that a flag called "inCombat" didn't actually tell you if you were in combat or not. Maybe they "fixed" it at some point...

But the IsCurrentAction version is guaranteed to work, so probably better to use that.

Personally, i just use the discord DL_ATTACKING flag, and have seperate keybinds for autoattack on and autoattack off, and it hasn't failed me ever (except when discord gets disabled after a patch and i forget to reenable it <_< )

Offline
Reply With Quote
Old 07/26/06, 1:58 PM   #17
dares
Von Kaiser
 
Dares
Blood Elf Paladin
 
No WoW Account
Pretty simple.

For Backstab...

/cast Backstab(Rank 9)
/script if not IsCurrentAction(x) then AttackTarget() end;

[where x is the location of your attack button]

For Sinister Strike/Riposte...

/script if (UnitMana("Player")>=10) and (IsUsableAction(y)) then CastSpellByName("Riposte");end
/script if (UnitMana("Player")>=40) then CastSpellByName("Sinister Strike(Rank 8"); end
/script if not IsCurrentAction(x) then AttackTarget() end;

[where y is the location of your Riposte button and x is the location of your attack button]

Offline
Reply With Quote
Old 07/26/06, 2:05 PM   #18
 Andeh
The Titleless
 
Goblin Rogue
 
Balnazzar
Dares posted the ideal macros for this. The SS one is perfect. The only issue with the Backstab one is that it fucks up Gouge->BS. I've tried to come up with some sort of logic check to get around this, but haven't thought of a good one. Basically you'll need to swap in your macro only while you raid.

United States Offline
Reply With Quote
Old 07/26/06, 2:08 PM   #19
dares
Von Kaiser
 
Dares
Blood Elf Paladin
 
No WoW Account
Absolutely.

I wouldn't use the Backstab one if you're pvping and have a tendency to mash your Backstab button because it will turn on your auto-attack and break Gouge.

Offline
Reply With Quote
Old 07/26/06, 2:16 PM   #20
Mist
Don Flamenco
 
Blood Elf Paladin
 
Shattered Hand
Originally Posted by dares
Pretty simple.

For Backstab...

/cast Backstab(Rank 9)
/script if not IsCurrentAction(x) then AttackTarget() end;

[where x is the location of your attack button]

For Sinister Strike/Riposte...

/script if (UnitMana("Player")>=10) and (IsUsableAction(y)) then CastSpellByName("Riposte");end
/script if (UnitMana("Player")>=40) then CastSpellByName("Sinister Strike(Rank 8"); end
/script if not IsCurrentAction(x) then AttackTarget() end;

[where y is the location of your Riposte button and x is the location of your attack button]
I actually found a problem with this macro. If you're attacking a moving target in PvP, it'll turn on autoattack when you're not in range which screws up your swing timer and you then won't get the awesome Sinister Strike + Mainhand autoattack at the same instant when you finally do close the distance.

Offline
Reply With Quote
Old 07/26/06, 3:11 PM   #21
 Bluefish
not a scrub(?)
 
Bluefish's Avatar
 
Troll Shaman
 
Lethon
I used a macro to perform both Riposte and SS for a while, but swapped to having them separate after a couple untimely deaths caused by having them linked. Using separate buttons allows you to use Riposte to its greatest strategic advantage and also doesn't interfere with your CP generation. Certainly it's rare that you'd rather SS than Riposte, but it does happen and if you parried some random cleave your macro won't do it for you.

Also makes Riposte much more deadly in PvP when you can parry the Valor Warrior's IBS and tab over to the Spinal Reaper you know doesn't have a weapon chain... :)

Offline
Reply With Quote
Old 07/27/06, 4:07 AM   #22
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
/script if (IsCurrentAction(x) == nil) then AttackTarget(); end

Ok, tested yesterday during a full BWL run.
Didn't notice any autoattack stops, so it seems to work like a charm.


Dares posted the ideal macros for this. The SS one is perfect. The only issue with the Backstab one is that it fucks up Gouge->BS. I've tried to come up with some sort of logic check to get around this, but haven't thought of a good one. Basically you'll need to swap in your macro only while you raid.
Well, you get used to observe your energy while in PvP. Not that big of a problem.


Offline
Reply With Quote
Old 07/27/06, 7:24 AM   #23
dreadnor
Von Kaiser
 
Murloc Warrior
 
Archimonde
Originally Posted by sp00n
Ok,
/script if (IsCurrentAction(13) == nil) then AttackTarget(); end
seems to work for me. Have to test it under raid conditions though.

Note that you have a typing error there, shouldn't it be nil instead of nill?


Although I dont understand why, the following line does the job perfectly and you don't need to have auto attck on any of your bars.
/script if (not isCurrentAction(1)) then AttackTarget();end
Doesn't work for me, it delivers
Error: [string "if (not isCurrentAction(1)) then AttackTarg..."]:1: attempt to call global `isCurrentAction' (a nil value)

Do you have autoattack bind to your 1st key? :)
You need a capital "I" in isCurrentAction. So it should be :

/script if (not IsCurrentAction(1)) then AttackTarget();end


The idea here is that you save a slot on your bars since auto attack is in the hidden number 1 slot. And no, auto attack is not on any of my bars and this macro still works.

Offline
Reply With Quote
Old 07/27/06, 8:15 AM   #24
 sp00n
banned
 
Night Elf Rogue
 
Wrathbringer (EU)
This somehow confuses me.
I thought IsCurrentAction(x) is counting the buttons on the bars, beginning with 1.
1 being the first button of the first bar. One bar has 12 buttons, therefore 13 is the 1st button of the second bar, where I placed my attack icon.
And using (IsCurrentAction(13) == nil) works just fine, whereas (IsCurrentAction(10) == nil) did toggle the autoattack.

I just checked with /script if (not IsCurrentAction(1)) then AttackTarget();end
Toggles autoattack aswell for me. Tried with an empty button 1 and with sinister strike in button 1.
Placing the attack button in that slot works fine of course.

Whats in your first button in your first bar then?


Offline
Reply With Quote
Old 07/27/06, 8:32 AM   #25
dreadnor
Von Kaiser
 
Murloc Warrior
 
Archimonde
I'm a warrior so I have a different bar for each stance. I'm not sure which is considered number 1. In battle stance I have a macro in the first slot. In berserker stance I have Whirlwind in the first slot and in defensive stance I have shield block in the first slot.

Oh I just realized that you need to have auto attack in the number 1 slot of your "null stance" bar for this to work. Sorry for the confusion.

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Public Discussion

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning on autoattack nfw User Interface and AddOns 22 07/17/07 7:08 PM
Automatic Spell Redirection? Nezralix User Interface and AddOns 5 05/16/07 6:40 PM
Parry and autoattack sp00n Public Discussion 15 06/15/06 8:44 PM
Macro Fun KGBAgent185 Public Discussion 16 11/05/05 1:24 PM