What did I do? (I cant remember)
* scott2010_h use Ctrl+Z and Ctrl+Y to remember
It looks like I added an if in there by (Message.substring(0,1) != /)
EDIT:
(I tested it and it works for me)
EDIT2:
(It stoped working for me )
code:
var blnEnabled = false;
function OnGetScriptCommands ()
{
var commands = "<ScriptCommands>";
commands += "<Command>";
commands += "<Name>cstart</Name>";
commands += "<Description>Start Auto Colorize</Description>";
commands += "</Command>";
commands += "<Command>";
commands += "<Name>cstop</Name>";
commands += "<Description>Stop Auto Colorize</Description>";
commands += "</Command>";
commands += "</ScriptCommands>";
return commands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
switch (Message){
case "/cstart":
blnEnabled = true;
return '';
case "/cstop":
blnEnabled = false;
return '';
default:
if (blnEnabled == true){
if (Message.substring(0,1) != "/"){
return "/colorize "+ Message;
}
}
}
}