Author Topic: My first chat bot (NEED HELP AGAIN)  (Read 2575 times)

It's not like chat bots are that hard to make...

It's not like chat bots are that hard to make...
Yeah but I had a stuffload of people steal my stuff.

Gee thanks for posting part of my stolen chatbot.

Edit: And wait a minute, you said you deleted that days ago. You richard. You still have it.

I re made her. Made it myself.

I re made her. Made it myself.
Dark master you lier. I hate you for giving me Uxie's chatbot. You shoulden't steal and share people's private add on's unless the real owner wants them to be shared. You know, there is a reason why its called a PRIVATE add on you idiot.

Dark. What he said. Its a lie. Thats EXACTLY how I made it except for the fact that you renamed it to DBot. And now your stealing credit.

Dark. What he said. Its a lie. Thats EXACTLY how I made it except for the fact that you renamed it to DBot. And now your stealing credit.
Wow uxie thats even worse and guys. And I'm gonna test adding another command to my chatbot. ^_^

I dont see whats wrong. :/

I went on and tried fixing it up and tried fixing alot of stuff. Yeah, you missed alot of brackeds, forgot semicolon at parent, and stuff. But after that, I still cant figure it out.

you thought what he gave you was the whole god damn script file? good god, you really need to learn what scripting syntax looks like.

Code: [Select]
package chatbot {
function clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%fmsg) {
parent::clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%fmsg);
       if(%msg $= "testing testing 123") {
       if(%name == $pref::player::netName) {
commandToServer('messageSent',"Your testing is win, " @ $pref::player::netName @ "!");
                        }
                }
        }
};
activatePackage(chatbot);
i might seem harsh, i'm sorry. i'm just loving frustrated.
please try to learn the syntax by yourself after this and don't rely on everyone else to spoonfeed you the code.

here's what i fixed:
-if ( to if(
-parent has no {
-parent had no ;
-added a lot of brackets
-added "$pref::player::netName" instead of "secton" so it will automatically check for your name and say your name, rather than "secton"

I dont see whats wrong. :/

I went on and tried fixing it up and tried fixing alot of stuff. Yeah, you missed alot of brackeds, forgot semicolon at parent, and stuff. But after that, I still cant figure it out.
did you remember the activatePackage?
« Last Edit: August 18, 2011, 10:08:44 PM by Placid »

It's not like chat bots are that hard to make...
I would consider it to be a level 2 project.


o.o
i'd take that as a no lol

i almost missed it too.. i caught it on a final look through

Uh guys... How do I add more commands to my client-side chatbot? I think it has something to do with this 'case' function thingy.

Code: [Select]
package chatbot {
function clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%fmsg) {
parent::clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%fmsg);
        if(%msg $= "testing testing 123") {
        if(%name == $pref::player::netName) {
commandToServer('messageSent',"Your testing is win, " @ $pref::player::netName @ "!");
                        }
                }
                else if(%msg $="command") {
                        //do stuff here
                }
        }
};
activatePackage(chatbot);

Uh guys... How do I add more commands to my client-side chatbot? I think it has something to do with this 'case' function thingy.
I prefer to make it like this:
Code: [Select]
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
                switch$(%msg)
                {
                        case "Test":
                               if (%name $= "jes00")
                               {
                                    commandToServer('messageSent',"Testing 1 2 3");
    commandToServer('messageSent',"Test: Success!");
                                }
                               break;

                        case "Victory!":
                              commandToServer('messageSent',"Yahhh!!!");
                              break;

                        case "the muffin smells good!":
                                commandtoserver('messagesent',"It does indeed!");
                                break;

                        case "Testing":
schedule(3000,0,commandtoserver,'messageSent',"Test: Success!");
                                break;
                }
}

};
activatePackage(chatbot);
If I say Test then it checks if the user's name is jes00 and then it makes me say Testing 1 2 3, Test: Success.
If someone says Victory! then I say Yahhh!!!
If someone says the muffin smells good! I say It does indeed!
If someone says Testing in three seconds I say Test: Success

What does break do? I dont think I've ever heard of that.