Blockland Forums > Modification Help
My first chat bot (NEED HELP AGAIN)
<< < (3/7) > >>
PurpleMetro:

--- Quote from: Placid on August 16, 2011, 08:40:55 PM ---read again.

also next time when you want to test around with something without messing all the rest up, why don't you just make a copy of the file? you're going to learn more from trying to write yourself rather than having others write for you.

--- End quote ---
Ok I fixed up. But now my chat only appears before my name when i want to talk. :(. And it shows up in red or white and only will display one word.
Placid:

--- Quote from: PurpleMetro on August 16, 2011, 08:51:18 PM ---Ok I fixed up. But now my chat only appears before my name when i want to talk. :(. And it shows up in red or white and only will display one word.

--- End quote ---
oh forget! i'm dumb.
here, try this.

--- Code: ---//Secton
//8448
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
        {
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
                if (%msg $= "testing testing 123")
                {
        if(%name $= "Secton")
                        {
commandToServer('messageSent',"Your testing is win, Secton!");
                        }
                 }
        }
};
ActivatePackage(chatbot);
--- End code ---
fyi, i messed up the two arguments so that they were backwards. I'm not quite sure what that does in the longrun, but it's not good apparently.
PurpleMetro:

--- Quote from: Placid on August 16, 2011, 08:54:15 PM ---oh forget! i'm dumb.
here, try this.

--- Code: ---//Secton
//8448
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
        {
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
                if (%msg $= "testing testing 123")
                {
        if(%name $= "Secton")
                        {
commandToServer('messageSent',"Your testing is win, Secton!");
                        }
                 }
        }
};
ActivatePackage(chatbot);
--- End code ---
fyi, i messed up the two arguments so that they were backwards. I'm not quite sure what that does in the longrun, but it's not good apparently.

--- End quote ---
Well Blockland dosen't show an error... But when I say testing testing 123, it does nothing...
Placid:
check to make sure:
-your add-on is properly enabling:
    go into console and type exec("youraddonpathhere.cs");
-add an echo or two to see where it's leaving off:
    add like, echo("passed %msg test"); and echo("passed name test"); in the appropriate places
Uxie:

--- Quote from: Darkmaster20 on August 16, 2011, 08:06:08 PM ---Well you nee--

Warning - while you were reading a new reply has been posted. You may wish to review your post. forget.

Here is what i have:


--- Code: ---//Global Dbot Brain Variables
$Dbot::killstreaks = 1;
$Dbot::Chat = 1;
$Dbot::revenge = 1;
$Dbot::multikill = 1;
//Global Dbot Brain Variables

package Dbot
{
function servercmdMessageSent(%client, %message) {
parent::servercmdMessageSent(%client, %message);
%player = %client.getPlayerName();
if($Dbot::Chat == 1) {
if(strLwr(getSubStr(%message, 0, 12)) $= "Dbot say") {
messageAll("", "\c3Dbot" @ "\c6:" SPC getSubStr(%message, 12, strLen(%message)-12));
} else if(strLwr(getSubStr(%message, 0, 2)) $= "hi")
{
messageAll("", "\c3Dbot" @ "\c6:" SPC "Hi," SPC %player @ "!");

--- End code ---

--- End quote ---

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.
Navigation
Message Index
Next page
Previous page

Go to full version