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?
November 20, 2008, 08:05:24 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Module Requests > Topic: Itemsdatabase for 15.9.6?
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Itemsdatabase for 15.9.6?  (Read 435 times)
0 Members and 1 Guest are viewing this topic.
Plac3bo
Rookie
**
Offline Offline

Gender: Male
Posts: 50



Itemsdatabase for 15.9.6?
« on: August 31, 2005, 02:38:06 AM »

I know this isnt a module... but the 15.8.4 database is somewhat outdated.. what do you others do?
Logged
Zacix
Rookie
**
Offline Offline

Posts: 72


Itemsdatabase for 15.9.6?
« Reply #1 on: August 31, 2005, 03: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.
Logged

Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network
Blondengy
BeBot Creator and Founder
Administrator
Rookie
********
Offline Offline

Posts: 50


Itemsdatabase for 15.9.6?
« Reply #2 on: August 31, 2005, 04: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... Wink 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... Wink
Logged
Zacix
Rookie
**
Offline Offline

Posts: 72


Itemsdatabase for 15.9.6?
« Reply #3 on: August 31, 2005, 05:57:53 AM »

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


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

Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network
Plac3bo
Rookie
**
Offline Offline

Gender: Male
Posts: 50



Itemsdatabase for 15.9.6?
« Reply #4 on: August 31, 2005, 10:27:32 AM »

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 Smiley
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Itemsdatabase for 15.9.6?
« Reply #5 on: August 31, 2005, 12: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:
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. Smiley
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
Zacix
Rookie
**
Offline Offline

Posts: 72


Itemsdatabase for 15.9.6?
« Reply #6 on: August 31, 2005, 03: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.
Logged

Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Module Requests > Topic: Itemsdatabase for 15.9.6?
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by Temar
[Today at 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]

Delete member from Bot al...
by Alreadythere
[November 14, 2008, 12:17:54 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11034
Total Topics: 1495
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 15
Total: 17
Temar
Zeephonz

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.519 seconds with 28 queries. (Pretty URLs adds 0.045s, 4q)
Loading...