All chat commands that send custom text to other players (for example, /yell, /csay, /emote, /raid) may make use of the following patterns to insert unit names or raid icons into the message.

These codes work in normal chat, in macros, and with the SendChatMessage function, and are not case-sensitive.

Available substitutions

  • %f - Inserts the name of the current focus target. Inserts <no focus> if applicable.
  • %n, %t - Inserts the name of the current target, e.g. "Sheeping %t!". Inserts <no target> if nothing is targeted.
  • {texture} - Inserts one of the eight target markers:
    • {star}, {rt1} - IconSmall RaidStar.png
    • {circle}, {rt2} - IconSmall RaidCircle.png
    • {diamond}, {rt3} - IconSmall RaidDiamond.png
    • {triangle}, {rt4} - IconSmall RaidTriangle.png
    • {moon}, {rt5} - IconSmall RaidMoon.png
    • {square}, {rt6} - IconSmall RaidSquare.png
    • {cross}, {rt7} - IconSmall RaidCross.png
    • {skull}, {rt8} - IconSmall RaidSkull.png
Note that the raid target markup names (star, circle, diamond, etc.) are localized, so {star} for example will not be replaced by the star texture on a german client. The {rtX}-style markup works on all clients.