well there is 2 ways i knwo that there is a 3 way were you dont lose target (good for rogues) well i'll post those two and keep looking for the last one but you can go use those for now ;)
D O W N L O A D M O D :
BandAid Mod This addon makes a new script command for macro useage. The syntax is as follows:
/script BandAid("bandage");
This searches your inventory for a bandage (in order of weakest to strongest) and applies it to your target (if friendly) or yourself (if not).
/script BandAid("potion");
This searches your inventory for a potion (in order of weakest to strongest) and gives it to your target (if friendly) or yourself (if not).
M A C R O :
you will lose combo points on this one
/target Yourname
/script UseContainerItem(bag,slot)
/script TargetLastEnemy()
you don't lose combo points on this one but If you have a friendly unit as your target when you run this, you'll accidentally bandage that unit instead of yourself
/script UseContainerItem(bag,slot);
/script if( SpellIsTargeting() ) then TargetUnit("player"); end
B A G L A Y O U T The first number indicates wich bag the second number indicates what slot in the bag.
Bag Number (#,6)
(4) (3) (2) (1) (0) <---Backpack
Slot Number
BackPack
(1) (2) (3) (4)
(5) (6) (7) (8)
(9) (10)(11)(12)
(13)(14)(15)(16)
6 Slot
(1) (2)
(3) (4) (5) (6)
8 Slot
(1) (2) (3) (4)
(5) (6) (7) (8)
10 Slot
(1) (2)
(3) (4) (5) (6)
(7) (8) (9) (10)
12 Slot
(1) (2) (3) (4)
(5) (6) (7) (8)
(9) (10)(11)(12)
14 Slot
(1) (2)
(3) (4) (5) (6)
(7) (8) (9) (10)
(11)(12)(13)(14)
16 Slot (same as backpack)
(1) (2) (3) (4)
(5) (6) (7) (8)
(9) (10)(11)(12)
(13)(14)(15)(16)
Edit: the link works now ;)
Edit: Found the last macro (dont lose combo points
Edit: added the bad layout, so you dont get confused ;)
Edited, Fri May 20 06:13:31 2005 by Zyprezz