Thread Tools Display Modes
02-03-11, 04:49 PM   #1
19logan91
A Deviate Faerie Dragon
 
19logan91's Avatar
Join Date: Jan 2011
Posts: 14
Question Ally / Enemy Keybindings

I was wondering if there was an addon or maybe just some way i don't know about that allows you to use the same key binding but it changes what it's used for for different targets.

For example i'll be playing my priest and want to cast smite on an enemy, so i press "1" and it casts smite. But when i target an ally and i press "1" it casts heal rather than smite because the ally is targeted rather than the enemy.

Is this a doable thing? it would be massively convenient. Currently my setup is alt1-5 for my main harmful spells but i'd rather be able to use the alt key for an easier layout out for helpful spells AND harmful.

Thanks for your help
-Logan
  Reply With Quote
02-03-11, 05:32 PM   #2
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Yes they are called conditionals. I can give you a quick example,
/cast [help] Renew; [harm] Shadow Word: Pain

Can also do mouseovers

/cast [@mouseover, help] Renew; [harm ] Shadow Word: Pain
__________________
[SIGPIC][/SIGPIC]

Last edited by Nobgul : 02-03-11 at 05:34 PM.
  Reply With Quote
02-03-11, 05:57 PM   #3
19logan91
A Deviate Faerie Dragon
 
19logan91's Avatar
Join Date: Jan 2011
Posts: 14
Thanks so much for the reply i was just about to post one saying i figured that out. Extremely convenient for me. here is the basic layout im using just in case anyone cares to copy me

Code:
#showtooltip [mod:alt] Heal; Smite
/cast [help] Heal; [harm] Smite
/stopmacro [harm]
/cast Heal
just the way i like it i added the switching tootips as well so you can see what the other spell does. not too important unless there's a cooldown but i like it
  Reply With Quote
02-03-11, 06:08 PM   #4
19logan91
A Deviate Faerie Dragon
 
19logan91's Avatar
Join Date: Jan 2011
Posts: 14
Haha sorry for the second response but i felt this could help some people.

Code:
#showtooltip [@target, help] heal; smite
the [@target, help] part makes it change to the friendly spell when a friendly unit is targeted. idk i liked it
  Reply With Quote
02-03-11, 08:03 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by 19logan91 View Post
Code:
/stopmacro [harm]
/cast Heal
These two lines are doing nothing for you. You already told the macro to cast Heal when you have a friendly target and Smite when you have a harmful one.

Originally Posted by 19logan91 View Post
Code:
#showtooltip [@target, help] heal; smite
And here, the [help] conditional refers to your target by default, so @target is redundant.

/edit: though you could just use #showtooltip by itself (no spell names) along with the ? icon and have the macro pick the icon for you automagically.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-03-11, 08:07 PM   #6
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Actually, it's the "help" part that's doing that - "@target" just means that it's checking your target, which is default behaviour.

In fact, this will work just as well, and use fewer characters.
Code:
#showtooltip
/cast [help] heal; smite
#showtooltip by itself shows the tooltip (and icon, if you used the ? icon) of whatever spell is going to be cast, based on conditionals and modifiers. In this case, target a friendly and it'll show "Heal", otherwise it'll show "Smite".

Also, as Seerah pointed out, the /stopcasting line and the one following it were completely redundant. This macro will do the same thing, but is quicker to type, easier to read, and uses fewer characters (not important for this macro, but can be important for more complex ones).
__________________
-- Taryble
  Reply With Quote
02-03-11, 10:51 PM   #7
19logan91
A Deviate Faerie Dragon
 
19logan91's Avatar
Join Date: Jan 2011
Posts: 14
Sorry i didnt explain better. Having
Code:
/stopmacro [harm]
/cast Heal
was totally a personal preference. It allows me to get that particular spell on the glowing cursor. It's just something i like to have. This way when i press that key with no target selected i have the option of where to place it.
  Reply With Quote
02-04-11, 07:47 AM   #8
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Then this should work just as well, actually - if you're not targetting something you can attack, it casts Heal on your target - if no target, it places the spell on the cursor.
Code:
#showtooltip
/cast [harm] Smite; Heal
__________________
-- Taryble
  Reply With Quote
02-04-11, 08:40 AM   #9
Jigain
A Molten Giant
 
Jigain's Avatar
Join Date: Jul 2009
Posts: 732
Of course, that's assuming Auto Self Cast isn't checked in the options. If that option is checked, whenever you try to cast a spell that requires a friendly target (like a buff or a heal) but your target is hostile or nonexistant, you cast it on yourself automatically.
__________________


  Reply With Quote
02-05-11, 12:13 AM   #10
19logan91
A Deviate Faerie Dragon
 
19logan91's Avatar
Join Date: Jan 2011
Posts: 14
i always have that unchecked
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Ally / Enemy Keybindings

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off