1. #1

    Weakauras bar color question.

    So a quick question for those of you out there more knowledgeable about the custom animations options in Weakauras...

    For Mists I'm making the transition from Hunter to Bear and want to have a Weakauars bar to track my rage. Specifically I want the bar to be red when I have 0-59 rage, and green when I have 60+ rage. I'm assuming that this is possible because Weakauras is frankly amazing and I can't possibly believe that Weakauras can't do this. Anyone know how to do this (or something very close to this), because I'm failing miserably to figure this out.

  2. #2
    Try this. If it works for you then I'll beef it up a little to support energy/rage/runic power/etc and add a video to the weak auras tutorials.

    Code:
    dyeAhaGifLUeuunkqItbszwsYTKu2LkPFrPugMs6yQuldk8mkGPbvvxtLiBtj03GIIXrb15GQsRtrH7rH2hueoOIIwiLsMiueDrvIQncs6JQeLtcfPwjGzcvHDcj)eQIgQsWsHQKNsYuLuDvOQyRukvFfksgluu6TQeURIk7vQ)QidwCyjwmLQhdQjtrxMyZqPpRIrdPoneZwHBReTBL63QA4qLLt1ZbA6K66uY2bP67ukgVIQopiwpuL69uGUpfK9JUV76TAzRmBLzxVvMiG4gfi1L514HGv3kMwPDKZr8UER0qWjTcux0wGTsGUS1TAH3gXBfU3gX1qWjnQ7wzbktwBeDBRwzTfOlBDRkw6VvwGYeU3gX1qWjTTADRW5)XfqWfCbgbe53nQ1wPrwkouhLdyRWt8PoEGPrD5TA8fZUER8FiD9wT0AOr66TU1TUvLnYYIg53D9wTSGS76Tc(hVJxnQ1wPHGtAfSfO(x2kq4YqMVrD3ktlVOr(DRWOvW)49z2OUBvzGdDPrT2k4F8EDi4KwbBbQ)LTcsJATvW)4DB1OUBf8pE)YAOUiMXW3ggFVXy1axAr8DrdB4gBTlH)wnFJATvW)4DOATHBLlAlFZG1AdRr(nuW5)XfqWkg)UI5CxXy)UIPCxX4yuXCWOIXogvmfmGgbyyyygpCzWa)J3bNW((KxocJrgdAicWWWWuRgJnOLndK3IXLcmAMzXSZY4LJWakAgnAHXftB74ISTn7dlHb(hVdYG9DgVCKReGHHHHammmmW)4DWjSVp5LJCX6CmgzmOlMmgzURyoUiBgJmRvm2hwcJrMvdXuRgJlMZGzlIjZ9Ly8YryW(oJPaDbux0cbyyyyG)X7GtyFFYlh5cdyG5ymYyqxmzmYCxXCCr2mgzURySpSegJmRgIPwnggiYy82mdgb6IdrJg5Szqazo)Bsagggg4F8o4e23N8YrUyXfNJXiJbDXKXiZAfZXfzZyK5UIX(WsymYSAiMA1yyoUi7zWy(mLnenAK9HbYBXytzRVYO)NzPfmAgVCecWWWWqagggMXdxgmUywXCCr2vm2hwcJrg4F8o4e23N8YrUyDURUywXa)J3bNW((KxoYfRZD94ISRyG)X7GtyFFYlh5I15UAFyjeGHHHHammmmJhUmyWnkqeFYlhHXid(Sr0l82iouMf3Oar8zRyUHgbyyyyW(oJgTlGO)HzfJxoYe8pEhKbzZGRG4Gqb(hVdoH99jVCeOXy(eGHHHHHHHbbldUrbI4tE5imycgnAxar)dtgnAztagggggggggggMA1W5iBnua1oY(Cf77llAOmlMJWG5iZwXGBuGi(KxosfJgTlGO)Hj0GgbyyyyyyyyyyyyCXSI54ISRySpSegJmE5itW)4DWRUywX4LJmb)J3bVECr2vmE5itW)4DWR2hwcbyyyyyyyyyyyyiadddddddJSnjadddJSnjaddddbyyyyCrB5BgxmRyoUi7kg7dlPI5MaY2KaeGaeGaeGaeGaeGaeGaeGaeGaeGaeGaeOv(RlAPrT2kq4YqG0OUBLfOmb)J3BB16w3ke4F32BLwMxRqWBPrHXARC5G876qWjTQy5f7fVvAKLIRqWBPrHXAR0Y8AlxALTBHgt(m1ywyuq2myk0iAPvAzEnu)TUvZeggXu26YGzbxarmLnmKwvS0FBVviMTcVkhPvAKLId1FRB1mHHrmLTUmywWfqetzddPv2GyQr3OW)6AR2wlR7iNJ4GnQ7wbbpXIfu0nQAySU2k0cYbTUrzamADRaB19v8FDXwb9g1n(xxBD3
    Under animations scroll down to the "colors" function and hit "expand edit"

    at the top you'll see a bunch of lines:
    Code:
    colors_for_rage[0] = {red = 1, green = 0, blue = 0}
    colors_for_rage[33] = {red = 1, green = 1, blue = 0}
    Every time you cross one of those thresholds (have more than, not equal to) your rage bar will switch to the colors defined.
    You'll start out with a red rage bar (RGB: 1, 0, 0) and then when you have 34 or more rage you'll switch Yellow (RGB: 1,1,0) and finally
    at 66 rage your bar will turn green.

    EDIT:
    You can define any set of color thresholds you like by adding them to the list. If you wanted a blue bar at full rage then you'd just add:
    Code:
    colors_for_rage[99] = {red = 0, green = 0, blue = 1}
    I did a bit of testing with my warrior on some target dummies and it seemed to behave as advertised. Since you're interested in weak auras I'm assuming you can figure out other configuration options on your own (load conditions, text options, etc).
    Last edited by a21fa7c67f26f6d49a20c2c51; 2012-08-26 at 06:15 PM.

  3. #3
    You, good sir, are a wonderful human being. Now if only I could open the stupid game to have a fiddle with this... (stupid battle.net not responding again...). I can sort all the rest of it out I'm sure as I've been using Weakauras for about 6 months now, just not what one might describe as a power user

    When I can log in I'll have a good play with it but it sounds exactly right. Oh, and huge kudos to you for replying on youtube so quickly!!

  4. #4
    Hey Evn.

    Finally got in the game to test this and the code string seems to be wrong. Weakauras returns "Error decompressing: Cannot decode map". I'm guessing your copy/paste missed out something crucial. Any chance you could repost the code string?

  5. #5
    Worked perfectly for me. Thanks very much!

  6. #6
    It imported okay for me - try making sure there is no extra white space at the start or end when you copy/paste.

  7. #7
    hmmmmm, i'll go have another look now.

    ---------- Post added 2012-08-30 at 05:07 PM ----------

    Yeah, just had some extra white space. My bad (hangs head in shame...). Thanks again, Evn.

  8. #8
    Hello I just imported the string and I seem to be having some trouble. I can change the rage threshold for the 2nd color (yellow) but when I try and change the 3rd threshold every rage over my custom yellow threshold is yellow.

    If anyone is good at weak auras I would really appreciate the help. If it matters I want to set me 2nd threshold at 20 for Shield Barrier and 3rd threshold at 60 for Shield Block.
    Hi Sephurik

  9. #9
    Grunt Scrooloose's Avatar
    10+ Year Old Account
    Join Date
    Jan 2011
    Location
    Lancashire, England, UK
    Posts
    16
    Took me ages to find how to do this but google finally came up with your thread, thanks very much for the help!

  10. #10
    Blademaster Skillfall's Avatar
    7+ Year Old Account
    Join Date
    May 2014
    Location
    US-Kil'Jaeden
    Posts
    39
    Day made!!!!

  11. #11
    Deleted
    function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
    local colors_for_rage = {}
    -- when you reach "X" rage set the red/green/blue colors for rage.

    colors_for_rage[0] = {red = 1, green = 0, blue = 0} -- red: need 15 rage for devestate
    colors_for_rage[59] = {red = 1, green = 1, blue = 0} -- yellow: everythign is good
    colors_for_rage[119] = {red = 0, green = 0, blue = 1} -- full rage

    local red, green, blue = colors_for_rage[0].red, colors_for_rage[0].green, colors_for_rage[0].blue

    local player_rage = UnitPower("player", 1)
    for threshold, rage_colors in pairs(colors_for_rage) do
    if player_rage > threshold then
    --print(string.format("%i %i", player_rage, threshold))
    red, green, blue = rage_colors.red, rage_colors.green, rage_colors.blue

    end
    end

    return red, green, blue, 1
    end
    I tried to get a blue color when reach 120 rage (war) and it is not working.

    Red and Yellow are working, no blue one

    I would like to have the number of rage centered too, not on right side

    Any help will be great
    Last edited by mmocdda15be790; 2014-11-10 at 08:33 AM.

  12. #12
    Deleted
    Thanks Evn

    it is not working with 119 but with 118.

Posting Permissions

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