Guillotine
01-15-2006, 08:57 PM
Inside an Item Link
Difficulty: 2/5 (Novice Programmer)
Welcome to the world of the item link. As I’m sure you all know, an item link is a method in WoW used to send stats of an item to someone else. You can do it by opening a chat input box, and shift-clicking on an item or another item link. This week, GUI with GUIllotine will tell you about the underlying workings of the item link.
First, we should probably go through what is required to get the most out of this article:
1. A copy of WoW (obviously)
2. An item (you better have this)
3. The add-on “Iriel’s Devtools” (obtainable at http://www.wowguru.com/ui/74/devtools/ )
4. Basic knowledge of scripting in WoW
Now some of you may be asking yourselves what the point is of knowing this. Ya, it’s neat, but why would I want to spend the time to use this? The answer is rather simple. Many add-ons, including some extremely popular ones, use a very inefficient method of getting info about items called ‘tool tip-scanning’. While in some instances, this is needed, in others, simply analyzing the item link will be sufficient.
Item Links
Here is an example of an item link (I will be explaining it later):
|cff1eff00|Hitem:1465:803:0:0|h[Tigerbane]|h|r
How exactly is this put together?
|(hex code for item color)|Hitem:(item ID code):(enchant code):(added stats code):0|h[(item name)]|h|r
Hex code for item color: This is rather self-explanatory. It is the hex code for either grey, white, green, blue, purple, or orange (until something more than legendary comes along).
Item ID code: Each item has a unique Item ID code. The one for [Tigerbane] happens to be 1465. All items “of so-and-so” have the same code. For example, “” has the same item code as “[Buccaneer’s Tunic of the Owl]”. These are different, however, from “[Buccaneer’s Bracers of the Bear]” (as they are totally different items).
Enchant code: This is the code for a permanent enchant. Different enchantments have different codes. 803 is the code for Fiery Enchantment (ok, call me a twinker. It’s what you have to do now to survive in BGs. Not as bad as dual lifestealing on a level 19 though…) It seems that enchantments on different items, but with the same modifier have the same code. For example, +1 agility to cloak will have the same code as +1 agility to bracers.
Added stats code: This is the code for added stats (also known as “of the” modifiers). For example, “of the Gorilla” for +17 strength and intellect is code 1002. Because Tigerbane has no modifier, this part is left at 0.
Item name: This is (you guessed it….) the item name. It is a localized string, and the name of the item as we all know it.
[b]Enchantment Links
A new type of link has appeared with the release of patch 1.9. Let’s talk about the inner workings of this as well.
Here is an example of an enchant link:
|cffffffff|Henchant:20034|h[Enchant Weapon – Crusader]|h|r
The template is this:
|cffffffff|Henchant:(enchant id)|h[(enchant name)]|h|r
This one is pretty self-explanatory:
cfffffffff: the enchant link is always white
Enchant id: a unique id for each enchantment. 20034 is Crusader. Please note that this is not the same id as the one once it is put on an item.
Enchant name: If you can’t figure this out, you shouldn’t be reading this column.
So how do I use this?
There are many ways to use this. One example is Lootlink. Rather than indexing each individual link, it only indexes it by the name. This prevents different enchant id’s from being stored as totally separate items. But how do YOU use this? Enter Iriel’s devtools. Simply open up a chat box and type in:
/dump “[ItemLink]” to get the full item/enchant link. From there, you can do whatever you need to do.
Once you understand the inner-workings of an item-link, the possibilities are endless. You are limited only by your ingenuity.
Thank you for reading the first edition of GUI with GUIllotine and please check back next week for more.
Difficulty: 2/5 (Novice Programmer)
Welcome to the world of the item link. As I’m sure you all know, an item link is a method in WoW used to send stats of an item to someone else. You can do it by opening a chat input box, and shift-clicking on an item or another item link. This week, GUI with GUIllotine will tell you about the underlying workings of the item link.
First, we should probably go through what is required to get the most out of this article:
1. A copy of WoW (obviously)
2. An item (you better have this)
3. The add-on “Iriel’s Devtools” (obtainable at http://www.wowguru.com/ui/74/devtools/ )
4. Basic knowledge of scripting in WoW
Now some of you may be asking yourselves what the point is of knowing this. Ya, it’s neat, but why would I want to spend the time to use this? The answer is rather simple. Many add-ons, including some extremely popular ones, use a very inefficient method of getting info about items called ‘tool tip-scanning’. While in some instances, this is needed, in others, simply analyzing the item link will be sufficient.
Item Links
Here is an example of an item link (I will be explaining it later):
|cff1eff00|Hitem:1465:803:0:0|h[Tigerbane]|h|r
How exactly is this put together?
|(hex code for item color)|Hitem:(item ID code):(enchant code):(added stats code):0|h[(item name)]|h|r
Hex code for item color: This is rather self-explanatory. It is the hex code for either grey, white, green, blue, purple, or orange (until something more than legendary comes along).
Item ID code: Each item has a unique Item ID code. The one for [Tigerbane] happens to be 1465. All items “of so-and-so” have the same code. For example, “” has the same item code as “[Buccaneer’s Tunic of the Owl]”. These are different, however, from “[Buccaneer’s Bracers of the Bear]” (as they are totally different items).
Enchant code: This is the code for a permanent enchant. Different enchantments have different codes. 803 is the code for Fiery Enchantment (ok, call me a twinker. It’s what you have to do now to survive in BGs. Not as bad as dual lifestealing on a level 19 though…) It seems that enchantments on different items, but with the same modifier have the same code. For example, +1 agility to cloak will have the same code as +1 agility to bracers.
Added stats code: This is the code for added stats (also known as “of the” modifiers). For example, “of the Gorilla” for +17 strength and intellect is code 1002. Because Tigerbane has no modifier, this part is left at 0.
Item name: This is (you guessed it….) the item name. It is a localized string, and the name of the item as we all know it.
[b]Enchantment Links
A new type of link has appeared with the release of patch 1.9. Let’s talk about the inner workings of this as well.
Here is an example of an enchant link:
|cffffffff|Henchant:20034|h[Enchant Weapon – Crusader]|h|r
The template is this:
|cffffffff|Henchant:(enchant id)|h[(enchant name)]|h|r
This one is pretty self-explanatory:
cfffffffff: the enchant link is always white
Enchant id: a unique id for each enchantment. 20034 is Crusader. Please note that this is not the same id as the one once it is put on an item.
Enchant name: If you can’t figure this out, you shouldn’t be reading this column.
So how do I use this?
There are many ways to use this. One example is Lootlink. Rather than indexing each individual link, it only indexes it by the name. This prevents different enchant id’s from being stored as totally separate items. But how do YOU use this? Enter Iriel’s devtools. Simply open up a chat box and type in:
/dump “[ItemLink]” to get the full item/enchant link. From there, you can do whatever you need to do.
Once you understand the inner-workings of an item-link, the possibilities are endless. You are limited only by your ingenuity.
Thank you for reading the first edition of GUI with GUIllotine and please check back next week for more.