1. #1

    Macro Say ONLY on Successful Cast

    As the title says.. Looking to make a macro here, but cant figure the writing for it to make something that ONLY goes off once, even if the button is spammed, because it only does the announcement of the macro's text when the spell that is linked with it is successfully cast.

    This will ofcourse make like say..a macro for using a CD that has a yell or something not go spamming that yell repeatedly if you spam the Macro, and will only announce it's text once as a yell when the CD is properly cast, taking out the GCD or CD clipping of the ability that leave you sending the same text announcement over and over again pointlessly.

    Like this macro here for example with a yell that would do exactly that if spammed while the spell tied to it is off CD, but will do the text announced yell if you click it macro and Avenging Wrath that is not on CD still doesn't cast for whatever reason..like say you're silenced, or stunned or something of the like.

    #showtooltip
    /run if GetSpellCooldown("Avenging Wrath") == 0 then SendChatMessage("We Strike with the Wrath of the Righteous!","yell"); end
    /use avenging wrath
    Last edited by Vx-Odessa-xV; 2020-01-30 at 06:35 AM.

  2. #2
    Try an addon like Cooldown Announcer or something similar or there might be a Weakaura on Wago. Almost certain that if you spam a macro, it will spam any chat channel text you have in it, so i'd go down the addon or weakaura route for that.

  3. #3
    Just make a weak aura.

    I haven't played retail in a long time but I remember it being something like

    combatlog>player>cast>success>spellname
    Hi Sephurik

  4. #4
    Quote Originally Posted by Moderatelol View Post
    Try an addon like Cooldown Announcer or something similar or there might be a Weakaura on Wago. Almost certain that if you spam a macro, it will spam any chat channel text you have in it, so i'd go down the addon or weakaura route for that.
    Mind giving me a quick rundown of how to go about making said weakaura for it?

    I have Weakaura2 and have used it for many xpacs but never have I messed with anything text announcement related with it, I always went the macro route..and I'm speaking ofcourse of how to make the text action that is part of it something that will not spam, and only go off if the spell tied to the aura is cast successfully.

  5. #5
    Banned FelPlague's Avatar
    Join Date
    Dec 2015
    Location
    Ontario,Canada
    Posts
    21,618
    Quote Originally Posted by Vx-Odessa-xV View Post
    Mind giving me a quick rundown of how to go about making said weakaura for it?

    I have Weakaura2 and have used it for many xpacs but never have I messed with anything text announcement related with it, I always went the macro route
    I used to use speaknspell, it was an amazing add-on. You could set multiple phrases for it to randomly pick from. You could set them to ratios, and how often you wanted you chat to say something, if you wanted it to say it all the time or just in raids. And you could even have it say stuff when you got procs.
    I don't think it's being updated anymore sadly... I'm not sure if it works...

  6. #6
    Quote Originally Posted by FelPlague View Post
    I used to use speaknspell, it was an amazing add-on. You could set multiple phrases for it to randomly pick from. You could set them to ratios, and how often you wanted you chat to say something, if you wanted it to say it all the time or just in raids. And you could even have it say stuff when you got procs.
    I don't think it's being updated anymore sadly... I'm not sure if it works...
    Yea..8.3 purposefully broke addons that did things like this, cause people were using them to cheese fights and such. ..A guy made a post about it on the Speakinspell page on curseforge

  7. #7
    I quickly created a small addon that does what you want (but works with emotes, not a fan of yelling):

    Code:
    local function OnEvent(self, event, ...)
    
        IDOfSpellToAnnounce = 31884 -- Avenging Wrath: https://www.wowhead.com/spell=31884/avenging-wrath
    	
    	if ( event == "PLAYER_LOGIN" ) then
    		self:UnregisterEvent("PLAYER_LOGIN");
    		self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    	elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
    
    		local timestamp, eventType, _, _, sourceName, _, _, _, destName, _, _, spellID, _, _, extraSpellID = CombatLogGetCurrentEventInfo()
    		
    		if (eventType == "SPELL_CAST_SUCCESS") and spellID == IDOfSpellToAnnounce and sourceName == UnitName("player") then
    				intmsg = ("says: We Strike with the Wrath of the Righteous! " ..GetSpellLink(spellID).. " up!")
    				SendChatMessage(intmsg, "EMOTE")
    		end
    	end
    end
    
    local OdessaSpellAnnouncer = CreateFrame("Frame")
    OdessaSpellAnnouncer:RegisterEvent("PLAYER_LOGIN")
    OdessaSpellAnnouncer:SetScript("OnEvent", OnEvent)
    Last edited by Crusader86; 2020-01-30 at 07:30 AM.

  8. #8
    Quote Originally Posted by Crusader86 View Post
    I quickly created a small addon that does what you want (but works with emotes, not a fan of yelling):

    Code:
    local function OnEvent(self, event, ...)
    
        IDOfSpellToAnnounce = 31884 -- Avenging Wrath: https://www.wowhead.com/spell=31884/avenging-wrath
    	
    	if ( event == "PLAYER_LOGIN" ) then
    		self:UnregisterEvent("PLAYER_LOGIN");
    		self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    	elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
    
    		local timestamp, eventType, _, _, sourceName, _, _, _, destName, _, _, spellID, _, _, extraSpellID = CombatLogGetCurrentEventInfo()
    		
    		if (eventType == "SPELL_CAST_SUCCESS") and spellID == IDOfSpellToAnnounce and sourceName == UnitName("player") then
    				intmsg = ("says: We Strike with the Wrath of the Righteous! " ..GetSpellLink(spellID).. " up!")
    				SendChatMessage(intmsg, "EMOTE")
    		end
    	end
    end
    
    local OdessaSpellAnnouncer = CreateFrame("Frame")
    OdessaSpellAnnouncer:RegisterEvent("PLAYER_LOGIN")
    OdessaSpellAnnouncer:SetScript("OnEvent", OnEvent)
    I greatly appreciate the effort put into this, and thank you, Crusader..but I was asking for the coding to write a macro that performs this function so I could do this with multiple spells across multiple characters. ..And that macro there that I used as an example was from a friend thats an RPer that I know has his macro spam that yell as he is trying to cast Avenging Wrath, as I have seen it myself.. ..so this "only perform chat message on spell successful cast" macro coding I am trying to figureout is as much for me as it is for him.

  9. #9
    The following macro is 234 characters. It should theoretically send the chat message once on the same key press as Avenging Wrath being successfully used, but it's possible you need to press it again. Since you wanted spam protection, I assume you may end up mashing the key to get the cast off, so you should be fine anyways.
    I have not tested this macro.

    #showtooltip
    /use Avenging Wrath
    /run local t,s,d=GetTime(),GetSpellCooldown(31884) if t-s<d and not S_Y then S_Y=1 SendChatMessage("We Strike with the Wrath of the Righteous!","YELL") C_Timer.After(d-(t-s),function() S_Y=nil end) end


    An addon will work better. 8.2.5 protected SAY and YELL only outside instances. The true reason SAY, YELL, and CHANNEL were protected was to combat automated spam and they are still usable by addons inside instances, so the author of that comment on SpeakinSpell is incorrect with their "cheese fights" or "efficient Mechagon farming" assumptions. It was common for many years for a level 1 to stand in Stormwind or Orgrimmar and advertise things like gold selling. This change also thankfully killed trade spam such as guild ads and lazy item/service sellers. Blizzard allowed SAY and YELL in instances for addons such as DBM and BigWigs to continue doing their thing.

    If you reconsider using addon code, keep in mind the yell will only happen in instances. The macro above counts as a hardware event and will work anywhere.
    Last edited by Kanegasi; 2020-01-30 at 10:51 AM.


    addons
    weakauras
    Lua Wall of Shame
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  10. #10
    Quote Originally Posted by Kanegasi View Post
    The following macro is 234 characters. It should theoretically send the chat message once on the same key press as Avenging Wrath being successfully used, but it's possible you need to press it again. Since you wanted spam protection, I assume you may end up mashing the key to get the cast off, so you should be fine anyways.
    I have not tested this macro.

    #showtooltip
    /use Avenging Wrath
    /run local t,s,d=GetTime(),GetSpellCooldown(31884) if t-s<d and not S_Y then S_Y=1 SendChatMessage("We Strike with the Wrath of the Righteous!","YELL") C_Timer.After(d-(t-s),function() S_Y=nil end) end


    An addon will work better. 8.2.5 protected SAY and YELL only outside instances. The true reason SAY, YELL, and CHANNEL were protected was to combat automated spam and they are still usable by addons inside instances, so the author of that comment on SpeakinSpell is incorrect with their "cheese fights" or "efficient Mechagon farming" assumptions. It was common for many years for a level 1 to stand in Stormwind or Orgrimmar and advertise things like gold selling. This change also thankfully killed trade spam such as guild ads and lazy item/service sellers. Blizzard allowed SAY and YELL in instances for addons such as DBM and BigWigs to continue doing their thing.

    If you reconsider using addon code, keep in mind the yell will only happen in instances. The macro above counts as a hardware event and will work anywhere.
    I appreciate the assistance, but testing that macro there it sends on the key press use of the cooldown, aswell as if there is another press afterward while the ability is on cooldown it will send the yell a second time.
    Last edited by Vx-Odessa-xV; 2020-01-31 at 02:44 AM.

  11. #11
    Still looking for something possibly to make this macro a thing. As fun as it is having to see this yell bubble multiple times from my buddy in dungeons while we're clearing and other fun little happenings.. ..would absolutely love to find someone that can make this macro work that it will ONLY do it's announcement on the successful cast of the spell so he can use this to fix his many macros across many characters to be more "stream-line" I guess you could call it, while still giving him the entertainment of these "character flare" happenings as he plays.

  12. #12
    Quote Originally Posted by Vx-Odessa-xV View Post
    ..but I was asking for the coding to write a macro that performs this function so I could do this with multiple spells across multiple characters.
    Well, an addon works on all your characters. I updated the code I did for you a little bit, so it now has the yelling part (Blizzard made this function only work in instanced content) and works with multiple spells. It should be clear how to add additional spells. With this, your friend doesn't have to fiddle around with (m)any macros anymore, but can configure everything in one place.

    Code:
    local function OnEvent(self, event, ...)
    
        IDsOfSpellToAnnounce  =
    	{
    		Paladin_AvengingWrath = {31884},  -- https://www.wowhead.com/spell=31884/avenging-wrath
    		Paladin_HolyLight = {82326}, -- https://www.wowhead.com/spell=82326/holy-light
    		Priest_PowerWordShield = {17} -- https://www.wowhead.com/spell=17/power-word-shield
    	}
    	
    	SentencesToAnnounce =
    	{
    		Paladin_AvengingWrath = {"We Strike with the Wrath of the Righteous!"},
    		Paladin_HolyLight = {"By the Holy Light, let me heal your wounds!"},
    		Priest_PowerWordShield = {"Shields up!"}
    	}
    	
    	if ( event == "PLAYER_LOGIN" ) then
    		self:UnregisterEvent("PLAYER_LOGIN");
    		self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    	elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
    
    		local _, eventType, _, _, sourceName, _, _, _, _, _, _, spellID, _, _, _ = CombatLogGetCurrentEventInfo()
    		
    		if (eventType == "SPELL_CAST_SUCCESS") and sourceName == UnitName("player") then
    			for index, value in pairs(IDsOfSpellToAnnounce) do
    				IDOfSpellCastedByPlayer = IDsOfSpellToAnnounce[index][1]
    				if IDOfSpellCastedByPlayer == spellID then
    					SentenceForSpellCastedByPlayer = SentencesToAnnounce[index][1]
    					PlayerIsInInstance, _ = IsInInstance()
    					if PlayerIsInInstance then
    						Message = (SentenceForSpellCastedByPlayer .. " " ..GetSpellLink(spellID))
    						SendChatMessage(Message, "YELL")
    					else
    						Message = ("says: " ..SentenceForSpellCastedByPlayer .. " " ..GetSpellLink(spellID))
    						SendChatMessage(Message, "EMOTE")
    					end
    				end
    			end
    		end
    	end
    end
    
    local OdessaSpellAnnouncer = CreateFrame("Frame")
    OdessaSpellAnnouncer:RegisterEvent("PLAYER_LOGIN")
    OdessaSpellAnnouncer:SetScript("OnEvent", OnEvent)
    Last edited by Crusader86; 2020-02-02 at 08:17 PM.

  13. #13
    Quote Originally Posted by Crusader86 View Post
    Well, an addon works on all your characters. I updated the code I did for you a little bit, so it now has the yelling part (Blizzard made this function only work in instanced content) and works with multiple spells. It should be clear how to add additional spells.

    Code:
    local function OnEvent(self, event, ...)
    
        IDsOfSpellToAnnounce  =
    	{
    		Paladin_AvengingWrath = {31884},  -- https://www.wowhead.com/spell=31884/avenging-wrath
    		Paladin_HolyLight = {82326}, -- https://www.wowhead.com/spell=82326/holy-light
    		Priest_PowerWordShield = {17} -- https://www.wowhead.com/spell=17/power-word-shield
    	}
    	
    	SentencesToAnnounce =
    	{
    		Paladin_AvengingWrath = {"We Strike with the Wrath of the Righteous!"},
    		Paladin_HolyLight = {"By the Holy Light, let me heal your wounds!"},
    		Priest_PowerWordShield = {"Shields up!"}
    	}
    	
    	if ( event == "PLAYER_LOGIN" ) then
    		self:UnregisterEvent("PLAYER_LOGIN");
    		self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    	elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
    
    		local _, eventType, _, _, sourceName, _, _, _, _, _, _, spellID, _, _, _ = CombatLogGetCurrentEventInfo()
    		
    		if (eventType == "SPELL_CAST_SUCCESS") and sourceName == UnitName("player") then
    			for index, value in pairs(IDsOfSpellToAnnounce) do
    				IDOfSpellCastedByPlayer = IDsOfSpellToAnnounce[index][1]
    				if IDOfSpellCastedByPlayer == spellID then
    					SentenceForSpellCastedByPlayer = SentencesToAnnounce[index][1]
    					PlayerIsInInstance, _ = IsInInstance()
    					if PlayerIsInInstance then
    						Message = (SentenceForSpellCastedByPlayer .. " " ..GetSpellLink(spellID))
    						SendChatMessage(Message, "YELL")
    					else
    						Message = ("says: " ..SentenceForSpellCastedByPlayer .. " " ..GetSpellLink(spellID))
    						SendChatMessage(Message, "EMOTE")
    					end
    				end
    			end
    		end
    	end
    end
    
    local OdessaSpellAnnouncer = CreateFrame("Frame")
    OdessaSpellAnnouncer:RegisterEvent("PLAYER_LOGIN")
    OdessaSpellAnnouncer:SetScript("OnEvent", OnEvent)
    Nothing, unfortunately

  14. #14
    Not tested:

    #showtooltip
    /run nospaz = nospaz or 0 if (nospaz == 0) then if GetSpellCooldown("Avenging Wrath") == 0 then nospaz = 1 SendChatMessage("Strike!","yell"); end else if GetSpellCooldown("Avenging Wrath") <> 0 then nospaz = 0 end end
    /use avenging wrath

    1. if nospaz is undefined, make it zero.
    2. if nospaz is zero, then check to see if we should send a message, if nospaz is 1 and spell is on CD, set nospaz to zero.
    3. if the spell cooldown is zero in our message check, set nospaz to 1.

  15. #15
    People actually like the yells on cooldowns and arent being trolls? I thought everyone that did this was just trying to be annoying or funny.

  16. #16
    Quote Originally Posted by Markatron View Post
    People actually like the yells on cooldowns and arent being trolls? I thought everyone that did this was just trying to be annoying or funny.
    not everyone is introverted.

    - - - Updated - - -

    Basically you need TWO checks:

    If the cd is zero,
    If the cd is NOT zero.

    And you change the toggle depending on those factors, OR if a yell has been used.

  17. #17
    My buddy wants to do something similar. He plays as a Pally, and whenever he uses Avengers Shield he wants his character to say "When Captain America throws his mighty shield!". How might I make that happen for him? Every time he throws it.

Posting Permissions

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