So I've been tinkering with how to add an item link into a macro so I didn't have to Shift-Click the item every time I wanted to spam the exact same text. And I found the answer (o'rly?)
First you get the link from WoWhead (or any other website that provides them):
It comes out looking something like this (depending on website and item):
Code:
/script DEFAULT_CHAT_FRAME:AddMessage("Shift-click this to place a link into a chat message: \124cffffffff\124Hitem:42780:0:0:0:0:0:0:0:0\124h[Relic of Ulduar]\124h\124r");
Now what you need from this is:
Code:
\124cffffffff\124Hitem:42780:0:0:0:0:0:0:0:0\124h[Relic of Ulduar]\124h\124r
That you add into:
Code:
/run SendChatMessage("MESSAGE + ITEMLINK","CHANNEL",nil,2)
All of it inside the quotes and no extra quotes, and voila you got yourself a macro with item link
P.S.: "CHANNEL" MUST NOT BE CHANGED! (unless you want to post in Party, Raid, Guilde etc.
A little example:
Code:
/run SendChatMessage("WTS 180x\124cffffffff\124Hitem:42780:0:0:0:0:0:0:0:0\124h[Relic of Ulduar]\124h\124r 2g each","CHANNEL",nil,2)
Would become:
"WTS 180x[Relic of Ulduar] 2g each" and be posted in trade chat
The last number "2" can be changed with any channel you'd want, and "CHANNEL" can be replaced with "PARTY", "RAID", "GUILD" and a lot of others (in which case you remove ",nil,2")
You can read more about "/run SendChatMessage" on WoWwiki
Sorry if its a repost, I searched in "UI & Macro Discussions" for "Item link" and found nothing (but I've always sucked at searching so what the heck :P)