01.02.2012, 20:34
(
Последний раз редактировалось Fj0rtizFredde; 10.04.2012 в 17:06.
)
Cleverbot - Never be alone again!
Ok. So I saw a guy a few days ago that wanted to be able to talk with Cleverbot ingame so I made this simple include that uses some PHP code that I found and modified. (This is not the best code I've made but it works so be happy! )
Features:
* You will never be alone on the server!
* Only has one function!
* This supports Cleverbot, Jabberwacky and Pandorabots.
* Easy to edit!
* You don't need to host the PHP files if you don't want to but I recommend that you do it!
So how do we setup this crap?
First download the .inc file from the link below. Paste the .inc file in your pawno/includes folder. Then open your gamemode and add
pawn Код:
#include <CleverBot>
pawn Код:
#include <a_samp>
(Notice: Since I just use a free host for testing I recommend that you host the PHP files on your own!)
Download:
The Include File
PHP Files In A .Rar File
If you host the files on your own follow this steps:
1. Create a folder on your webhost. (You can name it whatever you want)
2. Place the chatterbotapi.php and the test.php in that folder.
3. Open the .inc file and edit line 11 to something like this:
pawn Код:
#define CleverHost "YourAwesomeSite.com/TheFolder/test.php" //Location to the test.php file! (Without HTTP://)
Test Command:
pawn Код:
//Just a simple code but you can use it however you want!
//ZCMD Test code: /message [Text]
CMD:message(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /message [Text]");
new test[128];
format(test, sizeof(test), "Me: %s", params);
SendClientMessage(playerid, 0xFFFFFFFF, test);
SendPlayerMessageToCleverbot(playerid, params);
return 1;
}
Credits:
Fj0rtizFredde - Creating this crap!
The guy who made the base for the API.
Yes I know that I made some grammar misstakes (I know about the one in the title, it's going to be changed!)