quote:
Originally posted by Chunk1993
Thanks so much
most people will hate you tho if you always type in caps.
anyways, updated it abit. so you can enable & disable it
code:
function OnGetScriptCommands ()
{
commands = "<ScriptCommands>";
commands += "<Command>";
commands += "<Name>startcaps</Name>";
commands += "<Description>Replace lower Case to caps - Start</Description>";
commands += "</Command>";
commands += "<Command>";
commands += "<Name>stopcaps</Name>";
commands += "<Description>Replace lower Case to caps - Stop</Description>";
commands += "</Command>";
commands += "</ScriptCommands>";
return commands;
}
var sEnabled = false;
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
switch (Message){
case "/startcaps":
sEnabled = true
return '';
case "/stopcaps":
sEnabled = false;
return '';
default:
if (sEnabled = true){
Message = Message.replace(/a/gi,"A");
Message = Message.replace(/b/gi,"B");
Message = Message.replace(/c/gi,"C");
Message = Message.replace(/d/gi,"D");
Message = Message.replace(/e/gi,"3");
Message = Message.replace(/f/gi,"F");
Message = Message.replace(/g/gi,"G");
Message = Message.replace(/h/gi,"H");
Message = Message.replace(/i/gi,"ii");
Message = Message.replace(/j/gi,"J");
Message = Message.replace(/k/gi,"K");
Message = Message.replace(/l/gi,"L");
Message = Message.replace(/m/gi,"M");
Message = Message.replace(/n/gi,"N");
Message = Message.replace(/o/gi,"O");
Message = Message.replace(/p/gi,"P");
Message = Message.replace(/q/gi,"Q");
Message = Message.replace(/r/gi,"R");
Message = Message.replace(/s/gi,"S");
Message = Message.replace(/t/gi,"T");
Message = Message.replace(/u/gi,"U");
Message = Message.replace(/v/gi,"V");
Message = Message.replace(/w/gi,"W");
Message = Message.replace(/x/gi,"X");
Message = Message.replace(/y/gi,"Y");
Message = Message.replace(/z/gi,"Z");
return Message
}
}
}