Thread Tools Display Modes
08-01-15, 01:35 PM   #1
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
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
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
08-02-15, 11:45 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-03-15, 02:05 PM   #3
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Welcome back Phanx! Your "probably working" code works fine as always, thank you very much!
I called it the Legendary Ring Tracker !
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.

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!
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 08-03-15 at 02:20 PM.
  Reply With Quote
08-03-15, 05:12 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://wow.gamepedia.com/Creating_a_slash_command
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-04-15, 04:15 PM   #5
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Nevermind. I'm using Exorsus Raid Tools and it was just added as a modul. Thanks for your help!
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
08-12-15, 03:08 AM   #6
Beelsebub
A Defias Bandit
Join Date: Aug 2015
Posts: 2
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.
  Reply With Quote
08-12-15, 11:27 AM   #7
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Originally Posted by Beelsebub View Post
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:
Attached Files
File Type: zip LegendaryRingTracker01.zip (1.2 KB, 438 views)
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
08-12-15, 12:02 PM   #8
Beelsebub
A Defias Bandit
Join Date: Aug 2015
Posts: 2
Thank you so much..
Will try it today on todays raid and see how it goes..
  Reply With Quote
09-09-15, 11:34 AM   #9
archunter
A Defias Bandit
 
archunter's Avatar
Join Date: Nov 2006
Posts: 3
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
  Reply With Quote
09-10-15, 01:47 PM   #10
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Originally Posted by archunter View Post
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?
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
09-11-15, 09:16 AM   #11
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
The ring is doing its damage in 20 yd radius at the end of its activation.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
09-12-15, 09:59 AM   #12
archunter
A Defias Bandit
 
archunter's Avatar
Join Date: Nov 2006
Posts: 3
Originally Posted by Tonyleila View Post
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

Last edited by archunter : 09-12-15 at 05:05 PM.
  Reply With Quote
09-13-15, 09:07 AM   #13
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
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
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
09-16-15, 05:58 PM   #14
archunter
A Defias Bandit
 
archunter's Avatar
Join Date: Nov 2006
Posts: 3
Originally Posted by Tonyleila View Post
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?
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Who used the Legendary Ring?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off