Maplestory Reference Wiki
Advertisement

An Operation Code (aliases: Opcode, Header) is a the first bytes in a packet to help identify which packet is received or sent in MapleStory. In servers, Operation Codes are usually inserted into

An Operation Code collection enum made in C#.

enums, and thus given names for easier understanding of the code or packet.

In earlier versions, the Opcode was the first byte of the packet. However, the Opcode was changed to a short (2 bytes long). This changed the maximum amount of Opcodes potentially available from 255 (2^8) to 65,536 (2^16). It is also important to keep in mind that there are a different set of opcodes for both directions. Transmitting from the server and receiving on the client has one set of agreed upon Opcodes, where transmitting from the client and receiving on the server has yet another. These different Opcodes may even share the same Opcode number while containing different actions. For example in version 62, the Opcode 0x002D is "Update Mount" if sent by the server, yet "Take Damage" if send by the client.

Advertisement