View Single Post
08-07-14, 07:40 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I left an opening for it to respond to anyone since you can give it the name of the person that's talking to it. It wouldn't be too hard to get it to respond to whispers. All that'll be needed is to set up a handler to catch the whispers, then send the response back out.

An example of doing this in your own addon:
lua Code:
  1. local EFrame=CreateFrame("Frame");
  2. EFrame:RegisterEvent("CHAT_MSG_WHISPER");
  3. EFrame:SetScript("OnEvent",function(self,event,msg,sender)
  4.     SendChatMessage(AIBot:Query(msg,sender),"WHISPER",nil,sender);
  5. end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 08-07-14 at 09:11 PM.
  Reply With Quote