RE: Script Command
var test1 = 'Hello World!';
function OnGetScriptCommands()
{
var ScriptCommands = "<ScriptCommands>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>test</Name>";
ScriptCommands += "<Description>testing</Description>";
ScriptCommands += "</Command>";
ScriptCommands += "</ScriptCommands>";
return ScriptCommands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
switch (Message) {
case "/test":
function foo();
break;
}
}
function foo() {
ChatWnd.SendMessage(test1);
}
This post was edited on 03-11-2007 at 08:44 PM by effection.
|