1. #1

    total absorbs weak aura for target

    Hi, I'm trying to show a text with the total amount of absorbs on my target if I have a target, the string works but every time I switch target the game slows down from 100+fps to 10fps for a few seconds. I'm guessing there's something wrong somewhere.

    custom function
    Code:
    function()
    
        if UnitExists("target") then
    
            local absorb = UnitGetTotalAbsorbs("target")
            
            if absorb == 0 then
                absorb = ""
                
            end
            
            return(math.floor(absorb/1000))
            
        end
    
    end
    custom trigger
    Code:
    function()
        if UnitExists("target") then
            return true
        end
        
    end
    edit: words
    Last edited by kouby; 2014-12-25 at 10:24 PM.

  2. #2
    High Overlord Ironi's Avatar
    15+ Year Old Account
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    114
    Quote Originally Posted by kouby View Post
    Hi, I'm trying to show a text with the total amount of absorbs on my target if I have a target, the string works but every time I switch target the game slows down from 100+fps to 10fps for a few seconds. I'm guessing there's something wrong somewhere.

    custom function
    Code:
    function()
    
        if UnitExists("target") then
    
            local absorb = UnitGetTotalAbsorbs("target")
            
            if absorb == 0 then
                absorb = ""
                
            end
            
            return(math.floor(absorb/1000))
            
        end
    
    end
    custom trigger
    Code:
    function()
        if UnitExists("target") then
            return true
        end
        
    end
    edit: words
    most likely its becouse you are trying to divide string, try something like
    Code:
    if absorb == 0 then return ' ' else return math.floor(absorb/1000) end
    Abandon the search for Truth; settle for a good fantasy.
    iKeystones, iLFRDescription, iEncounterEventTracker

  3. #3
    Damn, perfect! I love you! Happy Kwanzaa!

Posting Permissions

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