1. #1
    Deleted

    WeakAuras raid debuff announcing (multiple targets)

    Hello, I have no knowledge regarding LUA (or weakauras), i've been trying to set up weakaura's to announce a certain debuff that a boss does to the raid which players have been afflicted with.

    example: Blade Lord does Wind Step on 2 people called Alice & Bob, these two get announced then by weakaura's.

    Now I've used http://www.wowace.com/addons/weakaur...ayer-names/#p2 as it had pretty much what I wanted, so far I have the following:

    PHP Code:
    dCewiaqiav1IOuJcO6uaLvPemlO4wkQDbvggG0XGOSmkP6zkvvtJs4AsiTnPiFtsX4uQkNtPk6DkvH7rj5FaQYbLKfkHQhciMOs0fvsBKs0hLqzKsioPuyLkLxcOmtGCtPO2js9tLkdvcwkeEkQMkaxvQQTcOYxvcDwkPyUusP9I4VsPbloSQwmeXJLktgsxMQnlP6ZqvJwQYPvKxRuLMTkDBKSBq(TkgUeTCfEoktNIRdQTlP03HinEiQopuA)KjiJaGWPiCuchLaGWho(PdeaSLoHp1DGiCS7QxN5gILZfTO7VMAkQf1S)A2hq3V1BYcs9zlSGW)oZ0bIraq4mZpmeaeoLZypEV1GT0jCEL1q4ONwkNXE8objeoLZypENW75yjgIHWHGPamMWJ3hmcnYiCKVREDMBiwo3K1RbznvttnbuKTVMakq3ZMi1NTWcc3mMWJ3heaeUbBPt4DWmZHIWrHhVz6ar4wq4DWmZHQT3eQt4DWmZHIW7GzMdfHxhgQZmDGa3R1HmyumtuoZ8uLyuOCg7X7yu6nH6a5zgFGrHDGhDEX63yjgf2bE050pLJrHDGhDUL3hpdJc7ap6Ce)eQL3hpdJcQZmfRFJLyuqDMH(PCmkOoZy59XZWOG6mdIFc1Y7JNHrbhoCGPnfL5zfG0Z72Rs9ZqbYrQYdpEfVwhYGrP7Hu(l7OGexrBkkZZkklOWlSccuBvFevTvfkaQX6sLhE8aWw6kGd5iv5HhpyAtrzEwrzbfEHvqGAR6JOQfXAZ7aU1Lkp84bGT0va)HhVs3HQ86g)Ivz4uNADuW0MIY8SIYck8cRGa1w1hrvBvHcGASUSD5o(QYdp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jC0jw59X2O7ar4nGm(O(35wBJUdeZA5L(92A50WB5(T(sNzgWDgc)EEucachM5TqpLtqcHpoxNaGWPGVMjcaIHyiCyM3c516dcsi8U7ZyeaeoBcc)1jCErQAUIMWPGVMjcacNxKQMROjfNyigIHyiCgHpS((AIWRLqJmlakqjgcba 

    The entire code is denoted using COMBAT_LOG_EVENT_UNFILTERED event:
    PHP Code:
    function(eventtimestampmessagehideCastersourceGUIDsourceNamesourceFlagssourceRaidFlagsdestGUIDdestNamedestFlagsdestRaidFlags, ...)
      -- 
    Check for new aura eventcan also be 
      
    --  * SPELL_AURA_APPLIED auraType (new aura)
      --  * 
    SPELL_AURA_REMOVED auraType (aura completely removed)
      --  * 
    SPELL_AURA_APPLIED_DOSE auraType amount (new stack of aura)
      --  * 
    SPELL_AURA_REMOVED_DOSE auraType amount (removed stack of aura)
      --  * 
    SPELL_AURA_REFRESH auraType (existing aura refreshed)
      --  * 
    SPELL_AURA_BROKEN auraType
      
    --  * SPELL_AURA_BROKEN_SPELL extraSpellID    extraSpellName    extraSchool    auraType 
      
    if message == "SPELL_AURA_APPLIED" then
        
    -- Additional arguments
        local spellId
    spellNamespellSchoolauraType = ...
        
        -- 
    Compare caster and spell
        
    if sourceName == "PlayerName" and (spellName == "Sated" or spellId == 57724then
          
    -- Add chat ("RAID" can also be "RAID_WARNING")
          
    SendChatMessage(sourceName or "UNKNOWN" .. " applied Aura " .. spellName or "UNKNOWN" .. (destName and " to " or "") .. destName or """SAY");

          -- 
    Want to whisper?
          if 
    destName then
             SendChatMessage
    (sourceName or "UNKNOWN" .. " applied Aura " .. spellName or "UNKNOWN" .. " to you!""WHISPER"nildestName);
          
    end

          
    -- Show display
          
    return true
        end
      end
    end 
    Now I've tested this code using Bloodlust on my shaman, the event triggers and it works fine however the chat function does not seem to be working correctly. It displays the sourcename and that's it, it does not add the applied aura or any of the rest, the whisper function works as in it whispers myself when I get the sated debuff (with my own BL) but again only with the playername and nothing else. I've had 2 others in the raid but none of them had a message or anything. I've played around slightly and got spellname, sourcename working however destName does not work, if I enter just a simple chat message with destname it just breaks for some reason.

    I've no clue what went wrong with the sendchatmessage, I hope someone could enlighten me.

    Thanks in advance.

  2. #2
    Try:
    Code:
    function(event, timestamp, message, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
    	-- Check for new aura event, can also be 
    	--  * SPELL_AURA_APPLIED auraType (new aura)
    	--  * SPELL_AURA_REMOVED auraType (aura completely removed)
    	--  * SPELL_AURA_APPLIED_DOSE auraType amount (new stack of aura)
    	--  * SPELL_AURA_REMOVED_DOSE auraType amount (removed stack of aura)
    	--  * SPELL_AURA_REFRESH auraType (existing aura refreshed)
    	--  * SPELL_AURA_BROKEN auraType
    	--  * SPELL_AURA_BROKEN_SPELL extraSpellID    extraSpellName    extraSchool    auraType 
    	if message == "SPELL_AURA_APPLIED" then
    		-- Additional arguments
    		local spellId, spellName, spellSchool, auraType = ...
    
    		-- Compare caster and spell
    		if sourceName == "PlayerName" and (spellName == "Sated" or spellId == 57724) then
    			-- Add chat ("RAID" can also be "RAID_WARNING")
    			local message = (sourceName or "UNKNOWN") .. " applied Aura " .. (spellName or "UNKNOWN");
    			if destName ~= nil then
    				message = message .. " to " .. destName;
    			end
    			SendChatMessage(message, "SAY");
    
    			-- Want to whisper?
    			if destName then
    				SendChatMessage((sourceName or "UNKNOWN") .. " applied Aura " .. (spellName or "UNKNOWN") .. " to you!", "WHISPER", nil, destName);
    			end
    
    			-- Show display
    			return true
    		end
    	end
    end

  3. #3
    Deleted
    I've tried it and it displays 'Playername applied Aura Sated" but doesn't include "to destName", I can't figure out why destination name isn't working at all.

    Thanks anyhow for the help

    [edit]: after using print(sourceName, spellName, destName) it seems that the first two work fine but destName returns nil

    [edit 2]: okay so it seems that spell_cast_start has a return function of nil in the combat log, silly me as I was using this to test.

    [edit 3]: I got it all working now, thanks for the help!

    ---------- Post added 2013-01-19 at 05:47 PM ----------

    One more question, is it possible to give these people a raid marker just like a bossmod does if they have the debuff? (as in use raid markers 1 to 8 and keep overwriting from 1 after it hits 8)
    Last edited by mmoc7596528317; 2013-01-19 at 04:19 PM.

  4. #4
    Deleted
    Names are valid unitIDs if the player is in your party or raid. Just pass them to SetRaidTarget (and keep a counter that increments from 1 to 8, then resets to 1.

  5. #5
    Deleted
    So is it possible to pass destName onto UnitID? http://wowprogramming.com/docs/api_types#unitID seems to not mention it.

  6. #6
    Deleted
    As I said, assuming the dest unit is in your group (it will be for Sated), its name is a valid unitID. Pass it to SetRaidTarget as arg1.
    Code:
    SetRaidTarget(destName,1-8)

  7. #7
    Deleted
    oh I see, thanks.

    ---------- Post added 2013-01-20 at 01:15 AM ----------

    Okay so I got everything working but the only problem is how do I implement the function to increment the counter? Global variables don't seem to work in the WeakAura's trigger custom box because right now I have no way of telling the trigger function that it's the 2nd run or so on.

    (Sorry for these questions, I'm completely inexperienced in any sort of coding)

    Thanks in advance.

    Edit: never mind! solved it.
    Last edited by mmoc7596528317; 2013-01-20 at 01:26 AM.

Posting Permissions

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