Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not dreamsay then
- CreateFrame("Frame","lapy")
- lapy:RegisterEvent("CHAT_MSG_SAY")
- lapy:RegisterEvent("CHAT_MSG_YELL")
- lapy:RegisterEvent("CHAT_MSG_RAID")
- lapy:RegisterEvent("CHAT_MSG_PARTY")
- lapy:RegisterEvent("CHAT_MSG_WHISPER")
- lapy:SetScript("OnEvent",function(self,event,...)
- local arg={...}
- -- if arg[1]=="Лапу" then CastSpellByName("Дар дикой природы") end
- local lapytext = {"Лапу","лапу","лапку","Лапку","баф","lapy","lapu","бафните","бафни"}
- local i
- for i = 1, #lapytext do
- if string.find(arg[1],lapytext[i])
- and UnitAffectingCombat("player") == nil then
- -- Cast(48470)
- CastSpellByName("Дар дикой природы")
- end
- end
- end)
- dreamsay = true end
- -- lapy:RegisterEvent("CHAT_MSG_CHANNEL")
- -- Group setting
- if IsInRaid() then group = "raid"
- elseif IsInGroup() then group = "party" end
- if GetNumGroupMembers() > 0 then
- -- Loop party or raid members
- for i=1,GetNumGroupMembers() do
- local member = group..i
- -- Do not dispel these spells
- local blackList = {}
- -- Dispel Type
- local dispelType = {Magic,Disease}
- -- At any given time, we can only have a total of 40 debuffs
- for i=1,40 do
- -- Loop our dispelTypes
- for x=1,#dispelType do
- -- Only fetch debuffs matching dispelType
- if select(5,UnitDebuff(member,i)) == dispelType[x] then
- -- If it's blacklisted, don't dispel it
- for i=1,#blackList do
- if UnitDebuff(member,blackList[i]) then return false end
- end
- -- At this point, we've cross referenced everything - Proceed
- return true
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement