pulling stats off an item
Hello all,
Is there any way to pull the number value for a stat off of an inspected item. For instance when I inspect an item, and I use Inspect.Item.Detail, will it give me a number for strength, or will it just say there is strength on it. Any assistance with this would be great. Thanks for your time. |
According to the Addon API documentation of Inspect.Item.Detail:
Code:
stats: The base stats of this item. Members may include "block", "critAttack", "critSpell", "deflect", "dexterity", "dodge", "endurance", "energyMax", "energyRegen", "focus", "hit", "intelligence", "manaMax", "manaRegen", "movement", "parry", "powerAttack", "powerMax", "powerRegen", "powerSpell", "resistAir", "resistDeath", "resistEarth", "resistFire", "resistLife", "resistWater", "stealth", "stealthDetect", "strength", "wisdom", "xp", "valor", "toughness", and "vengeance". Code:
local itemStrength = Inspect.Item.Detail(item).stats.strength Code:
local itemDetail = Inspect.Item.Detail(item) |
well I copy and pasted the code as you suggested, but it only returns a value of 0, which is what I was getting before as well. Any other suggestions? Or is there just no way to get the value of a stat into a variable?
|
What are just using as value for the item variable?
Just tried this and it works for me: Code:
local item = Utility.Item.Slot.Equipment("helmet") |
Quote:
|
I think what you are looking for is the following event:
Event.Tooltip this will trigger every time the tooltip is changed. Once fired, you will need to use Inspect.Tooltip This will get the entire tooltip object. In this object there is a type property that will hold "item" or "itemtype" for you to key off of... others tooltip types are "unit", "buff", and "ability" Then use the code posted to pass the item... Example: Code:
function scrapeTooltip() |
All times are GMT -6. The time now is 10:07 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2022 MMOUI