MyBB-Plugins Forums

Full Version: MyShoutbox - How to add words to the bot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Some of you may have wondered how you can add words to the bot.
It's really easy.

The words the bot understands are inside:
inc/plugins/bot/user_words.php

The words the bot uses to build the response:
inc/plugins/bot/bot_words.php

Both files are composed of arrays.

The arrays from user_words.php are linked to bot_words.php so the bot knows which words will be used for the answer.

User arrays:
PHP Code:
$UserHello//0
$UserBye//1
$UserQuestion//2
$UserWhatsUpQ//3
$UserWhatsUpA//4
$UserInsult//5
$UserPraise//6
$UserThanks//7
$UserNoProblem//8
$UserYesNo//9
$UserQuestion2 //10 

Bot arrays:
PHP Code:
$BotHello//0
$BotBye//1
$BotQuestion//2
$BotWhatsUpQ//3
$BotWhatsUpA//4
$BotInsult//5
$BotPraise//6
$BotThanks//7
$BotNoProblem//8
$BotYesNo//9
$BotQuestion2//10
$BotSimpleAnswer //11 

If the words/phrases inside the following arrays( are found in the message typed by the user):
  • $UserHello(e.g. if the user says "Hi") - the bot will answer one of the words/phrases from the array $BotHello
  • $UserBye - the bot will answer one of the words/phrases from the array $BotBye

This guide is not completed, but will be, tomorrow or later today
Thanks PN! Can't wait for the rest! lol Big Grin
Waiting patiently for the rest Smile
*Ring, ring!* lol
I was re-installing windows seven now more work to come. I will update this probably tonight
What about a bot in portuguese? My forums are portuguese.
Just translate the words Tongue
Okey, so it kind'a late now, you'll finish this tomorrow? Tongue
Nope, probably today, well tomorrow if it's after midnight. Yesterday I went to sleep at 2 am lol
I have found a few typos which made somethings to not work correctly. I will release 1.1 soon and update this guide as well
Pages: 1 2 3