1. #1

    Battle Rez Count Weakaura

    my friend who usually helps me with the more complicated weakauras that require Lua isn't around, so I thought I'd post here.

    I'd like to set up a weakaura that gives me the amount of brez's (used/left doesn't matter) I have a weakaura that tells me when people cast one, but when multiple people cast on the same person they both go on cd. So i just want an aura that shows the count actually taken. Anyone have one handy? or able to help me out making one?

  2. #2
    Hey there!

    I can't open the game right now to test it, but it should be something like this:

    If you want to use LUA (all in one):

    Create a WeakAura (icon, text, whatever) and set the display to stacks (%s).
    The trigger type is Custom, on event. The events to listen for are:
    Code:
    COMBAT_LOG_EVENT_UNFILTERED,PLAYER_REGEN_ENABLED,PLAYER_REGEN_DISABLED
    In the trigger custom code it should go something like this:
    Code:
    function(...)
        local Rebirth, RaiseAlly, Soulstone = 20484, 61999, 20707
        local waEvt,_, eventType, _, _, whoCast, _, _, _, whoReceived, _, _, spellID = ...    
    
        if waEvt == "COMBAT_LOG_EVENT_UNFILTERED" then
    	    if eventType == "SPELL_CAST_SUCCESS" then
    	        if (spellID == Rebirth) or (spellID == RaiseAlly) or (spellID == Soulstone) then
    	            if qtyBress == nil then
    	            	qtyBress = 1
    	            else
    	           		qtyBress = qtyBress + 1
    	        	end
    	        end        
    	    end
    	elseif (waEvt == "PLAYER_REGEN_ENABLED") or (waEvt == "PLAYER_REGEN_DISABLED") then
    		-- Reset counter upon entering or leaving combat
    	    qtyBress = 0
    	end
    
    	return true
    end
    And the "Stacks Information" custom code:

    Code:
    function()
    	return qtyBress
    end
    If you do not want to mess with that much lua code, you can create various "Spell cast sucessful event" triggers in one weakaura (Trigger type: event) and increase a variable (like qtyBress) on the "Action" tab, using custom code upon activation. Then create a second one that will display that variable (using the custom fuction returning the stack amount)

    Edit: This will show Battle resses CASTED, not accepted. Not sure how to track the ones that were accepted, never payed attention if there is any entry on the combat log for resurrection accepted.
    Last edited by moothz; 2014-07-21 at 08:15 PM.

  3. #3
    Deleted
    tried this myself not too long ago, but then we started to almost one-shot everything and i didn't finish

    i also couldn't find an event to see if a player actually accepted a resurrection. you could maybe store death players (UNIT_DIED), see if they where target of a resurretion (SPELL_RESURRECT) and check when they gain an aura, all while still in the same encounter. not sure about cpu load though. might even be flawed when a shaman uses his ankh after he got a resurrection

    when in a raid, i suggest using the events ENCOUNTER_START and ENCOUNTER_END (came with SoO i think, don't know if they implemented them retrospectively) instead of PLAYER_REGEN_... so that even if yourself die, the counter doesn't reset while the fight still continues. seems better suited, even if PLAYER_REGEN_ENABLED might work the same, not quiet sure

  4. #4
    Quote Originally Posted by zusiline View Post
    tried this myself not too long ago, but then we started to almost one-shot everything and i didn't finish

    i also couldn't find an event to see if a player actually accepted a resurrection. you could maybe store death players (UNIT_DIED), see if they where target of a resurretion (SPELL_RESURRECT) and check when they gain an aura, all while still in the same encounter. not sure about cpu load though. might even be flawed when a shaman uses his ankh after he got a resurrection

    when in a raid, i suggest using the events ENCOUNTER_START and ENCOUNTER_END (came with SoO i think, don't know if they implemented them retrospectively) instead of PLAYER_REGEN_... so that even if yourself die, the counter doesn't reset while the fight still continues. seems better suited, even if PLAYER_REGEN_ENABLED might work the same, not quiet sure
    I didn't know about those events! I'll make sure to use them!
    You could couple spell_aura_removed to get a soulstone ress, or spell_aura_applied (Void touched) for the Death Knight ress. I have no idea if Rebirth (druid) applies any buff, though...

  5. #5
    Deleted
    i managed to get something running (import string: http://pastebin.com/CM6HbyRV )
    it's basically what i said

    ENCOUNTER_START: init/reset vars
    UNIT_DIED .. store in a table
    SPELL_RESURRECT .. get notified when someone casted a resurrection
    SPELL_AURA_APPLIED .. if player is in our death table, he somehow is no longer dead. if he got a resurrection before, he most likely is no shaman and we can only res n-1 times
    ENCOUNTER_END

    you might want to add or change some logic to accustom for your output needs.
    as it stands, it reports to the raid channel whenever someone dies, gets resurrected and is alive again, while also always notifying how much res are left. as initial spam protection it will stop if 7 players are dead

Posting Permissions

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