- summary: Says something on a chat channel. This is the message a script sends to talk.
- area: Game.Chat
Says something on a chat channel. This is the message a script sends to talk.
Kind request · Area Game.Chat
Talk on a channel. The server echoes your own line back as
ChatChannelMessageEvent, so do not render it locally - wait for the echo, as
the client does.
channel DECIDES WHO HEARS YOU AND IT IS EASY TO GET WRONG. It has no explicit
presence, so leaving it unset does not mean "default channel" in any safe sense:
it means the enum's zero value, which is Channel.GLOBAL - the loudest
channel in the game. Set it deliberately every time.
TO WHISPER ONE PERSON, THIS IS THE WRONG MESSAGE. Use
ChatPrivateMessageRequest.
metadata carries rich attachments - item and monster-group links - and stays
present but empty for an ordinary line. The visible words always go in
content; the link data rides alongside so the recipient's client can render
and hover it. To link an item, put {chatitem,<uid>,<gid>} in content and the
item in Metadata.objects; for a monster group, use Metadata.monster_groups.
Leave every other member unset. The request also declares an optional int32 that
no client code sets (3.7.12.12: hay.bncc sets content, channel and
metadata, fzq.mac sets only content, and nothing calls that member's setter
or stores it), and a captured request never carries it.
Chat is the most visible thing a script does. Rate, timing and repetition here are what a human moderator looks at first.
When you may send it
- Requires
character_loadedobserved - Raised by: the player types a line in the chat window and presses enter observed
Related messages
- You will receive one of
ChatChannelMessageEventobserved — the server echoes the line back to the sender as well as to everyone else on the channel - You will receive one of
ChatErrorEventinferred — instead of the echo when the server refuses the line (unknown recipient, channel unavailable, ...)
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 2 | channel | Channel | Which channel to say it on. A Channel value.NO EXPLICIT PRESENCE: unset means the zero value, Channel.GLOBAL, not 'unspecified'. | required |
| 3 | content | string | The text being said. The only string the message carries. | required |
| 4 | metadata | Metadata | Rich content attached to the line - item and monster-group links. Present but empty for an ordinary text message. See Metadata.Name ours, after its type Metadata: beta has no such field and no build names it. | optional |