Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gsay(text)
- SendChatMessage(text, "GUILD")
- end
- Watchlist = { }
- illegalspells = { "Eye of Kilrogg", "Mind Vision", "Far Sight", "Reincarnation", "Rebirth", "Lay on Hands", "Raise Ally", "Army of the Dead", "Astral Recall", "Nitro Boosts", "Saronite Bomb", "Cobalt Frag Bomb", "Explosive Sheep", "Divine Intervention", "Soulstone Resurrection", "Inferno" }
- illegalpotions = { "Indestructible", "Speed", "Wild Magic", "Arcane Protection", "Fire Protection", "Frost Protection", "Nature Protection", "Shadow Protection", "Nightmare Slumber", "Ironshield", "Fel Mana", "Destruction", "Holy Protection", "Stoneshield", "Restoration", "Resistance", "Free Action", "Swim Speed", "Shrouding", "Living Free Action", "Sneaking", "Greater Stoneshield", "Greater Dreamless Sleep", "Petrification", "Invulnerability", "Dreamless Sleep", "Haste", "Major Dreamless Sleep" }
- illegalelixirs = { "Pygmy Oil", "Lesser Intellect", "Health", "Armor", "Fire Power", "Strong Troll's Blood Elixir", "Greater Intellect", "Detect Undead", "Agility", "Greater Water Breathing", "Onslaught Elixir", "Detect Demon", "Greater Agility", "Arcane Elixir", "Mighty Agility", "Wrath Elixir", "Healing Power", "Major Strength", "Mighty Strength", "Guru's Elixir", "Spellpower Elixir", "Greater Arcane Elixir", "Mighty Thoughts", "Weak Troll's Blood Elixir", "Lesser Armor" }
- if not enforcerFrame then
- enforcerFrame = CreateFrame("Frame", nil, UIParent)
- end
- local frame = enforcerFrame
- frame:RegisterEvent("COMBAT_LOG_EVENT")
- frame:SetScript("OnEvent", function(self, event, ...)
- for i,v in ipairs(illegalspells) do
- if (arg10 == illegalspells[i]) and (arg2 == "SPELL_RESURRECT") or (arg10 == illegalspells[i]) and (arg2 == "SPELL_AURA_APPLIED") or (arg10 == illegalspells[i]) and (arg2 == "SPELL_CAST_SUCCESS") and (arg10 == "Lay on Hands") or (arg10 == illegalspells[i]) and (arg2 == "SPELL_SUMMON") and (arg10 ~= "Eye of Kilrogg") and (arg10 ~= "Army of the Dead") or (arg10 == illegalspells[i]) and (arg2 == "SPELL_CAST_SUCCESS") and (arg10 == "Raise Ally") or (arg10 == illegalspells[i]) and (arg2 == "SPELL_CAST_SUCCESS") and (arg10 == "Reincarnation") then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- end
- if (arg10) then
- if (arg2 ~= "SPELL_AURA_APPLIED") and (arg2 ~= "SPELL_AURA_REMOVED") and (arg2 ~= "SPELL_HEAL") and (arg2 ~= "SPELL_ENERGIZE") and (arg2 ~= "SPELL_PERIODIC_HEAL") then
- if (string.find(arg10, "Flask of(.*)")) and (arg10 ~= "Flask of the North") and (arg2 ~= "SPELL_AURA_APPLIED") or (string.find(arg10, "Elixir of(.*)")) or (arg10 == "Fortitude") and (arg2 ~= "SPELL_AURA_APPLIED") and (arg2 ~= "SPELL_AURA_REMOVED") or (string.find(arg10, "(.*)Forgotten Kings")) or (string.find(arg10, "(.*)Potion")) and (arg2 ~= "SPELL_HEAL") or (string.find(arg10, "Restore Mana")) and (arg2 ~= "SPELL_ENERGIZE") or (string.find(arg10, "Noggenfogger Elixir")) then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- end
- end
- if (arg2 == "SPELL_CAST_SUCCESS") and (arg10) then
- for i,v in ipairs(illegalpotions) do
- if (arg10 == illegalpotions[i]) and (arg10 ~= "Shadow Protection") then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- end
- if (arg10 == "Shadow Protection") and (arg9 == 7242) or (arg9 == 28537) or (arg9 == 17548) or (arg9 == 53915) then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- end
- if (arg2 == "SPELL_AURA_APPLIED") and (arg10) then
- for i,v in ipairs(illegalelixirs) do
- if (arg10 == illegalelixirs[i]) then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- end
- end
- if (arg2 == "SPELL_DAMAGE") and (string.find(arg10, "(.*)Frag Bomb")) then
- for i,v in ipairs(Watchlist) do
- if (arg4 == Watchlist[i]) then
- spell = GetSpellLink(arg9)
- gsay(arg4.. " used a forbidden spell. Spell: " ..spell.. ". " ..arg4.. " is disqualified.")
- end
- end
- end
- if (arg10 == "Eye of Kilrogg") or (arg10 == "Thunderstorm") then print (arg4.. " used " ..arg10) end
- end)
- function ClearWatchList()
- table.wipe(Watchlist)
- print("Watch List has been cleared.")
- CombatLogClearEntries()
- end
- function RemoveWatchList()
- RemoveTarget = UnitName("target")
- if (RemoveTarget) then
- for i,v in ipairs(Watchlist) do
- if (Watchlist[i] == RemoveTarget) then
- table.remove(Watchlist, i)
- print("Watchlist successfully updated." ..RemoveTarget.. " was removed.")
- end
- end
- end
- if not RemoveTarget then print("Please target someone to remove from the list.") end
- end
- function AddWatchList()
- Addtarget = UnitName("target")
- if (Addtarget) then
- table.insert(Watchlist, Addtarget)
- print(Addtarget.. " added to watch list.")
- else
- print("Please target someone to add to the list.")
- end
- end
- SLASH_wl1 = '/wl'
- function SlashCmdList.wl(msg, editbox)
- if (msg == "Show") or (msg == "show") then
- WatchList:Show()
- end
- if (msg == "Hide") or (msg == "hide") then
- WatchList:Hide()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement