Macro Item Links

Macro Item Links

Example syntax for creating a trade chat macro with an item link:

/run SendChatMessage(format("WTS %s (226) 725k ",select(2,GetItemInfo("item:183010:0:0:0:0:0:0:0:0:0:0:0:4:7187:6652:1498:6646"))),CHANNEL,nil,GetChannelName("Trade - City"))

Format() #

-- Input:
/run SendChatMessage(format("This is a %s", "Test"), "Party")

-- Output:
"This is a Test"
  • :::lua format(".. %s ..", "text") - basic text replacement with %s being replaced by text.

GetItemInfo() #

GetItemInfo(itemID or "itemString" or "itemName" or "itemLink") = itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice

  • itemID - numeric ID of the item. e.g. 12345
  • "itemString" - full item ID enclosed in quotes, e.g. "item:183010:0"
    • partial item strings automatically fill any missing values with 0
  • "itemName"
  • itemLink : - from shift-clicking items

Select() #

:::lua select(2, ..) returns the second value from a list of values.