/2 – Linking Items in Macros

Using trade chat is worthy of a blog post of its own, if not multiple. However I thought today I would share a quick tip with you on how to link items in macros.

This actually came up in the IRC when debussy asked if there was a way to do this.

You see, while you can copy and paste links, you can’t make a chat link in a macro by shift+clicking it into the macro text box. Instead we use a small script to have the macro link the items for us.

First before showing how you do it, I want to explain that while it might look confusing it really isn’t! Will explain it as simply as I can however.

All of the macros shown need to be on a single line – the website is just putting them on to two, you shouldn’t! If you copy and paste them they should still be on one line and work however.

/run SendChatMessage("TEXT1 "..(select(2,GetItemInfo(ITEMID))).." TEXT2","channel",nil,CHANNEL)

The things in bold are what you need to edit. Replace TEXT1 with what you want before the item link, such as WTB and then change the ITEMID to the item id of the item you want to link. Finally CHANNEL is the channel number you wish to link to (normally 2, for trade chat) and TEXT2 is any text you want after the item link.

So if we wanted to say “WTB [Netherweave Cloth] 3g a stack!” in trade we would use

/run SendChatMessage("WTB "..(select(2,GetItemInfo(21877))).." 3g a stack!","channel",nil,2)

You can find the itemid of any item in game by searching for it in Wowhead and looking at the url.

Finding an Itemid

Finding an Itemid (click to enlarge)

Linking more than one item in the same line

To link more than one item in the same line is fairly simple, although it does make things a tiny bit more confusing. To do it you simply need to add another ..select(2,GetItemInfo(ITEMID)).. after the first.

So if we wanted to say “WTB [Adder's Tongue][Icethorn][Lichbloom] 20g a stack!” we would use

/run SendChatMessage("WTB "..select(2,GetItemInfo(36903))..select(2,GetItemInfo(36906))..select(2,GetItemInfo(36905)).." 20g a stack!","channel",nil,2)

Hopefully this will be helpful to you in your buying and selling in /2 !

Posted in /2, GuideComments (6)