Blockland Forums > General Discussion
GUI Ideas [Help pg4]
Setro:
Here's some functions I scrapped from a chatbot a friend gave to me.
--- Code: ---if(getWord(%msg,0) $= $botname && getWord(%msg,1) $= "Calculate" && getWord(%msg,2) $= "Numbers") {
eval("$Equals = "@%args3@";");
if($Equals)
commandToServer('messageSent', $botname@": "@%args3@" = "@$Equals);
return;
} if(getWord(%msg,0) $= $botname && getWord(%msg,1) $= "Check" && getWord(%msg,2) $= "Ping") {
if(%name $= $Owner) {
%ping=serverConnection.getPing();
commandToServer('messageSent', $botname@": Your Ping ["@%ping@" ms]");
return;
--- End code ---
Enjoy
MrLoganator111:
Wait, what does the 1st part do?
Yin Yang:
http://www.cleverbot.com/
MrLoganator111:
--- Quote from: Yin Yang on April 20, 2013, 03:13:30 PM ---http://www.cleverbot.com/
--- End quote ---
Lol I've been using that a lot. But that isn't really giving me ideas on what to add to MY chatbot.
PurpleMetro:
--- Quote from: Setro on April 20, 2013, 02:59:18 PM ---Here's some functions I scrapped from a chatbot a friend gave to me.
--- Code: ---if(getWord(%msg,0) $= $botname && getWord(%msg,1) $= "Calculate" && getWord(%msg,2) $= "Numbers") {
eval("$Equals = "@%args3@";");
if($Equals)
commandToServer('messageSent', $botname@": "@%args3@" = "@$Equals);
return;
} if(getWord(%msg,0) $= $botname && getWord(%msg,1) $= "Check" && getWord(%msg,2) $= "Ping") {
if(%name $= $Owner) {
%ping=serverConnection.getPing();
commandToServer('messageSent', $botname@": Your Ping ["@%ping@" ms]");
return;
--- End code ---
Enjoy
--- End quote ---
--- Quote from: MrLoganator111 on April 20, 2013, 03:09:30 PM ---Wait, what does the 1st part do?
--- End quote ---
If the first word of the user's message is equal to the variable botname, and if the second word of the user's message is equal to Calculate, and if the third word of the users name is equal to Numbers.. Then blah blah