1. #1
    Deleted

    [Weak Aura] Ability Counter

    Hi there,

    I was trying to set a generic aura for Raid CDs, so I can forget about pen & paper, or notepad on second screen...

    Basically the idea I had in mind, was making an aura to display a string each time an ability is cast (ie, each time a Huddle is cast, the display will update showing the name of the persons who should pop their CDs on the next one). I was trying to go with (in metacode):

    if spell=xxx is cast then i++
    when i=1 return string1
    when i=2 return string2

    But lua is not my strong point, so I'm rather incapable of getting a trigger each time a spell is cast.

    Someone knows how to do it? Thanks in advance!

  2. #2
    Deleted

  3. #3
    Deleted
    Thanks a lot, working on it.

  4. #4
    Deleted
    Sounds really interesting, would be nice if you could share it once you're done!

  5. #5
    Deleted
    Truth be told, I'm rather stuck. Googling it, there are other post in other forums that ended up dead, so I suppose there is no easy solution. Anyways, I will keep putting some time on it. Using COMBAT_EVENT_UNFILTERED is the way to go for a trigger, but I suppose the approach it's a bit different, since what's is needed is an aura permantly loaded (in each encounter) which puts a +1 each time in a local variable when the IF is truth, instead of an aura that load when the spell is cast.

    Being rather clueless at lua, though I have made a couple of custom auras before, I'm rather stuck at the syntax for combat_log_event. The aura doesn't like at all the syntaxis of the example of wowpedia

    Code:
    local frame = CreateFrame("FRAME");
    frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    frame:SetScript("OnEvent", function(self, event, ...)
    
      local timestamp, type, hideCaster,
        sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
    
      --[[
        * Note, for this example, you could just use 'local type = select(2, ...)'.  The others are included
          so that it's clear what's available.
        * You can also lump all of the arguments into one block (or one really long line):
    
        local timestamp, type, hideCaster,                                                                      -- arg1  to arg3
          sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags,   -- arg4  to arg11
          spellId, spellName, spellSchool,                                                                      -- arg12 to arg14
          amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = ...             -- arg15 to arg23
      ]]
    
      if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
        if (type == "SPELL_DAMAGE") then
    
          local spellId, spellName, spellSchool, amount,
            overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(12, ...)
    
          if (spellName == "Mind Blast" and critical == 1) then -- "== 1" for clarity only.  Not needed.
            print("Mind Blast Just Critted!")
          end
        end
      end
    end);
    It seemed the perfect example to get it done, but.. d'oh. Errors everywhere.

  6. #6
    Deleted
    Your code looks good, but I have no idea how WA custom function integration works syntax-wise. You'll have to wait for someone more experienced with it to post.

Posting Permissions

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