BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => AO 0.6.x Custom/Unofficial modules => Anarchy Online Archive => AO official modules => Topic started by: Vhab on April 26, 2006, 06:54:06 am
-
Made this plugin for someone that requested here on the boards.
But I figured I'd properly release it over here too.
This plugin allows you to search vhabot's central items database from ingame.
This database is located at a remote location and won't require installing or updating on your side.
It supports searching for specific QL's and will display the item icon.
At the top there are several configuration settings you can change to suit it more to your liking
Preview of the output:
(http://dump.vhabion.net/images/rich-output.jpg)
<?
/*
* Central Items Database v1.1, By Vhab
* Latest version can always be found at: http://bebot.link/index.php/topic,380.0.html
* Details about the database itself: http://aodevs.com/index.php/topic,84.0.html
*/
$VhItems = new VhItems($bot);
$commands["tell"]["items"] = &$VhItems;
$commands["pgmsg"]["items"] = &$VhItems;
$commands["gc"]["items"] = &$VhItems;
class VhItems
{
var $icons = 'true';
var $color_header = 'DFDF00';
var $color_highlight = '97BE37';
var $color_normal = 'CCF0AD';
var $server = 'http://items.vhabot.net/';
var $max = 50;
var $bot;
function VhItems (&$bot)
{
$this->bot = &$bot;
}
function tell($name, $msg)
{
$this->bot->send_tell($name, $this->process_command($name, $msg));
}
function pgmsg($name, $msg)
{
$this->bot->send_pgroup($this->process_command($name, $msg));
}
function gc($name, $msg)
{
$this->bot->send_gc($this->process_command($name, $msg));
}
function process_command($name, $msg)
{
if (preg_match('/^'.$this->bot->commpre.'items/i', $msg, $info)) {
$words = trim(substr($msg, strlen($this->bot->commpre.'items')));
if (!empty($words)) {
$parts = explode(' ', $words);
if (count($parts) > 1 && is_numeric($parts[0])) {
$ql = $parts[0];
unset($parts[0]);
$search = implode(' ', $parts);
} else {
$ql = 0;
$search = $words;
}
$url = $this->server;
$url .= '?bot=BeBot';
$url .= '&output=aoml';
$url .= '&max='.$this->max;
$url .= '&search='.urlencode($search);
$url .= '&ql='.$ql;
$url .= '&icons='.$this->icons;
if ($this->color_header)
$url .= '&color_header='.$this->color_header;
if ($this->color_highlight)
$url .= '&color_highlight='.$this->color_highlight;
if ($this->color_normal)
$url .= '&color_normal='.$this->color_normal;
$result = file_get_contents($url);
if (!empty($result))
return $result;
else
return "Unable to query database";
} else {
return "Usage: items [quality] [item]";
}
} else {
$this -> bot -> send_help($name);
}
}
}
?>
-
This is now the default items plugin for BeBot.
Thanx Vhab.
-
Yeah, looks great.
*shakes fist at the select few who took credit for "making" that plugin*
-
Uber vhab :) Glad you put it into bebot
-
Oddly, this module won't work properly with PHP 5.1.4.
The " 4 items found -Click here- " gets displayed, but nothing is showed inside the blob.
Any ideas what needs to be fixed? I can't find anything as to what's wrong with it.
-
That's very very odd.
All the module does it pass the input it gets to the website and displays what it receives.
That includes the message and link.
Nothing version specific to that could possibly break the blob.
-
Using it on php 5.1.4 here and no issues.
-
I figured out what was wrong.
In order to use that module, you need PHP5-XSL extension installed (LoadModule in the httpd.conf)
Hope if someone comes across the same issue that helps them =)
-
looks like your DB doesn't have Shade spirits, can someone confirm this?
-
I know the database does not have implants (which i occationally miss), and as such i would assume it also is missing Spirits and possibly Symbiants?
-
It has symbiants. not having implants is intended because it's huge spam. half the entries in the entire database are implants.
I'll look into spirits.
-
This database is located at a remote location and won't require installing or updating on your side.
How often do you plan on updating it on your side?
-
Updated the database to 17.0.0_EP1
Updated the plugin to v1.1
Changelog:
- New URL for the central database
- Added several settings to configure the output
- Made the default colors more like most BeBot plugins to be better suited as official plugin.
-
Any chance of getting an SQL of the new items?
-
Any chance of getting an SQL of the new items?
Nope sorry.
1. i updated the db completely using a new dump (last dump has some issues so no incremental changes this time). so don't have track of the changes
2. it's a huge db spread over different tables (not a tiny db like the sql items module has)
3. it took me quite alot of work to put together the db and get various scripts to work together outputs from different tools and run fixes on that output, i prefer to make all that work available just through the central db.
-
Yep no problem, just if you had it handy. Thanks for your quick central update anyway :)
-
No perks included with the update?
Still haven't found any of the LE items in the central DB... but I could just be looking in the wrong spot :P
-
i can find the perks and new items just fine. (search on ofab)
however, the "effects" aren't in the db.
are you using the updated script?
-
Was looking at the wrong bot when I did !items ;)
-
Updated to 17.2, enjoy!
-
Thanks!
-
Updated to 17.3.0
Sorry for the small delay, jack locked the basement and gave the key to paja
-
you damn slacker ;-p
-jj-
-
Damn right, slacker ftl!
-
The database update is going to be somewhat delayed.
It seems funcom did some changes to the items database again that causes the parser to fail exporting it.
-
Better late than never.
Updated to 17.4.1
ps. ban natu
-
I find " * Ocular Symbiant, Artillery" symbs are missing, haven't seen anny other missing yet tho
-
Any word on the update to 17.7?
-
Generic dog ate my homework excuse :P
Na, I blame school for assignments like "implement a quad-tree in xyz game" that suck up time.
I'll get on it.
-
is this only for AO?
-
Yes.
-
Since this got bumped. Am I still uptodate? I'm not really tracking AO's updates.
-
Damnit, update already!
Ooh wait, that's my job.
Updated.
-
Thanks Vhab, great job as always! :)
-
Thanks for update ! ;D
-
is there a plan to update the central db to the current version of ao?
-
DB has been out of date for a while... Anyone willing and able to start looking into alternatives (maybe reverting back to a local itemsdb or setting up a current server or helping vhab update his)?
-
Xyphos has very generously provided us with a CIB interface to his items database.
To use it, replace "http://items.vhabot.net/" with "http://www.xyphos.com/cidb2.php"
-
thanks for the great news and thanks allot for the new DB. great work :-)
-
Some more news,
The new CIDB has moved to a dedicated subdomain: http://cidb.xyphos.com
Be sure to update your plugin.
Additionally, Xyphos gave us a really nice new feature.
I quote: "and my cidb now supports "google style search" eg, !items kyr sword -energy"
Let's have some cheers for Xyphos :)
-
hey that's a nice feature.
But since I have changed the server my bot displays all items twice. I have only changed in bebot/modules/ao/Items.php var $server = 'http://cidb.xyphos.com';
I have just executed the URL that the bot should send and noticed that the server returns the items twice. (e.g. http://cidb.xyphos.com/?bot=Bebot&output=aoml&max=50&search=goddes&ql=&icons= )
I have also noticed that output=xml or text does not work any more. So that can not be used as workaround.
Do I have to change the parameters of the URL to avid this problem or what did I do wrong?
p.s. for output of the URL see attached test.txt. I jsut changed %20 to space so I can display the result ingame. :-)
p.s.s. just noticed that he has got a bug forum. so posted it there also
-
got a question, is there a way of getting an item's lookup to output to all channels, I tried changing the $orgin to $all, but that did not seem to work. The bot still replies back to origin
-
definately a bug in the CIDB over at xyphos now... not returning searches for items through that wich show when you search for the same item on the webpage...
if i search for say... 'adrenal' I get a reply but if si search for 'spets' i get nada, even if I enter the lookup in a webbrowser towards CIDB, but if I on the webpage search for 'spets' I get 'Scimitar of Spetses'
-
same thing is happening when searching for an ofab tiger. pretends it doesn't exist.
-
Yeah t has some odd behavior like looking for 'low light' returns 'Extreme Low Light Targeting Scope' but if you type 'extreme low light' it doesn't find anything. Guess it doesn't look for HighID names or smth.
But Xyphos is working on his db so items missing or other bugs might be due to that tho.
-
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Forbidden
You don't have permission to access /
on this server.
Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 Server at cidb.xyphos.com Port 80
Either he's working on it or it is kaput.
-
He is working on it. For how long I honestly don't know.
I would much rather not depend on Xyphos for this, but atm it's all we have.
-
Maybe one time after I win the lottery I'll mirror. ;D
-
Is there a fix to the searching problem?
If I search for "xan" I don't get any of the weapons in the result. I have to search for "the xan", even "of xan" doesn't work.