To Gr4ph0s: it would be very cool if I can gain access to my Warehouse and do staff like placing item in the Auction House; as well as do some Item Enchantments and so on... by accessing a Web Page instead of loggin into the game. This will let me play even on my spear time.
:-)
Ok I think I have all the knowledge I need for now... (except the unpack/decode + pack/encode for the .dat files).
This how i will proceed with my experimentation:
1. Read the .rdb files and populate right db table.
For now I have discovered (I hope) the db_string(ascii).rdb structure:
/* Done with structorian */
filemask="db_string(ascii).rdb"]
struct HEADER {
str [len=128, id=date] "date";
u32 [id=records] "records";
child ENTRY;
}
struct ENTRY {
u32 group_id;
u32 code;
cstr [id=name_id] "name_id";
cstr [id=value] "value";
u32 [id="data_1"] data_1;
u32 [id="data_2"] data_2;
u32 [id="data_3"] data_3;
u32 [id="data_4"] data_4;
u32 [id="data_5"] data_5;
u32 [id="data_6"] data_6;
if (CurOffset < FileSize) {
sibling;
}
}
I am playing with php to create a sort of Bynary File Read/Write class... in order to get these data in a better way.
Because this is the php code I am using:
/* Author: Skamorzo */
/* To: ElitePVPers - Rappelz Private Server Teams */
/* This is for educational use, all the trademarks and copyrights belong to the respective owners */
<?php
$handle = fopen("db_string(ascii).rdb", "rb");
$contents = '';
if (!feof($handle)) {
$contents = fread($handle, 128);
echo "/* Data :". unpack("a128date", $contents)['date']. " */\n";
}
if (!feof($handle)) {
$contents = fread($handle, 4);
echo "/* Records :". unpack("Irecords", $contents)['records']. " */\n";
}
while(!feof($handle)) {
$contents = fread($handle, 4);
echo unpack("Icode", $contents)['code']. "|";
$contents = fread($handle, 4);
echo unpack("Igroup_id", $contents)['group_id']. "|";
$string = "";
while(unpack("cname_id", $char = fread($handle, 1))['name_id'] != "\0") {
$string .= $char;
}
echo "\"". $string. "\"|";
$string = "";
while(unpack("cvalue", $char = fread($handle, 1))['value'] != "\0") {
$string .= $char;
}
echo "\"". $string. "\"|";
$contents = fread($handle, 4);
echo unpack("Idato_1", $contents)['dato_1']. "|";
$contents = fread($handle, 4);
echo unpack("Idato_2", $contents)['dato_2']. "|";
$contents = fread($handle, 4);
echo unpack("Idato_3", $contents)['dato_3']. "|";
$contents = fread($handle, 4);
echo unpack("Idato_4", $contents)['dato_4']. "|";
$contents = fread($handle, 4);
echo unpack("Idato_5", $contents)['dato_5']. "|";
$contents = fread($handle, 4);
echo unpack("Idato_6", $contents)['dato_6']. "\n";
}
fclose($handle);
?>
Stay tuned...
Skamorzo.
PS. This structure is related to a 6.2 game client db_string(ascii).rdb file.