Simple target & attack macro

allphuctup

New member
Joined
Jul 21, 2011
Messages
42
Reaction score
0
Points
0
Can someone please make/show me how to make a very simple macro that would target the nearest NPC and attack. The macro would end once no more mobs were on extended target/aggro. No sticking/moving or anything, just target nearest and /attack on.

Thanks.
 
Can someone please make/show me how to make a very simple macro that would target the nearest NPC and attack. The macro would end once no more mobs were on extended target/aggro. No sticking/moving or anything, just target nearest and /attack on.

Thanks.
Code:
Sub Main
:loop
/if (!${Me.XTarget}) {
  /squelch /target clear
  /echo No more XTargets, ending macro.
  /end
}
/if (${Target.ID}) /goto :loop
/target npc radius 100
/delay 3s ${Target.ID}
/attack on
/goto :loop
/return

I think that'd probably work. Untested!

htw
 
EDIT: Spoke too soon. Works 'almost' perfectly. About 1/3 of the time, it's targeting the corpse of the mob i just killed. Can you add a clear target if it's a corpse?
 
Last edited:
EDIT: Spoke too soon. Works 'almost' perfectly. About 1/3 of the time, it's targeting the corpse of the mob i just killed. Can you add a clear target if it's a corpse?
Maybe try:

Code:
Sub Main 
:loop 
/if (!${Me.XTarget}) {   
  /squelch 
  /target clear   
  /echo No more XTargets, ending macro.   
  /end 
} 
/if (${Target.ID}) /goto :loop 
/delay 1s
/target id ${Me.XTarget[1].ID} 
/delay 3s ${Target.ID} 
/attack on 
/goto :loop 
/return

htw