Skip to content

sdk.movement ​

Thin wrappers around native game.walk / game.move_to. Directional steps are official one-shot TGameActionPlayerMovementIntent actions; bounded town recovery segments use MoveTo so the client keeps normal pre-walk cadence. Rotate / turn is the facing packet fallback when game.rotate is missing.

lua
local M = require("sdk.movement")

walk ​

function · walk(dir)

Walk one tile (or stop) through the native client action queue.

Parameters

NameTypeSummary
dirstring|integerCompass name/abbreviation, or an sdk.math.dir value.

Returns

TypeSummary
boolean|nilok
string|nilerr 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

NameTypeSummary
xnumber—
ynumber—
znumberFloor in the inclusive range 0..15.

Returns

TypeSummary
boolean|nilok
string|nilerr invalid position, move_to missing, or the native send error.

stop ​

function · stop()

Cancel an in-flight walk / MoveTo. Publishes official TMovementIntentStop and enqueues GameclientMessageStop. Stop alone only ends the current step; the stored click-to-walk waypoint keeps republishing Go* until the handler sees Stop.

Returns

TypeSummary
boolean|nilok
string|nilerr

rotate ​

function · rotate(dir)

Face a cardinal. Diagonals collapse to the nearest east/west so the four Rotate* packets stay valid. Prefers game.rotate; falls back to Packet.empty. Common: call after a path step when the next action needs a facing (use, talk).

Arcane SDK catalog generated from scripts/sdk