MessagePublic

class MessagePublic : IncomingGameMessage

Message public events are sent when the player talks in public.

Chat types table:

| Id |        Type        |
|----|:------------------:|
| 0 | Normal |
| 1 | Autotyper |
| 2 | Friend channel |
| 3 | Clan main channel |
| 4 | Clan guest channel |

Colour table:

| Id    | Prefix    |          Hex Value         |
|-------|-----------|:--------------------------:|
| 0 | yellow: | 0xFFFF00 |
| 1 | red: | 0xFF0000 |
| 2 | green: | 0x00FF00 |
| 3 | cyan: | 0x00FFFF |
| 4 | purple: | 0xFF00FF |
| 5 | white: | 0xFFFFFF |
| 6 | flash1: | 0xFF0000/0xFFFF00 |
| 7 | flash2: | 0x0000FF/0x00FFFF |
| 8 | flash3: | 0x00B000/0x80FF80 |
| 9 | glow1: | 0xFF0000-0xFFFF00-0x00FFFF |
| 10 | glow2: | 0xFF0000-0x00FF00-0x0000FF |
| 11 | glow3: | 0xFFFFFF-0x00FF00-0x00FFFF |
| 12 | rainbow: | N/A |
| 13-20 | pattern*: | N/A |

Effects table:

| Id | Prefix  |
|----|---------|
| 1 | wave: |
| 2 | wave2: |
| 3 | shake: |
| 4 | scroll: |
| 5 | slide: |

Clan types table:

| Id |      Type     |
|----|:-------------:|
| 0 | Normal clan |
| 1 | Group ironman |
| 2 | PvP Arena |

Constructors

Link copied to clipboard
constructor(type: Int, colour: Int, effect: Int, message: String, pattern: MessagePublic.MessageColourPattern?, clanType: Int)

Types

Link copied to clipboard

A class for message colour patterns, allowing easy conversion from the byte array to the respective 24-bit RGB colours. This wrapper class additionally provides a helpful isValid function, as it is possible to otherwise send bad data from the client and crash the players in vicinity.

Properties

Link copied to clipboard
open override val category: ClientProtCategory
Link copied to clipboard

the clan type, if the type is the main clan channel, a value of 0 to 2 (inclusive) is provided. If the clan type is not defined, the value of -1 is given.

Link copied to clipboard
val colour: Int

the colour of the message, ranging from 0 to 20 (inclusive) (see above)

Link copied to clipboard
val effect: Int

the effect of the message, ranging from 0 to 5 (inclusive) (see above)

Link copied to clipboard

the message typed

Link copied to clipboard

the colour pattern attached to the message, if the colour value is in range of 13-20 (inclusive), otherwise null

Link copied to clipboard
val type: Int

the type of the message, ranging from 0 to 4 (inclusive) (see above)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String