L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 10:23:37 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Central Items Database (With Icons)
Pages: [1] 2   Go Down
« previous next »
Print
Author Topic: Central Items Database (With Icons)  (Read 5842 times)
0 Members and 1 Guest are viewing this topic.
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Central Items Database (With Icons)
« on: April 25, 2006, 11:54:06 PM »

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:


Code:
<?
/*
 * Central Items Database v1.1, By Vhab
 * Latest version can always be found at: http://bebot.shadow-realm.org/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);
}
}
}
?>
« Last Edit: December 15, 2006, 10:51:44 AM by Vhab » Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Central Items Database (With Icons)
« Reply #1 on: May 15, 2006, 12:05:17 PM »

This is now the default items plugin for BeBot.
Thanx Vhab.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Central Items Database (With Icons)
« Reply #2 on: June 22, 2006, 01:24:09 AM »

Yeah, looks great.

*shakes fist at the select few who took credit for "making" that plugin*
Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
joey12344
Guest
Re: Central Items Database (With Icons)
« Reply #3 on: June 29, 2006, 12:46:34 PM »

Uber vhab Smiley Glad you put it into bebot
Logged
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Central Items Database (With Icons)
« Reply #4 on: July 27, 2006, 11:15:48 AM »

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.
Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Central Items Database (With Icons)
« Reply #5 on: July 27, 2006, 12: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.
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Central Items Database (With Icons)
« Reply #6 on: July 27, 2006, 02:59:34 PM »

Using it on php 5.1.4 here and no issues.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Central Items Database (With Icons)
« Reply #7 on: July 27, 2006, 07:26:50 PM »

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 =)
Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
Nogoal
Rookie
**
Offline Offline

Posts: 61


Re: Central Items Database (With Icons)
« Reply #8 on: October 02, 2006, 10:16:11 AM »

looks like your DB doesn't have Shade spirits, can someone confirm this?
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Central Items Database (With Icons)
« Reply #9 on: October 02, 2006, 10:40:24 AM »

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?
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Central Items Database (With Icons)
« Reply #10 on: October 02, 2006, 11:04:59 AM »

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.
Logged
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: Central Items Database (With Icons)
« Reply #11 on: November 27, 2006, 10:40:08 AM »

Quote from: Vhab on April 25, 2006, 11:54:06 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?
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Central Items Database (With Icons)
« Reply #12 on: December 15, 2006, 10:53:39 AM »

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.
Logged
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Central Items Database (With Icons)
« Reply #13 on: December 15, 2006, 11:28:07 AM »

Any chance of getting an SQL of the new items?
Logged

Eternalist
General of The Syndicate
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Central Items Database (With Icons)
« Reply #14 on: December 15, 2006, 11:48:39 AM »

Quote from: Malosar on December 15, 2006, 11:28:07 AM
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.
Logged
Pages: [1] 2   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Central Items Database (With Icons)
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11145
Total Topics: 1505
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 11
Total: 13
Jiheld
xlDanek

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.402 seconds with 29 queries. (Pretty URLs adds 0.032s, 4q)
Loading...