Gryphonheart Items

  • Increase font size
  • Default font size
  • Decrease font size
Home

GHI_GetItemInfo

Print PDF

Gets information about an item

Input / Output

Input
ID:
  • has to be a string or number
  • ID of the item to retrieve information about
returnTable (new in v0.26):
  • (boolean)
  • if true, the function will return all item info as one table.
Output
  1. name (string): name of the item
  2. icon (string): path of the icon
  3. quality (number): quality of the item. Ranging from 0 to 6
  4. white1 (string): first white text
  5. white2 (string): secound white text
  6. comment (string): comment in yellow
  7. stackSize (number): stackSize of the item
  8. creator (string): name of the creator of the item
  9. version (number): version of the item (not including right click actions
  10. rightClick (table): right click information about the item
  11. rightClickText (string): use text of the item

Example Usage

Lua Code

Lets say the item is called "test" and it has a "rare" quality.

 
-- withtout second argument, or set to false
local n,_,q = GHI_GetItemInfo("Laruna_12345678");
GHI_Message("[via vars] The item called \""..n.."\" has a "..q.." quality.");
-- with second argument "true"
local item_table = GHI_GetItemInfo("Laruna_12345678",true);
GHI_Message("[via table] \""..item_table[1].."\" is a "..item_table[3].." quality item.");

ChatFrame

[via vars] The Item called "test" has a rare quality. [via table] "test" is a rare quality item.

 

Last Active Forum Topics