Thread Tools Display Modes
11-10-07, 05:59 PM   #1
Durnus
A Murloc Raider
Join Date: Nov 2007
Posts: 5
Recieving and sending tells?

Okay, three questions.

1- How do you recieve tells and interprete what was said?

2- How do you send tells?

3- How do you create a table?

Thanks if you can answer. These things will be needed to create my mod, which I call PlayerMerchant. You can announce that you are selling something, and people can place orders and list their highest price they are willing to pay. Then you can sort the requests by name or price. Useful for someone whose products are in demand.

Thanks if you can help.
  Reply With Quote
11-10-07, 07:11 PM   #2
Tyrolit
A Black Drake
 
Tyrolit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 88
1:

Code:
local Your_Frame = CreateFrame("Frame")
Your_Frame:RegisterEvent("CHAT_MSG_WHISPER")
Your_Frame:SetScript("OnEvent", function(self, event, msg, author)
    if msg == "string your looking for"  then
        -- your code here
    end
end
2:

Code:
SendChatMessage(messageString, "WHISPER", Language, recipient)
3: not sure this time of night what you mean here but to make a table as an array ( use for k,v in ipairs(table) to iterate thro )

Code:
table = {"first", "second", "third",..}
or ( use for k,v in pairs(table) )

Code:
table = { tyrolit = "Warlock", thoraxe = "Hunter", kaieldriale = "Priest", daednumai = "rogue"}
__________________
click HERE for the ultimate idiot test.
  Reply With Quote
11-10-07, 07:21 PM   #3
Durnus
A Murloc Raider
Join Date: Nov 2007
Posts: 5
Oh, thanks. I meant arrays.

I'll check this out, thanks for the help.

EDIT: Your code doesn't work. It looks like there is an error with the parenthesis, are they supposed to be unending?

EDIT2: Just tried out WoWUIdesigner, and it's working great,

Last edited by Durnus : 11-10-07 at 08:30 PM.
  Reply With Quote
11-11-07, 04:33 PM   #4
Tyrolit
A Black Drake
 
Tyrolit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 88
oops yeah i forgot a )

__________________
click HERE for the ultimate idiot test.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Recieving and sending tells?


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