for forget's sake, stop using switch, strStr, or strStrW to check what the forget the player wants to command for your client-side chatbot
package FrogCM
{
function clientCmdChatMessage(%cl,%a,%b,%line,%pre,%name,%suf,%msg,%x)
{
Parent::clientCmdChatMessage(%cl,%a,%b,%line,%pre,%name,%suf,%msg,%x);
if(getSubStr(%msg,0,1) $= "@")
{
%msg = getSubStr(%msg,1,strLen(%msg));
%cmd = firstWord(%msg);
%arg = restWords(%msg);
if(isFunction(%func = "frogCmd" @ %cmd))
call(%func, %name, %arg);
}
}
};
function frogCmdExample(%name,%arg)
{
echo("Hello" SPC %name);
}
PLEASE
USE THIS
I AM BEGGING YOU
Source:
http://forum.blockland.us/index.php?topic=137725.msg3129523#msg3129523