Page 48 of 111 FirstFirst ... 3846474849505898 ... LastLast
Results 471 to 480 of 1109

Thread: WeakAuras Tutoring Thread

  1. #471

    Default

    Quote Originally Posted by Kulldam View Post
    You cannot format it in the default WeakAuras options because it's not an expected numeric value, so the next best option is a custom function to grab the value of your shield then format it appropriately. Luckily this can easily be done by using GetUnitAuraValue to grab the shield value (value2) and ShortenNumber to format the number to the nearest thousand.

    1. Under Display > Display Text, change the value to: +%c
    2. Set Update Custom Text On... to: Every Frame
    3. In Custom Function, paste the following:

    Code:
    function()    local GetUnitAuraValue = function(aura, valueType, unit, sourceUnit)
            if not aura then return end valueType, unit = valueType or 'name', unit or 'player' if not UnitExists(unit) then return end local v, value = {}
            local GetAuraValues = function(unit, aura, filter)
                local v, filter = {}, filter or 'HELPFUL'
                v.name, v.rank, v.icon, v.count, v.auraType, v.duration, v.expirationTime, v.unitCaster, v.isStealable, v.shouldConsolidate, v.spellId, v.canApplyAura, v.isBossDebuff, v.value1, v.value2, v.value3 = UnitAura(unit, aura, type(aura)=='number' and filter or nil, filter)
                return v
            end
            local GetAuraValue = function(v, t, s) if v[t] then if s then if v.unitCaster and UnitExists(s) and v.unitCaster == s then return v[t] end else return v[t] end end end
            if type(aura) == 'string' then
                v = GetAuraValues(unit, aura)
                if GetAuraValue(v,valueType,sourceUnit) then return GetAuraValue(v,valueType,sourceUnit) end
                v = GetAuraValues(unit, aura, 'HARMFUL')
                if GetAuraValue(v,valueType,sourceUnit) then return GetAuraValue(v,valueType,sourceUnit) end
            elseif type(aura) == 'number' then
                for i=1,40 do v = GetAuraValues(unit, i)
                    if v.spellId and v.spellId == aura then if GetAuraValue(v,valueType,sourceUnit) then return GetAuraValue(v,valueType,sourceUnit) end end
                    v = GetAuraValues(unit, i, 'HARMFUL')
                    if v.spellId and v.spellId == aura then if GetAuraValue(v,valueType,sourceUnit) then return GetAuraValue(v,valueType,sourceUnit) end end
                end    
            end
        end
        local ShortenNumber = function(value, decimal, format)
            if not value then return end
            format = format or '%s%s'
            function round(val, decimal)
                if (decimal) then
                    return math.floor( (val * 10^decimal) + 0.5) / (10^decimal)
                else
                    return math.floor(val+0.5)
                end
            end
            if(value > 999999999) then return (format):format(round(value/1000000000, decimal), 'b') end          
            if(value > 999999) then return (format):format(round(value/1000000, decimal), 'm') end        
            if(value > 999) then return (format):format(round(value/1000, decimal), 'k') end        
        end
        -- BEGIN EDIT
        local shield = ShortenNumber(GetUnitAuraValue(65148, 'value2'))
        return shield or ''
        -- END EDIT
    end


    4. That's it! This should give you the formatted number value you're looking for. Enjoy!
    Wow, that's a lot more complicated than i thought it'd be!

    Thanks a lot though, much appreciated

  2. #472

    Default

    Can you shorten down just normal text auras as well like this one?

    Spoiler



    So it says 300k, 258k, 138k, etc etc. Thanks!

  3. #473

    Default

    I went through all 37 pages on the Wow Ace WA forum and several pages here, found tons of great info, but haven't found an answer to an immediate need, something that is probably a very simple thing to do.

    Working on heroic Lei Shen and I need a count down timer or bar for Diffusion Chain. I know DBM/Bigwigs already do this but I really need to see this one specific timer separate from the other 4 or 5 things that can happen within a second or two during transitions.

    Thank you in advance!

  4. #474

    Default

    Quote Originally Posted by Lazdude View Post
    I went through all 37 pages on the Wow Ace WA forum and several pages here, found tons of great info, but haven't found an answer to an immediate need, something that is probably a very simple thing to do.

    Working on heroic Lei Shen and I need a count down timer or bar for Diffusion Chain. I know DBM/Bigwigs already do this but I really need to see this one specific timer separate from the other 4 or 5 things that can happen within a second or two during transitions.

    Thank you in advance!
    If the DBM timer for it is accurate and you just want a WeakAura version of that same basic timer, then your best bet is to create a DBM Skeleton for Diffusion Chain.

    I've edited some basic settings into the prototype for you below, but of course this is UNTESTED so give it a whirl. If it fails to work, try changing the "id" field from the SpellId value to the SpellName value (Diffusion Chain).

    Lei Shen - Diffusion Chain CD DBM Skeleton

    Last edited by Kulldam; 06-24-2013 at 07:18 PM.

  5. #475

    Default

    Quote Originally Posted by skmzarn View Post
    Can you shorten down just normal text auras as well like this one?

    Spoiler



    So it says 300k, 258k, 138k, etc etc. Thanks!
    I ve made a new one cause trying to edit yours caused my WoW to crash Dont know why though.
    Try it and tell me if thats what you wanted to do. You can setup class/spec and other triggers to your liking.

    Here it is
    Code:
    dOdRcaGEvs6LGsTluyBkyMsqMTK6MQe1VujX3KKDkrTxQDlL9lvJsLQHPOFtQBRqdfszWQy4kzCK0PufDmu6CQkleuYHvQflb1YrArGINsSmO8CqopImveMmKmDHRrIRQsWZa66q1grutdvBgITdP67QsZsLsFgunpvcDzrpwv1OLiJxcDjvsDlu0PbCpvISsjWFvf(PkfBwtyz0cklOmHfeDleGRMUm40YVUwtnHlZAYdyQvGvQGtqW5h4NQryQWDzmtwL9JxPQGn5GSGGvGgHPc3HfuaqR6njISyy56FyB5hhk0JezXWccE7pa0T7p7f0p9t)0p16)DD)S6Nl1pJ7OeJXDX7ZB7Nl0ac00Vj9omR6nPKcZZN9Zv6h25C2lOF6N(PFOzGtB9duqbAWzGOPJ74omxZyIaZT9Z6zVGSHYYUbmUdaDZewg3antyjiTsllAcLHLfnHYWYUEvAJgEnu6WHLGcahEsnHLG0kTaf7ahYcou(yPFtQlSLe9Sfwqt)Mul4Te9Sfw24H2cou(aVbegwwWHYhRK(NTyPFtQHLLvs)ZwS0Vj1YaMLvs)ZwS0Vj9HEL0DOPwUOdl0eoGUrqALwISyy5favuYKvg((uh4kytSpoFonct(GLg(ibfao8Kc5YSwaqzPq63(5Y722sPeaEPWKv5CowLYSILfdKRmyeMCvlfVbbbkdtEadRAqPIRIn5GGFygHjNBPwVrzcluDDAclJ41bGjC4WHfs3GGaLHjpaccIn5SkkQkQFCUryYRCybYcldoJkgStlO7YS850Hna

  6. #476

    Default

    Quote Originally Posted by Kostis View Post
    I ve made a new one cause trying to edit yours caused my WoW to crash Dont know why though.
    Try it and tell me if thats what you wanted to do. You can setup class/spec and other triggers to your liking.

    Here it is
    Code:
    dOdRcaGEvs6LGsTluyBkyMsqMTK6MQe1VujX3KKDkrTxQDlL9lvJsLQHPOFtQBRqdfszWQy4kzCK0PufDmu6CQkleuYHvQflb1YrArGINsSmO8CqopImveMmKmDHRrIRQsWZa66q1grutdvBgITdP67QsZsLsFgunpvcDzrpwv1OLiJxcDjvsDlu0PbCpvISsjWFvf(PkfBwtyz0cklOmHfeDleGRMUm40YVUwtnHlZAYdyQvGvQGtqW5h4NQryQWDzmtwL9JxPQGn5GSGGvGgHPc3HfuaqR6njISyy56FyB5hhk0JezXWccE7pa0T7p7f0p9t)0p16)DD)S6Nl1pJ7OeJXDX7ZB7Nl0ac00Vj9omR6nPKcZZN9Zv6h25C2lOF6N(PFOzGtB9duqbAWzGOPJ74omxZyIaZT9Z6zVGSHYYUbmUdaDZewg3antyjiTsllAcLHLfnHYWYUEvAJgEnu6WHLGcahEsnHLG0kTaf7ahYcou(yPFtQlSLe9Sfwqt)Mul4Te9Sfw24H2cou(aVbegwwWHYhRK(NTyPFtQHLLvs)ZwS0Vj1YaMLvs)ZwS0Vj9HEL0DOPwUOdl0eoGUrqALwISyy5favuYKvg((uh4kytSpoFonct(GLg(ibfao8Kc5YSwaqzPq63(5Y722sPeaEPWKv5CowLYSILfdKRmyeMCvlfVbbbkdtEadRAqPIRIn5GGFygHjNBPwVrzcluDDAclJ41bGjC4WHfs3GGaLHjpaccIn5SkkQkQFCUryYRCybYcldoJkgStlO7YS850Hna
    Thank you! Was exactly what I was looking for. Strange that you get crashes with my import though.

  7. #477

    Default

    Quote Originally Posted by Kulldam View Post
    If the DBM timer for it is accurate and you just want a WeakAura version of that same basic timer, then your best bet is to create a DBM Skeleton for Diffusion Chain.

    I've edited some basic settings into the prototype for you below, but of course this is UNTESTED so give it a whirl. If it fails to work, try changing the "id" field from the SpellId value to the SpellName value (Diffusion Chain).

    Lei Shen - Diffusion Chain CD DBM Skeleton


    Thanks so much Kulldam! It's a lot more complicated than I thought but this is exactly what I needed and it works perfectly.

  8. #478

    Default

    Quote Originally Posted by skmzarn View Post
    Thank you! Was exactly what I was looking for. Strange that you get crashes with my import though.
    Glad to hear that As for the crash, i guess it's one of those strange little things!

  9. #479

    Default Conflagrate

    Quote Originally Posted by Kulldam View Post
    Hi Xag, That shouldn't be too difficult, but would you mind exporting to string the setup you have right now so I can take a look? Just paste it here between

    Spoiler

    tags and I'll import it and see if I can figure out the proper tweaks.
    For some reason the forum didn't like me using your spoiler box with the no parse so I just turned off parsing for the whole reply and removed the tags. Ok, so basically I kind of figured out the first part of my dilemma. I was being dumb about how to calculate the showing/hiding of the images. As it stands right now it is 2 rotating stars labeled "Con Left" and "Con Right" The "Con Right" star disappears when I have used one of the two Conflagrates at my disposal and the "Con Left" star disappears when I use the second and they both reappear as they become available again Left then Right. You will see that there is custom LUA code for the triggers. This is actually the same code as a previous string from somewhere in this thread that showed an icon with a timer and "stack count". My mistake was trying to model it after another aura I have that keeps track of stacks of a proc and the resulting timer until it expires. In it one was set to show at ">=1" and the other at "=2" so that's how I set this one up also. It was the "=2" that was screwing me up. Instead ">=2" seems to work in this instance but I wouldn't mind a second opinion as to my assumption since I am only guessing. The second part (since I'm pretty sure I have the first worked out) is I would like to try and turn them into progress textures by removing the spinning and introducing a "filling" effect so I can see when they are about to become ready to use. The graphic used is irrelevant as long as it's a texture and not a bar. I can figure out how to tweak that myself. This is way beyond my scope of knowledge at this time and her is where I will truly need your help. Hopefully I articulated better this time what I am attempting to do and have included my string as per your instructions. If there is anything else I need to clear up just let me know. Thanks again for the help.
    Last edited by Xagnut; 06-26-2013 at 09:51 PM. Reason: noparse issue

  10. #480

    Default

    Hi,
    I tried this string for Prayer of Mending from page 4 last night with a friend trying to get it to work but I am a newbie with weak auras. It didn't work as well as I would hope. I would like it to work as Vikrum posted due to the set bonus from Vestments of the Exorcist. The spell should jump up to 5 times and if it doesn't jump for 30 seconds it will fall off and should be recast. I would like the icon to be opaque if its off CD, if it's on a character it should have a number in the centre with the amount of potential jumps remaining, and be partially greyed out with a clock like cool down timer. Any help you could give would be really appreciated and I think other disc priests might find this useful also. Thanks in advance.
    Last edited by Hobnail; 07-01-2013 at 09:14 AM.

Tags for this Thread

Posting Permissions

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