Parsing Quests in 0x3013 (vSRO 188)

06/29/2015 01:06 magicanoo#1
Hello,

I'm stuck somewhere in 0x3013 parsing (self-spawn packet). I reached the quests part and I couldn't parse it correctly. There is a "completed quests" part which is just a WORD and a for loop with DWORD for each one, but what comes next is the "Active/Accepted quests". Does anyone have any clue about that part?
Part of my code :
Code:
                            ushort CompletedQuestCount = PacketItem.ReadUInt16();
                            for (int q = 0; q < CompletedQuestCount;q++ )
                            {
                                PacketItem.ReadUInt32(); //refquestID
                            }
                            byte activeQuest = PacketItem.ReadUInt8();
                            for (int q = 0; q < activeQuest; q++)
                            {
                                PacketItem.ReadUInt32(); //refquestID
                                PacketItem.ReadUInt16();
                                byte questtype = PacketItem.ReadUInt8();
                                byte objectiveCount = PacketItem.ReadUInt8();
                                for (int obj = 0; obj < objectiveCount; obj++)
                                {
                                    PacketItem.ReadUInt8Array(11);
                                    string objj =PacketItem.ReadAscii();
                                    byte objtask = PacketItem.ReadUInt8();
                                    for (int ot = 0; ot < objtask; ot++)
                                    {
                                        PacketItem.ReadUInt32();
                                    }
                                }
Thanks

EDIT : I fixed it on my own. The problem was because there should have been a condition like this :
Code:
if (questtype==8)
{
PacketItem.ReadUInt8();
continue;
}
06/29/2015 08:57 amra85#2
Hi. Im not totaly sure this is full structure...
Theres a few thing you can do to skip teh quest part(if you don't need it)
1. Use charUID parsed from x3020 packet. Just search through bytes for a match. Actually i suggest not to use this one as it may interfere with quests ids. Its pretty rare though
2. Save teh char name when its being selected and search for it.
06/29/2015 17:03 magicanoo#3
Quote:
Originally Posted by amra85 View Post
Hi. Im not totaly sure this is full structure...
Theres a few thing you can do to skip teh quest part(if you don't need it)
1. Use charUID parsed from x3020 packet. Just search through bytes for a match. Actually i suggest not to use this one as it may interfere with quests ids. Its pretty rare though
2. Save teh char name when its being selected and search for it.
I am trying to dynamically parse everything that might be useful in in the self-spawn packet. I reached the point where almost all types of quests are parsed correctly as the image following :

[Only registered and activated users can see links. Click Here To Register...]

I'm still looking for different types of quests to take and try to parse, because I discovered that each quest type has its own custom bytes.
06/29/2015 17:21 Devsome#4
Quote:
Originally Posted by magicanoo View Post
I am trying to dynamically parse everything that might be useful in in the self-spawn packet. I reached the point where almost all types of quests are parsed correctly as the image following :

[Only registered and activated users can see links. Click Here To Register...]

I'm still looking for different types of quests to take and try to parse, because I discovered that each quest type has its own custom bytes.
I guess the bytes for each quest are in the Media.pk2
So you can parse it and save it into a dictionary