Appearance
sdk.movement
Thin wrappers around native game.walk / game.move_to. Combat remains acknowledgement-driven one-tile walking; bounded town recovery segments use moveTo so the official client can keep its normal pre-walk cadence.
lua
local M = require("sdk.movement")walk
function · walk(dir)
Walk one tile (or stop) through the native client action queue.
Parameters
| Name | Type | Summary |
|---|---|---|
dir | string|integer | Compass name/abbreviation, or an sdk.math.dir value. |
Returns
| Type | Summary |
|---|---|
boolean|nil | ok |
string|nil | err walk missing, unknown direction, or the native send error. |
moveTo
function · moveTo(x, y, z)
Ask the official client to walk toward a world-map coordinate.
Parameters
| Name | Type | Summary |
|---|---|---|
x | number | — |
y | number | — |
z | number | Floor in the inclusive range 0..15. |
Returns
| Type | Summary |
|---|---|
boolean|nil | ok |
string|nil | err invalid position, move_to missing, or the native send error. |
stop
function · stop()
Cancel an in-flight walk / MoveTo. Official GameclientMessageStop.
Returns
| Type | Summary |
|---|---|
boolean|nil | ok |
string|nil | err |