WARNING: This program is only for people who wanna try making their own SQL files with the client RDB data. I coded/ran/tested this in Linux, PHP 5 and on the old AO Client (EP1.) If you have something else, then you might need to do some edits to get it to work. Also this is just a demo. It makes an .SQL file, but I'm not going to say which kind. Why? Because if you try to use this SQL file in your bot it will not work.
All this does, is reads an item from clientRDB and organizes it into an array. Then you can check if you need that item, and copy the parts you want. Then continue to the next item, etc. Here's an example:
Code: Select all
string(23) "Flamethrower Ammunition"
string(41) "This is Ammunition for the flamethrowers."
Basicly, excluding the 'id' at the top, there are 3 sections for this item.  is the Attributes section (QL, Price, Icon, etc.)  is the Name/Description part. Finally  is ATK/DEF. (Not sure why that's there for ammo though. lol) There are also other groups, and hopefully I put in enough comments everywhere to understand the basics. This is why I'm not really calling this a ripper. There aren't thousands of line of code in here to translate all the numbers into pretty text.
To get this to run, you'll have to edit the php file in the ./PHP directory. Change the $dir at the top to the directory your root AO directory is at. Save, and run the bash file at the root directory. If all goes well you'll see a new .sql file.
When writing your own SQL files, if you're having trouble reading what the numbers are in specific items, in game you can do:
Code: Select all
/tell ttst idblob 21601