Link Search Menu Expand Document

Verified naming

Sequence Mask

The sequence mask is used to play an animation on the player or NPC.


Table of contents

Supported variables

Below is a breakdown of the different variables that the server defines:

  • The animation id, written as an unsigned short.
  • The delay in client ticks before the sequence is played, written as an unsigned byte.

Use Cases

Animations are used all around the game, whether it be combat or skilling actions. These animations should however not be confused with the base animations that entities have, meaning the run, walk, stand and such. Those cannot be configured by the server for NPCs, and can only be modified through the appearance mask for players.

Client Code

Below is the refactored version of the client code behind the sequence mask.

All the buffer methods shown below can have different transformations applied on them, depending on the revision of the client. For the purposes of the demonstration, all transformations have been excluded.

int animationId = var0.readUnsignedShortLE();
if (animationId == 65535) {
    animationId = -1;
}
int animationDelay = var0.readUnsignedByteAdd();
Client.animate(entity, animationId, animationDelay);