Game Client
getClient() returns the bot handle that scripts drive. From a script the parent client is implicit (getClient() with no args), but you can also fetch any spawned bot by id, email, or device id.
local client = getClient() -- script's parent bot
local target = getClient("57ce9585c26da4fe...") -- by device id
Most methods that reach the server return string? — nil on success, or one of the Errors.* codes on failure. Methods that surface a value still return the value as the first half of a (value, err) tuple.
Topics
- Connection — connect, disconnect, status, ping, subserver, account fields
- Chat — say, status icons, presence, animations
- Movement — setPoint/setPosition, pathfinding, location
- Worlds — warp, world lookups, queries
- Tile interaction — hit, place, plant, hitEnemy
- Inventory — drop, trash, wear, collectables, gift boxes, item packs
- Presence & physics — camera, gravity
- Quests — daily gift, achievements, quests
- Packets — raw send/on, child instances
- Errors — error code reference
For tutorial drivers + state queries see the dedicated Tutorial page.