From time to time I have the need to link an item or achievement in a macro, sadly the built in macro builder doesn't allow you to simply type in the macro and "shift/click" the item into the macro like you can when typing a message (why Blizz stop this only they know).
There are longwinded ways I have seen on other blogs but recently I discovered an easy way to do it.
First you get the link from WoWhead. In this example I'll use the link to the Herald of the Titans achievement, http://www.wowhead.com/achievement=3316,
once on the site you need to click the "link" button and then copy the code from the "ingame link"
It comes out looking something like this (depending on the item):
Code:Now what you need from this is:
/script DEFAULT_CHAT_FRAME:AddMessage("\124cffffff00\124Hachievement:3316:"..UnitGUID("player")..":0:0:0:0:0:0:0:0\124h[Herald of the Titans]\124h\124r");
Code:That you add into:
\124cffffff00\124Hachievement:3316:"..UnitGUID("player")..":0:0:0:0:0:0:0:0\124h[Herald of the Titans]\124h\124r
Code:All of it inside the quotes and no extra quotes, and voila you got yourself a macro with item link
/run SendChatMessage("MESSAGE + ITEMLINK","CHANNEL",nil,2)
P.S.: "CHANNEL" MUST NOT BE CHANGED! (unless you want to post in Party, Raid, Guild)
For example:
Code:When used in game it looks like:
/run SendChatMessage("are a \\124cffffff00\\124Hachievement:3316:\"..UnitGUID(\"player\")..\":0:0:0:0:0:0:0:0\\124h[Herald of the Titans]\\124h\\124r seeking guild. If you'd like to join us visit http://ReExhumed.shivtr.com or /w me\",\"CHANNEL\",nil,2)
and get posted to /2 (Trade Chat). The last number "2" denotes the channel number you wish to post your message in so if you wanted to use General Chat (/1) the macro would become:
Code:"CHANNEL" can also be replaced with "PARTY", "RAID", "GUILD" and if you do that, you also need to remove ",nil,2")
/run SendChatMessage("are a \\124cffffff00\\124Hachievement:3316:\"..UnitGUID(\"player\")..\":0:0:0:0:0:0:0:0\\124h[Herald of the Titans]\\124h\\124r seeking guild. If you'd like to join us visit http://ReExhumed.shivtr.com or /w me\",\"CHANNEL\",nil,1)
The only drawback with this method is the 255 character limit and if you're wanting to post multiple links the "long winded" method I mentioned earlier are a better solution. So if you need to do that I suggest you take a look at an article in the Power Word: Gold blog.
There are a million and one uses for such macros, so if you find this tip useful please comment below and tell me how you used it :)
0 comments: