Skip to content

EN Runtime API 24 Persistent State

Codex edited this page Oct 12, 2026 · 4 revisions

Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어

Runtime API — Persistent state

Home · C# · IDE · UO API · A–Z · Examples · Languages

Each team opens a card with C#-signatures, parameters and several independent examples.

Movement

Adds the passed values ​​to the compatibility list of the same name for the current runtime. Elements are serialized via |; This is a change to the local list, not an independent game action.

Client UI

Creates a persistent client-side overlay entry used by the actual ClassicUO WorldMapGump. The map renders line, ellipse, rectangle, direction-arrow and text figure kinds. World-coordinate figures follow the current map transform/zoom; screen-coordinate figures are relative to the map gump. The returned ID is used by UpdateFigure and RemoveFigure.

Magic

The command is used to add a gate charge to the standard Object runbook.

Sound & Visual Environment

Prints the word Alarm to the local ClassicUO syslog. Use as a note about the occurrence of a condition in the script.

Movement

Changes the state of the checkbox in the Always Run client options (if the client supports this option).

Diagnostics & Introspection

Returns 1 if the specified command name is registered at runtime, 0 otherwise. To check the number of arguments use ApiSignatureExists, for values ​​without a call use ApiParameterExists.

Diagnostics & Introspection

Checks a registered runtime value or named object. Returns 1 or 0. An empty name gives 0; options with UO are checked. and without a prefix.

Diagnostics & Introspection

Returns 1 if there is a registration of the specified name with the given number of arguments. This is a name and arity check, not a confirmation of value types or game object availability.

Character

Removes all weapons, then equips himself with the my_name set, previously memorized by the command SetArm.

Shops & Vendors

Installs an automatic hook for purchasing from vendors.

Shops & Vendors

Expanded version of AutoBuy with additional filtering by price and item name.

Shops & Vendors

Sets up an automatic hook for selling to vendors.

Combat

Attempts to use bandages on the current character.

Books

Finds the currently open ModernBookGump, verifies that it is editable, updates the visible title/author controls and sends Send_BookHeaderChanged (or the old-protocol header packet when required by the client version).

Speech & Chat

Performs the “bow” gesture - the character bows.

Conversion & Compatibility

Outdated command to fix another native client. In ClassicUO it only prints a message that such a patch is not required. Does not alter movement, speech or containers.

Shops & Vendors

To the vendor's name name appends the purchase keyword from the injection.ini file (usually buy) and pronounces this phrase, after which he buys things according to the list in the purchase menu, which the vendor will show.

Characters and creatures

Returns a pointer to the ability to change the name of the specified character.

Client & Connection

Sends a tokenized 0x73 ping packet and waits for the matching server echo up to timeoutMS. It does not substitute IsOnline() for a network round trip.

World & Geometry

A positive result requires reaching the end point. Exceeding the traversal limit and invalid coordinates are not considered a success.

Client UI

Changes the state of the checkbox in the Transparency Circle client options.

Client UI

Clears every client-side map figure created through the C# AddFigure API. Normal World Map marker files/user markers are not affected.

Client UI

Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.

Client & Connection

Close the Ultima Online client window.

Client UI

Changes the color of the text that Injection writes in the console.

Client & Connection

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

Menus & Context Menus

Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.

Menus & Context Menus

Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.

World & Geometry

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

Character

Removes items from both hands (right and left) into the character's backpack.

Client & Connection

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

Character

Get off the horse, and put a “saddle” in your backpack - an object associated with the horse, see.

World & Geometry

Returns the distance in tiles between two points (X1, Y1) and (X2, Y2).

Items

Reads or mutates the current ClassicUO item/equipment state through the registered runtime route and client action queue.

Diagnostics & Introspection

Writes all things known in the world to a log file, indicating the main parameters.

Items

Old command maintained for compatibility.

Speech & Chat

Passes the string name of the animation/action to GameActions.EmoteAction. This is a character action, not printing regular text into a journal.

Conversion & Compatibility

Decodes the letter entry EasyUO into a numeric identifier. Both commands use DecodeEasyUoId; the result is an int, not a hex string.

Conversion & Compatibility

Converts the literal notation serial EasyUO (base 26, A=0) into a hex string Injection. Letters are case insensitive; non-letter characters are skipped. The inverse function is Inj2EUO.

Items

Checks whether serial is present in the loaded client world: 1 - the object was found, 0 - not. The string overload first resolves the object name. Absence from the client world does not prove deletion on the server.

Diagnostics & Introspection

Returns extended information about a character as a TExtendedInfo entry.

Client UI

Writes to the Info Window through the client text-information route. It does not merely emit a normal in-game/system chat message.

Client UI

Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.

Speech & Chat

Reads, filters or emits speech/journal data through the registered ClassicUO runtime route.

Sound & Visual Environment

Enables/disables permission to change weather.

Speech & Chat

Outdated command to fix another native client. In ClassicUO it only prints a message that such a patch is not required. Does not alter movement, speech or containers.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Client UI

Sets your character's speech color.

Items

Removes an object from Injection memory.

Journal

Compatibility alias for the pattern-selection state used by journal searches. For 'first|second|third', matching second sets FoundedParamId() to 1. It no longer exposes the internal ClassicUO journal text/message type.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Scripts & Runtime

Returns 1 if the procedure was found by manager C# and is currently running, otherwise 0. Argument is the name of the procedure.

Client & Connection

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Items

Returns the "alternative name" of the object with ObjID.

Shops & Vendors

Returns the delay (in milliseconds) applied after each auto-buy operation via AutoBuy or AutoBuyEx .

Shops & Vendors

Returns the delay (in milliseconds) applied after each auto-sell operation through AutoSell .

Buffs & Effects

Returns a list of the character's active buffs and debuffs.

Localization

Returns the text of the tooltip of an object with ObjID as a ready-made string.

Localization

Returns a localized cliloc string at the specified ClilocID .

Items

Returns the color (hue) of an object with ObjID .

Containers

Returns the contents of the container with ID as an array of TContentItemData entries.

Character

Reads Dexterity from PlayerMobile. UO.GetDex() is equivalent to reading the active player's value. UO.GetDex(self) reads the same value.

Movement

Returns an object parameter (player character by default) - direction, from 0 to 7

Profiles & Configuration

Returns the value of the EasyUO global variable by its index num .

Items

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Items

Returns an object parameter (player character by default) - object type

Diagnostics & Introspection

In the current implementation, it takes the exact string "character" and returns the name of its character. For any other value, returns the string "UNKNOWN". This is not an Info window command or a general-purpose arbitrary property request.

Character

Reads Intelligence from PlayerMobile. UO.GetInt() is equivalent to reading the active player's value. UO.GetInt(self) reads the same value.

Items

Reads the loaded character's paralysis flag: 1 - IsParalyzed is set, otherwise 0. Doesn't check chest or door locks.

World & Geometry

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Characters and creatures

Returns detailed data about the mobile from ID as a TMobileData record.

Characters and creatures

Enumerates loaded World.Mobiles only; ordinary Item objects are excluded. Optional filters and nearest ordering are applied by the shared Search Core.

Items

Returns the name of the object with ObjID .

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Containers

Returns ID of the parent container of the object with ObjID .

Shops & Vendors

Returns the price of an object with ObjID .

Items

Returns the stack size (count) of the object with ObjID .

Quests & Virtues

Returns the quest-arrow state directly as [exists, x, y]. This is the C# adaptation of the historical Pascal var/out point.

Character

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Movement

Returns a parameter of the object (by default - the player character) - whether it is running.

Character

Returns the lock status of the specified characteristic.

Character

Reads Strength from PlayerMobile. UO.GetStr() is equivalent to reading the active player's value. UO.GetStr(self) reads the same value.

World & Geometry

Returns the average surface height (Z) of landscape tiles at a specified map point.

Character

Returns the title (suffix) of an object or mobile with the specified ObjID.

Items

Reads the current Object Property List. If the OPL is not cached yet, C# requests it from the shard and waits up to approximately 200 ms, polling without blocking the ClassicUO UI thread. If data arrives, the object name and property text are combined into one string.

Items

If structured OPL data is not cached, requests it and waits up to approximately 120 ms without blocking the UI thread.

Localization

Returns the CodePage Encoding.Default encoding of the current .NET runtime. This is not a client language switch or a Windows ANSI encoding promise; modern .NET usually returns UTF-8 (65001).

Files / JSON / Data

Splits a string into words and returns the word with index FROM ZERO. Without delimiter, whitespace characters are used, empty parts are removed. An unreachable index returns an empty string.

Containers

Returns a special value indicating the ground as a target or destination in item handling and search methods.

Diagnostics & Introspection

Prints a hint about using UO.* and the path to Manual in C# settings. This is a quick tip, not a help download from the Internet.

Client UI

Sends a request to the server to display a help window (similar to pressing the “Help” button in the game client).

Conversion & Compatibility

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

HTTP

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

HTTP

Performs an HTTP GET. The one-argument form returns/uses the registered text semantics; the LStream overload writes raw response bytes to a supported C# MemoryStream/File target.

HTTP

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

HTTP

Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.

Diagnostics & Introspection

Without an argument, enables local targeting to select a loaded item or character. After selection, the C# Object Information window opens and displays the information in the log. The Info(serial) form immediately displays text about the specified object in the log and does not open the inspector. If interactive selection is not available, the form without an argument uses lasttarget. For land and static tiles use InfoTile.

Diagnostics & Introspection

Logs the object's color in hexadecimal 0xHHHH. Without an argument, lasttarget is used; there is no return value.

Conversion & Compatibility

Converts 32-bit serial to literal notation with base 26 (A=0). Serial=0 gives "A". The inverse function is EUO2Inj.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Character

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Conversion & Compatibility

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Character

true if the selected character or creature has the female gender flag set; otherwise false.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Multis & Houses

Returns true if the specified object is a multi-object (house, ship, or other multi-tile structure), false otherwise.

Items

Returns true if the specified object is movable, otherwise false .

Character

Reads the registered value of the current character/client state or runtime. The type is specified in the signature; to write, use the appropriate Set method if it is registered.

Character

true, if the selected character or creature is paralyzed (frozen); otherwise false.

Movement

true if the selected character or creature is currently running; otherwise false.

Character

Returns true if the specified mobile has a yellow health bar (indicating invulnerability or special status), otherwise false .

Mouse & Keyboard

Emulates a keystroke using Windows virtual-key code. The optional count and delay specify the number of repetitions and delay after each press: by default 1 and 105 ms. Press is an alias of KeyPress. The input is received by the active OS window; The command itself does not activate the client.

Scripts & Runtime

Runs the external program filename with parameters parameters

Sound & Visual Environment

Changes the lighting in the game.

Journal

Returns the serial number (ID) of the speaker from the last log entry found.

Journal

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Journal

Returns the speaker name from the last log entry found.

World & Geometry

LOSOptions is no longer a state-only setting. UO.CheckLOS(...) consumes the current value on every check. The C# implementation evaluates the currently loaded ClassicUO map, land, static, multi and world-item tile data. Walls and impassable tiles block LOS; RunUO mode also respects NoShoot; POL can opt into NoShoot and window-through behavior with the flags above.

Search

Displays the current list of found serial via | in the format 0xXXXXXXXX. Doesn't start a new search.

Characters and creatures

Returns true if the specified mobile can be renamed (for example, pet or follower), otherwise false .

Client UI

Changes your character's body to the specified type.

Speech & Chat

Outputs text to the server.

Movement

Sends a request to the server to open the door for the character.

Character

Returns true if own character is currently paralyzed (frozen), false otherwise.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Party

Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.

Items

Returns 1 if the client's cursor is holding a picked item, 0 otherwise. This is the state of the transfer operation, not the state of the target.

Sound & Visual Environment

Plays the WAV file asynchronously.

Movement

Returns the predicted X coordinate of a character based on the current motion path.

Movement

Returns the predicted Y coordinate of a character based on the current motion path.

Movement

Returns the predicted Z coordinate (height) of a character based on the current motion path.

Mouse & Keyboard

Emulates a keystroke using Windows virtual-key code. The optional count and delay specify the number of repetitions and delay after each press: by default 1 and 105 ms. Press is an alias of KeyPress. The input is received by the active OS window; The command itself does not activate the client.

Proxy

Reports proxy state only. It deliberately does not return the game-server IP as a fake proxy address.

Proxy

Reports proxy state only and does not mirror the game-server port.

Quests & Virtues

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Files / JSON / Data

Returns a random integer in the range 0..maxnumber

Characters and creatures

Sends a request to rename the mobile character to newName. The server decides whether renaming is allowed. The command does not return anything.

Characters and creatures

Sends a request to the server to rename the specified mobile.

Character

Sends a status request packet to the server for the specified mobile.

Client & Connection

Updates at least the exact coordinates of the character, and on many shards also the surrounding objects.

Speech & Chat

Performs a fireworks animation (emotion) for the character.

Conversion & Compatibility

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Profiles & Configuration

In this implementation, only three named settings are changed: finddistance (search distance), grabdelay (transfer delay in ms), equipfordress (equipment mode when Dress). Names are compared in a case-insensitive manner. Numeric and string overloads use the same path; string supports 0x/0X, invalid number becomes 0. An unknown name does not change settings and does not cause an error. This is not a universal setter of all 310 runtime values.

Character

The values are no longer stored as inert runtime-only strings. C# passes them into the actual ClassicUO reconnect selection pipeline:

Character

Remembers the weapon equipped on the character under the name of the set Name.

Shops & Vendors

Sets the delay (in milliseconds) between automatic purchases triggered by AutoBuy / AutoBuyEx .

Shops & Vendors

Sets the delay (in milliseconds) between automatic sales triggered by AutoSell .

Search

Marks a map tile as impassable for the pathfinding system.

Containers

Designates a container as a “catch bag” - all items received by the character (loot, exchange, etc.) are automatically moved to this container.

Profiles & Configuration

The command is used to set the default rune in the standard runbook.

Profiles & Configuration

Writes the value to the EasyUO general registry (Windows only).

Scripts & Runtime

Registers or removes a legacy C# event handler. Registration captures the current state and does not execute the handler immediately. Supported live events are SeeNewPlayer, Death, ChangeHitPoints, ChangeMana, and ChangeStamina; they are evaluated while the script yields through UO.Wait. repeat=false/0 is one-shot and is automatically disabled after the first matching transition; repeat=true/1 remains armed. For historical compatibility, a non-numeric third argument such as 'exec OnChange' is treated as the handler name and enables repeating mode.

Scripts & Runtime

Registers a repeating handler through the same live-state event engine as UO.SetEvent. Procname='' unregisters the event. Registration does not execute the handler immediately; the handler is evaluated on subsequent UO.Wait yields when the documented event transition occurs.

Record / Playback

UO.SetRec() is the one-shot recorder. It clears the previous recording, arms capture, then lets the next compatible legacy UO.* command execute normally while storing the command name together with its typed arguments. The recorder disarms immediately after that one capture; UO.UseRec() replays the saved action.

Sound & Visual Environment

Sets the season according to season_num: 0 - default (current) 1 - spring 2 - summer 3 - fall 4 - winter 5 - desolation (drought)

Client UI

Saves the local flag showZ (0/1). This flag is not connected to rendering: the command itself does not include height display. It should not be described as an active switch UI.

Client UI

Controls automatic diagnostic output to the Info Window. When silent mode is disabled (false), Gump description/query helpers may both return their data and mirror the lines into the Info Window. When silent mode is enabled (true), those helpers return data without automatic Info Window output.

Character

Sends a request to the server to change the lock state of a character's characteristics.

Character

Alias ​​for SetStatLockState .

Client & Connection

Returns the name of the shard to which the character is currently connected (or was last connected).

Conversion & Compatibility

A registered compatible name that is explicitly prohibited from being executed in ClassicUO: throws NativeSubrutineException. Windows won't shut down. Do not use as a working system shutdown command.

Client UI

Saves a snapshot of the client via TakeScreenshot. Without arguments, the standard name, quality=100 and includeUi=1 are selected. quality is limited to 1–100; includeUi determines whether the interface is enabled. Returns the result of a client save operation.

Skills

Opens an empty container, similar to Object, or shown by the crosshair if parameters are not specified.

Sound & Visual Environment

Plays game sound according to sndnumber.

Skills

Returns the number of steps the character took in Stealth mode.

Diagnostics & Introspection

Returns information about the actual product version and embedded ClassicUO / BadNewbie / C# IDE runtime as [productName, productVersion, clientPath]. The version is sourced from the current C# IDE product version instead of the old hard-coded compatibility value 1.0.

UO.Str

Character

Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.

Sound & Visual Environment

Returns the stored Timer label in tenths of a second. In this implementation, it is updated, in particular, when the Move() check is successful. This is not a separate animation frame counter.

Items

Returns the stored label UO.Timer for applying the object. The unit is a tenth of a second.

Character

Switches the flight mode for the Gargoyle character.

Character

Removes the stored Name weapon set from memory.

Containers

Resets the current "catch bag".

Items

Looks for an object of the specified type and color on the ground, then double-clicks it.

Character

Opens the character status scroll (Character Status, from the paperdoll window) for the specified mobile.

Proxy

Compatibility query for proxy mode. The current ClassicUO/C# embedded runtime does not expose a separate proxy transport, so this returns 0 rather than pretending the normal game connection is a proxy.

Record / Playback

Replays the command and typed arguments stored by the UO.SetRec() recorder through the same legacy compatibility dispatcher. Replay does not consume the recording, so the same action can be executed repeatedly. If no valid recording exists, UO.UseRec() performs no action and reports the missing recording in a connected client.

Character

Opens the Character Status scroller (from the paperdoll window) for the current character.

Quests & Virtues

Activates the specified virtue.

Diagnostics & Introspection

Prints the real C# product version from the active ClassicUO / BadNewbie / C# IDE client. The value is sourced from the live product-version bridge and is not a hard-coded compatibility placeholder.

Clone this wiki locally