DOUBLEPOST: You really forgeted up the code, try this one
Also, try to format your code when you can
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
if(%msg $= "hi"){
commandToServer('messageSent',"MagicBot: Hi,"@%name);
}
if(%msg $= "(\"){
commandToServer('messageSent',"MagicBot: (\\");
}
}
};
activatepackage(chatbot);