#LUA for tooltip value of damage or healing on a spell

6 messages · Page 1 of 1 (latest)

turbid cove
#

I'm looking to use the numerical values found in a spell in some custom lua code, but I'm not sure how to approach it.

fervent vector
#

!tooltip maybe?

mental domeBOT
#

To get a value from a buff or debuff's tooltip (the absorb amount on a shield buff for example), tick "Use Tooltip Info" in the buff trigger. This will have WeakAuras grab the whole tooltip, which can be accessed as %tooltip, and also the first three number values from the tooltip will be extracted and set as %tooltip1, %tooltip2 and %tooltip3.
If you need to manipulate any of these in code then they can be access in Custom Text with aura_env.states[triggerNumber].tooltip1. But the Format Options settings in Display will probably handle most of what you would need.

turbid cove
#

you have to enable the fetch tooltip in the aura section, but thats not available on any type of spell trigger that i saw

#

like vivify, i want the second value for the renewing mist heal in the tooltip, but renewing mist itself doesnt contain that info

#

i saw this, but im not sure what portion of the costext variable actually fits this case aura_env.GetCostTooltipInfo = function(spellID) local tooltip = WeakAuras.GetHiddenTooltip(); tooltip:SetSpellByID(spellID) local costText = WeakAurasTooltipTextLeft2:GetText() local cost = gsub(costText, "[^0-9]", "") return tonumber(cost) or 0 end