ClassicUO Web scripts have access to three built-in global functions that are available without any import. These functions handle common scripting needs — pausing execution, printing debug output, and stopping a script early. They complement theDocumentation 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.
player, client, target, and gump namespaces and can be called freely anywhere in your script.
sleep
Note: The delay timing for long durations is not guaranteed to be exact due to the nature of the browser’s JavaScript event loop.
The number of milliseconds to pause execution. For example,
500 pauses for
half a second and 10000 pauses for ten seconds.Example — polling loop with sleep
Example — delay between skill uses
log
console.log in a browser, but outputs to the in-game script console rather than the browser’s developer tools. You can pass any number of arguments of any type; objects and arrays will be printed in an inspectable format.
One or more values to print to the console. Strings, numbers, booleans,
objects, and arrays are all accepted.
Example — simple string
Example — template literal with player name
Example — multiple values in one call
Example — inspecting an equipped item
exit
exit performs a clean termination — the script stops without displaying an uncaught-exception message. An optional reason string can be provided; if supplied it will be displayed in the console area so you can see why the script stopped.
This is most useful as an early-return guard at the top of your script to validate preconditions before doing any work.
An optional human-readable message explaining why the script was stopped. The
message will appear in the in-game script console.
Example — guard against dead player
Example — guard against missing backpack
Example — conditional exit inside a loop
Globals
Explore the global variables —
player, client, target, and moreEnums
Constants for spells, layers, directions, and more
Introduction
Get started with scripting in ClassicUO Web
Player Namespace
Read player stats, equipment, skills, and more