code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
lastchar = sMessage.substr(sMessage.length-1, sMessage.length);
switch(lastchar) {
case '?':
haschar = 1;
break;
case '}':
haschar = 1;
break;
case ')' :
haschar = 1;
break;
default:
haschar = 2;
break;
}
firstchar = sMessage.substr(0,1);
if(firstchar == '/') {
haschar = 4;
}
firstthree = sMessage.substr(0,7);
if(firstthree == '(!nor) ') {
haschar = 3;
}
if(haschar == '1') {
sMessage = sMessage.substr(0,1).toUpperCase() + sMessage.substr(1);
} else if (haschar == '2') {
sMessage = sMessage.substr(0,1).toUpperCase() + sMessage.substr(1) + '.';
} else if (haschar == '3') {
sMessage = sMessage.substr(7);
}
return sMessage;
}
I was working on a script like this lol, never realeased it though..
Usage:
(!nor) text - produces: text
text - produces: Text.
text? - produces: Text? (example a question)
text} - produces: Text} (example showing code)
text) - produces: Text) (most emoticons!)
/command parameter - produces: (result from command)
Hows that