Parse character data packet

01/15/2015 00:28 hadescik#1
Hi. My code is :

PHP Code:
 //Header
    
a7 01 //size = 01A7(423)
    
13 30 //Opcode = 0x3013(vsro)
    
00 00 //Security & CRC
    //End
     
    //Data
    ///Self Info
    
--
    
8a 07 00 00 // CharType
    
11 // Volume
    
03 // level
    
03 // mastery can't be more than that value
    
9a 02 00 00 00 00 00 00 // exp
    
53 01 00 00 // spexp
    
6b 03 00 00 00 00 00 00 // gold
    
05 00 00 00 // sp
    
06 00 // aatr. pts.
     
    
04 00 00 00 00 // 5 noob icons
    
e4 00 00 00 // hp
    
f9 00 00 00 // mp
    
01 00 // PKDaily
    
00 00 // PKLVL
    
00 00 // Karma
    
00 00 // Area title(WTF?!)
    //End
     
    //Items
    
--
    
00 // ??
    
2d // Total item slots
    
0a // Used item slots
     
    //Item1
    ///
    
00 // ItemSlot = 0 - exist?
    
33 05 00 00 // Item Id
     
    
01 // plus
    
83 b2 23 0e 00 00 00 00 // Item modifier
    
2a 00 00 00 // durability
    
04 // number of blue stats
    
80 00 00 00 //stat id 1
    
14 00 00 00 //stat value 1
    
50 00 00 00 //stat id 2
    
1e 00 00 00 //stat value 2
    
05 00 00 00 //stat id 3
    
02 00 00 00 //stat value 3
    
38 00 00 00 //stat id 4
    
01 00 00 00 //stat value 4
     
    //Item2
    ///
    
01 // ItemSlot = 1
    
41 0e 00 00 // Item Id
     
    
00 //plus
    
00 00 00 00 00 00 00 00 // Item modifier
    
2a 00 00 00 //Durability
    
00 //Number of blue stats
     
    //Item3
    ///
    
04 // itemSlot = 4
    
42 0e 00 00 // ItemId
     
    
00 //plus
    
00 00 00 00 00 00 00 00 //Item Modifier
    
28 00 00 00 //Durability
    
00 //Number of blue stats
     
    //Item4
    ///
    
05 //ItemSlot
    
43 0e 00 00 //ItemId
     
    
00 //plus
    
00 00 00 00 00 00 00 00 //item Modifier
    
26 00 00 00 //Durability
    
00 //Number of blue stats
     
    //Item5
    ///
    
06 //ItemSlot
    
31 0e 00 00 //itemId
     
    
00 //plus
    
00 00 00 00 00 00 00 00 //Item Modifier
    
40 00 00 00 //Durability
    
00 //number of blue stats
     
    //Item6
    ///
    
07 //ItemSlot
    
86 2a 00 00 //ItemId
     
    
00 //plus
    
00 00 00 00 00 00 00 00 //Item Modifier
    
2c 00 00 00 //Durability
    
00 //number of blue stats
     
    //Item7(EXP Helper(60%))
    ///
    
0d //ItemSlot
    
42 1d 00 00 //ItemId
     
    
01 00 //amount
     
    //Item8(EXP Helper(100%))
    ///
    
0e //itemSlot
    
43 1d 00 00 //ItemId
     
    
01 00 //amount
     
    //item9(20 newbie item scrolls)
    ///
    
0f //itemSlot
    
8e 28 00 00 //itemid
     
    
14 00 //Amount
     
    //Item10(150 chinese arrows)
    
10 //ItemSlot
    
3e 00 00 00 //ItemId
    
96 00 //Amount
     
    //EndItems
     
    //Avatar Items
    
05 //Start of avatar items
    
00 //Number of items
     
    //EndItems
     
    //Mastery
     
    
00 //Start Mastery
     
    //Mastery 1 - Bicheon
    ///
    
01 // unknown
    
01 // First mastery(Bicheon)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // mastery level
     
    //Mastery 2 - Heuscal
    ///
    
01 // unknown
    
02 // Second mastery(Heuscal)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // Mastery level
     
    //Mastery 3 - Pacheon
    ///
    
01 // unknown
    
03 // Third mastery(Pacheon)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // mastery level
     
    //Mastery 4 - Cold
    ///
    
01 // unknown
    
11 // Fourth Mastery(Cold)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
02 // mastery level
     
    //Mastery 5 - Light
    ///
    
01 // unknown
    
12 // Fifth Mastery(Light)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // mastery level
     
    //Mastery 6 - Fire
    ///
    
01 // unknown
    
13 // Sixth Mastery(Fire)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // mastery level
     
    //Mastery 7 - Force
    ///
    
01 // unknown
    
14 // Seventh Mastery(Force)
    
01 // Chinese mastery
    
00 // unknown
    
00 // unknown
    
00 // mastery level
     
    //EndMastery
     
    //Skill list
    
02 00 //Start of skill list
    
02      //End of skill list
    //EndSkill
     
    //Questst
    
01 00 // 1 completed quest
    
01 00 00 00  // completed quest ID(you start with this)
    
01 // 1 active quests
    
02 00 00 00 // active quest ID
    
10 00 58 //quest data??
    
01 //description available <bool>
    
01
    01
    01
    16 00 
//quest name len
    
53 4e 5f 43 4f 4e 5f 51 54 55 54 4f 52 49 41 4c 5f 43 48 5f 30 31 //quest name
    
00
    01 
//npc quest <bool>
    
e3 07 00 00 //npc ID
     
    
00 //End of quests
     
    //EndQuests
     
    //PlayerID
    
61 cd 03 00
     
    
//Coordinate Data
    
aa          // X Sector
    
60          // Y Sector
    
52 05 c2 42 // X Coord
    
53 bb 9a 41 // Z Coord
    
ad 5a e9 44 // Y Coord
    
4c 1d       // Angle
    
00          // Moving <Bool>
    
01          // Walking/Running??
    
00          //
    
4c 1d       // Angle
     
    //Other char data
    
00          //Dead <bool>
    
00          //State (02=walking 03=running 04=sitting)
    
00          //Berserking <bool>
    
00 00 80 41 //Walkspeed (float)
    
00 00 48 42 //RunSpeed (float)
    
00 00 c8 42 //Berserkspeed (float)
     
    
00 //Active buffs?
    
09 00 //char name length
    
43 65 6c 65 62 72 69 74 79 //char name
     
    //Job Data
    
00 00 //alias name length
    
00 //job type(0=none,1 = trader,2=thief,3=hunter)
    
01 //job lvl
    
00 00 00 00 //job exp
    
00 00 00 00
    00 00 00 00
     
    
//Other Data
    
00 //pvp state
    
00 00
    ff 
//startup popups
    
df
    00
    00 
//other data
    
00 8a 79 1a //AccountID
    
00 //GM flag
    
00
    07 
//hotkeys
     
    //End Of Packet
    
00 00 00 00 00 00 00 00
    01 00 01
    00 00 
How can i get character is in Job or not from c# ?
01/15/2015 14:02 tarek1500#2
I check if it wear job suit or not.
01/16/2015 14:51 magicanoo#3
[Only registered and activated users can see links. Click Here To Register...]

Credits to DaxterSoul. Try the "pvp cape" byte and let us know!
01/20/2015 03:40 Royalblade*#4
You cant. Not just from what you've seen above. That's not nearly enough.

2 ways. The last 20-30 bytes. There's a Jobflag there. Either you read that, or you do it via inventory items.

This means, you have to parse all equipment items up to slot 8. You check if slot 8 contains a jobsuit. If it does, then the char is obviously jobbing.

However, if you can't think of this yourself, then the whole thing is going to be way too hard for you.

Just fetch it from the DB. That's easier for you here.
01/20/2015 22:48 hadescik#5
Quote:
Originally Posted by blablaRoyal View Post
You cant. Not just from what you've seen above. That's not nearly enough.

2 ways. The last 20-30 bytes. There's a Jobflag there. Either you read that, or you do it via inventory items.

This means, you have to parse all equipment items up to slot 8. You check if slot 8 contains a jobsuit. If it does, then the char is obviously jobbing.

However, if you can't think of this yourself, then the whole thing is going to be way too hard for you.

Just fetch it from the DB. That's easier for you here.
I don't want to use DB option. But i can check slot. Thank you for help Royal