| Blockland Forums > Modification Help |
| Toggling client chatbot on/off? |
| << < (4/5) > >> |
| DrenDran:
--- Quote from: slimabob on August 20, 2011, 08:03:40 PM ---I'm so confused... It executes properly but doesn't respond to anything I say to him. Ive tried telling him to wake up but that has no effect. --- Code: ---package MimicBot { function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg) { Parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg); if(firstWord(%msg) $= "Mimic" && (!$MimicBotOff || %msg $= "Mimic Wake up")) { switch$(restWords(%msg)) { case "Testing": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: This was a triumph!"); case "Hi": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Hello how are you?"); case "Good": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: That's not good, that's Great!"); case "lol": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: HAHAHAHAHAHAAA I don't get it.."); case "derp": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Herp-a-Derp."); case "wtf": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: What the fail?!? I don't understand your human language at all.."); case "Mimic": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: What do you want?"); case "Hi": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Hello."); case "Cool": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: What are you talking about?! I'm not cold!"); case "I don't know": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Wait, you DON'T know?! Everyone knows!!"); case "What?": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: You heard him!"); case "NO U": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: No, i do believe he WAS talking to you."); case "slimabob": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Hey, I know that guy!"); case "No wait": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: No you wait. This is MY game MY rules."); case "Hi everyone.": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: I don't see anyone here i like.."); case "Shut up": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: No you shut the up."); case "No YOU shut up": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: No you do this shutting up thing!"); case "afk": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Quick, he's going afk! Do all sorts of annoying stuff to him before he comes back!"); case "This sentence is false.": commandToServer('messageSent',"<color:e5e500>Mimic<color:ffffff>: FFFFFFFUUUUUUUUUUU- PARADOOX!!!!!!!!"); case "Cake": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: LIES! THERE IS NO CAKE!"); case "That makes mimic sad.": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: WAAAAAAA I'M FEELING SIMULATED SADNESS!!!!"); case "who are you?": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: To tell you the truth, I have no idea."); case "Youre stupid!": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: Technicaly, since I'm a computer program, I'm smarter than you.."); case "your mom": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: I don't have a mom, I'm an orphan."); case "bye": commandToServer('messageSent', "<color:e5e500>Mimic<color:ffffff>: BYE! DON'T COME BACK!"); case "Go to sleep": $MimicBotOff = 1; case "Wake up": $MimicBotOff = 0; } } } }; activatePackage(MimicBot); --- End code --- Crap triple post.... --- End quote --- That's not even what I'd consider a "bot". No, that's just reads one phrase and gives out another. No capacity for learning at all. e.g. spam |
| AGlass0fMilk:
--- Quote from: Bloxxed on August 20, 2011, 09:56:31 AM ---Or if it's in a package you could do deactivatepackage(chatbot); --- End quote --- And then he wouldn't be able to turn it back on |
| Bloxxed:
--- Quote from: AGlass0fMilk on August 22, 2011, 05:54:36 PM ---And then he wouldn't be able to turn it back on --- End quote --- Yes, it does. |
| MegaScientifical:
--- Quote from: Chrono on August 22, 2011, 01:51:10 PM ---Protip: You can use more than one line in a switch check. --- End quote --- What are you directing that at? I reduced the code by making responses variables instead of full commands. As for the turning on and off, I wasn't able to conceive just how to implement that. My code has activations in a different script not interacting with chat, so it wouldn't get included in an on off check. Can't really explain, but you can show what you think would work. --- Quote from: DrenDran on August 22, 2011, 03:37:19 PM ---That's not even what I'd consider a "bot". No, that's just reads one phrase and gives out another. No capacity for learning at all. e.g. spam --- End quote --- Sorry to tell you, but according to everyone I meet in BL, you're wrong. Any chat script is apparently a "bot" to them. I could quote case in point from my chatlogger, but I think you've witnessed this yourself. |
| infiniteLoop:
--- Quote from: DrenDran on August 22, 2011, 03:37:19 PM ---That's not even what I'd consider a "bot". No, that's just reads one phrase and gives out another. No capacity for learning at all. e.g. spam --- End quote --- Would you say that silly little piece of code Murela or whatever the chat bot's name was that you made was a self learning bot? No. It just spams and has the intelligence of a golf ball. --- Quote from: AGlass0fMilk on August 22, 2011, 05:54:36 PM ---And then he wouldn't be able to turn it back on --- End quote --- activatePackage(chatBot); |
| Navigation |
| Message Index |
| Next page |
| Previous page |