UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

36 lines (35 loc) 1.18 kB
import { Packet } from './base'; import { PacketType } from './enums'; /** * MSg Out - system messages and user messages - variable size * * NOTE: Typing "/o MESSAGE" into LFS will send an IS_MSO with {@link UserType} = {@link MSO_O} */ export declare class IS_MSO extends Packet { private static readonly FIXED_DATA_SIZE; readonly Size = 8; readonly Type = PacketType.ISP_MSO; readonly ReqI = 0; readonly Zero = 0; /** Connection's unique id (0 = host) */ UCID: number; /** Player's unique id (if zero, use UCID) */ PLID: number; /** Set if typed by a user (see {@link UserType}) */ UserType: UserType; /** First character of the actual text (after player name) */ TextStart: number; /** 4, 8, 12... 128 characters - last byte is zero */ Msg: string; unpack(buffer: Uint8Array<ArrayBuffer>): this; } export declare enum UserType { /** System message */ MSO_SYSTEM = 0, /** Normal visible user message */ MSO_USER = 1, /** hidden message starting with special prefix (see {@link IS_ISI}) */ MSO_PREFIX = 2, /** Hidden message typed on local pc with /o command */ MSO_O = 3 }