wrong rudy
function NMH_Type::send(%this) {
%text = cleanStringemot(cleanString(trim(%this.getValue())));
if(strstr(strlwr(%text),"/") == 0) {
%text = getSubStr(%text,1,strlen(%text));
%command = getword(%text,0);
if(getwordcount(%text)>=2) {
%vars = getwords(%text,1,getwordcount(%text));
%vars = getsubstr(%vars,0,strlen(%vars)-1);
eval("commandtoserver(\'"@%command@"\',\"" @ %vars @ "\");");
//echo("commandtoserver(\'"@%command@"\',\"" @ %vars @ "\");");
}
else {
eval("commandtoserver(\'"@%command@"\');");
//echo("commandtoserver(\'"@%command@"\');");
}
canvas.popdialog(NewMessageHud);
return;
}
else if(%text !$= "") {
if(NewMessageHud.isTeamMsg)
commandToServer('teamMessageSent',%text);
else if(NewMessageHud.isLocalMsg)
commandToServer('localMessageSent',%text);
else
commandToServer('messageSent',%text);
}
canvas.popdialog(NewMessageHud);
//activateKeyboard();
}
$numemotions=-1;
$emotions[$numemotions++] = "(b)"; $replacementemotion[$numemotions] = "ß";
$emotions[$numemotions++] = "(c)"; $replacementemotion[$numemotions] = "©";
$emotions[$numemotions++] = "(r)"; $replacementemotion[$numemotions] = "®";
$emotions[$numemotions++] = "(tm)"; $replacementemotion[$numemotions] = "™";
$emotions[$numemotions++] = "(e)"; $replacementemotion[$numemotions] = "È";
$emotions[$numemotions++] = "(S)"; $replacementemotion[$numemotions] = "§";
$emotions[$numemotions++] = "(ce)"; $replacementemotion[$numemotions] = "Œ";
$emotions[$numemotions++] = "(1)"; $replacementemotion[$numemotions] = "î";
$emotions[$numemotions++] = "(y)"; $replacementemotion[$numemotions] = "Ÿ";
$emotions[$numemotions++] = "({)"; $replacementemotion[$numemotions] = "£";
$emotions[$numemotions++] = "(>>)"; $replacementemotion[$numemotions] = "»";
$emotions[$numemotions++] = "(divid)"; $replacementemotion[$numemotions] = "÷";
$emotions[$numemotions++] = "(u1)"; $replacementemotion[$numemotions] = "µ";
$emotions[$numemotions++] = "(u2)"; $replacementemotion[$numemotions] = "ù";
$emotions[$numemotions++] = "(u3)"; $replacementemotion[$numemotions] = "Ü";
$emotions[$numemotions++] = "(u4)"; $replacementemotion[$numemotions] = "û";
$emotions[$numemotions++] = "(dot)"; $replacementemotion[$numemotions] = "•";
$emotions[$numemotions++] = "(!)"; $replacementemotion[$numemotions] = "¡";
$emotions[$numemotions++] = "(--)"; $replacementemotion[$numemotions] = "¦";
$emotions[$numemotions++] = "(1/2)"; $replacementemotion[$numemotions] = "½";
$emotions[$numemotions++] = "(1/4)"; $replacementemotion[$numemotions] = "¼";
$emotions[$numemotions++] = "(3/4)"; $replacementemotion[$numemotions] = "¾";
$emotions[$numemotions++] = "(I)"; $replacementemotion[$numemotions] = "Í";
$emotions[$numemotions++] = "(z)"; $replacementemotion[$numemotions] = "Ž";
$emotions[$numemotions++] = "(,,)"; $replacementemotion[$numemotions] = "„";
$emotions[$numemotions++] = "(o/oo)"; $replacementemotion[$numemotions] = "‰";
$emotions[$numemotions++] = "(a)"; $replacementemotion[$numemotions] = "Å";
$emotions[$numemotions++] = "(e)"; $replacementemotion[$numemotions] = "é";
$emotions[$numemotions++] = "(thing)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(yen)"; $replacementemotion[$numemotions] = "¥";
$emotions[$numemotions++] = "(star)"; $replacementemotion[$numemotions] = "*";
$emotions[$numemotions++] = "(sun)"; $replacementemotion[$numemotions] = "¤";
$emotions[$numemotions++] = "(n)"; $replacementemotion[$numemotions] = "Ñ";
$emotions[$numemotions++] = "(tilda)"; $replacementemotion[$numemotions] = "~";
$emotions[$numemotions++] = "(1)"; $replacementemotion[$numemotions] = "¹";
$emotions[$numemotions++] = "(2)"; $replacementemotion[$numemotions] = "²";
$emotions[$numemotions++] = "(3)"; $replacementemotion[$numemotions] = "³";
$emotions[$numemotions++] = "(t)"; $replacementemotion[$numemotions] = "†";
$emotions[$numemotions++] = "(?)"; $replacementemotion[$numemotions] = "¿";
$emotions[$numemotions++] = "(!)"; $replacementemotion[$numemotions] = "¡";
function cleanStringemot(%string) {
for(%i=0; %i<=$numemotions; %i++)
%string = Strreplace( %string, $emotions[%i], $replacementemotion[%i] );
%string = strreplace(%string, "(ping)",ServerConnection.getping());
return %string;
}Edit: WQhole Script, including my censors :D If you want non-case sensitive part, you'll have to deal with some Torque slip up's that mess up sometimes....