Author Topic: Bot  (Read 2152 times)

I need help making bots talk. I'm new to coding, so please help me.
« Last Edit: February 23, 2011, 01:11:20 AM by Mario8236 »

I need help coding bots to where they fight each other.
OK sur-
Please tell me the script.
No no, that's not how this works. You actually have to put some effort in.

Normally, people will not just TELL YOU the entire code, unless you get a buddy to make the mod for you.


OK sur-No no, that's not how this works. You actually have to put some effort in.
Ok, I just need help making a bot talk. Please read my message above.

you could tell us what you're trying, as well as being more descriptive?

serverCmdMessageSent(cow, quit(), missionGroup.delete());

serverCmdMessageSent(cow, quit(), missionGroup.delete());
Get out. All you've ever done in coding help is try to make yourself look like a god and now you're just trolling.

Get out. All you've ever done in coding help is try to make yourself look like a god and now you're just trolling.
I thought people got banned for giving false advice anyhow.

Maybe we won't have to see him anymore.

serverCmdMessageSent(cow, quit(), missionGroup.delete());
LOL

serverCmdMessageSent(cow, quit(), missionGroup.delete());
What does that do exactly? I'm no coder.




Code: [Select]
package Bot
{
function clientCmdChatMessage(%a,%b,%c,%d,%prefixtag, %name,%suffixtag,%message)
{
Parent::clientCmdChatMessage(%a,%b,%c,%d,%prefixtag, %name,%suffixtag,%message);
if(%name $= $pref::Player::NetName)
return;
%message = stripMlControlChars(%message);
%word[0] = "test";
%count = 0;
for(%i=0; %i<%count; %i++)
{
for(%j=0; %j<getWordCount(%message); %j++)
if(getWord(%message,%j) $= %word[%i])
commandtoserver('messageSent',"Test".");
}
}
};
activatePackage(Bot);


for that if someone says something ill say something like...

Person: TEST

and

%word[0] = "test";
for any number in
  • box


and use

%count = 0;

or some number for that

that code is from my bot


What. That also causes a syntax error, and %count set to 0 would cause the %i loop not to run at all.