1. #1

    Creating Enable/Disable Addon Slash Command

    I'm quite new to coding and recently made an addon that's really as simple as it gets. One point the downloaders were mentioning to me and one I myself knew would be an issue, is that it's intended for arena, so when outside of arena it tends to get annoying.

    Can anyone assist me in creating a simple /enable and /disable command for the addon? I've read through the code of many other addons in my WoW folder but I'm still rather clueless.
    'E's not pinin'! 'E's passed on! This parrot is no more! He has ceased to be! 'E's expired and gone to meet 'is maker! 'E's a stiff! Bereft of life, 'e rests in peace! If you hadn't nailed 'im to the perch 'e'd be pushing up the daisies! 'Is metabolic processes are now 'istory! 'E's off the twig! 'E's kicked the bucket, 'e's shuffled off 'is mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-PARROT!!

  2. #2

    Re: Creating Enable/Disable Addon Slash Command

    My knowledge of Lua is virtually non existent, but is it not possible to identify the zone you are in, I belive by its ID or something and have the addon function only when in an arena.
    Quote Originally Posted by DeadmanWalking View Post
    Your forgot to include the part where we blame casuals for everything because blizzard is catering to casuals when casuals got jack squat for new content the entire expansion, like new dungeons and scenarios.
    Quote Originally Posted by Reinaerd View Post
    T'is good to see there are still people valiantly putting the "Ass" in assumption.

  3. #3

    Re: Creating Enable/Disable Addon Slash Command

    It's not even as complicated as that. I don't want to make the addon zone specific like Gladius for example, I just want to add the commands "/ccr (addon acronym) disable" to stop all functions from happening regardless of location, and then "/ccr enable" to reapply them.
    'E's not pinin'! 'E's passed on! This parrot is no more! He has ceased to be! 'E's expired and gone to meet 'is maker! 'E's a stiff! Bereft of life, 'e rests in peace! If you hadn't nailed 'im to the perch 'e'd be pushing up the daisies! 'Is metabolic processes are now 'istory! 'E's off the twig! 'E's kicked the bucket, 'e's shuffled off 'is mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-PARROT!!

  4. #4

    Re: Creating Enable/Disable Addon Slash Command

    See if this makes any sense to you, because it doesn't to me.

    Code:
    function Frame1_OnLoad()
    
    	SlashCmdList["CCR"] = CCRSlashCommand;
    
    	SLASH_CCR1 = "/ccr enable";
    
    	SLASH_CCR2 = "/ccr disable";
    
    end
    
    
    
    -- SlashCommand: handle slash commands
    
    
    
    function CCRSlashCommand(command)
    
    	-- turn on
    
    	if (command == "on" or command == "enable") then
    
    		CCRAddonEnable();
    
    		Frame1:Show();
    
    	-- turn off
    
    	elseif (command == "off" or command == "disable") then
    
    		CCRAddonDisable();
    
    		Frame1:Hide();
    
    	end
    
    end

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  5. #5
    Brewmaster dawawe's Avatar
    10+ Year Old Account
    Join Date
    Jul 2009
    Location
    Atl, Ga
    Posts
    1,265

    Re: Creating Enable/Disable Addon Slash Command

    If u cant find a command this is what i use


    http://wow.curse.com/downloads/wow-a...tails/acp.aspx

  6. #6

    Re: Creating Enable/Disable Addon Slash Command

    A quick google came up with the following.
    See if this helps http://www.wowwiki.com/Creating_a_slash_command.

    Basically how to create a slash command for your addon, with how you enable or disable the functionalty being down to you, since that depends on how your addon works.
    If it is based on some sort of hook or loop, then maybe some variable that acts as a toggle.
    A saved variable would enable that setting to persist between logins.
    Quote Originally Posted by DeadmanWalking View Post
    Your forgot to include the part where we blame casuals for everything because blizzard is catering to casuals when casuals got jack squat for new content the entire expansion, like new dungeons and scenarios.
    Quote Originally Posted by Reinaerd View Post
    T'is good to see there are still people valiantly putting the "Ass" in assumption.

  7. #7

    Re: Creating Enable/Disable Addon Slash Command

    Quote Originally Posted by dawawe
    If u cant find a command this is what i use

    http://wow.curse.com/downloads/wow-a...tails/acp.aspx
    As useful as this may be, I'm thinking in terms of my making it useful for my downloaders seeing as they more than likely won't have that addon.

    Quote Originally Posted by lawomous
    See if this makes any sense to you, because it doesn't to me.
    Tried to add it in and just got "Type '/help' for a listing of a few commands." In game :_<

    If it's of any help to anyone, this is the entire addon code. I'm simply looking to add a slash command so that when disabled, the reports won't occur until reenabled.
    Code:
    local CCReport = CreateFrame("Frame")
    CCReport.playername = UnitName("player")
    
    CCReport:SetScript("OnEvent",function()
    ------------------------------------------
    --					--
    --		Crowd Controls		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAPPED{skull}", "PARTY")
    	end
    --Sap^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAP REFRESHED{skull}", "PARTY")
    	end
    --Sap (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Fear^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Fear (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY'D{skull}", "PARTY")
    	end
    --Polymorph^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY REFRESHED{skull}", "PARTY")
    	end
    --Polymorph (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51514))
    	then
    		SendChatMessage("{skull}HEXED{skull}", "PARTY")
    	end
    --Hex^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2094))
    	then
    		SendChatMessage("{skull}BLINDED{skull}", "PARTY")
    	end
    --Blind^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCED{skull}", "PARTY")
    	end
    --Seduction (Succubus)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCE REFRESHED{skull}", "PARTY")
    	end
    --Seduction (Succubus) (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 33786))
    	then
    		SendChatMessage("{skull}CYCLONED{skull}", "PARTY")
    	end
    --Cyclone^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 605))
    	then
    		SendChatMessage("{skull}MIND CONTROLLED{skull}", "PARTY")
    	end
    --Mind Control^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 8122 or arg9 == 8124 or arg9 == 10888 or arg9 == 10890))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Psychic Scream^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20511))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Intimidating Shout^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20066))
    	then
    		SendChatMessage("{skull}REPENTANCED{skull}", "PARTY")
    	end
    --Repentance^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 14309 or arg9 == 60210))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Freezing Trap / Arrow^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISHED{skull}", "PARTY")
    	end
    --Banish^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISH REFRESHED{skull}", "PARTY")
    	end
    --Banish (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATED{skull}", "PARTY")
    	end
    --Hibernate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATE REFRESHED{skull}", "PARTY")
    	end
    --Hibernate (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51209))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Hungering Cold^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47476))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Strangulate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5211))
    	then
    		SendChatMessage("{skull}BASHED{skull}", "PARTY")
    	end
    --Bash^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 53308))
    	then
    		SendChatMessage("{skull}ROOTED{skull}", "PARTY")
    	end
    --Entangling Roots^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Scare Beast^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Scare Beast (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 49012))
    	then
    		SendChatMessage("{skull}STUNNED{skull}", "PARTY")
    	end
    --Wyvern Sting^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10308))
    	then
    		SendChatMessage("{skull}HoJ'd{skull}", "PARTY")
    	end
    --Hammer Of Justice^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Turn Evil^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Turn Evil (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLED{skull}", "PARTY")
    	end
    --Shackle Undead^
    	if ((arg7 == CCReport.playername)
    	and ( arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLE REFRESHED{skull}", "PARTY")
    	end
    --Shackle Undead (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 58582))
    	then
    		SendChatMessage("{skull}I JUST HIT STONECLAW TOTEM /PALM{skull}", "PARTY")
    	end
    --Stoneclaw Stun^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 17928))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Howl Of Terror^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 42917 or arg9 == 33395))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Frost Nova / Water Elemental Freeze^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 44572))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Deep Freeze^
    ------------------------------------------
    --					--
    --		Silences		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 34490))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silencing Shot^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 55021 or arg9 == 18469))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Counterspell^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18425))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Kick^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1330))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Garrote^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 63529))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Priest)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 24259))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Spell Lock (Fel Hunter)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18498))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Warrior)^
    ------------------------------------------
    --					--
    --		Warlock			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA APPLIED{cross}", "PARTY")
    	end
    --Unstable Affliction Applied^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REMOVED{cross}", "PARTY")
    	end
    --Unstable Affliction Removed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REFRESHED{cross}", "PARTY")
    	end
    --Unstable Affliction Refreshed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 31117 or arg9 == 43523 or arg9 == 65813))
    	then
    		SendChatMessage("{cross}I JUST DISPELLED UNSTABLE AFFLICTION /PALM{cross}", "PARTY")
    	end
    --Unstable Affliction Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47811))
    	then
    		SendChatMessage("{circle}IMMOLATED{circle}", "PARTY")
    	end
    --Immolate^
    ------------------------------------------
    --					--
    --		Dispels			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 50642 or arg9 == 20578 or arg9 == 31538 or arg9 == 33963 or arg9 == 50643 or arg9 == 20577))
    	then
    		SendChatMessage("OMNOMNOM", "PARTY")
    	end
    --FFFFFFFFF
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20217))
    	then
    		SendChatMessage("{triangle}KINGS - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Kings Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48936))
    	then
    		SendChatMessage("{triangle}WISDOM - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Wisdom Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48932))
    	then
    		SendChatMessage("{triangle}MIGHT - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Might Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53307))
    	then
    		SendChatMessage("{triangle}THORNS - REMOVED{triangle}", "PARTY")
    	end
    --Thorns Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48469))
    	then
    		SendChatMessage("{triangle}MotW - REMOVED{triangle}", "PARTY")
    	end
    --Mark of the Wild Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48043))
    	then
    		SendChatMessage("{triangle}SPIRIT - REMOVED{triangle}", "PARTY")
    	end
    --Prayer of Spirit Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48169))
    	then
    		SendChatMessage("{triangle}SHADOW PROTECTION - REMOVED{triangle}", "PARTY")
    	end
    --Shadow Protection Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 42995 or arg9 == 61024))
    	then
    		SendChatMessage("{triangle}INTELLECT - REMOVED{triangle}", "PARTY")
    	end
    --Arcane Intellect / Dalaran Intellect Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48161))
    	then
    		SendChatMessage("{triangle}FORTITUDE - REMOVED{triangle}", "PARTY")
    	end
    --Power Word: Fortitude Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 54646))
    	then
    		SendChatMessage("{triangle}FOCUS MAGIC - REMOVED{triangle}", "PARTY")
    	end
    --Focus Magic Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20911))
    	then
    		SendChatMessage("{triangle}SANCTUARY - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Sanctuary Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53563))
    	then
    		SendChatMessage("{triangle}BEACON - REMOVED{triangle}", "PARTY")
    	end
    --Beacon of Light Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 25780))
    	then
    		SendChatMessage("{triangle}RIGHTEOUS FURY - REMOVED{triangle}", "PARTY")
    	end
    --Righteous Fury Dispelled^
    end)
    
    CCReport:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    DEFAULT_CHAT_FRAME:AddMessage("CCReport loaded - Sup bro.",1,0,0)
    'E's not pinin'! 'E's passed on! This parrot is no more! He has ceased to be! 'E's expired and gone to meet 'is maker! 'E's a stiff! Bereft of life, 'e rests in peace! If you hadn't nailed 'im to the perch 'e'd be pushing up the daisies! 'Is metabolic processes are now 'istory! 'E's off the twig! 'E's kicked the bucket, 'e's shuffled off 'is mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-PARROT!!

  8. #8

    Re: Creating Enable/Disable Addon Slash Command

    Hi Teliko,

    Might take some testing... but you can create a slash command that simply changes a boolean variable, and nest all of your current if/then conditions within an outside check of the boolean variable. So, for instance, to set up standard slash command functionality (this is just an example), try this:

    Code:
    local function SlashCmd(cmd,self)
    	 if (cmd:match"disable") then
    		(set boolean variable value here)
        elseif (cmd:match"enable") then
            (set alternate value to the boolean variable here)
        else
            (message indicating wrong value entered, or something)
        end
    end
    
    SlashCmdList["YourAddon"] = SlashCmd;
    SLASH_YOURADDONSTUFF = "/ccr";
    Code:
      if(enabled == true)
        if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAPPED{skull}", "PARTY")
    	end
    --Sap^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAP REFRESHED{skull}", "PARTY")
    	end
    --Sap (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Fear^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Fear (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY'D{skull}", "PARTY")
    	end
    --Polymorph^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY REFRESHED{skull}", "PARTY")
    	end
    --Polymorph (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51514))
    	then
    		SendChatMessage("{skull}HEXED{skull}", "PARTY")
    	end
    --Hex^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2094))
    	then
    		SendChatMessage("{skull}BLINDED{skull}", "PARTY")
    	end
    --Blind^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCED{skull}", "PARTY")
    	end
    --Seduction (Succubus)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCE REFRESHED{skull}", "PARTY")
    	end
    --Seduction (Succubus) (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 33786))
    	then
    		SendChatMessage("{skull}CYCLONED{skull}", "PARTY")
    	end
    --Cyclone^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 605))
    	then
    		SendChatMessage("{skull}MIND CONTROLLED{skull}", "PARTY")
    	end
    --Mind Control^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 8122 or arg9 == 8124 or arg9 == 10888 or arg9 == 10890))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Psychic Scream^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20511))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Intimidating Shout^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20066))
    	then
    		SendChatMessage("{skull}REPENTANCED{skull}", "PARTY")
    	end
    --Repentance^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 14309 or arg9 == 60210))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Freezing Trap / Arrow^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISHED{skull}", "PARTY")
    	end
    --Banish^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISH REFRESHED{skull}", "PARTY")
    	end
    --Banish (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATED{skull}", "PARTY")
    	end
    --Hibernate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATE REFRESHED{skull}", "PARTY")
    	end
    --Hibernate (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51209))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Hungering Cold^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47476))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Strangulate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5211))
    	then
    		SendChatMessage("{skull}BASHED{skull}", "PARTY")
    	end
    --Bash^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 53308))
    	then
    		SendChatMessage("{skull}ROOTED{skull}", "PARTY")
    	end
    --Entangling Roots^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Scare Beast^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Scare Beast (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 49012))
    	then
    		SendChatMessage("{skull}STUNNED{skull}", "PARTY")
    	end
    --Wyvern Sting^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10308))
    	then
    		SendChatMessage("{skull}HoJ'd{skull}", "PARTY")
    	end
    --Hammer Of Justice^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Turn Evil^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Turn Evil (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLED{skull}", "PARTY")
    	end
    --Shackle Undead^
    	if ((arg7 == CCReport.playername)
    	and ( arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLE REFRESHED{skull}", "PARTY")
    	end
    --Shackle Undead (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 58582))
    	then
    		SendChatMessage("{skull}I JUST HIT STONECLAW TOTEM /PALM{skull}", "PARTY")
    	end
    --Stoneclaw Stun^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 17928))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Howl Of Terror^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 42917 or arg9 == 33395))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Frost Nova / Water Elemental Freeze^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 44572))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Deep Freeze^
    ------------------------------------------
    --					--
    --		Silences		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 34490))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silencing Shot^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 55021 or arg9 == 18469))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Counterspell^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18425))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Kick^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1330))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Garrote^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 63529))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Priest)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 24259))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Spell Lock (Fel Hunter)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18498))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Warrior)^
    ------------------------------------------
    --					--
    --		Warlock			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA APPLIED{cross}", "PARTY")
    	end
    --Unstable Affliction Applied^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REMOVED{cross}", "PARTY")
    	end
    --Unstable Affliction Removed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REFRESHED{cross}", "PARTY")
    	end
    --Unstable Affliction Refreshed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 31117 or arg9 == 43523 or arg9 == 65813))
    	then
    		SendChatMessage("{cross}I JUST DISPELLED UNSTABLE AFFLICTION /PALM{cross}", "PARTY")
    	end
    --Unstable Affliction Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47811))
    	then
    		SendChatMessage("{circle}IMMOLATED{circle}", "PARTY")
    	end
    --Immolate^
    ------------------------------------------
    --					--
    --		Dispels			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 50642 or arg9 == 20578 or arg9 == 31538 or arg9 == 33963 or arg9 == 50643 or arg9 == 20577))
    	then
    		SendChatMessage("OMNOMNOM", "PARTY")
    	end
    --FFFFFFFFF
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20217))
    	then
    		SendChatMessage("{triangle}KINGS - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Kings Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48936))
    	then
    		SendChatMessage("{triangle}WISDOM - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Wisdom Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48932))
    	then
    		SendChatMessage("{triangle}MIGHT - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Might Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53307))
    	then
    		SendChatMessage("{triangle}THORNS - REMOVED{triangle}", "PARTY")
    	end
    --Thorns Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48469))
    	then
    		SendChatMessage("{triangle}MotW - REMOVED{triangle}", "PARTY")
    	end
    --Mark of the Wild Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48043))
    	then
    		SendChatMessage("{triangle}SPIRIT - REMOVED{triangle}", "PARTY")
    	end
    --Prayer of Spirit Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48169))
    	then
    		SendChatMessage("{triangle}SHADOW PROTECTION - REMOVED{triangle}", "PARTY")
    	end
    --Shadow Protection Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 42995 or arg9 == 61024))
    	then
    		SendChatMessage("{triangle}INTELLECT - REMOVED{triangle}", "PARTY")
    	end
    --Arcane Intellect / Dalaran Intellect Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48161))
    	then
    		SendChatMessage("{triangle}FORTITUDE - REMOVED{triangle}", "PARTY")
    	end
    --Power Word: Fortitude Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 54646))
    	then
    		SendChatMessage("{triangle}FOCUS MAGIC - REMOVED{triangle}", "PARTY")
    	end
    --Focus Magic Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20911))
    	then
    		SendChatMessage("{triangle}SANCTUARY - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Sanctuary Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53563))
    	then
    		SendChatMessage("{triangle}BEACON - REMOVED{triangle}", "PARTY")
    	end
    --Beacon of Light Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 25780))
    	then
    		SendChatMessage("{triangle}RIGHTEOUS FURY - REMOVED{triangle}", "PARTY")
    	end
    --Righteous Fury Dispelled^
     end
    end)
    This will enable user entries via chat command, however you need to fill in the blanks with your own code. I just recommend nesting everything within another check of that boolean variable though, perhaps call it "enabled", set it to true by default. If the user types in /ccr disabled, then set the boolean value to false, send an addon message and register/catch the event so you can have live updating. You may not have to send the message, even, since on-event will make the check to see if the enabled variable is true every time it fires. Just my two cents, hope that helps.

    -Mistra50



  9. #9

    Re: Creating Enable/Disable Addon Slash Command

    As helpful as that info was, you probably overestimate my knowledge with coding. I threw them together as well as I know how, yet I'm still getting the "Type '/help' for a listing of a few commands." message in game upon trying to enter a /ccr command. This was my failure of a result

    Code:
    local function SlashCmd(cmd,self)
    	 if (cmd:match"disable") then
    		DEFAULT_CHAT_FRAME:AddMessage("CCReport Disabled",1,0,0)
        elseif (cmd:match"enable") then
            DEFAULT_CHAT_FRAME:AddMessage("CCReport Enabled",0,1,0)
        else
            DEFAULT_CHAT_FRAME:AddMessage("Unknown command. Enter either '/ccr enable' to activate CCReport, or '/ccr disable' to deactivate it.",1,0,0)
        end
    end
    
    SlashCmdList["YourAddon"] = SlashCmd;
    SLASH_YOURADDONSTUFF = "/ccr";
    
     if(enabled == true)
        if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAPPED{skull}", "PARTY")
    	end
    --Sap^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAP REFRESHED{skull}", "PARTY")
    	end
    --Sap (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Fear^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Fear (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY'D{skull}", "PARTY")
    	end
    --Polymorph^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY REFRESHED{skull}", "PARTY")
    	end
    --Polymorph (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51514))
    	then
    		SendChatMessage("{skull}HEXED{skull}", "PARTY")
    	end
    --Hex^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2094))
    	then
    		SendChatMessage("{skull}BLINDED{skull}", "PARTY")
    	end
    --Blind^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCED{skull}", "PARTY")
    	end
    --Seduction (Succubus)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCE REFRESHED{skull}", "PARTY")
    	end
    --Seduction (Succubus) (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 33786))
    	then
    		SendChatMessage("{skull}CYCLONED{skull}", "PARTY")
    	end
    --Cyclone^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 605))
    	then
    		SendChatMessage("{skull}MIND CONTROLLED{skull}", "PARTY")
    	end
    --Mind Control^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 8122 or arg9 == 8124 or arg9 == 10888 or arg9 == 10890))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Psychic Scream^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20511))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Intimidating Shout^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20066))
    	then
    		SendChatMessage("{skull}REPENTANCED{skull}", "PARTY")
    	end
    --Repentance^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 14309 or arg9 == 60210))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Freezing Trap / Arrow^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISHED{skull}", "PARTY")
    	end
    --Banish^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISH REFRESHED{skull}", "PARTY")
    	end
    --Banish (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATED{skull}", "PARTY")
    	end
    --Hibernate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATE REFRESHED{skull}", "PARTY")
    	end
    --Hibernate (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51209))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Hungering Cold^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47476))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Strangulate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5211))
    	then
    		SendChatMessage("{skull}BASHED{skull}", "PARTY")
    	end
    --Bash^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 53308))
    	then
    		SendChatMessage("{skull}ROOTED{skull}", "PARTY")
    	end
    --Entangling Roots^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Scare Beast^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Scare Beast (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 49012))
    	then
    		SendChatMessage("{skull}STUNNED{skull}", "PARTY")
    	end
    --Wyvern Sting^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10308))
    	then
    		SendChatMessage("{skull}HoJ'd{skull}", "PARTY")
    	end
    --Hammer Of Justice^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Turn Evil^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Turn Evil (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLED{skull}", "PARTY")
    	end
    --Shackle Undead^
    	if ((arg7 == CCReport.playername)
    	and ( arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLE REFRESHED{skull}", "PARTY")
    	end
    --Shackle Undead (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 58582))
    	then
    		SendChatMessage("{skull}I JUST HIT STONECLAW TOTEM /PALM{skull}", "PARTY")
    	end
    --Stoneclaw Stun^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 17928))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Howl Of Terror^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 42917 or arg9 == 33395))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Frost Nova / Water Elemental Freeze^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 44572))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Deep Freeze^
    ------------------------------------------
    --					--
    --		Silences		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 34490))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silencing Shot^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 55021 or arg9 == 18469))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Counterspell^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18425))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Kick^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1330))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Garrote^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 63529))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Priest)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 24259))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Spell Lock (Fel Hunter)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18498))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Warrior)^
    ------------------------------------------
    --					--
    --		Warlock			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA APPLIED{cross}", "PARTY")
    	end
    --Unstable Affliction Applied^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REMOVED{cross}", "PARTY")
    	end
    --Unstable Affliction Removed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REFRESHED{cross}", "PARTY")
    	end
    --Unstable Affliction Refreshed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 31117 or arg9 == 43523 or arg9 == 65813))
    	then
    		SendChatMessage("{cross}I JUST DISPELLED UNSTABLE AFFLICTION /PALM{cross}", "PARTY")
    	end
    --Unstable Affliction Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47811))
    	then
    		SendChatMessage("{circle}IMMOLATED{circle}", "PARTY")
    	end
    --Immolate^
    ------------------------------------------
    --					--
    --		Dispels			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 50642 or arg9 == 20578 or arg9 == 31538 or arg9 == 33963 or arg9 == 50643 or arg9 == 20577))
    	then
    		SendChatMessage("OMNOMNOM", "PARTY")
    	end
    --FFFFFFFFF
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20217))
    	then
    		SendChatMessage("{triangle}KINGS - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Kings Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48936))
    	then
    		SendChatMessage("{triangle}WISDOM - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Wisdom Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48932))
    	then
    		SendChatMessage("{triangle}MIGHT - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Might Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53307))
    	then
    		SendChatMessage("{triangle}THORNS - REMOVED{triangle}", "PARTY")
    	end
    --Thorns Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48469))
    	then
    		SendChatMessage("{triangle}MotW - REMOVED{triangle}", "PARTY")
    	end
    --Mark of the Wild Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48043))
    	then
    		SendChatMessage("{triangle}SPIRIT - REMOVED{triangle}", "PARTY")
    	end
    --Prayer of Spirit Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48169))
    	then
    		SendChatMessage("{triangle}SHADOW PROTECTION - REMOVED{triangle}", "PARTY")
    	end
    --Shadow Protection Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 42995 or arg9 == 61024))
    	then
    		SendChatMessage("{triangle}INTELLECT - REMOVED{triangle}", "PARTY")
    	end
    --Arcane Intellect / Dalaran Intellect Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48161))
    	then
    		SendChatMessage("{triangle}FORTITUDE - REMOVED{triangle}", "PARTY")
    	end
    --Power Word: Fortitude Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 54646))
    	then
    		SendChatMessage("{triangle}FOCUS MAGIC - REMOVED{triangle}", "PARTY")
    	end
    --Focus Magic Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20911))
    	then
    		SendChatMessage("{triangle}SANCTUARY - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Sanctuary Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53563))
    	then
    		SendChatMessage("{triangle}BEACON - REMOVED{triangle}", "PARTY")
    	end
    --Beacon of Light Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 25780))
    	then
    		SendChatMessage("{triangle}RIGHTEOUS FURY - REMOVED{triangle}", "PARTY")
    	end
    --Righteous Fury Dispelled^
     end
    end)
    'E's not pinin'! 'E's passed on! This parrot is no more! He has ceased to be! 'E's expired and gone to meet 'is maker! 'E's a stiff! Bereft of life, 'e rests in peace! If you hadn't nailed 'im to the perch 'e'd be pushing up the daisies! 'Is metabolic processes are now 'istory! 'E's off the twig! 'E's kicked the bucket, 'e's shuffled off 'is mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-PARROT!!

  10. #10

    Re: Creating Enable/Disable Addon Slash Command

    While I am not an expert, I define all of my slash commands in the following way.


    Code:
    SLASH_CCR1 = "/ccr";
    SlashCmdList["CCR"] = CCR_SlashHandler;
    
    
    --Slashcommands
    function CCR_SlashHandler(msg)
    
    	if (string.lower(msg)=="off") then 
            enable=0;
    
    	elseif (string.lower(msg)=="on") then 
            enable=1;
    
    	else
    		--Do something else
    	end
    end
    EDIT: Looking at your code it could be either case-sensitivity or the addition of "STUFF" not making it work properly.
    Quote Originally Posted by Xhosas
    Why do ppl thing that dodge isnt good in ICC? i mean if u have alot 25 bananas and 25 oranges and someone steals u 20 bananas, what will u do, buy back some bananas or buy more oranges?

  11. #11

    Re: Creating Enable/Disable Addon Slash Command

    Aye, I apologize, I got a little too liberal with syntax in my example. This is how I have the set up the slash commands in the oUF_D3OrbsLight modification:

    Code:
    SlashCmdList["D3Stuff"] = SlashCmd;
    SLASH_D3Stuff1 = "/d3"; --end of slash command list
    Be sure also that you declare and initialize the boolean variable "enabled" to true, just make sure it's done before the event declaration. I'm sorry if I was confusing earlier

  12. #12

    Re: Creating Enable/Disable Addon Slash Command

    Got it working using this code:

    Code:
    local CCReport = CreateFrame("Frame")
    CCReport.playername = UnitName("player")
    local enabled = 'true';
    SLASH_CCR1 = '/CCR';
    local function SlashCmd(cmd,self)
    	if (cmd == 'enable') then
    		enabled = 'true';
    		DEFAULT_CHAT_FRAME:AddMessage("CCReport Enabled",1,0,0);
        elseif (cmd == 'disable') then
            enabled = 'false';
    		DEFAULT_CHAT_FRAME:AddMessage("CCReport Disabled",0,1,0);
        else
            DEFAULT_CHAT_FRAME:AddMessage("Unknown command. Enter either '/ccr enable' to activate CCReport, or '/ccr disable' to deactivate it.",1,0,0);
        end
    end
    SlashCmdList["CCR"] = SlashCmd;
    
    CCReport:SetScript("OnEvent",function()
    ------------------------------------------
    --					--
    --		Crowd Controls		--
    --					--
    ------------------------------------------
    if (enabled == 'true') then
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAPPED{skull}", "PARTY")
    	end
    --Sap^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAP REFRESHED{skull}", "PARTY")
    	end
    --Sap (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Fear^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Fear (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY'D{skull}", "PARTY")
    	end
    --Polymorph^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY REFRESHED{skull}", "PARTY")
    	end
    --Polymorph (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51514))
    	then
    		SendChatMessage("{skull}HEXED{skull}", "PARTY")
    	end
    --Hex^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2094))
    	then
    		SendChatMessage("{skull}BLINDED{skull}", "PARTY")
    	end
    --Blind^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCED{skull}", "PARTY")
    	end
    --Seduction (Succubus)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCE REFRESHED{skull}", "PARTY")
    	end
    --Seduction (Succubus) (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 33786))
    	then
    		SendChatMessage("{skull}CYCLONED{skull}", "PARTY")
    	end
    --Cyclone^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 605))
    	then
    		SendChatMessage("{skull}MIND CONTROLLED{skull}", "PARTY")
    	end
    --Mind Control^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 8122 or arg9 == 8124 or arg9 == 10888 or arg9 == 10890))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Psychic Scream^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20511))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Intimidating Shout^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20066))
    	then
    		SendChatMessage("{skull}REPENTANCED{skull}", "PARTY")
    	end
    --Repentance^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 14309 or arg9 == 60210))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Freezing Trap / Arrow^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISHED{skull}", "PARTY")
    	end
    --Banish^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISH REFRESHED{skull}", "PARTY")
    	end
    --Banish (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATED{skull}", "PARTY")
    	end
    --Hibernate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATE REFRESHED{skull}", "PARTY")
    	end
    --Hibernate (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51209))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Hungering Cold^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47476))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Strangulate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5211))
    	then
    		SendChatMessage("{skull}BASHED{skull}", "PARTY")
    	end
    --Bash^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 53308))
    	then
    		SendChatMessage("{skull}ROOTED{skull}", "PARTY")
    	end
    --Entangling Roots^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Scare Beast^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Scare Beast (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 49012))
    	then
    		SendChatMessage("{skull}STUNNED{skull}", "PARTY")
    	end
    --Wyvern Sting^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10308))
    	then
    		SendChatMessage("{skull}HoJ'd{skull}", "PARTY")
    	end
    --Hammer Of Justice^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Turn Evil^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Turn Evil (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLED{skull}", "PARTY")
    	end
    --Shackle Undead^
    	if ((arg7 == CCReport.playername)
    	and ( arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLE REFRESHED{skull}", "PARTY")
    	end
    --Shackle Undead (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 58582))
    	then
    		SendChatMessage("{skull}I JUST HIT STONECLAW TOTEM /PALM{skull}", "PARTY")
    	end
    --Stoneclaw Stun^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 17928))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Howl Of Terror^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 42917 or arg9 == 33395))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Frost Nova / Water Elemental Freeze^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 44572))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Deep Freeze^
    ------------------------------------------
    --					--
    --		Silences		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 34490))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silencing Shot^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 55021 or arg9 == 18469))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Counterspell^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18425))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Kick^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1330))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Garrote^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 63529))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Priest)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 24259))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Spell Lock (Fel Hunter)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18498))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Warrior)^
    ------------------------------------------
    --					--
    --		Warlock			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA APPLIED{cross}", "PARTY")
    	end
    --Unstable Affliction Applied^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REMOVED{cross}", "PARTY")
    	end
    --Unstable Affliction Removed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REFRESHED{cross}", "PARTY")
    	end
    --Unstable Affliction Refreshed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 31117 or arg9 == 43523 or arg9 == 65813))
    	then
    		SendChatMessage("{cross}I JUST DISPELLED UNSTABLE AFFLICTION /PALM{cross}", "PARTY")
    	end
    --Unstable Affliction Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47811))
    	then
    		SendChatMessage("{circle}IMMOLATED{circle}", "PARTY")
    	end
    --Immolate^
    ------------------------------------------
    --					--
    --		Dispels			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 50642 or arg9 == 20578 or arg9 == 31538 or arg9 == 33963 or arg9 == 50643 or arg9 == 20577))
    	then
    		SendChatMessage("OMNOMNOM", "PARTY")
    	end
    --FFFFFFFFF
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20217))
    	then
    		SendChatMessage("{triangle}KINGS - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Kings Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48936))
    	then
    		SendChatMessage("{triangle}WISDOM - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Wisdom Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48932))
    	then
    		SendChatMessage("{triangle}MIGHT - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Might Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53307))
    	then
    		SendChatMessage("{triangle}THORNS - REMOVED{triangle}", "PARTY")
    	end
    --Thorns Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48469))
    	then
    		SendChatMessage("{triangle}MotW - REMOVED{triangle}", "PARTY")
    	end
    --Mark of the Wild Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48043))
    	then
    		SendChatMessage("{triangle}SPIRIT - REMOVED{triangle}", "PARTY")
    	end
    --Prayer of Spirit Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48169))
    	then
    		SendChatMessage("{triangle}SHADOW PROTECTION - REMOVED{triangle}", "PARTY")
    	end
    --Shadow Protection Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 42995 or arg9 == 61024))
    	then
    		SendChatMessage("{triangle}INTELLECT - REMOVED{triangle}", "PARTY")
    	end
    --Arcane Intellect / Dalaran Intellect Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48161))
    	then
    		SendChatMessage("{triangle}FORTITUDE - REMOVED{triangle}", "PARTY")
    	end
    --Power Word: Fortitude Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 54646))
    	then
    		SendChatMessage("{triangle}FOCUS MAGIC - REMOVED{triangle}", "PARTY")
    	end
    --Focus Magic Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20911))
    	then
    		SendChatMessage("{triangle}SANCTUARY - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Sanctuary Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53563))
    	then
    		SendChatMessage("{triangle}BEACON - REMOVED{triangle}", "PARTY")
    	end
    --Beacon of Light Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 25780))
    	then
    		SendChatMessage("{triangle}RIGHTEOUS FURY - REMOVED{triangle}", "PARTY")
    	end
    --Righteous Fury Dispelled^
    end
    end)
    
    
    CCReport:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    DEFAULT_CHAT_FRAME:AddMessage("CCReport loaded - Sup bro.",1,0,0)
    Tested it in-game and seemed to work fine.

  13. #13

    Re: Creating Enable/Disable Addon Slash Command

    Quote Originally Posted by zfire911
    Got it working using this code:

    Code:
    local CCReport = CreateFrame("Frame")
    CCReport.playername = UnitName("player")
    local enabled = 'true';
    SLASH_CCR1 = '/CCR';
    local function SlashCmd(cmd,self)
    	if (cmd == 'enable') then
    		enabled = 'true';
    		DEFAULT_CHAT_FRAME:AddMessage("CCReport Enabled",1,0,0);
        elseif (cmd == 'disable') then
            enabled = 'false';
    		DEFAULT_CHAT_FRAME:AddMessage("CCReport Disabled",0,1,0);
        else
            DEFAULT_CHAT_FRAME:AddMessage("Unknown command. Enter either '/ccr enable' to activate CCReport, or '/ccr disable' to deactivate it.",1,0,0);
        end
    end
    SlashCmdList["CCR"] = SlashCmd;
    
    CCReport:SetScript("OnEvent",function()
    ------------------------------------------
    --					--
    --		Crowd Controls		--
    --					--
    ------------------------------------------
    if (enabled == 'true') then
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAPPED{skull}", "PARTY")
    	end
    --Sap^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51724 or arg9 == 11297 or arg9 == 2070 or arg9 == 6770))
    	then
    		SendChatMessage("{skull}SAP REFRESHED{skull}", "PARTY")
    	end
    --Sap (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Fear^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5782 or arg9 == 6213 or arg9 == 6215))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Fear (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY'D{skull}", "PARTY")
    	end
    --Polymorph^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 188 or arg9 == 12824 or arg9 == 12825 or arg9 == 12826 or arg9 == 61305 or arg9 == 28272 or arg9 == 61721 or arg9 == 61780 or arg9 == 28271))
    	then
    		SendChatMessage("{skull}POLY REFRESHED{skull}", "PARTY")
    	end
    --Polymorph (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51514))
    	then
    		SendChatMessage("{skull}HEXED{skull}", "PARTY")
    	end
    --Hex^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2094))
    	then
    		SendChatMessage("{skull}BLINDED{skull}", "PARTY")
    	end
    --Blind^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCED{skull}", "PARTY")
    	end
    --Seduction (Succubus)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 6358))
    	then
    		SendChatMessage("{skull}SEDUCE REFRESHED{skull}", "PARTY")
    	end
    --Seduction (Succubus) (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 33786))
    	then
    		SendChatMessage("{skull}CYCLONED{skull}", "PARTY")
    	end
    --Cyclone^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 605))
    	then
    		SendChatMessage("{skull}MIND CONTROLLED{skull}", "PARTY")
    	end
    --Mind Control^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 8122 or arg9 == 8124 or arg9 == 10888 or arg9 == 10890))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Psychic Scream^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20511))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Intimidating Shout^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 20066))
    	then
    		SendChatMessage("{skull}REPENTANCED{skull}", "PARTY")
    	end
    --Repentance^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 14309 or arg9 == 60210))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Freezing Trap / Arrow^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISHED{skull}", "PARTY")
    	end
    --Banish^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 710 or arg9 == 18647))
    	then
    		SendChatMessage("{skull}BANISH REFRESHED{skull}", "PARTY")
    	end
    --Banish (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATED{skull}", "PARTY")
    	end
    --Hibernate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 2637 or arg9 == 18657 or arg9 == 18658))
    	then
    		SendChatMessage("{skull}HIBERNATE REFRESHED{skull}", "PARTY")
    	end
    --Hibernate (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 51209))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Hungering Cold^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47476))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Strangulate^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 5211))
    	then
    		SendChatMessage("{skull}BASHED{skull}", "PARTY")
    	end
    --Bash^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 53308))
    	then
    		SendChatMessage("{skull}ROOTED{skull}", "PARTY")
    	end
    --Entangling Roots^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Scare Beast^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1513))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Scare Beast (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 49012))
    	then
    		SendChatMessage("{skull}STUNNED{skull}", "PARTY")
    	end
    --Wyvern Sting^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10308))
    	then
    		SendChatMessage("{skull}HoJ'd{skull}", "PARTY")
    	end
    --Hammer Of Justice^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Turn Evil^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10326))
    	then
    		SendChatMessage("{skull}FEAR REFRESHED{skull}", "PARTY")
    	end
    --Turn Evil (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLED{skull}", "PARTY")
    	end
    --Shackle Undead^
    	if ((arg7 == CCReport.playername)
    	and ( arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 10955))
    	then
    		SendChatMessage("{skull}SHACKLE REFRESHED{skull}", "PARTY")
    	end
    --Shackle Undead (Refreshed)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 58582))
    	then
    		SendChatMessage("{skull}I JUST HIT STONECLAW TOTEM /PALM{skull}", "PARTY")
    	end
    --Stoneclaw Stun^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 17928))
    	then
    		SendChatMessage("{skull}FEARED{skull}", "PARTY")
    	end
    --Howl Of Terror^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 42917 or arg9 == 33395))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Frost Nova / Water Elemental Freeze^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 44572))
    	then
    		SendChatMessage("{skull}FROZEN{skull}", "PARTY")
    	end
    --Deep Freeze^
    ------------------------------------------
    --					--
    --		Silences		--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 34490))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silencing Shot^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 55021 or arg9 == 18469))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Counterspell^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18425))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Kick^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 1330))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Garrote^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 63529))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Priest)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 24259))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Spell Lock (Fel Hunter)^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 18498))
    	then
    		SendChatMessage("{skull}SILENCED{skull}", "PARTY")
    	end
    --Silence (Warrior)^
    ------------------------------------------
    --					--
    --		Warlock			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA APPLIED{cross}", "PARTY")
    	end
    --Unstable Affliction Applied^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REMOVED{cross}", "PARTY")
    	end
    --Unstable Affliction Removed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 30108 or arg9 == 30404 or arg9 == 30405 or arg9 == 47841 or arg9 == 47843))
    	then
    		SendChatMessage("{cross}UA REFRESHED{cross}", "PARTY")
    	end
    --Unstable Affliction Refreshed^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 31117 or arg9 == 43523 or arg9 == 65813))
    	then
    		SendChatMessage("{cross}I JUST DISPELLED UNSTABLE AFFLICTION /PALM{cross}", "PARTY")
    	end
    --Unstable Affliction Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED" or arg2 == "SPELL_AURA_REFRESH")
    	and (arg9 == 47811))
    	then
    		SendChatMessage("{circle}IMMOLATED{circle}", "PARTY")
    	end
    --Immolate^
    ------------------------------------------
    --					--
    --		Dispels			--
    --					--
    ------------------------------------------
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_APPLIED")
    	and (arg9 == 50642 or arg9 == 20578 or arg9 == 31538 or arg9 == 33963 or arg9 == 50643 or arg9 == 20577))
    	then
    		SendChatMessage("OMNOMNOM", "PARTY")
    	end
    --FFFFFFFFF
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20217))
    	then
    		SendChatMessage("{triangle}KINGS - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Kings Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48936))
    	then
    		SendChatMessage("{triangle}WISDOM - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Wisdom Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48932))
    	then
    		SendChatMessage("{triangle}MIGHT - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Might Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53307))
    	then
    		SendChatMessage("{triangle}THORNS - REMOVED{triangle}", "PARTY")
    	end
    --Thorns Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48469))
    	then
    		SendChatMessage("{triangle}MotW - REMOVED{triangle}", "PARTY")
    	end
    --Mark of the Wild Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48043))
    	then
    		SendChatMessage("{triangle}SPIRIT - REMOVED{triangle}", "PARTY")
    	end
    --Prayer of Spirit Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48169))
    	then
    		SendChatMessage("{triangle}SHADOW PROTECTION - REMOVED{triangle}", "PARTY")
    	end
    --Shadow Protection Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 42995 or arg9 == 61024))
    	then
    		SendChatMessage("{triangle}INTELLECT - REMOVED{triangle}", "PARTY")
    	end
    --Arcane Intellect / Dalaran Intellect Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 48161))
    	then
    		SendChatMessage("{triangle}FORTITUDE - REMOVED{triangle}", "PARTY")
    	end
    --Power Word: Fortitude Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 54646))
    	then
    		SendChatMessage("{triangle}FOCUS MAGIC - REMOVED{triangle}", "PARTY")
    	end
    --Focus Magic Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 20911))
    	then
    		SendChatMessage("{triangle}SANCTUARY - REMOVED{triangle}", "PARTY")
    	end
    --Blessing of Sanctuary Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 53563))
    	then
    		SendChatMessage("{triangle}BEACON - REMOVED{triangle}", "PARTY")
    	end
    --Beacon of Light Dispelled^
    	if ((arg7 == CCReport.playername)
    	and (arg2 == "SPELL_AURA_REMOVED")
    	and (arg9 == 25780))
    	then
    		SendChatMessage("{triangle}RIGHTEOUS FURY - REMOVED{triangle}", "PARTY")
    	end
    --Righteous Fury Dispelled^
    end
    end)
    
    
    CCReport:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    DEFAULT_CHAT_FRAME:AddMessage("CCReport loaded - Sup bro.",1,0,0)
    Tested it in-game and seemed to work fine.
    Retried it again, working perfectly now.
    Thanks for all your time, everyone.
    'E's not pinin'! 'E's passed on! This parrot is no more! He has ceased to be! 'E's expired and gone to meet 'is maker! 'E's a stiff! Bereft of life, 'e rests in peace! If you hadn't nailed 'im to the perch 'e'd be pushing up the daisies! 'Is metabolic processes are now 'istory! 'E's off the twig! 'E's kicked the bucket, 'e's shuffled off 'is mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-PARROT!!

Posting Permissions

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