WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Target of Target is Myself (https://www.wowinterface.com/forums/showthread.php?t=43642)

Makakoa 07-04-12 11:12 PM

Target of Target is Myself
 
Hello All,

I need help with a macro. I'd like it to use an ability if the target of my target is myself, or a different ability if the target of my target is another player.

I was trying something like this where I was the focus target:

#showtooltip
/cast [@targettarget,focus] Ability1, [@targettarget,help] Ability2

Thanks in advance for any help!

Makakoa

Dridzt 07-05-12 06:17 AM

You can check for valid unitids

I don't have WoW atm but something like this might work.

Code:

/cast [@target,targettarget=player] Spell1; [@target,party][@target,raid] Spell2
This "should" cast spell1 on your target if the target of target is yourself (player) and spell2 on your target if that target belongs to your party or raid.

Haleth 07-05-12 06:24 AM

Deleted my previous post because it's wrong. What Dridzt says is mostly correct, except 'player' should be 'self'.

http://www.wowwiki.com/MACRO_cast

Foxlit 07-05-12 07:35 AM

There is no way to check whether two units are actually the same unit with secure code, including macro conditionals. More specifically, you cannot choose which spell to cast based on whether your target's target is you or some other friendly player.

Quote:

Originally Posted by Haleth (Post 257675)
Deleted my previous post because it's wrong. What Dridzt says is mostly correct, except 'player' should be 'self'.

http://www.wowwiki.com/MACRO_cast

The Wowwiki page is blatantly wrong as far as "self" is concerned. You're also falling into the trap of thinking that target= implies unit comparison, rather than simply setting which unit the conditional operates on. [On a tangent, that's a slight benefit of the @unit syntax: it's more difficult to misread in this way.]

WoWWiki UI articles are generally not actively updated since the WoWWiki/Wowpedia split. In this case, the relevant wowpedia page is http://www.wowpedia.org/MACRO_cast , which removes some of the inaccuracies and subtleties that confused you so. Please consider linking to Wowpedia rather than WoWWiki in the future.

Haleth 07-05-12 07:49 AM

Hm, my bad there. My first post was actually right, but I decided to check to make sure :rolleyes:


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

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