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

Title: Central Items Database (With Icons)
Post 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)

Code: [Select]
<?
/*
 * 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);
}
}
}
?>
Title: Re: Central Items Database (With Icons)
Post by: Khalem on May 15, 2006, 07:05:17 pm
This is now the default items plugin for BeBot.
Thanx Vhab.
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on June 22, 2006, 08:24:09 am
Yeah, looks great.

*shakes fist at the select few who took credit for "making" that plugin*
Title: Re: Central Items Database (With Icons)
Post by: joey12344 on June 29, 2006, 07:46:34 pm
Uber vhab :) Glad you put it into bebot
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on July 27, 2006, 06:15:48 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Vhab on July 27, 2006, 07:49:04 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Khalem on July 27, 2006, 09:59:34 pm
Using it on php 5.1.4 here and no issues.
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on July 28, 2006, 02:26:50 am
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 =)
Title: Re: Central Items Database (With Icons)
Post by: Nogoal on October 02, 2006, 05:16:11 pm
looks like your DB doesn't have Shade spirits, can someone confirm this?
Title: Re: Central Items Database (With Icons)
Post by: Khalem on October 02, 2006, 05:40:24 pm
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?
Title: Re: Central Items Database (With Icons)
Post by: Vhab on October 02, 2006, 06:04:59 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Dracutza on November 27, 2006, 04:40:08 pm
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?
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 15, 2006, 04:53:39 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Malosar on December 15, 2006, 05:28:07 pm
Any chance of getting an SQL of the new items?
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 15, 2006, 05:48:39 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Malosar on December 15, 2006, 06:05:19 pm
Yep no problem, just if you had it handy. Thanks for your quick central update anyway :)
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on December 15, 2006, 09:16:30 pm
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
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 15, 2006, 09:19:42 pm
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?
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on December 19, 2006, 05:27:17 pm
Was looking at the wrong bot when I did !items ;)
Title: Re: Central Items Database (With Icons)
Post by: Vhab on March 15, 2007, 04:42:44 pm
Updated to 17.2, enjoy!
Title: Re: Central Items Database (With Icons)
Post by: Alreadythere on March 15, 2007, 04:58:36 pm
Thanks!
Title: Re: Central Items Database (With Icons)
Post by: Vhab on April 27, 2007, 04:49:14 pm
Updated to 17.3.0
Sorry for the small delay, jack locked the basement and gave the key to paja
Title: Re: Central Items Database (With Icons)
Post by: jjones666 on April 27, 2007, 05:13:31 pm
you damn slacker ;-p

-jj-
Title: Re: Central Items Database (With Icons)
Post by: Naturalistic on April 28, 2007, 01:16:19 am
Damn right, slacker ftl!
Title: Re: Central Items Database (With Icons)
Post by: Vhab on June 13, 2007, 10:18:38 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Vhab on July 21, 2007, 12:21:23 pm
Better late than never.
Updated to 17.4.1

ps. ban natu
Title: Re: Central Items Database (With Icons)
Post by: Heffalomp on August 29, 2007, 06:11:12 pm
I find " * Ocular Symbiant, Artillery" symbs are missing, haven't seen anny other missing yet tho
Title: Re: Central Items Database (With Icons)
Post by: Binary on December 16, 2007, 11:32:24 pm
Any word on the update to 17.7?
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 17, 2007, 06:19:42 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: Jiheld on January 20, 2009, 01:40:39 pm
is this only for AO?
Title: Re: Central Items Database (With Icons)
Post by: Alreadythere on January 20, 2009, 06:01:32 pm
Yes.
Title: Re: Central Items Database (With Icons)
Post by: Vhab on January 21, 2009, 08:47:26 am
Since this got bumped. Am I still uptodate? I'm not really tracking AO's updates.
Title: Re: Central Items Database (With Icons)
Post by: Vhab on February 21, 2009, 11:21:29 am
Damnit, update already!

Ooh wait, that's my job.

Updated.
Title: Re: Central Items Database (With Icons)
Post by: Alreadythere on February 21, 2009, 12:17:08 pm
Thanks Vhab, great job as always! :)
Title: Re: Central Items Database (With Icons)
Post by: Baja on March 02, 2009, 12:20:14 pm
Thanks for update !  ;D
Title: Re: Central Items Database (With Icons)
Post by: mcgunman on November 14, 2009, 01:31:21 pm
is there a plan to update the central db to the current version of ao?
Title: Re: Central Items Database (With Icons)
Post by: m0r72010 on December 02, 2009, 07:45:03 am
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)?
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 28, 2009, 11:42:18 am
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"
Title: Re: Central Items Database (With Icons)
Post by: mcgunman on December 28, 2009, 11:06:10 pm
thanks for the great news and thanks allot for the new DB. great work :-)
Title: Re: Central Items Database (With Icons)
Post by: Vhab on December 31, 2009, 02:35:15 pm
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 :)
Title: Re: Central Items Database (With Icons)
Post by: mcgunman on January 09, 2010, 07:31:28 pm
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
Title: Re: Central Items Database (With Icons)
Post by: clashbot on January 28, 2010, 01:24:27 am
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
Title: Re: Central Items Database (With Icons)
Post by: Heffalomp on March 05, 2010, 09:22:13 pm
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'
Title: Re: Central Items Database (With Icons)
Post by: flashpointblack on April 07, 2010, 07:27:58 pm
same thing is happening when searching for an ofab tiger. pretends it doesn't exist.
Title: Re: Central Items Database (With Icons)
Post by: Nogoal on April 20, 2010, 04:30:01 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: taconis on April 22, 2010, 03:44:06 pm
<!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.
Title: Re: Central Items Database (With Icons)
Post by: Khalem on April 22, 2010, 08:01:33 pm
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.
Title: Re: Central Items Database (With Icons)
Post by: taconis on April 22, 2010, 09:25:44 pm
Maybe one time after I win the lottery I'll mirror.   ;D
Title: Re: Central Items Database (With Icons)
Post by: motoislo on September 30, 2010, 01:00:51 am
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.
SimplePortal 2.3.7 © 2008-2024, SimplePortal