1. #1

    WeakAuras-LUA help needed.

    Hello, I am writing my own WA LUA and I am curious how I could a save a variable without it resetting.

    I need this to track Stormlash/Skull Banner this way, because they do not have a timer - I am making a suggesting script when to pop dps cooldowns and for that, knowing the current duration of these buffs is crucial.

    (dont mind the code errors)

    for i=1 to 40
    local BuffName,_,_,_,_,_,_,_,_=UnitBuff("player",i);
    if "Skull Banner" == BuffName then
    --[[Start Countdown timer from 10s-> 0s--]]

    I was thinking of making a bool variable that gets true value every time Skull Banner goes up and false every time the buff disapears.
    a = GetTime()+10;
    CurrentDuration = a - GetTime(); (until >0)

    How can I do this without the timer resetting on me? Any type of values just reset as its all real time.
    I am open to other ideas on how to do it, however it needs to be in lua.

    Thank you.
    Last edited by Skey; 2013-10-15 at 10:26 PM.

  2. #2
    use combat log events and either monitor SPELL_CAST_SUCCESS or SPELL_SUMMON because both of those are triggered by Skull Banner and Stormlash.

  3. #3
    I will look into that, thank you for your answer.

  4. #4
    Make a new aura (icon) using the following in the custom trigger page and make sure %n is written under text in the display page, you will have to select the skull banner icon yourself as well.


    Custom Trigger
    function(event, timestamp, message, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)  
        if message == "SPELL_CAST_SUCCESS" then
            local spellId, spellName, spellSchool = ...
            if spellName == "Skull Banner" then   
                WA_RCD_Name = sourceName
                return true

    Hide: Timed: Duration 10

    Name Info
        return WA_RCD_Name
    Last edited by suprep; 2013-10-16 at 03:24 PM.
    Retired WoW in 2016 to chase cryptocurrencies instead.

  5. #5
    Big ups man, I didn't have much time, but I will work with it over the weekend.

Posting Permissions

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