[rSro] 3013 Char Data

07/03/2011 21:09 lvszoc#1
Hi,
i try parse quests...

i parse a bit, but i stuck somewhere

[byte] QuestCount
ForEach Quest

//Parse Quest

End ForEach

But some quests
Code:
[dword] Quest ID
[word]   ??
[byte]   ??
[dword] ??
[word]  Quest Type Len
[string] Quest Type
[byte] ??
[word] ??
and some quests
Code:
[dword] Quest ID
[word]   ??
[byte]   ??
[dword] ??
[word]  Quest Type Len
[string] Quest Type
[byte] ??
[word] ??
[byte] ??
[word] ??
why :S

Some QuestData in Code
Code:
96 00 00 00 
10 00 
18
01 01 01 01
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 31 ...SN_CON_QNO_EU
01 
00 00 00 00
Code:
97 00 00 00   _CONS_1.........
10 00 
58 
01 01 01 01 
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 32  SN_CON_QNO_EU_CONS_2
01 
00 00 00 00
01 
4D 1D 00 00
Code:
99 00 00 00 
10 01 
58 
01 01 01 01
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 34   ....SN_CON_QNO_E
01 
00 00 00 00 
01 
4C 1D 00 00
Code:
9D 01 00 00 
10 00 
18 
01 01 01 01 
17 00 
53 4E 5F 43 4F 4E 5F 51 45 56 5F 41 4C 4C 5F 42 41 53 49 43 32 5F 31   N_CON_QEV_ALL_BA
01
00 00 00 00
Code:
A1 00 00 00 
10 00 
18 
01 01 01 01 
15 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 31 32   .....SN_CON_QNO_
01 
00 00 00 00
07/03/2011 21:18 vorosmihaly#2
hm,I've parsed them this way:


Quote:
for (int x = 0; x < alivequest; x++)
{
p.ReadUInt32();
p.ReadUInt16();
p.ReadUInt16();
p.ReadUInt16();
byte taskcount = p.ReadUInt8();
for (int df = 0; df < taskcount; df++)
{
p.ReadUInt16();
string questname = p.ReadAscii();
while(p.ReadUInt8() == 1)
{
p.ReadUInt32();
}
}
}
I hope that helps^^
07/03/2011 21:26 lvszoc#3
Quote:
Originally Posted by vorosmihaly View Post
hm,I've parsed them this way:




I hope that helps^^
it don't work...

because nothing bytes between two quests...

example

Code:
97 00 00 00 
10 00 
58 
01 01 01 01 
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 32  _CON_QNO_EU_CONS
01 00 00 00 00
01 4D 1D 00 00 
99 00 00 00   _2......M.......
10 01 
58 
01 01 01 01 
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 34 
01 00 00 00 00 
01 4C 1D 00 00
reader reads 01 4D 1D 00 00 in while and read one byte "99" for while detection, but this byte a part of second quest
07/03/2011 21:36 vorosmihaly#4
Quote:
Originally Posted by lvszoc View Post
it don't work...

because nothing bytes between two quests...

example

Code:
97 00 00 00 
10 00 
58 
01 01 01 01 
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 32  _CON_QNO_EU_CONS
01 00 00 00 00

01 
4D 1D 00 00 

99 00 00 00   _2......M.......
10 01 
58 01
01 01
01 
14 00 
53 4E 5F 43 4F 4E 5F 51 4E 4F 5F 45 55 5F 43 4F 4E 53 5F 34 
01 00 00 00 00 

01 4C 1D 00 00
reader reads 01 4D 1D 00 00 in while and read one byte "99" for while detection, but this byte a part of second quest
oh sry,I sent you the old code..:D

byte nextdata = p.ReadUInt8();
if (nextdata == 1)
{
p.ReadUInt32();
}

that's the one I use at that part,but I dunno about the last 5 bytes o_O
I've never got that in the end,lol.


EDIT:
BTW if you read this:
[dword] id
[word] sth
[byte] if this byte is 0x58,you'll need to read +5 bytes at the end of it^^,I guess:P
07/03/2011 21:38 lvszoc#5
thx