1. #1

    WeakaAuras (How do I show the casters name when I get a buff)

    Hey,

    I would like some help with how you create a WA that can show a players name if they throw a buff (like Vigilance) on me.

    This is how I want it to be

    And then instead of it saying Vigilance I want to see who casted it on me.
    We got 2 warriors in my guild, and I gotta know exactly who threw it on me.
    ----------------------------------------------------------------------------------------
    This is how my Raid CD WA looks like when someone in my raid casts Stampeding Roar


    Here is the WA string - http://pastebin.com/ubsFBuNu

    And here are the settings for the WA

    The custom Trigger
    Code:
    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 == "ironbark" then   
                name = sourceName
                return true
            end
        end
    end
    ;;EDIT

    I guess the part I gotta change is this one?
    But I dont know what I should add, since it should only track when they cast stuff one me, nobody else.
    Is it possible to add something like when spell is sucessful on player then bla bla bla
    Code:
     if message == "SPELL_CAST_SUCCESS" then
    Last edited by Hekkipekki; 2015-02-11 at 02:04 PM.

  2. #2
    Deleted
    This code dump is a huge mess, but I'd look at
    if spellName == "Stampeding Roar" then
    and change it whichever spell you want tracked.

  3. #3
    Quote Originally Posted by Erzengel View Post
    This code dump is a huge mess, but I'd look at

    and change it whichever spell you want tracked.
    If you replace just the spell, then it just shows who casted the spell.
    What I wanna know is who cast the spell on me and only show it when they cast it on me.

    How the WA work atm is that like whenever someone cast the spell i have mentioned in the code it shows the Icon of the spell and the players name.

    ;;EDIT
    I changed the #1 post so it looks better.
    Last edited by Hekkipekki; 2015-02-11 at 02:03 PM.

  4. #4
    Code:
    if destGUID == UnitGUID("player") then
    Should do that.

  5. #5
    Quote Originally Posted by Sinelle View Post
    Code:
    if destGUID == UnitGUID("player") then
    Should do that.
    Its the only thing I gotta change?
    Where do I add it in?

  6. #6
    An easier way is to simply put a normal aura trigger so it shows up whenever you have the buff, and then put this function as a custom text (%c)
    Code:
    function()
        return UnitName((select(8,UnitBuff("player","Vigilance"))or "")) or UNKNOWN
    end
    and just replace "Vigilance" by the buff name.

    Should look like this WA
    Last edited by Timp; 2015-02-11 at 05:45 PM.

  7. #7
    Quote Originally Posted by Hekkipekki View Post
    Where do I add it in?
    Doesn't really matter. For example, you can replace line #2 with:
    Code:
    if message == "SPELL_CAST_SUCCESS" and destGUID == UnitGUID("player") then

  8. #8
    Thank you Timp and Sinelle going to try both options

    ;;Edit
    Both options worked. Dont know whats the best though =)
    But thank you so much for the help
    Last edited by Hekkipekki; 2015-02-13 at 07:06 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
  •