WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Ally / Enemy Keybindings (https://www.wowinterface.com/forums/showthread.php?t=38727)

19logan91 02-03-11 04:49 PM

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

Nobgul 02-03-11 05:32 PM

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

19logan91 02-03-11 05:57 PM

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 :D 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 :)

19logan91 02-03-11 06:08 PM

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 :D

Seerah 02-03-11 08:03 PM

Quote:

Originally Posted by 19logan91 (Post 228558)
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.

Quote:

Originally Posted by 19logan91 (Post 228560)
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. :)

Taryble 02-03-11 08:07 PM

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).

19logan91 02-03-11 10:51 PM

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.

Taryble 02-04-11 07:47 AM

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


Jigain 02-04-11 08:40 AM

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.

19logan91 02-05-11 12:13 AM

i always have that unchecked :)


All times are GMT -6. The time now is 08:32 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI