We have updated our Terms of Service and Privacy Policy.
  1. #1

    LUA HELP! Always show buff tooltip

    How would I go about showing the tooltip of a buff somewhere on the screen at all times/permanently without having to mouseover it (if the buff exists) and update it "OnUpdate"? I'm not expecting someone to write all this for me, but some pointers in the right direction would be awesome. I got some very simple lua experience already. Thanks for any help!

  2. #2
    I'd break it down like this

    1) Check existence of the buff on the target (be that player, boss, focus) in some event (I'd use say Weakauras custom trigger)
    2) Create hide trigger

  3. #3
    I think you might be missing what I'm asking for, or I'm misunderstanding your reply :O When you mouseover a buff up in the top right corner, there pops up a tooltip on your mouse, for example: "Guild Champion, All guild reputation gains are increased by 100%", then I want this tooltip to show somewhere on the screen in a fixed spot and have it update on every frame refresh (OnUpdate). Just imagine that the reputation gain percentage in this tooltip is changing randomly every few seconds and I want to be able to see this tooltip in a fixed spot on the screen so I can watch any changes in realtime without having to mouse over the buff every time I want to check for changes.

  4. #4
    local buffName = "Mark of the Wild"
    local tooltipPos = {"BOTTOMRIGHT",-10,10}
    local UnitAura, UIParent = UnitAura, UIParent
    local tooltip = CreateFrame("GameTooltip","BuffCheckDisplayTooltip",UIParent,"GameTooltipTemplate")
    function tooltip:Update()
    	local i=1
    	local aura = UnitAura("player",i)
    	while aura and (aura ~= buffName) do
    		aura = UnitAura("player",i)
    	if aura then
    CreateFrame("Frame"):SetScript("OnUpdate",function(self,elapsed) self.elapsed = (self.elapsed or 0)+elapsed if self.elapsed > 0.5 then self.elapsed = 0 tooltip:Update() end end)
    How to use. First two lines are config. Don't change the rest unless you know what you're doing.
    UI & AddOns expert | Interface & Macros moderator - My work

  5. #5
    Exactly what I needed, thanks a lot Treeston

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts