Shoutbox

Help: How can I make my bot send a message? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Help: How can I make my bot send a message? (/showthread.php?tid=64231)

Help: How can I make my bot send a message? by RogerX on 07-30-2006 at 03:15 PM

code:
    if (Bot){
    if (sMessage == "!say"){
         pChatWnd.SendMessage("RogerBot: ");
        return "";
    }

Any ideas on how to make it send the message like this: "RogerBot: *Whatever I typed after the !say command*"?
RE: Help: How can I make my bot send a message? by hmaster on 07-30-2006 at 04:20 PM

code:
if(sMessage.substr(0, 4) == '!say'){
Message = sMessage.substr(4);
botMessage = "RogerBot:" + Message);
return botMessage;
}
I think that's what you're trying to do.

RE: Help: How can I make my bot send a message? by RogerX on 07-30-2006 at 05:06 PM

Thanks, it worked out nicely.