ClassicUO Web ships a built-in scripting engine that lets you automate actions inside Ultima Online directly from your browser. Scripts run inside the Web Assistant panel alongside your game session, giving you programmatic access to your character, the game world, journal, targeting, and more — no external tools or client modifications required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ClassicUO/classicuo-web/llms.txt
Use this file to discover all available pages before exploring further.
What is Scripting?
The scripting engine exposes a set of global variables and namespaces that mirror the live state of your UO session. You can read your character’s position, stats, and equipment; search for nearby mobiles and items; interact with context menus and targeting cursors; inspect the journal; and control pacing with timed delays — all from a script that runs in lock-step with the game loop. Scripts execute synchronously in a loop. Each iteration of your script runs to completion, and you usesleep() to introduce deliberate pauses between actions. This model makes scripts easy to reason about and keeps behavior predictable.
The scripting engine runs inside a sandboxed environment within the Web Assistant. Scripts cannot access your browser’s filesystem, make arbitrary network requests, or interact with anything outside the ClassicUO Web scripting API.
Script Modes
The engine supports two authoring modes, letting you choose whichever fits your workflow:TypeScript
Write scripts in TypeScript — they are compiled to JavaScript at runtime before execution. You get full type-checking, autocompletion, and access to all global variables and namespaces without any import statements.
Blockly (Visual)
Assemble scripts visually using drag-and-drop Blockly blocks. Ideal for players who prefer a no-code approach. Blockly scripts compile to the same underlying engine as TypeScript.
Accessing the Scripting Window
The scripting window is embedded in the Web Assistant panel. To open it:Open the Web Assistant
Click the Web Assistant button in the ClassicUO Web toolbar. The panel will slide open alongside your game view.
Navigate to the Scripting tab
Select the Scripting tab inside the Web Assistant. You’ll see the code editor (TypeScript mode) or block canvas (Blockly mode) along with a console output area below it.
Write or paste your script
Type your script in the editor. All global variables such as
player, client, and journal are available immediately — no imports needed.Shard Rules
Shard owners can control whether scripting is available to players on their shard. This is configured via ShardRules and supports three settings:| Value | Behaviour |
|---|---|
enabled | Both TypeScript and Blockly scripting are fully available to all players. |
disabled | Scripting is completely disabled; the scripting tab is hidden. |
disable-ts | Blockly (visual) scripting remains available, but the TypeScript editor is disabled. |
Hello World Example
The simplest possible script logs a greeting and then reads a live value from theplayer global:
A Looping Script Example
Most useful scripts run in a loop and usesleep() to pace their actions. Here is a script that periodically checks whether the player is dead and bails out if so:
Explore the API
Global Variables & Functions
Reference for every pre-injected global variable and built-in function available in all scripts.
Player Namespace
Full API for reading and controlling your character — stats, skills, equipment, movement, and actions.
Client Namespace
Interact with the UO client world: search for entities, send messages, and control the camera.
Built-in Functions
Detailed reference for
sleep(), log(), and exit() with parameter tables and examples.Enums
All enumeration values used across the scripting API — graphic IDs, skill names, directions, and more.
Target Namespace
Create and respond to targeting cursors for objects, mobiles, and ground tiles.