collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: 16.0 database  (Read 3611 times)

0 Members and 1 Guest are viewing this topic.

Offline Plac3bo

  • BeBot User
  • **
  • Posts: 50
  • Karma: +0/-0
16.0 database
« on: October 28, 2005, 03:22:48 pm »
So.. I know blondengy was using aunos xml version of the database up to now.. but Auno has been MIA for a while now. So .. is there any chance you can use the dev-tool from aodb.info to update the db? it has an xml export plugin.

Program
Documentation

it makes a xml files, but it differs a bit from the file auno had..
any chance that maybe there could be made a filter for that program so it converts it into mysql format for the bebot?
anyone up for the challange?  :twisted:

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
16.0 database
« Reply #1 on: October 28, 2005, 09:16:43 pm »
If someone would step up and do this, it would be most welcome.
I myself have my plate more than full at present.

If we had a plugin for the aodb.info tool, or a script/program to convert the XML output, we could release itemsdb updates right after patches, and people could make their own easilly.

The old script that Blondengy uses is a rather poor, quick and very dirty way of doing it and it basically abuses MySQL to get the job done.

I dont care if the parser is written in perl, python, php, ruby, C, C++, C#, VBS or whatever, just as long as its usable, and preferably availible in source format if compiled into an executeable.
BeBot Founder and Fixer Kingpin

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
16.0 database
« Reply #2 on: October 29, 2005, 01:03:09 am »
I actually did write a parser for to do this...or I tried. Problem is that it's not as simple as doing lowid,highid on the itemnames since an itemname can occur more than 2 times. There are som special cases...for instance NCU chips, so u might have to edit some stuff manually.
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Derroylo

  • Contributor
  • *******
  • Posts: 43
  • Karma: +0/-0
16.0 database
« Reply #3 on: October 30, 2005, 10:59:20 pm »
Angels has written a programm to convert the AODB XML file to a sql file, maybe it is that what you are searching for.

http://dl.aosource.de/tools/AODBXMLparser/AODBXMLparser_2.6.tar.gz
Derroylo 220/23 NT RK2

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
16.0 database
« Reply #4 on: October 31, 2005, 04:10:37 pm »
Sadly that parser just parses the xml to single items, e.g. not lowid/highid as used in BeBot...unless there has been som update to the temple that is...
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Derroylo

  • Contributor
  • *******
  • Posts: 43
  • Karma: +0/-0
16.0 database
« Reply #5 on: October 31, 2005, 04:27:49 pm »
didn´t look yet what exactly it parse and such but you can build you own templates. So write one with the data you need out of the xml fiel and you will never need todo it again. Guess that is a good start :)

Otherwise i didn´t had time to write my own !items module for my bot, so i have not really a clue what do need out of the xml but it will time for it soonish :)
Derroylo 220/23 NT RK2

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
16.0 database
« Reply #6 on: October 31, 2005, 05:36:43 pm »
Ack.

Looks like the resourcetool doesnt play nice with .NET 2.0 :\
*grumphs*

I'll have a closer look at it later. It could be just what we need.
BeBot Founder and Fixer Kingpin

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
16.0 database
« Reply #7 on: October 31, 2005, 05:48:52 pm »
The concept is fairly easy for most items. I'll take an easy example: Second Tier Keeper Cuirass. This item occurs twice in the XML file. First occurance has ql160, the other one has ql220. Now, they both have an unique ID, we call it ID 1 and 2. The BeBot database would call this lowid = 1, highid = 2, name = Second Tier Keeper Cuirass, and iconid is that same for both since the mesh doesn't change unless u upgrade to Chosen. As far as I know, the ql220 item is just the next item in the XML, so this is easy to parse out and get the format we want.

Now...the hard part. I'll take NCU memory, as this is probably one of the trickiest ones. There are 6 different "items" called NCU Memory, 2-3 NCU Memory, 4-7 NCU Memory, 8-15 NCU Memory, 16-31 NCU Memory, 32-63 NCU Memory and 64 NCU Memory. They have all different QLs ofc (ql1, 20, 40, 50, 120 and 200) and all totally different IDs and all different iconids. I'm not 100% sure, but I don't think there are no logical way to really create a lowid/highid template for this. For NCU Memories, there are no "matching pair", as the 2-3 NCU Memory is valid for ql1-ql19 suddenly. From ql20-39 it's 4-7 NCU Memory etc etc. For Freedom Arms 3927 pistols, ranging from ql 1-200, there are matching pairs for everything except the  ql200 version, namely the Freedom Arms 3927 G2 (I really want this pistol btw :)). The lowid/highid for this version would be 200/200.

This is not impossible ofc, but I think one should think a bit different when making the item system. Some of the point must be that when you search for "Freedom Arms 3927", you should only get 1 hit in the database. If you put in a specfic ql, it should pick the right one too. Just some thoughts about the subject, and it would be really cool if someone could make the best item system :P I'd be happy to help out ofc
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
16.0 database
« Reply #8 on: October 31, 2005, 05:54:14 pm »
Was looking this one over.
Angels parser for the sql output, puts out Item ID, Name, QL, Itemtype, Icon by default. Changing the included output template is easy enough. I changed it to only output ID, Name and QL.

That's all that's needed really. Now to create a Items Module that queries that Table, determines lowid, highid, lowql, highql, name.

I could probably base it off Vhab's Items plugin for IGN Bot as I know that plugin determines that info based on those 3 pieces of information from the items.db flat file. Hmmm... the SQL query only needs to pull the rows that are 'LIKE' the items asked for from the name column and dumped into a Temp Array.

The relevent piece of code I speak of is:
Code: [Select]
// search for matches and combine the results into complete data needed for making links
if (count($result) < 150) {
$matches = array();
$i = 0;
$temp = $result;
foreach($result as $record)
{
foreach($temp as $temp_record)
if (strcmp($record["name"],$temp_record["name"]) == 0 && $record["ql"] > $temp_record["ql"]) {
$matches[$i]["name"] = $record["name"];
$matches[$i]["highid"] = $record["id"];
$matches[$i]["lowid"] = $temp_record["id"];
$matches[$i]["highql"] = $record["ql"];
$matches[$i]["lowql"] = $temp_record["ql"];
if ($QL > 0 && $QL >= $matches[$i]["lowql"] && $QL <= $matches[$i]["highql"]) {
$matches[$i]["ql"] = $QL;
} else {
$matches[$i]["ql"] = $matches[$i]["highql"];
}
$i++;
}
}
$j = 0;
foreach($result as $record)
{
$match = 0;
foreach($temp as $temp_record)
{
if (strcmp($record["name"],$temp_record["name"]) == 0 && $record["ql"] != $temp_record["ql"]) {
$match=1;
}
}
if ($match==0) {
$matches[$i]["name"] = $record["name"];
$matches[$i]["lowid"] = $record["id"];
$matches[$i]["highid"] = $record["id"];
$matches[$i]["lowql"] = $record["ql"];
$matches[$i]["highql"] = $record["ql"];
$matches[$i]["ql"] = $record["ql"];
$i++;
}
}
Note the String Compares and QL matching.


Don't mind me... just thinking out loud. :)
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Plac3bo

  • BeBot User
  • **
  • Posts: 50
  • Karma: +0/-0
16.0 database
« Reply #9 on: November 25, 2005, 10:45:52 am »
got ahold of auno today, and he made a new xml version of the db!
can you do your magic blondengy?  :twisted:

http://auno.org/dev/aoxml.html

Offline Shelnaria

  • BeBot Rookie
  • *
  • Posts: 17
  • Karma: +0/-0
16.0 database
« Reply #10 on: November 27, 2005, 06:55:55 pm »
I apologize in advance for asking here. But how do we update to a new items.sql? I have the original one in place after setting up the bot and I see there was a 15.9.2 update done. Any help will be greatkly appreciated.

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 253
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal