Appearance
sdk.input
Official tibia::input::TGameAction catalog + publish. Resolve by name (ToggleMounted, TGameActionUse). Do not paste RVAs. Simple actions publish through TGameClient signal 0. Parameterized Use/Look/MoveObject stay on sdk.packet / sdk.tools until a factory is wired.
lua
local M = require("sdk.input")get
function · get(name)
Look up a tibia::input TGameAction catalog row by name.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | catalog key or TGameAction* RTTI |
Returns
| Type | Summary |
|---|---|
table|nil | spec |
string|nil | err |
list
function · list(): GameActionRow[]
All recovered TGameAction rows.
Returns
| Type | Summary |
|---|---|
GameActionRow[] | — |
publishable
function · publishable(name: string): boolean
True when the kernel can publish this simple action.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
publish
function · publish(name, fields)
Publish a simple TGameAction through TGameClient signal 0.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
fields? | table | — |
Returns
| Type | Summary |
|---|---|
Result?, | ErrorMessage?, string? |
toggleMounted
function · toggleMounted(): Result?, ErrorMessage?, string?
Publish ToggleMounted (simple TGameAction). Catalog name, not an RVA. Fails if the action is not publishable.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
mount
function · mount(): Result?, ErrorMessage?, string?
Publish MountPlayer. Does not check whether already mounted. Use toggleMounted when the UI button is the model.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
unmount
function · unmount(): Result?, ErrorMessage?, string?
Publish UnmountPlayer. Does not check mount state first. Pair with mount() in scripts that know the desired state.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
attackFirst
function · attackFirst(): Result?, ErrorMessage?, string?
Publish AttackFirstTarget (battle list). Not a substitute for engagement lock/attack packets. Catalog-driven; no opcode constants.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
attackNext
function · attackNext(): Result?, ErrorMessage?, string?
Publish AttackNextTarget. Cycles the battle-list selection. CaveBot targeting does not use this.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
attackPrevious
function · attackPrevious(): Result?, ErrorMessage?, string?
Publish AttackPreviousTarget. Battle-list cycle, opposite of attackNext. Keep for scripts that mirror the client buttons.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
startTalkingToNpc
function · startTalkingToNpc(): Result?, ErrorMessage?, string?
Publish StartTalkingToNPC. Npc.greet still owns the hi packet; this is the input action. Parameterized talk stays on sdk.packet.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
quitGame
function · quitGame(): Result?, ErrorMessage?, string?
Publish QuitGame. Safety logout may use this after safe_stop. No confirm dialog from Lua.
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |
setTactics
function · setTactics(opts?: table): Result?, ErrorMessage?, string?
Publish TGameActionSetTactics with fight/chase/secure/pvp.
Parameters
| Name | Type | Summary |
|---|---|---|
opts | { | chase?: integer, secure?: integer, pvp?: integer } |
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage?, string? | — |