thorpedosg

5sWEG4PD

Aug 6th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. local MyFilterAddon = CreateFrame'Frame'
  2.  
  3. local function myChatFilter(self,event,arg1,...)
  4. if arg1:find("Выносливость") then
  5. return false, gsub(arg1, "Выносливость", "123"), ...
  6. end
  7. -- if arg1:find("green") then
  8. -- return false, gsub(arg1, "green", "blue"), ...
  9. -- end
  10. end
  11.  
  12. function MyFilterAddon:PLAYER_LOGIN()
  13. ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", myChatFilter)
  14. ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", myChatFilter)
  15. ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", myChatFilter)
  16. ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", myChatFilter)
  17. end
  18. MyFilterAddon:RegisterEvent'PLAYER_LOGIN'
  19.  
  20. MyFilterAddon:SetScript('OnEvent', function(self, event, ...)
  21. return self[event](self, event )
  22. end)
Add Comment
Please, Sign In to add comment