Thread Tools Display Modes
07-04-12, 11:12 PM   #1
Makakoa
A Kobold Labourer
Join Date: Jul 2012
Posts: 1
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
  Reply With Quote
07-05-12, 06:17 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
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.

Last edited by Dridzt : 07-05-12 at 06:20 AM.
  Reply With Quote
07-05-12, 06:24 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
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
  Reply With Quote
07-05-12, 07:35 AM   #4
Foxlit
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 91
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.

Originally Posted by Haleth View Post
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.
__________________
... and you do get used to it, after a while.

Last edited by Foxlit : 07-05-12 at 07:52 AM.
  Reply With Quote
07-05-12, 07:49 AM   #5
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Hm, my bad there. My first post was actually right, but I decided to check to make sure
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Target of Target is Myself

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