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
    Deleted
    A quick Progressbar for PWS tracking on yourself would be
    Code:
    dyeyjaGiP4sKeQrHuDkKYSa4wsPyxuvkddQYXqsldIYZKQ00uvPRbO2gvfFJKY4GO6CsvzDqKMhvLu3JIAFuvchKISqsQEOQkMijjxKQQnkvXhHiAKuvIojjPwjfMjGCtsc2PuYpLQQHcblfQQNcAQO4QqOTsvP6RQQ6Suvs2lXFLkdw5WaTysLhJstgkxwLntv(SQYOrIttLxdry2K42KYUr8BknCOYYr1ZH00LCDvz7Ke9DPunEPu68KQMpjHSFXcvHrGGcJucevGiZ3WZ38rGAcetGycJarpfpeSosjq17NHPFvai)9Wiq(95Seg94ob(XTpCcK80y4UVVJJkTOkqhMavhKlqfliMWiqUv5egbQ9ukNWiLusjWRT4ajyhMOUucKvyKwufgbYVpNLWOh3jW6ABjWI7((oUWiWspUtGSp0YQjWtLhPqficazYx5h)o)Ty8JVQBHKD)7hFGuLazFOLvRR0J7e4PYJucK9Hwwnb69iSLZsOtllgzzzz)n1bQd1Y1LzodVyCembY(qlRwhfh2jWYPDysjW2DyffPN(Wdp1O2hYqMAa)l1(O2RpIxB(f5c0HjW)MqVsGKNgd399DCuPfvbs5CFukPhFudyG7vnGrovKRwVa7dvFeV28BFcuXcIjmcKBvoHrGApLYjmsjLusjTqMWiq(95Seg94obwxBlbwC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ECsgOM9rka)n1bQd1Y1bO4Vlgzzzzhblgzzzz8RECsgEaWdqXFxmocwmIrmei7dTSATa1ob69iSLZsOtlgzzzz8RECsg6PCSfDQaYqK4k1FEE0BWPaQ)4naAqW2(XZ(B5yindsXDkyn0OfJJGLLjq2hAz1eO3JWwolHoTyKLLL5i)y10bwzMZqK4ktEEhB5iF)y10bw0BWPaQ)4n0IrwwwMZlZr(XQPdSYajyz)n1bQd1Y1L5lYWllROCKyKLLLLLLLXV6Xjzf)DXilll7iyXilllJF1JtY8avqVyCembY(qlRMQzTeb69iSLZsOtlgzzzz8RECsg6PCSf9EbKHiXvQ)88O3Gtbu)XBa0GGT9JN93YXqAgKI7uWAOrlghblltGSuowKqGpCyG1jLavSGycJa5wLtyeO2tPCcJusjLajpngU7774OslQcKFFolHrpUtGGpoOoqUaXCO4ua1ZCTTW39rPeyMkgvGombYq5uhKlq0cKfjqfDsjLavP0I6VuXtkra
    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:
    Code:
    Type: Custom
    Event(s): PLAYER_ENTERING_WORLD
    
    Custom Trigger:
    function()
      WA_absorb = 0
    end
    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:
    Code:
    Type: Custom
    Event Type: Event
    Event(s): COMBAT_LOG_EVENT_UNFILTERED
    
    Custom Trigger:
    function(_,_,action,_,_,dest,_,_,_,_,_,_,_,spellName)
        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"))
            end
            if action == "SPELL_AURA_REMOVED" then
                WA_absorb = 0 
            end
            
        end
    end
    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
    Code:
    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:
    Code:
    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
    Deleted
    my brain just puked

  4. #4
    Deleted
    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
  •