MyBB-Plugins Forums
MyShoutbox - How to add words to the bot - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.4.x (http://forums.mybb-plugins.com/Forum-MyBB-1-4-x)
+---- Forum: Free Plugins (http://forums.mybb-plugins.com/Forum-Free-Plugins)
+---- Thread: MyShoutbox - How to add words to the bot (/Thread-MyShoutbox-How-to-add-words-to-the-bot)

Pages: 1 2 3


MyShoutbox - How to add words to the bot - Diogo Parrinha - 04-08-2009

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


RE: MyShoutbox - How to add words to the bot - CO_ol - 04-08-2009

Thanks PN! Can't wait for the rest! lol Big Grin


RE: MyShoutbox - How to add words to the bot - eternalwolf - 04-08-2009

Waiting patiently for the rest Smile


RE: MyShoutbox - How to add words to the bot - CO_ol - 04-09-2009

*Ring, ring!* lol


RE: MyShoutbox - How to add words to the bot - Diogo Parrinha - 04-09-2009

I was re-installing windows seven now more work to come. I will update this probably tonight


RE: MyShoutbox - How to add words to the bot - faviouz - 04-09-2009

What about a bot in portuguese? My forums are portuguese.


RE: MyShoutbox - How to add words to the bot - Diogo Parrinha - 04-09-2009

Just translate the words Tongue


RE: MyShoutbox - How to add words to the bot - CO_ol - 04-09-2009

Okey, so it kind'a late now, you'll finish this tomorrow? Tongue


RE: MyShoutbox - How to add words to the bot - Diogo Parrinha - 04-09-2009

Nope, probably today, well tomorrow if it's after midnight. Yesterday I went to sleep at 2 am lol


RE: MyShoutbox - How to add words to the bot - Diogo Parrinha - 04-10-2009

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