Thread Tools Display Modes
07-07-07, 08:20 AM   #1
Balsta
Guest
Posts: n/a
Need Assistance with a complex macro.

I have been been trying to figure out how to pull the raid target icon info from a mob.
eg you can pull target info with %t and info on your focus with %f.

The reason I am asking is I use a macro for shackles and use the %f in the announce part of the macro. which is fine but it doesn't really help people to know who I am shackling in a group of mobs with all the same name. I also will switch targets after mine is down to assist with a trap etc.

Code:
/script smsg="<<<Shackling  %f You Break it you take it!>>>"; if (GetNumRaidMembers() > 0) then SendChatMessage(smsg,"RAID") elseif (GetNumPartyMembers() > 0) then SendChatMessage(smsg,"PARTY") end
/cast [target=focus] Shackle Undead(Rank 3)
What I would like to happen in chat is <<<Shackling "raidicon" you break it you take it!>>

I hope all that mubbling made sense.

Any ideas?

Thanks for your time and effort.
  Reply With Quote
07-08-07, 10:56 PM   #2
Balsta
Guest
Posts: n/a
Is this even possible guys?
  Reply With Quote
07-09-07, 12:46 AM   #3
Gemini_II
A Molten Giant
 
Gemini_II's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 762
I went browsing through the API's list of UnitID's and I couldn't find anything.

I don't think Blizz has given us this ability yet, but I think it would be a good one. Unless someone updates and educates us, I'd suggest posting in the official Macros & UI Forum requesting it.
__________________
Retired prior to 3.2, before all challenge was removed.

  Reply With Quote
07-09-07, 08:44 AM   #4
Balsta
Guest
Posts: n/a
Thank you for your time and I will go do that today.
  Reply With Quote
07-09-07, 01:40 PM   #5
chriswa
A Murloc Raider
 
chriswa's Avatar
Join Date: Jul 2007
Posts: 4
I think this is what you're looking for:
http://www.wowwiki.com/API_GetRaidTargetIndex
  Reply With Quote
07-09-07, 05:32 PM   #6
chriswa
A Murloc Raider
 
chriswa's Avatar
Join Date: Jul 2007
Posts: 4
Yep, this works perfectly.
/script ri={'Star','Circle','Diamond','Triangle','Moon','Square','X','Skull','Unmarked'} DEFAULT_CHAT_FRAME:AddMessage(ri[GetRaidTargetIndex("raid1") or 9])

Something like this maybe?
/script ri={'Star','Circle','Diamond','Triangle','Moon','Square','X','Skull'};smsg="<<<Sheeping "..(ri[GetRaidTargetIndex('focus')] or UnitName('focus')).." You Break it you take it!>>>"; if (GetNumRaidMembers() > 0) then SendChatMessage(smsg,"RAID") elseif (GetNumPartyMembers() > 0) then SendChatMessage(smsg,"PARTY") end
/cast [target=focus] Shackle Undead(Rank 3)

Last edited by chriswa : 07-09-07 at 09:16 PM.
  Reply With Quote
07-09-07, 11:39 PM   #7
Balsta
Guest
Posts: n/a
Finaly got it to work. This needs a focus target to function.


/cast [target=focus,]Shackle Undead
/run local g,r="PARTY",{"STAR","CIRCLE","DIAMOND","TRIANGLE","MOON","SQUARE","CROSS","SKULL"} if GetNumRaidMembers()>0 then g="RAID" end SendChatMessage("SHACKLING.."..r[GetRaidTargetIndex("focus")],g)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need Assistance with a complex macro.


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