Shaiya Packets

Packets are units of data used to communicate between the client and the server. They transmit information from the server, as well as input from the player to the server. In this document, incoming packets refer to the packets that the client sends to the server, while outgoing packets refer to the ones the server sends to players.

A packet is always prefixed with 2 shorts - the length, and the opcode. These should both be in little endian order. When using encryption, the packet should be encrypted from the opcode onwards, leaving the length unencrypted. Thus, a packet should follow the convention:

Data type Name Description
u16 length The length of the entire message.
u16 opcode The identifier of the packet.
byte[length - 4] payload The data of the packet

Documented Packets

Below is a list of packets that are currently documented on this site.

Packet Grouping

As you might have noticed, packets are grouped based on their most significant byte. This allows for the server to logically separate packets based on their opcode alone. An example of this would be, if the client sends a character screen packet while in the game world, we can just ignore it, or disconnect the client.

packet_group = opcode & 0xFF00
is_character_screen_packet = packet_group == 0x0100

Table of contents