1. #1

    Alice Taunt Watch

    Hello guys/gals.

    I am having trouble, Alice Taunt Watch is giving me problems.

    You see it used to announce all taunts performed in party and raids into a System message (Think "Your share of the loot is 15silver" style message).

    Now it announces /party and /raid.

    I have managed to change the LUA so that it announce in EMOTE, but surely there is a way to get it to announce like a system message in chat frame.

    Bellow is line 39 from lua

    SendChatMessage("<TauntWatch> " .. sourceName .. " used " .. GetSpellLink(spellid) .. " on " .. destName .. ".", "EMOTE",lang)


    Anyone got any ideas to help me out???

  2. #2
    Give this a shot. Change the hex color to whatever you want. I'm not sure what color the system messages are exactly.

    Code:
    local hexColor = "34B7E2";
    DEFAULT_CHAT_FRAME:AddMessage("\124cff" .. hexColor .. "<TauntWatch> " .. sourceName .. " used " .. GetSpellLink(spellid) .. " on " .. destName .. "." .. "\124r");
    Last edited by Woogs; 2012-09-20 at 12:36 PM.

  3. #3
    Code:
    DEFAULT_CHAT_FRAME:AddMessage("<|cFFFFFF00[TauntWatch]|r> " .. sourceName .. " used " .. GetSpellLink(spellid) .. " on me.", ".",lang)
    [/QUOTE]

    Thanks for setting me on the correct path, Learning LUA by trail and error, I know understand SendChatMessage is trying to send a message to a channel. Default_Chat_Frame, places them like the system message.

    Again Thanks heaps, all fixed and working perfectly.

  4. #4
    Deleted
    To be specific:
    - SendChatMessage actually sends a chat message. As in, other players can see it.
    - DEFAULT_CHAT_FRAME:AddMessage() (and by extension, print()) simply add a message to your chat window. Other players cannot see this.

  5. #5
    Quote Originally Posted by Treeston View Post
    To be specific:
    - SendChatMessage actually sends a chat message. As in, other players can see it.
    - DEFAULT_CHAT_FRAME:AddMessage() (and by extension, print()) simply add a message to your chat window. Other players cannot see this.
    I learnt that yesterday, The whole LUA thing has sparked an interest and is something I may follow up, Might make myself a basic boring mod for the hell of learning something new.

  6. #6
    I wrote an addon to be similar to the pre-5.0.4 version along with Monk taunt, Shaman's Unleashed Earth, all the class colors, tank stances, Misdirect/Tricks of the Trade, and pet taunts/threat abilities. Feel free to change the ChatFrame or whatever you need to your likings. For simplicity, I did not include a config to enable/disable the warnings.

    Code:
    local taunted = CreateFrame("Frame")
    
    taunted:SetScript("OnEvent", function(self, event, _, eventType, _, _, casterName, _, _, _, targetName, _, _, spellID, ...) 
    	if IsInGroup() or IsInRaid() then
    		if (eventType == "SPELL_CAST_SUCCESS") then
    			--Death Knight
    			if (spellID == 56222) or (spellID == 49576) then --Dark Command/Death Grip
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFC41F3B" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			elseif (spellID == 48263) then --Blood Presence
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFC41F3B" .. casterName .. "|r gained " .. GetSpellLink(spellID) .. ".")
    			--Druid
    			elseif (spellID == 6795) then --Growl
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFFF7D0A" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Hunter
    			elseif (spellID == 20736) or (spellID == 34477) then --Distracting Shot/Misdirection
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFABD473" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			elseif (spellID == 2649) or (spellID == 53477) then --Hunter Pet stuff
    				ChatFrame1:AddMessage("|cFFFFFF00[PetTaunted]|r |cFFABD473" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Monk
    			elseif (spellID == 115069) then --Stance of the Sturdy Ox
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFF558A84" .. casterName .. "|r gained " .. GetSpellLink(spellID) .. ".")
    			elseif (spellID == 115546) then --Provoke 
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFF558A84" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Paladin
    			elseif (spellID == 62124) then --Reckoning
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFF58CBA" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			elseif (spellID == 25780) then --Righteous Fury
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFF58CBA" .. casterName .. "|r gained " .. GetSpellLink(spellID) .. ".")
    			--Rogue
    			elseif (spellID == 57934) then --Tricks of the Trade
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFFFF569" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Warlock
    			elseif (spellID == 17735) or (spellID == 3716) then --Voidwalker Suffering/Torment
    				ChatFrame1:AddMessage("|cFFFFFF00[PetTaunted]|r |cFF9482C9" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Warrior
    			elseif (spellID == 71) or (spellID == 114192) then --Defensive Stance
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFC79C6E" .. casterName .. "|r gained " .. GetSpellLink(spellID) .. ".")
    			elseif (spellID == 355) then --Taunt
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFC79C6E" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			elseif (spellID == 114192) then --Mocking Banner (Untested)
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFFC79C6E" .. casterName .. "|r used " .. GetSpellLink(spellID) .. ".")
    			end
    		elseif (eventType == "SPELL_AURA_APPLIED") then
    			--Shaman
    			if (spellID == 73684) then --Unleashed Earth
    				ChatFrame1:AddMessage("|cFFFFFF00[Taunted]|r |cFF0070DE" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			--Hunter Pet
    			elseif (spellID == 19577) then --Hunter Pet Intimidation (Untested, hopefully fixed)
    				ChatFrame1:AddMessage("|cFFFFFF00[PetTaunted]|r |cFFABD473" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r.")
    			end
    		end
    	end
    end)
    
    taunted:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    Last edited by Newbie95816; 2012-09-21 at 08:44 AM. Reason: Fixed Hunter Pet Intimidation

  7. #7
    Code:
    elseif (spellID == 61999) then --Raise Ally
    SendChatMessage:AddMessage("|cFFFFFF00[Taunt]|r |cFFC41F3B" .. casterName .. "|r used " .. GetSpellLink(spellID) .. " on |cFFFF0000" .. targetName .. "|r." "RAID",lang)

    Newbie95816, Thanks. I have changed the LUA over to your's (I hope this is allowed) as I liked the layout of each class being shown.

    I wanted to add a SendChatMessage when any of the three battle rezzes get used.

    Would the above coding be the correct way to get it to announce to /Raid. (Im not at home at the moment so cant log in and test this out.???

    Also please Letme know if copying your script is not allowed and I will revert back to Alice Taunt Watch .

  8. #8
    Feel free to use it.. I updated the code a bit, there was an error with Hunter's Pet Intimidation before since I didn't have a hunter to test it.

    Code:
    elseif (spellID == 61999) then --Raise Ally
    	if IsInRaid() then
    		SendChatMessage("[BattleRez] " .. casterName .. " used " .. GetSpellLink(spellID) .. " on " .. targetName .. ".", "RAID", nil)
    	else
    		SendChatMessage("[BattleRez] " .. casterName .. " used " .. GetSpellLink(spellID) .. " on " .. targetName .. ".", "PARTY", nil)
    	end
    I haven't tested the code above. The addon should check if player is in raid/party all the way on top already.

    Information about the SendChatMessage function could be found:
    http://wowprogramming.com/docs/api/SendChatMessage
    http://www.wowpedia.org/API_SendChatMessage
    Last edited by mmocba105e19de; 2012-09-21 at 01:06 PM. Reason: Removed WoWwiki, no longer updated.

  9. #9
    Deleted
    Note that you cannot add color codes to chat messages.

Posting Permissions

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