#Editing the duration of a combat log trigger thanks to conditions?

21 messages · Page 1 of 1 (latest)

swift mulch
#

Hello there! As the title says it, I'm trying to modify the timed duration of a combat log using conditions, but I can't seem to be finding my way around.

Find attached a screenshot of my trigger section.

As for the condition tab itself, I've been trying to use some custom code. To do so, I have something like that:
if Trigger2: Spell known[active} == true, then I run the following custom code:

aura_env.states[1].duration = 88

But as I said, it doesn't work the way I want it to work, and it only takes into account the original value I've entered (the main goal being to trigger a /s message on different timers, based on the talent choices of the player).

In advance, thanks a lo!

PS: sorry if I'm sort of unclear in my statements 😅

flint void
#

So you want to track the cooldown of this ability?

#

which might change if you select a talent?

swift mulch
# flint void So you want to track the cooldown of this ability?

I'm already tracking it actually. What this aura does, is alerting in say chat when there's only 20s left on the cooldown. So I've set the Timed at 88s when the talent is selected, but when it is not it should be set at 100s. And I don't really know how to twist that out with conditions & custom code :(

swift mulch
#
  • I forgot to say, I'm not tracking my own CD (as I don't play the spec), but the one from any evoker in my party... so I just realized that I can't even check that second trigger using the spell known thing 😭
flint void
#

!cooldowns

simple ivyBOT
#

There's 3 main approaches to tracking the CDs of others:
1. You catch the event for them casting an ability and start a timer for the base CD time.
2. You try to gather as much info about them as you can, their talents, traits and buffs, then start a timer based on the base CD, adjusted with the info you were able to gather.
3. You send Addon Messages to each other with your current actual CD times.

• The first is inaccurate - especially on longer CD with more chance for procs and talents to reduce things - but simple and easy to get up and running. If you need a rough guide then this is fine and can be done with a default Event - Combat log - Spell - Cast Success trigger.
○ This is also the only real option if you're trying to track the CDs of enemies.
• The second is a lot of work and there's still always going to be some information you're unable to gather.
• The third is the most accurate but requires that both users have a WA or Addon.

flint void
#

if you want to get talent info about another player you have to use Inspect info

#

using Inspect is a huge pain

swift mulch
#

Well I've been working on it this morning and now I'm wondering if simply tracking the spell CD would be an option, with something like that:

function(allstates, ...)
    local _, trackedSpellCooldown = GetSpellCooldown(403631)
    local _, _, _, _, _, _, sourceName = UnitAura("player", GetSpellInfo(403631))
    
    if trackedSpellCooldown and trackedSpellCooldown > 0 and trackedSpellCooldown <= 20 then
        local spellLink = GetSpellLink(403631)
        local msg = sourceName.. "'s ".. spellLink.. " will be ready in 20s."
        SendChatMessage(msg, "SAY")
    end
end

Here I'm using this code inside a custom trigger, and as for the trigger I use the combat log thing, however it's not quite successful yet 😅

flint void
#

!auracreation

simple ivyBOT
#

Here's the work flow for any Aura:

1. Think about all the info that the Aura you're trying to make will need.
2. Make a trigger for each piece of info
3. Decide which info should be sent as Dynamic Info and order the triggers accordingly.
3a. Order them so that "Dynamic Info from First Active" catches the right info, or select a specific trigger.
4. Decide which triggers need to be involved in overall activation of the Aura and change Required for Activation accordingly
4a. All (default), Any or Custom (e.g. function(t) return t[1] and (t[2] or t[3]) end) - https://github.com/WeakAuras/WeakAuras2/wiki/Aura-Activation-and-Deactivation#custom
4b. This step lets you include triggers that will be used only for Conditions but excluded from Activation entirely.
5. Make your conditions using the info from the triggers.

While working through this and building your Aura, if there's anything you're unsure of, just ask in the appropriate Help channel.

flint void
#

You need to think about what you're trying to track and when you want to see that info.

#

If you're using a Combat Log Event to trigger your custom aura above then you're spending a lot of extra lines getting info already available to you from the parameters sent in.

Also local _, trackedSpellCooldown = GetSpellCooldown(403631) This gives you the total time not the time left. So your logic later will send your SAY if the total duration is <= 20 not if the remaining time is <=20.

I suggest that you get your trigger to track the remaining time and store that info then send your SAY message with a condition.

swift mulch
#

So, I should do that using that same trigger? Or maybe without the Combat Log trigger, using only the custom ones and trying to get the remaining cooldown inside the code I’ve sent earlier?

#

Sorry though for all my questions, I’m pretty new to custom configs/WAs, let alone coding in LUA

flint void
#

!starterkit

simple ivyBOT
flint void
#

!TSU

simple ivyBOT
flint void
#

You should look at what dynamic info is and how to use it