
Originally Posted by
mesosa
Packets is the word we use to describe bytes sent from Client to Server and Server to Client.
Mu Online packet format is very simple.
You have 1 byte length packets (C1 & C3) and 2 bytes length packets (C2 & C4).
The main structure of the packet is:
type size code
"type" is C1, C2, C3 or C4
"size" is the length of the packet, being 1 byte for C1 & C3 and 2 bytes for C2 & C4.
"code" is the identifier of the packet that is used on protocol core.
This is an example of a C1 packet:
0xC1 0x04 0xF1 0x01
0xC1 -> packet type.
0x04 -> packet length.
0xF1 -> packet code.
0x01 -> packet data. sometimes this data can be a sub identifier.
This is an example of a C2 packet:
0xC2 0x00 0x05 0xF1 0x01
0xC2 -> packet type.
0x00 -> this is the high byte of the packet length.
0x05 -> this is the low byte of the packet length. A simple explanation of how to get full packet length would be HighByte * 256 + LowByte. In this case is 0x00 * 256 + 0x05 = 0x05
0xF1 -> packet identifier
0x01 -> packet data. sometimes this data can be a sub identifier.
C3 packets are the same than C1 packets but encrypted.
C4 packets are the same than C2 packets but encrypted.
This was a very very basic explanation about mu online packets.