1. #1

    Question [Weakauras] Power Word: Shield Absorb / Progress bar

    Hello all,
    I'm sure this question is asked quite often however all the posts I've looked at using google just post the code w/o further instructions. I'm absolutely oblivious on how to write custom code in Weakauras, with that being said I was wondering if anyone would be kind enough to give me step by step instructions on how to make a progress bar show my amount of the absorb remaining and diminish as the absorb is diminished (Just on myself). Every time I try to set this up all I get is a progress bar that diminishes with the duration remaining.

    Again, I tried messing around with the "custom" option but I have no clue where to place the codes I did find online, since there were like four different boxes like: Custom trigger, Name Info, Icon Info, Stack info. Maybe there's a much easier way to set this up...? Thank you ahead of time for anyone that helps me out!
    Last edited by Seductive876; 2014-06-09 at 06:23 AM.

  2. #2
    A quick Progressbar for PWS tracking on yourself would be
    Step by Step to create would be:
    To show a progressbar you have two different methods: timed and value-based. You want to track a "static" number: your PWS absorb amount. I did this with 3 weakaura elements.

    First I made a variable to save the absorb amount I get when the shield is cast. Creating a Text-Trigger with Custom Settings:
    Type: Custom
    Custom Trigger:
      WA_absorb = 0
    WA_absorb is a global variable, so you can access it everywhere in WA. Just give it a unique name, or you can damage other addons. This trigger fires everytime you enter the world, meaning: log-in, join a instance, etc. to initialize this variable.

    Second is the trigger for checking if you got PWS buff:
    Used a text-based trigger with following settings:
    Type: Custom
    Event Type: Event
    Custom Trigger:
        if dest == GetUnitName("player") and spellName == "Power Word: Shield" then
            if action == "SPELL_AURA_APPLIED" or action == "SPELL_AURA_REFRESH" then
                WA_absorb = select(15,UnitBuff("player","Power Word: Shield"))
            if action == "SPELL_AURA_REMOVED" then
                WA_absorb = 0 
    I am not going about all the lua functions and all (wowprogramming.com gives you the informations you need). All it does is:
    - Getting PWS it sets the global variable to the initial absorb amount
    - Removing PWS it sets the global variable to 0

    The last is the Progressbar. Create it, go to triggers and set it to custom and set it to
    Event Type: Status
    Check On... Every Frame
    The following textboxes are the needed informations for the bar:
    Custom Trigger: When should the bar be shown
    Custom Untrigger: When should it be hidden
    Duration Info: Informations about the duration (time or value)
    Name Info: If you want to use text Information (e.g. %n) you set the Name here
    Icon Info: Which icon should be shown
    Stack Info: Amount of stacks that can be shown (you can use %s to show them in the bar) (PWS stacks = absorb amount remaining)

    The only important thing is the duration, where you have to return 3 parameters:
    return duration, expirationTime, static
    duration is the absorb amount you have right now
    expirationTime is the max absorb you had
    static needs to be set, to make the bar value based.

    If you set duration = expirationTime your bar will never diminish.

    Hope this helped somehwat. If more questions, just ask

  3. #3
    The Patient az2d's Avatar
    Join Date
    Aug 2011
    my brain just puked
    100 Warrior | 2x100 Priest | 90 Shaman | 100 Druid | 100 Hunter | 100 Death Knight | 100 Mage | 2x100 Paladin | 100+90 Rogue | 2x 100 Monk |
    100 Warlock |

  4. #4
    The long String is an Import-String for weakauraus. Just go to "New" and on the bottom you can select "Import" and paste the Long string there

  5. #5
    Thank you so much! It works now ^_^ Wish I knew how to write code like that seems pretty complex though...

  6. #6
    Hate to necro a thread, but I'm looking for this as well and can't find it anywhere! This trigger doesn't work in 7.0 for whatever reason.

  7. #7
    WA_absorb = select(15,UnitBuff("player","Power Word: Shield"))
    change 15 to 17 i bet

  8. #8
    Quote Originally Posted by Translit View Post
    WA_absorb = select(15,UnitBuff("player","Power Word: Shield"))
    change 15 to 17 i bet
    Thank you, but still a no go

    I made that change in every possible place, however the bar will not show upon casting PW:S on myself

Posting Permissions

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