m
no edit summary
(Slightly faster and more precise itemString extraction function call and pattern) |
mNo edit summary |
||
| Line 5: | Line 5: | ||
In essence, they are [[itemString]]s with additional formatting to make in-game text controls display them as clickable hyperlinks. | In essence, they are [[itemString]]s with additional formatting to make in-game text controls display them as clickable hyperlinks. | ||
|cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0|h[Broken Fang]|h|r | |cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0:80:0|h[Broken Fang]|h|r | ||
Broken up in its components: | Broken up in its components: | ||
| Line 13: | Line 13: | ||
** The next three sets of two characters represent the red, green, and blue levels, just like HTML. | ** The next three sets of two characters represent the red, green, and blue levels, just like HTML. | ||
* <tt>"'''|H'''"</tt> – "Hyperlink link data starts here" | * <tt>"'''|H'''"</tt> – "Hyperlink link data starts here" | ||
* <tt>"'''item:7073:0:0:0:0:0:0:0'''"</tt> – Read more at [[itemString]]. | * <tt>"'''item:7073:0:0:0:0:0:0:0:0:0'''"</tt> – Read more at [[itemString]]. | ||
* <tt>"'''|h'''"</tt> – "End of link, text follows" | * <tt>"'''|h'''"</tt> – "End of link, text follows" | ||
* <tt>"'''[Broken Fang]'''"</tt> – The actual text displayed | * <tt>"'''[Broken Fang]'''"</tt> – The actual text displayed | ||
| Line 21: | Line 21: | ||
You can extract the itemString from a given itemLink with the following function: | You can extract the itemString from a given itemLink with the following function: | ||
local itemString = string.match(itemLink, " | local itemString = string.match(itemLink, "item[%-?%d:]+") | ||
Note: The format of the link is similar for enchant, spell and quest links, with merely the "itemstring" changing. See [[spellString]], [[enchantString]] and [[questString]] | Note: The format of the link is similar for enchant, spell and quest links, with merely the "itemstring" changing. See [[spellString]], [[enchantString]] and [[questString]] | ||