1. #1

    Question Custom WeakAura (noob)

    I'll pre-face this by saying I'm "decent" at programming in some languages, however, LUA is not one of them.

    So the idea is that with warlocks, you need to finish the cast of a chaos bolt before the "Madness of the Azj'Aqir" buff ends. I want to create a custom progress bar that finishes at the last moment chaos bolt can be cast. So this should be: (time remaining on buff) - (cast time of chaos bolt) - (gcd)

    Right now, I don't care for the aesthetics, I just want the bar functional. At the moment, all I've done is made this function and put it into the "Duration Info" field:

    Code:
    function()
    	local duration, expirationTime = select(5, WA_GetUnitBuff("player", "Madness of the Azj'Aqir"))
    	return duration, expirationTime
    end
    I pulled this just from the WA documentation and modified a little. However the WA doesn't ever show/trigger. I assume that I should have something in the "Custom Trigger/Untrigger" fields and likely something is wrong with the above code too.

    Can anyone give some help?

    Or even just a link to a REALLY simple WA using LUA that shows a progress bar for a buff duration? That would immensely help me along my way.

  2. #2
    If it was me I'd use this as a starting point.
    https://wago.io/FrenzyTracker
    Last edited by Elvenbane; 2023-03-01 at 07:06 PM.

  3. #3
    Since all you want right now is to know how to make it appear at all, I'll give you two methods and you can pick the one you want, or use them as reference, I don't know which, if either is actually ideal, but they both work.

    Method 1: Programmatically

    As you correctly surmised, nothing is actually telling your WeakAura to appear.

    So in the trigger section you can put:

    Code:
    function()
        local buffActive= select(1, WA_GetUnitBuff("player", "Rejuvenation"))
        return buffActive
    end
    Note that I used Rejuv for my testing and you'll want to change it.

    Method 2: A second trigger.
    Another way you could approach it is to make a second trigger while leaving the Custom Trigger completely blank.
    Make a second Trigger and just make it check for the buff.

    At the top of the Trigger page, change the Required for Activation drop down to Any Triggers and the Dynamic Information to "Dynamic Information from <the trigger containing your custom duration information>"
    This is important since this is you telling it where to get its display information from.

    If you have more than two triggers you might need to use a Custom Function for your "Required for Activation"

    A custom function will look something like this:
    Code:
    function(t)
        return t[1] and t[3] and not t[2]
    end
    Where 't' represents an array of triggers and the index directly reflects their order as listed in the trigger tab.
    Note: This example is not representative of your question and is just a generic example.


    Personally, I'd suggest Method 1. But I like to list options since they might open your eyes to other possibilities in the future simply by being exposed to them.Hope this was helpful even a little. Good luck.

  4. #4
    I think you need a semicolon after t[2].

Posting Permissions

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