1. #1

    Help out a noob with LUA coding for WA

    I'm using a dynamic group to show the progress remaining for PW:S, spirit shell, and divine aegis. I'm using multi-target buff with only tracking my spells. The problem I was having at first was that it would only show the time remaining on my shields, not the actual absorb amounts. Then in a moment of genius I decided to frankenstein in one of the weak aura strings for my brewmaster monk I got from sunniers art of war. It tracks the absortion amount of guard. So after a couple quick changes from "player" to "targer" and "guard" to the spells mentioned above, I ended up with this:

    function ()

    local name,_,icon,_,_,_,_,_,_,_,_,_,_,_,value=UnitBuff("target", "Power Word: Shield")
    if(value > 999999) then value = math.floor(value/1000000) .. "m"
    elseif(value > 999) then value = math.floor(value/1000) .. "k" end
    return(value)
    end
    Now if you're reading this and know any LUA at all you will say wait, that should work! And you would be right - it does work. I am looking for help because it is not exactly as I would like. The only way to update the absorb amount remaining is to click back on something that already has my shield.

    My question: is there a way to have it automatically update the absorb left on my shields? I had thought of maybe changing the "target" function to possible "unitisvisible" after but I have no idea how to do that or if it would even work. I would just like it to update the absorb amount without me having to click back on all the units that would have my shields.


    Thanks for any and all help

  2. #2
    Unit Frames addons are much better suited for this. There are lots of good ones out there that will let you customize the display of your buffs on your group members.

  3. #3
    Quote Originally Posted by Rastafaree View Post
    My question: is there a way to have it automatically update the absorb left on my shields? I had thought of maybe changing the "target" function to possible "unitisvisible" after but I have no idea how to do that or if it would even work. I would just like it to update the absorb amount without me having to click back on all the units that would have my shields.


    Thanks for any and all help
    Is there perhaps a better option to choose in the update frequency box?

  4. #4
    The Patient
    15+ Year Old Account
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    319
    I agree with peanut here, unit frames would give you the information much faster than WeakAuras would. In any case what you could do is instead of using a tracker for different shields just use one tracker that tracks the entire absorb amount on your target.

    http://www.mmo-champion.com/threads/...1#post23561745

    change player to target
    Retired in WoD

  5. #5
    I agree that a dedicated addon would be better for this, but what trigger type/events were you using? I probably would have started with COMBAT_LOG_EVENT_UNFILTERED.

Posting Permissions

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