segosa
Community's Choice
Posts: 1407 Reputation: 92
Joined: Feb 2003
|
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
Try this:
code: function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
if (!sMessage.match('www') && !sMessage.match('http') && sMessage.charAt(0) != '/')
{
var a = [ 'a','B','C','D','e','F','G','H','i','J','K','L','M','N','o','P','Q','R','S','T','u','V','W','X','Y','Z' ];
var o = "", c;
str = str.toLowerCase();
for (var i = 0; i < str.length; i++)
{
c = str.charCodeAt( i );
if (c >= 97 && c <= 122)
o += a[c - 97];
else o += str.charAt( i );
}
return o;
}
return sMessage;
}
The previous sentence is false. The following sentence is true.
|
|