Thread Tools Display Modes
03-02-08, 05:52 AM   #1
DaishoWoW
A Kobold Labourer
Join Date: Mar 2008
Posts: 1
Question Chat message queries ????

What i want to do, is make a chat msg hook for whispers so that when a player whispers me "pc [itemlink]" it will return a whisper with various information pulled from my auctioneer AddOn like price etc

I read alot of the WoWAPI from wowwiki but this is all brand new to me. If someone could point me in the right direction of how I would call up info from Auctioneer thats being displayed in my tooltips, and how to place that in a return message?? I thought useing something like craftskill2 to do the trick (make my own !price) would work but inspecting the files it all looks garbled cant make any sense of it.

I do have AutoRespond AddOn. I thought I could make in-game /script commands to place in it as responses but Then also im not sure how to take something a character says and add it to a variable. Im most familiar with BASIC ><

Anyone please give me some direction here?
  Reply With Quote
03-02-08, 03:25 PM   #2
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
This two pages are (most of) what you need:

About chat messages:
http://www.wowwiki.com/Hooking_chat_messages

References on the events:
http://www.wowwiki.com/Events_(API)


You'll basically create a function that is applied to a chat message (which basically tests if it matches what you want, and if it does, executes your main function). You will create a frame (which will not be a graphical frame, just an object used to link chat events to your function). You will then register the CHAT_MESSAGE_WHISPER on this frame, and you will use something like MyFrame:SetScript("OnEvent",myfunction). This will basically call "myfunction" whenever the event CHAT_MESSAGE_WHISPER is fired.
  Reply With Quote
03-02-08, 03:55 PM   #3
mrwuss
A Deviate Faerie Dragon
 
mrwuss's Avatar
Join Date: May 2005
Posts: 16
The auctioneer addon already sends back information if you have the feature turned on.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Chat message queries ????


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off