NanaFreak
Scripting Contest Winner
Posts: 1476 Reputation: 53
32 / /
Joined: Jul 2006
|
RE: Script Command
code: 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":
foo();
break;
}
}
function foo() {
ChatWnd.SendMessage(test1);
}
that should do it
This post was edited on 03-11-2007 at 08:45 PM by NanaFreak.
|
|