01-11-13, 08:33 PM | #6 |
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() local ttType = "" local ttItem = nil ttType, ttItem = Inspect.Tooltip() if ttType == "item" then TTGetItem(ttItem) elseif ttType then print(string.format("Type: %s", ttType)) end end function TTGetItem(itm) local itemDetail = Inspect.Item.Detail(itm) local itemStrength = itemDetail and itemDetail.stats and itemDetail.stats.strength or 0 if itemStrength then print(string.format("Strength: %s", itemStrength)) end end table.insert(Event.Tooltip, {scrapeTooltip, "Tester", "Tester_Init"}) Last edited by Bullarky : 01-11-13 at 08:36 PM. |
|
Riftui » Developer Discussions » Lua Help » pulling stats off an item |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|