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

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

Author Topic: Itemsdatabase for 15.9.6?  (Read 9990 times)

0 Members and 1 Guest are viewing this topic.

Offline Plac3bo

  • BeBot User
  • **
  • Posts: 50
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« on: August 31, 2005, 09:38:06 am »
I know this isnt a module... but the 15.8.4 database is somewhat outdated.. what do you others do?

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #1 on: August 31, 2005, 10:33:47 am »
I'm working on a new items module. As you've probably noticed, Blondengy isn't developing on BeBot right now. Making the list of items the way it is now is very timeconsuming (lowid/highid), so I will create an easier way to update the itemsfile.
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Blondengy

  • BeBot Creator and Founder
  • BeBot Hero
  • ******
  • Posts: 51
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #2 on: August 31, 2005, 11:35:56 am »
ItemsDB 15.9.2

Sorry, Auno only had the 15.9.2 XML on his site and I don't have AO installed... ;) At least its a bit newer then the old one... Hope it helps!

And Zacix, yes, it takes more CPU load to create the high/lowid thingys when creating the mysql database, but in return a query takes less CPU load... ;)

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #3 on: August 31, 2005, 12:57:53 pm »
Quote from: "Blondengy"
ItemsDB 15.9.2

Sorry, Auno only had the 15.9.2 XML on his site and I don't have AO installed... ;) At least its a bit newer then the old one... Hope it helps!

And Zacix, yes, it takes more CPU load to create the high/lowid thingys when creating the mysql database, but in return a query takes less CPU load... ;)


Problem is that you can't just parse everything as lowid/highid. There are quite a few special cases like NCU chips. That means that you manually have to edit some items, in which case I don't intend to do for every update.
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Plac3bo

  • BeBot User
  • **
  • Posts: 50
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #4 on: August 31, 2005, 05:27:32 pm »
blondengy, do you use a special program to convert the xml to .sql file? in that case could you post it? or do you have to have aunos.xml?
On aodb.info there is a tool extracting the db wich can output it to xml.
There is also a sql output, but its not for mysql.

I dont know, if you want the resourece file from newest ao for that program without installing it, send me a privmsg here with talk/msn adress and I can send it, or out it on my webserver as zip file so you can download it and look at it :)

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #5 on: August 31, 2005, 07:08:47 pm »
Eeem silly question about your choice of SQL Syntax.
But why drop the table if it exists? I find it easier/faster to update the table with REPLACE INTO rather than INSERT INTO.

Ex:
Code: [Select]
CREATE TABLE IF NOT EXISTS `items` (
  `lowid` int(11) NOT NULL default '0',
  `highid` int(11) NOT NULL default '0',
  `lowql` int(11) default NULL,
  `highql` int(11) default NULL,
  `name` varchar(150) default NULL,
  PRIMARY KEY (`lowid`)
) TYPE=MyISAM;

REPLACE INTO `items` VALUES (21601, 21601, 1, 1, 'Flamethrower Ammunition');
REPLACE INTO `items` VALUES (21605, 21605, 1, 1, 'Bullets');
REPLACE INTO `items` VALUES (21609, 21609, 1, 1, 'Energy Weapon Ammo');
REPLACE INTO `items` VALUES (21613, 21613, 1, 1, 'Shotgun Shells');

Etc... Etc..


If that row exists it will skip it... if it's not present then it'll insert it.
NOTE: Unless the table has a PRIMARY KEY or UNIQUE index, using a REPLACE statement will make no sense. It becomes equivalent to INSERT, because there is no index to be used to determine whether a new row duplicates another.

EDIT: On 2nd thought, don't mind me. I'm just being an old crotchety DB Admin. :)
<<< Hack's in Zend Studio

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

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Itemsdatabase for 15.9.6?
« Reply #6 on: August 31, 2005, 10:19:42 pm »
Quote from: "Xenixa"

If that row exists it will skip it... if it's not present then it'll insert it.


That's actually wrong....REPLACE INTO will update the row if it exist, hence u need an primary key to make it useful. If the row doesn't exist, it will just insert it normally.
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


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


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

* Who's Online
  • Dot Guests: 389
  • 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