魔獸插件25:代碼
laohu25.lua的內(nèi)容:
```
FB = FB or CreateFrame("Frame")
FB:RegisterEvent("CHAT_MSG_CHANNEL")
if B then
? ? print("關(guān)")
? ? B = nil
else
? ? print("開")
? ? B = function(self,event,...)
? ? ? a = {...}
? ? ? message = a[1]
? ? ? sender = a[2]
? ? ? channelIdx = a[8]
? ? ? print(message,sender,channelIdx)
? ? ? if sender=="Jfkldsf-祖爾格拉布" and string.find(message,"hello") then
? ? ? ? SendChatMessage(sender.."這個(gè)人是帥哥","CHANNEL",nil,channelIdx)
? ? ? end
? ? end
end
FB:SetScript("OnEvent", B)
```
標(biāo)簽: