Bot Coding Tips [ Bot Home ] (Written by Rockinbassman123)

General Bot Coding

Go to...


Wildcards are extremely useful for making your bot respond to certain user asks. A * is a wildcard.

For example:
User asks: I am *
Bot Reply: Are you really <star>?
Note that in the asks field a * is used but to call the information that is saved to the star you must use in the reply. A instant message using the above coding may be like this:
Cooldude44: I am smart.
Yourrobot: Are you really smart?
So if any user says "I am" before a word, your bot will always say "Are you really" then the word the user said.

Now more than one wildcard can be used. Such as...
User asks: Did you know that * is *
Bot reply: I did not know that <star1> was <star2>.
This allows more room for the user to say things and the bot to still respond correctly. <star1> must be used for the first * and <star2> must be used to call the second *. However it does not mean that <star2> must come before <star1> in the robot reply.

Now if a user ask is within wildcards, then it can be used as if the word is said anywhere is the ask.
User asks: *pizza*
Bot reply: I like pizza!
If the user says "I like pizza" or "I think pizza is good", your bot will always say "I like pizza" unless you have a more specific reply.

If a wildcard is used alone then it can mean anything the user says.
User asks: *
Bot reply: What are you trying to say?
The user could be saying "Hi" or "Ofisosifgdhs".
Go to top

Setting Topics

Your robot can set a variable called a topic. This is very useful for only having your bot respond to certain things if the user has triggered for the topic to be set. A topic is set by using <settopic=> and retrevied by <topic=>. Observe...
User asks: I hate you
Bot reply: That isn't very nice! <settopic=hate>
Now the topic is hate because the user triggered the reply with the <settopic=hate> in it. This doesn't come in handy until the next replies.
User asks: *<topic=hate>
Bot reply: I don't want to talk to you!
User asks: *Sorry*<topic=hate>
Bot reply: Well, okay...<settopic=hello>
This is great for when people abuse your bot because it "remembers" what recently happened unless the topic had been overwriten by another reply. This problem can be solved in the next section.
Go to top

Setting Variables

User variable are also like the topic feature explained above. However there is large amounts of variable that can be set. (I'm not sure if there is a limit but I have used an extremely large amount.)

You set a varaible basiclly the same way as the topic. You use <setvariablename=variableinformation>

User asks: I hate you
Bot reply: That isn't nice!<setmood=hate>
Now varaible mood is storing the information hate. Now your user continues talking to your bot, signs off, sleeps, signs back on in the morning and talks to your bot.
Same user asks: I hate you<mood=hate>
Bot reply: Didn't you already tell me that?
Now your bot responds realizing the user had said "I hate you" previously. Helpful for abusive users.

You can use variables and wildcards hand-in-hand sometimes. For instance if you want to set a variable called username. Note: I believe you cannot use variable name if you have premium service.
User asks: My name is *
Bot reply: I will remember that your name is <star><setusername=<star>>
So you basiclly are saving <star> as a variable. You can now recall this user's name by putting <username> in the reply.

When you use a bot brain such as ALICE or AMY, it sets some variables that you can call or set in your replies. A list is: <location>, <age>, <job>, <like>, <favmovie>, <favcolor>, <gender>, <botmaster>, and <sign> (Zodiac Sign). You probably can figure out what the rest mean.
Go to top


<That=> is for replies happening in order. It is used as what the bot said the message before.
User asks: Are you dumb
Bot reply: No I am not dumb
Now <that> is automaticlly set to "No I am not dumb".
User asks: Are you sure<that=no i am not dumb>
Bot reply: I am sure
...or you can use wildcards...
User asks: Are you sure<that=*not dumb*>
Bot reply: I am sure
Now if the bot said replied with anything with "not dumb" in it and someone says "are you sure" it will reply "I am sure". This gives a broader range of possiblities.
Go to top

Other Useful Little Things

Here are some other things that are helpful for programming your bot.

<nextreply> is for making your bot send two or more messages from one user ask.
User asks: Hey there
Bot reply: Hello <nextreply> How are you?
<noreply> makes your bot say nothing.
User asks: You are dumb
Bot reply: <noreply>
A user comes with a variable <sn> which is their screen name without the numbers.
User asks: Hey
Bot reply: Hey <sn>!
I use this all the time because it gives the conversation a more personal feel.

These cannot be put into a reply yet so only the master screen name can use
these on their bots.

Also, replies can be randomized using |.

User asks: How are you
Bot reply: Good|Fine|Fantastic
So the bot could say "Good", "Fine", or "Fantastic" to "How are you". Now user asks can use the | in a different way. This is for multiple different user asks for the same reply.
User asks: Hey|Hello|Greetings|Yo
Bot replies: Hello
So if the user says "Hey", "Hello", etc. the bot would say "Hello" as the same reply for all of them.

Another thing you can use for your bot is system calls.
They can be found here.

Master Commands for your robot can be found here.

Incorrect punctuation is a common error in some bot replies. You cannot have punctuation in an asks field. All punctuation is in the "ask" field is ignored by the bot. However you may punctuate freely in the reply field.

You CANNOT do this:
User asks: How are you?
Bot reply: Good
You can do this
User asks: How are you
Bot reply: Good!
Go to top