View Single Post
01-24-12, 07:26 PM   #5
kitwinz
A Defias Bandit
Join Date: Jan 2012
Posts: 3
Smile

omg thanks! works like a charm! There's only one small issue.

How would I modify that code so that when I say "hello world" it does nothing, but when other people say "hello world" it executes the script? Also, when it executes, it makes me say "hi" twice. That's the only issue I'm having now. I really appreciate all the help.

I think it would be something like this, but i can't seem to find the variable to define yourself:

Code:
local frame=CreateFrame("frame");
frame:RegisterEvent("CHAT_MSG_SAY");
frame:SetScript("OnEvent",function(self,event,msg,author)
    if event=="CHAT_MSG_SAY" and msg=="hello world" and author~= then
        SendChatMessage("hi","SAY");
    end
end);

Last edited by kitwinz : 01-24-12 at 09:02 PM.
  Reply With Quote