Getting Client structure
#1

Hey,

im looking for the Structure of the QuestAll and ItemAll, how can i find it out? 

#2
Revers Engine.dll

#3
Just open them with HeX editor and think on it ...

#4

Just open them with HeX editor and think on it ...

Proven method, but long. Much faster view engine.dll

#5
Most of the lod files are ordered the same way like the matching database table. Just do it with a hex editor and compare it with what u see in the database. Thats how i made all my editors

#6

What Wizatek said, open a hex editor(I prefer Hex WorkShop because it has the menu on the right, abd calculates  integer values from hex bytes automatically).

 

Just compare the values from the database with a item from the client then create a structure.

All lc binary files start with the first 4 bytes that represent the number of rows.

Each row has a index(another 4 bytes), every time before any string is specified 4 bytes that represents the string length

 

the data is stored in little endian so 1 in 32bit hex is 01 00 00 00(in big endian is 00 00 00 01)

 

59 26 00 00  02 00 00 00 0D 00 00 00 4C6561746865722041726D6F72 01 00 00 00 ....03 00 00 00 0D 00 00 00 4C6561746865722050616E7473  01 00 00 00 ...

 

As you can see:

- Nr of rows to read(last index actually)

- item index

- upcomming string size

- the actual string "Leather Armor", "Leather Pants"

- level

.. and so on(check the database to see what the rest mean)

 

Dont forget there are sometime loops inside, a row for example when reading skills, it contains the skill level.

#7

Struct ItemAll fo 010 Editor

typedef struct {
int32 CraftItemID;
int32 CraftItemAmount;
} CRAFT <read=CraftRead>;

string CraftRead(CRAFT &p)
{
string s;
SPrintf(s, "ID:%d|Amount:%d", p.CraftItemID, p.CraftItemAmount);
return s;
}

typedef struct {
int32 NameCount;
char Name[NameCount];
} STR;

typedef struct {
int32 ItemID;
STR ItemNAme;
int32 JobFlag;
int32 Weight;
int32 MaxUse;
int32 Level;
int32 Flag;
int32 Position;
int32 Type;
int32 SubType;
CRAFT Crafts[10];
int32 NeedSkill1ID;
int32 NeedSkill1Level;
int32 NeedSkill2ID;
int32 NeedSkill2Level;
int32 unk1;
int32 unk2;
int32 unk3;
int32 unk4;
int32 Price;
STR Smc;
int32 TexID;
int32 TexRow;
int32 TexCol;
STR Description;
STR Effect1;
STR Effect2;
STR Effect3;
int32 Set1;
int32 Set2;
int32 Set3;
int32 Set4;
int32 Set5;
int32 RareOption;
int32 RareChance;
} ITEM;

int IfLast(ITEM &p, int32 &Max)
{
if(p.ItemID == Max)
{
return 1;
} else
{
return 0;
}
}

int32 MaxID;

while( !FEof() )
{
ITEM Item;
if(IfLast(Item, MaxID))
{
break;
}
}

#8
like wiza and someone allready said ...   but to get the newer once you can try with IDA Pro to reverse the engine.dll to get the struckts out

#9

This is not C/C++ proper format for a structure:

typedef struct {
int32 CraftItemID;
int32 CraftItemAmount;
} CRAFT <read=CraftRead>;

typedef struct {
int32 NameCount;
char Name[NameCount];
} STR;
In the first struct you cant attach functions to a struct its not a template, a templated us declared differently, in the second struct, you cant dinamically allocate a field size(unless yuour using constants). or pointers(which will use 32/64  bits depending  on platform)

typedef struct {
int32 CraftItemID;
int32 CraftItemAmount;
} CRAFT ;

typedef struct {
int32 NameCount;
char* Name;
} STR;


Forum Jump:


Users browsing this thread: 1 Guest(s)