package Sevenbot {
function clientCmdChatMessage(%client, %num2, %num3, %amsg, %prefix, %name, %suffix, %msg) {
Parent::clientCmdChatMessage(%client, %num2, %num3, %amsg, %prefix, %name, %suffix, %msg);
if(firstWord(%msg) $= "7bot,")
SevenbotProcessor(%name, restWords(%msg));
}
};
activatePackage(Sevenbot);
function SevenbotRelay(%msg) {
commandtoserver('MessageSent', "(7bot) " @ %msg);
}
function SevenbotProcessor(%name, %cmd) {
%first = firstWord(%cmd);
%rest = restWords(%cmd);
switch$(%first) {
case "info":
SevenbotRelay("Pecon7 made this bot.");
case "dance":
SevenbotRelay("I don't feel like it, " @ %name @ ".");
case "baby":
SevenbotRelay("Uh... Baby " @ %rest @ "?");
}
}
That's how I'd do it. Change the other two entries with whatever.
Please note: Clientside is extremely restrictive. You can't send color code and names and such to chat. If you could, everyone would be abusing fake usernames and such... We used to be able to do that. I changed your code so you note it as a 7bot response. It also only activates if someone starts the message with "7bot," so it doesn't have to do a full process every time.