Appearance
sdk.talk
Outbound TalkMessage (type 150). mode 1=say, 2=whisper, 5=private-to, 12=NPC.
lua
local M = require("sdk.talk")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
TALK_PRIVATE_FROM | 4 | — |
TALK_PRIVATE_TO | 5 | — |
TALK_GM_PRIVATE_FROM | 15 | — |
TALK_GM_PRIVATE_TO | 16 | — |
talk
function · talk(text, opts)
Returns boolean|nil: ok
Parameters
| Name | Type | Summary |
|---|---|---|
text | string | — |
opts | table|nil | mode, receiver, channel |
Returns
| Type | Summary |
|---|---|
boolean|nil | ok |
string|nil | err |
privateMessage
function · privateMessage(receiver, text)
Private message (mode 5). Receiver is required; empty names are rejected in talk().