API reference
Overview
Find Lua functions by table or bundled library.
Browse by gameplay area or Lua table. Each reference gives callable names, parameters, results, and examples. Calls that cannot read a game value usually return nil, error; false is a valid result for boolean queries. Advanced pages include experimental interfaces with their exact underscore-prefixed names and availability limits.
By task
| Goal | Functions | Complete workflow |
|---|---|---|
| Read character state | Character, current world | Quickstart |
| Query nearby entities | game.entities(), entities | Examples |
| Request movement and inspect destinations | Movement, travel | Configurable travel |
| Read and act on quests | Quests | Quest journal |
| Look up item, skill, NPC, pet, quest, or dungeon definitions | Game data | SDK downloads |
| Use items and skill shortcuts | Items and shortcuts | Request timing |
| Select targets, inspect skills, and upgrade them | Combat and skills | Auto Defense |
| Read detailed resources and surrounding action state | Character and environment | Error handling |
| Manage inventory, equipment, storage, crafting, and gathering | Inventory, equipment, and crafting | Request timing |
| Read objectives, enter dungeons, and manage expedition parties | Quests, dungeons, and rewards | Quest journal |
| Buy, sell, list, settle, and read memberships | Commerce | Inventory |
| Request cross-map travel or change the camera | Navigation and camera | Configurable travel |
| Inspect or interact with existing game windows | Game windows and controls | Custom script windows |
| Draw and accept user input | UI and graphics, hotkeys | Examples |
| Make web requests or play sounds | Services | Script lifecycle |
| Read a game CAPTCHA image with the hosted service | CAPTCHA API | Request timing |
| Observe, queue, or edit packets | packets | Script lifecycle |
Game scripts
| Lua table | What it provides |
|---|---|
game | Character, world, movement, items, and quests. |
ui | Windows and interactive controls. |
gfx | Screen drawings. |
hotkeys | Key state and one-time presses. |
http | Asynchronous web requests. |
sound | System and WAV playback. |
defense | Auto Defense skills, rules, and events. |
packets | Incoming packet copies, outgoing packet requests, and future byte edits. |
script | Workers, pauses, saved module values, and loading, reloading, or unloading modules. |
menu | Inspect Sharp menu features and turn them off. |
log | Script messages. |
Bundled libraries
Import these with require.
| Library | What it provides |
|---|---|
sdk | Common game functions in one import. |
entities | Nearby entity helpers. |
ui_sdk | A window helper that opens and closes ui windows. |
captcha_api | Hosted five-character image requests and reply checks. |
Start with the quickstart if you have not run a script yet.