|
Sending message to a chat channel is somewhat easy to do if you are writing your own addon. Add this to your OnUpdate Method
function MyAddon.OnUpdate()
if activate == true then
SystemData.UserInput.ChatText = texttosend
BroadcastEvent(SystemData.Events.SEND_CHAT_TEXT)
activate = false
end
end
Make sure you have the globals vars "texttosend" and "activate = false" defined. Then to send text simply
function MyAddon.SaySomething(input)
local s = StringToWString(input)
local channel = L"/s" -- or whatever channel you want
texttosend = channel..L" "..s
activate = true
end
That should work fairly well I think, I use it at any rate.
[edited by: macaran at 3:10 PM (GMT -6) on 31 Oct 2008]
|