WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Who used the Legendary Ring? (https://www.wowinterface.com/forums/showthread.php?t=52566)

Tonyleila 08-01-15 01:35 PM

Who used the Legendary Ring?
 
I'm looking for a simple AddOn (NO Weak Aura) to post in chat who used the Legendary Ring. It shoud be possible to post in raid chat and alternative post only to myself so noone else sees it.

I found this weakaura script, if it helps:
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 spellId == 187615 or spellId == 187611 or spellId == 187614  then 
            name = sourceName
            return true
        end
    end
end


Phanx 08-02-15 11:45 PM

This should probably work:
Code:

local ringSpells = { [187611] = true, [187614] = true, [187615] = true }

local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(f, event, _, combatEvent, _, sourceGUID, sourceName, sourceFlags, _, _, _, _, _, spellID, spellName)
        if combatEvent == "SPELL_CAST_SUCCESS" and ringSpells[spellID] and bit.band(sourceFlags, COMBATLOG_OBJECT_AFFILIATION_RAID) > 0 then
                local message = sourceName .. " used a legendary ring!"

                -- Post to own chat frame:
                DEFAULT_CHAT_FRAME:AddMessage(message)

                -- Post to own raid warning frame:
                RaidNotice_AddMessage(RaidWarningFrame, message, ChatTypeInfo["SYSTEM"])

                -- Send to instance/raid/party chat:
                -- SendChatMessage(message, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup() and "PARTY")
        end
end)

Comment or uncomment the lines for different message outputs as desired.

Tonyleila 08-03-15 02:05 PM

Welcome back Phanx! Your "probably working" code works fine as always, thank you very much!
I called it the Legendary Ring Tracker :rolleyes:!
Just wish it had a slash command to change the chat output so I don't have to reload for it ;)
Like "/lrt raid" to toggle the raid output on and off with a chat confirmation that it is on/off.
If the raid output is on it coud also disable the personal DEFAULT_CHAT_FRAME output. :cool:

I guess it woud be complicated to change the text based on what ring has been used?
187614, 187615, = NAME used the Meele DPS legendary ring!
187611, = NAME used the Caster DPS legendary ring!
187612, = NAME used the Healer legendary ring!
187613, = NAME used the Tank legendary ring!

Seerah 08-03-15 05:12 PM

http://wow.gamepedia.com/Creating_a_slash_command ;)

Tonyleila 08-04-15 04:15 PM

Nevermind. I'm using Exorsus Raid Tools and it was just added as a modul. Thanks for your help!

Beelsebub 08-12-15 03:08 AM

Hi Phanx.
I used your code to create an addon for it.
Problem is I wanted to test it, so I created a raid in my Garrison and used my ring, but I didnt get any message in chat saying I used it.
Will it only say in raid-frames if other people uses it or have I done something wrong ?
Best regards.

Tonyleila 08-12-15 11:27 AM

1 Attachment(s)
Quote:

Originally Posted by Beelsebub (Post 310283)
Hi Phanx.
I used your code to create an addon for it.
Problem is I wanted to test it, so I created a raid in my Garrison and used my ring, but I didnt get any message in chat saying I used it.
Will it only say in raid-frames if other people uses it or have I done something wrong ?
Best regards.

Try out this one:

Beelsebub 08-12-15 12:02 PM

Thank you so much..
Will try it today on todays raid and see how it goes..

archunter 09-09-15 11:34 AM

Can you add to this - if a class is NOT melee - to whisper them to get in melee? That would be a HUGE help!

Thanks

Tonyleila 09-10-15 01:47 PM

Quote:

Originally Posted by archunter (Post 310871)
Can you add to this - if a class is NOT melee - to whisper them to get in melee? That would be a HUGE help!

Thanks

Why woud you want range dps in the meele camp when the ring is active?

Rilgamon 09-11-15 09:16 AM

The ring is doing its damage in 20 yd radius at the end of its activation.

archunter 09-12-15 09:59 AM

Quote:

Originally Posted by Tonyleila (Post 310909)
Why woud you want range dps in the meele camp when the ring is active?

If non-melee activate the ring (outside of melee) they essentially waste the end-effect. So rather than completely "calling them out" - perhaps best to simply advice them to get their ass into melee before the explosion.

As the tooltip states - the explosion occurs 20 yd around the "initiating" player, which is why melee should really be the only ones popping the ring.

So- if you can add some type of whisper and raid call when non-melee pop it - that would be awesome.

I tried something basic - but could use some help:
Code:

               
                local class = select(2, UnitClass(sourceName))
                if class == "HUNTER" then message = sourceName .. "<< non-melee << used Legendary DPS Ring"
                        elseif class == "MAGE" then message = sourceName .. "<< non-melee << used Legendary DPS Ring"
                        elseif class == "WARLOCK" then message = sourceName .. "<< non-melee << used Legendary DPS Ring"
                else message = sourceName .. " used Legendary DPS Ring" end

Thanks

Tonyleila 09-13-15 09:07 AM

You coud ask if it can be added to Exorsus Raid Tools. If possible it then shoud first check if someone is realy more then 20y away from the boss or any mob

archunter 09-16-15 05:58 PM

Quote:

Originally Posted by Tonyleila (Post 310964)
You coud ask if it can be added to Exorsus Raid Tools. If possible it then shoud first check if someone is realy more then 20y away from the boss or any mob

Done - well - if in the meantime perhaps you want to hack something to add to this one maybe? :)


All times are GMT -6. The time now is 07:40 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI