View Single Post
07-19-14, 09:43 AM   #10
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
To send to a specific channel - http://wowpedia.org/API_SendChatMessage

In the example posted on the page
Code:
SendChatMessage("Hello Bob!", "WHISPER", 7, "Bob")
"Hello Bob!" is the message
"WHISPER" is the channel and with whispers you need to provide the 4th parameter "Bob"
7 is the language type, if you don't want any specific language you can set that to nil
"Bob" is the 4th parameter and only needed when using whispers

The only 2 parameters needed to be set when sending to channels are the message and channel, the rest you can ignore.

For example using zork's example to tell you what was casted..
Code:
print("|cffffff9a[NoTroll]|r", name, "used", spellName)
To send a message to a channel you would do
Code:
SendChatMessage("|cffffff9a[NoTroll]|r "..name.." used "..spellName, "SAY")
__________________
AddOns: Tim @ WoWInterface
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote