(Written by Rockinbassman123)
General Bot CodingGo to...
WildcardsWildcards are extremely useful for making your bot respond to certain user asks. A * is a wildcard.
User asks: I am *Note that in the asks field a * is used but to call the information that is saved to the star you must use
Cooldude44: I am 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 *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*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: *The user could be saying "Hi" or "Ofisosifgdhs".
Go to top
Setting TopicsYour 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 youNow 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>
User asks: *Sorry*<topic=hate>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 VariablesUser 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 youNow 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>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 *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=><That=> is for replies happening in order. It is used as what the bot said the message before.
User asks: Are you dumbNow <that> is automaticlly set to "No I am not dumb".
User asks: Are you sure<that=no i am not dumb>...or you can use wildcards...
User asks: Are you sure<that=*not dumb*>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 ThingsHere 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<noreply> makes your bot say nothing.
User asks: You are dumbA user comes with a variable <sn> which is their screen name without the numbers.
User asks: HeyI 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 youSo 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|YoSo 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?You can do this
User asks: How are youGo to top