MapleStory Private Server Wiki

A Packet Structure is a structure of a packet, so you can easily see how the packet is 'build'.

You can structurize a packet with using closing brackets or newlines.

Packet Structure Datatypes[]

There are a couple datatypes in packets:

  • Byte (1 byte)
  • Short (2 bytes)
  • Integer (4 bytes)
  • Long (8 bytes)
  • String (Fixed lenght) (Size depends on the fixed length, as it can hold only 3 characters but the length is 13 and the remaining bytes are nulled (filled with 00's).
  • String (Variable length) (Size depends on the short at the beginning of the string, which holds the amount of characters the string holds)
  • Double/float (8 bytes)


Datatype examples[]

Byte[]

FF || Byte, -1

Short[]

0E 01 || Short, 0x10E or 270

Integer[]

EC 0A 3D 00 || Integer, 4000492 (itemid of item 'Certificate of Great Tester')

Long[]

00 E5 90 D9 D3 66 01 00 || Long, 394534900000000 (64 bit FILETIME value for time values)

String (fixed length)[]

6F 68 69 54 68 65 72 65 47 4D 53 00 00 || String (fixed length), 'ohiThereGMS'

String (variable length)[]

20 00 57 65 6C 63 6F 6d 65 20 74 6F 20 74 68 65 20 4D 61 70 6C 65 53 74 6F 72 79 20 57 69 6B 69 61 21
 || String (variable length), amount of characters: 0x0020 | 32, 'Welcome to the MapleStory Wikia!'

Example[]

We have these packets:

13 00 05 00 33 34 35 36 37 04 00 00 00 01 FF FF FF FF
13 00 01 00 33 03 00 00 00 00

We can structurize it as this:

[13 00] [05 00] [33 34 35 36 37] [04 00 00 00] [01] [FF FF FF FF]
[13 00] [01 00] [33] [03 00 00 00] [00]

or this:

13 00
05 00 33 34 35 36 37
04 00 00 00
01
FF FF FF FF
13 00
01 00 33
03 00 00 00
00

You can use XXs to 'set' a byte if it can be different, and use the original value if you think it's static, like:

13 00 || Short, Header?
XX XX ... || String, because the characters 'depends' on the length (length is 05 for 5 characters, and 01 for 1 character)
XX XX XX XX || Integer, seems to be an integer with unknown purpose
XX || Boolean, seems to be 01 when the following integer is set, else 00
-- If boolean = 01
XX XX XX XX
-- end if