yes i think so your way will be better , but maybe you give algorithm start and if we finish it faster i will help you too
Printable View
What kind of fields the records inside the dat files has? how the struct looks like?
I see you guys are struggling with that. Here's my work about that particular topic: https://github.com/gregoo/pt.inventory.php
The repo contains a set of class that can unpack and pack the inventory of a .dat file.
There's also a little demo that display the content of my very own char and buttons to delete items.
Have some fun you guys!
EDIT: I must confess I've tested the theory (checking if unpacking - packing produced the exact same file) but I didn't try to launch the character afterwards (too lazy to launch a test server). Do backup your character before checking this stuff!