View Single Post
Old 01/02/2012, 08:34 PM   #1
Fj0rtizFredde's Avatar
Join Date: Jun 2008
Location: Sweden
Posts: 888
Reputation: 120
Default Cleverbot - Never Be Alone Again!

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! )

* 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 Code:
#include <CleverBot>
pawn Code:
#include <a_samp>
and that's it!
(Notice: Since I just use a free host for testing I recommend that you host the PHP files on your own!)

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 Code:
#define CleverHost "" //Location to the test.php file! (Without [url]HTTP://)[/url]
And now you're done!

Test Command:
pawn Code:
//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;


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!)
Latest crap I've made:
[Include]CleverBot - Never Be Alone Again!

Last edited by Fj0rtizFredde; 10/04/2012 at 05:06 PM.
Fj0rtizFredde is offline   Reply With Quote