Page 60 of 111 FirstFirst ... 1050585960616270110 ... LastLast
Results 591 to 600 of 1109

Thread: WeakAuras Tutoring Thread

  1. #591

    Default

    Quote Originally Posted by arzelia View Post
    On a side note, your WA for Proving Grounds look really helpful! I wanted to give it a whirl, but encountered this error.
    "Error deserializing... Invalid AceSerializer table format (no table end marker)"
    could it be that the string was too long like what you mentioned in the Veangeance one above it?
    Quote Originally Posted by Suedama View Post
    I was hoping to be able to use the Proving Grounds Helper as well, but I also received the same error.

    I have my Data table ready to go to swap over the Healer one to DPS with my CDs, etc., and was wondering if Kulldam (or anyone else) could help me create the aura from scratch up to the Data table part.

    I was able to get through to the Proving Grounds Score Update event, etc., but not sure where to go from here.


    Thanks so much.
    I split up the Proving Grounds helper into two groups to get around the import limitation. If you still want to mess with them, you can find both group import strings on the same wiki page.

  2. #592

    Default

    Quote Originally Posted by Anzulo View Post
    Hi, i wanted to create a smart Interupt announcer. Here is the code
    Code:
    function(_,_,message,_,_,sourcename,_,_,_,targetname,_,_,_,_,_,spellid,spellname,_)
        
        
        spellLink = GetSpellLink(spellid)
        local kanal
        local inInstance, instanceType = IsInInstance()
        
        if inInstance == true then
            if instanceType == "none"  then
                kanal   = "YELL"
            elseif instanceType == "pvp"  then
                kanal   = "BATTLEGROUND"
            elseif instanceType == "arena" then
                kanal   = "PARTY"
            elseif instanceType == "party" then
                kanal   = "PARTY"
            elseif instanceType == "raid" then
                kanal   = "RAID"
            elseif instanceType == nil  then  
                kanal   = "INSTANCE_CHAT"
            end
        end
        
        if inInstance == false then
            if UnitInRaid("player") then
                kanal = "RAID"
            elseif UnitInParty("player") then
                kanal = "PARTY"
            else
                kanal = "YELL"
            end
        end
        
        if(message == "SPELL_INTERRUPT")  then
            SendChatMessage(sourcename.." interrupted ".. targetname.."'s ["..spellLink.."] ",kanal)
            return true
        end
    end
    I works so far, problem is:

    I want it to be a smart accnouncer.
    So if you are in instance (lfr, dungeon, shenario, random battleground) it shoudl post to instace chat.
    If you are in a regular raid, it should post to raidchat, if you are in a group only, it should post to group, ad if you are alone, it should yell.

    This is the part i cat get to work.

    Help is pretty apreciated.
    You're very close, you just need to change a few of your conditional checks to match the output of the IsInInstance() function. The first value output, "inInstance" for you, is either 1 of in an instance, or nil if not. So your top comparison line should be:
    Code:
    if inInstance == 1 then
    Similarly the second inInstance comparison should be:
    Code:
    if inInstance == nil then
    Everything else looks pretty solid so I suspect that should clear it up.

  3. #593

    Default

    Quote Originally Posted by MicrosoftDotCom View Post
    Hi Kulldam,

    been following this thread for quite some time and was hoping you could help me with this problem.
    So I tried to make this custom trigger .It should desaturate my displayicon (named icon1) whenever fortifying brew is ready to be cast and not desaturate when its on cooldown.
    But unfortunately its not working . What am I doing wrong in my code?

    Event Type: Status
    Check On: Every Frame

    Custom Trigger:
    Code:
    function()
        local _,duration = GetSpellCooldown("Fortifying Brew")
        
        if duration ~= 0 then
            return WeakAuras.regions["Icon1"].region.icon:SetDesaturated(0)
        end
        return WeakAuras.regions["Icon1"].region.icon:SetDesaturated(1)
    end
    This seems to be a side effect of "order of operations", so to speak, of how WeakAuras renders frames. From what I can gather from testing, all trigger code and functionality takes place prior to finalized drawing of the frame. Therefore, it executes your trigger code whereby you are setting the saturation as a custom value, THEN it is rendering the frame. All the settings for a WeakAura region are saved locally of course, one of which is a "Desaturate" option (found under the Display tab in most cases).

    Since your custom function is not changing that custom saved data, and because the frame is rendered after your custom code runs, you'll never be able to change the saturation on your own to override the Desaturate setting applied in the WeakAuras data.

    I dug around a bit but was unable to find the proper way to change that saved data programatically, so the only solution to your problem I found is thus:

    1. Create two Displays.
    2. Icon1 is your actual display icon and is whatever you want to be shown and visibly desaturated.
    3. Icon1 Controller is the controller where you'll actually be impacting the visual properties of Icon1.
    4. Your goal in setting up Icon1 is to make sure it is Triggered and therefore visible at all times without untriggering it as much as possible. The easiest method I think is to set it as Type: Status, Status: Unit Characteristics, Class: Monk. This should ensure this Icon1 display is always visible no matter what and prevent it from redrawing as much as possible.
    5. For setting up your Icon1 Controller, this is where you set the "Every Frame" trigger and put your custom trigger code in. You'll also want to take out both "return" prefixes and instead add a final "return false" line at the end of the function, because you never want this second display to actually trigger and attempt to display itself.

    That's about it. It's somewhat convoluted using two Displays for this, but this gets around the issue you were having where the visual saturation never actually appears because it's overridden by WeakAura settings.

    Hope that helps!

  4. #594

    Default

    Hi Kulldam,

    So, I am having a problem tracking cooldowns. I searched some of the thread, but it is just so thick. I am trying to track i.e. Adrenaline Rush. I want to track the progress of the cooldown and the buff itself on me, but I can't get it to work exactly how I want it. I want the buff itself to show, then when it is over, I want the progress desaturated in the same place. The problem I am having is I have it separated into two different auras, but the progress aura is taking priority over the buff. Due to combat rogue mechanics, I can't make it work through remaining time on the buff. I have no clue how to do custom triggers, but the idea I had was to have the progress aura check for Adrenaline Rush buff. If it isn't up, track cooldown. If it is, don't track. Is this possible?

    Thank you in advance for all of your help.

  5. #595

    Default

    Quote Originally Posted by Xaide View Post
    Hi Kulldam,

    So, I am having a problem tracking cooldowns. I searched some of the thread, but it is just so thick. I am trying to track i.e. Adrenaline Rush. I want to track the progress of the cooldown and the buff itself on me, but I can't get it to work exactly how I want it. I want the buff itself to show, then when it is over, I want the progress desaturated in the same place. The problem I am having is I have it separated into two different auras, but the progress aura is taking priority over the buff. Due to combat rogue mechanics, I can't make it work through remaining time on the buff. I have no clue how to do custom triggers, but the idea I had was to have the progress aura check for Adrenaline Rush buff. If it isn't up, track cooldown. If it is, don't track. Is this possible?

    Thank you in advance for all of your help.
    That certainly sounds possible, but can you export what you've got to a string and paste it here so I can mess with it? Throw it in [spoiler][/spoiler] tags for formatting.

  6. #596

    Default

    I put them into a separate group.

    Spoiler



    My Weakauras expertise ends when it comes to anything more complicated than this. lol

  7. #597

    Default

    Quote Originally Posted by Xaide View Post
    I put them into a separate group.

    Spoiler



    My Weakauras expertise ends when it comes to anything more complicated than this. lol
    No problem, thanks for posting what you've got so far. Now that I see it in action and read your description I believe I understand what you're after, and yes it should be quite simple.

    To perhaps help you in the future with your WeakAura needs, a brief lesson! In order to get a Display to "trigger" (and thus actually display), WeakAuras will check through every single requirement specified in the Trigger tab and ensure they are all true (or equivalent of "truthiness"). This means that you can have virtually any number of required "conditions" setup in the Trigger tab for your Display and only in the event that ALL of them are active at the same time (i.e. true) will the Display actually trigger and show itself.

    So for your specific scenario, you have two Displays. The first one, "Adrenaline Rush", has only a single Trigger condition which is when an Aura (Adrenaline Rush in this case) is active on you (the player). This is essentially the most common Display type in WeakAuras of course (hence the name) and works as you expect: It activates when your single condition of that aura being found is true and hides when it's false.

    For the second Display, "Adren Rush CD", you have one Trigger condition already in place (Status > Cooldown Progress (Spell) for Adrenaline Rush), which of course means it is triggering when your Adrenaline Rush is on cooldown. Your idea for how to make this work is exactly correct:

    Quote Originally Posted by Xaide
    the idea I had was to have the progress aura check for Adrenaline Rush buff. If it isn't up, track cooldown. If it is, don't track.
    So again following the logic from before, where any given Display can have any number of conditional triggers set in the Trigger tab, you can easily achieve your desired result. What you are describing ("If it isn't up, track cooldown. If it is, don't track.") is exactly the same as the trigger for your first "Adrenaline Rush" Display that shows the buff progress when the buff is active, but inversed. So instead of having your conditional trigger activate when the Adrenaline Rush buff is present, you want it to be the opposite and activate when Adrenaline Rush is not present.

    WeakAuras makes this sort of conditional trigger very easy, so here's how you can do it:

    1. Under the Trigger tab for your "Adren Rush CD" Display that you want to alter, click "Add Trigger" to add a second conditional trigger to this Display.
    2. When you have multiple conditional triggers set for a Display, you'll see a new dropdown box at the top of the Trigger tab called "Required for Activation," which is exactly what it sounds like: The setting to determine whether all conditional triggers must be true for the Display to activate or only one conditional trigger must be true to activate.
    3. In your case, since you want to check both for the Adrenaline Rush to be on cooldown AND that the Adrenaline Rush buff is not active at the time, you'll want to leave it default as "All Triggers."
    4. For your second conditional trigger (Trigger 2), you're checking for the existence of the Adrenaline Rush aura, so duplicate everything you have for the trigger of your other Display (Type: Aura, Aura Name: Adrenaline Rush).
    5. Now the final step is to reverse this second conditional trigger logic, so that instead of showing when the Adrenaline Rush buff is active, it instead displays when it is not active.
    6. This is done with the "Inverse" checkbox near the bottom of the trigger settings, and as you can see from the tooltip description, will activate the Display when the aura in question cannot be found.

    That's it! Now your "Adrenaline Rush" display will show as normal when Adrenaline Rush is active on you, and your "Adren Rush CD" will display when Adrenaline Rush is not active AND the spell is on cooldown.

    I know this was a much too involved explanation, but hopefully that'll help you both now and in the future!

  8. #598

    Default

    Well... that was simple. lol Thank you for your help. The explanation was fine. You explaining it like that helps me understand how it works rather than how to just simply do it. I appreciate all of your help.

  9. #599

    Default

    Hey Kulldam, I was referred here by one of your officers after trying to get a hold of you in game. So I have a weakaura progress bar that updates my current and max attack power dynamically. (http://pastebin.com/ifyrKZGi) I copied it from a Hunter I know and replaced the range attack power values for regular attack power ones everywhere I could find. I guess what I'm trying to get this thing to do is display the current percentage of my max attack power. Say when EVERYTHING procs at the same time, I'm right at 200k attack power (which would be 100%) but my idling attack power in raid is like 75k (where 75k would be a baseline 0%?). When a trinket procs, that would bump me up to x% etc. I guess what I'm looking for is a "green" zone percentage where it would be ideal to snapshot for Fists of Fury. At the moment, I'm just using a separate weakaura (http://pastebin.com/RHBKTJf8) to just track my current attack power and I positioned it over the progress bar. Anyway, I hope you can help.

  10. #600

    Default

    Quote Originally Posted by Ulchi View Post
    Hey Kulldam, I was referred here by one of your officers after trying to get a hold of you in game. So I have a weakaura progress bar that updates my current and max attack power dynamically. (http://pastebin.com/ifyrKZGi) I copied it from a Hunter I know and replaced the range attack power values for regular attack power ones everywhere I could find. I guess what I'm trying to get this thing to do is display the current percentage of my max attack power. Say when EVERYTHING procs at the same time, I'm right at 200k attack power (which would be 100%) but my idling attack power in raid is like 75k (where 75k would be a baseline 0%?). When a trinket procs, that would bump me up to x% etc. I guess what I'm looking for is a "green" zone percentage where it would be ideal to snapshot for Fists of Fury. At the moment, I'm just using a separate weakaura (http://pastebin.com/RHBKTJf8) to just track my current attack power and I positioned it over the progress bar. Anyway, I hope you can help.
    Alright I think I see what you're asking for, and this is the modified versions I came up with:

    High



    Med



    Low



    Note: There are three imports because of the stupid character limitation on AceSerialization, but ideally if using all three, they should be placed inside a parent Group to make moving easier.

    To solve your issue of wanting the bar to represent "percentage of max" thresholds, what you had was already very close, but I just added some additional values and calculations to get the percent of max:

    Code:
        -- Set min
        if not GetValue(MinAttackPower) then SetValue(base, MinAttackPower) end
        if base < GetValue(MinAttackPower) then SetValue(base, MinAttackPower) end
       
        -- Set max
        if not GetValue(MaxAttackPower) then SetValue(current, MaxAttackPower) end
        if current > GetValue(MaxAttackPower) then SetValue(current,MaxAttackPower) end


    In addition to your existing storage of MaxAttackPower, I also added MinAttackPower, which can be referenced elsewhere (particularly in the Duration function) to figure out the percent of maximum.

    Code:
        -- Set max percent
        SetValue((current-GetValue(MinAttackPower)) / (GetValue(MaxAttackPower)-GetValue(MinAttackPower)), PercentMax)


    Here I'm storing the percent of maximum AP value, which isn't really used much elsewhere but may be handy to have if you decide to use it for your text display or what not.

    Code:
        -- Set visibility
        SetValue(GetThreshold(GetValue(PercentMax), thresholds) == requiredThreshold, 'AttackPowerBar', DisplayID, 'visible')
       
        -- Should display
        return GetValue('AttackPowerBar', DisplayID, 'visible')


    Finally, within the Trigger function, I created a second new saved variable, the visible flag, which is important because we're using more than one actual display to make it "appear" as one seemless display (The need for multiple Displays is because programatically changing color is difficult).

    Additionally, at the top of the Trigger function I've added a few new config options:

    Code:
        local MinAttackPower = 'MinAP';
        local PercentMax = 'PercentMaxAP'
        -- Config values
        local DisplayID = 'high'
        local thresholds = {0.3, 0.6}
        local requiredThreshold = 2
        -- End Config values


    DisplayID is used to differentiate between the different displays (and is also set in the Untrigger function, so if you change it update it in both places).

    Thresholds are the various levels of the Percent of Maximum AP that we are testing against. And finally the requiredThreshold is the threshold level (taken from the thresholds table) that this particular Display requires to show itself.

    So for this 'high' display, since we have three different levels of thresholds defined (the two table entries plus the level below 0.3) -- and thus three corresponding Displays in total of Low, Med, and High -- we ensure that this 'high' Display is only visible when the current AP is currently at least 60% of the maximum AP. Anything below that threshold will hide the display.

    For reference, here is the added Untrigger function that uses the aforementioned visible flag to determine if it should hide or not:

    Code:
    function ()
        -- Config values
        local DisplayID = 'high'
        -- End Config values
       
        local GetValue = function(...)
            if not WeakAuras.CustomValues then WeakAuras.CustomValues = {} end
            if not ... then return end
            local count, data = #{...}
            if count and (count > 1) then
                for i,v in pairs({...}) do
                    if i==1 then WeakAuras.CustomValues[v] = WeakAuras.CustomValues[v] or {} data = WeakAuras.CustomValues[v]
                    else if i ~= count then if not data[v] then data[v] = {} else data = data[v] end else data = data[v] end end
                end
            else data = WeakAuras.CustomValues[select(1, ...)] end
            return data
        end
       
        -- Should display
        return not GetValue('AttackPowerBar', DisplayID, 'visible')
    end


    Finally, I altered the Duration function's return value to take advantage of the new MinAttackPower value that we store so it can always be referenced and used to calculate the Percent of Max AP once again:

    Code:
        local minimum = GetValue(MinAttackPower)
        return current-minimum, GetValue(MaxAttackPower)-minimum, true


    I should also note that I left your Name and Stack functions in there, but I notice you had those text options under Display unchecked when I imported them, so they were not shown. I also removed the Custom / '%c' Display settings you had, because they are redundant if you are using custom Trigger functions such as Name and Stack. Just setting your Display text fields to the appropriate key value ('%n', '%s', etc) will pull the value from the corresponding Trigger function. Just make sure you check the appropriate text box under Display if you wish (Text Settings, Timer Settings, etc).

    Hope that helps you out, lemme know if you have any questions.

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
  •