Repository navigation
EN Runtime API 24 Persistent State
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Home · C# · IDE · UO API · A–Z · Examples · Languages
Each team opens a card with C#-signatures, parameters and several independent examples.
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.
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.
The command is used to add a gate charge to the standard Object runbook.
Prints the word Alarm to the local ClassicUO syslog. Use as a note about the occurrence of a condition in the script.
Changes the state of the checkbox in the Always Run client options (if the client supports this option).
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.
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.
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.
Removes all weapons, then equips himself with the my_name set, previously memorized by the command SetArm.
Installs an automatic hook for purchasing from vendors.
Expanded version of AutoBuy with additional filtering by price and item name.
Sets up an automatic hook for selling to vendors.
Attempts to use bandages on the current character.
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).
Performs the “bow” gesture - the character bows.
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.
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.
Returns a pointer to the ability to change the name of the specified character.
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.
A positive result requires reaching the end point. Exceeding the traversal limit and invalid coordinates are not considered a success.
Changes the state of the checkbox in the Transparency Circle client options.
Clears every client-side map figure created through the C# AddFigure API. Normal World Map marker files/user markers are not affected.
Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.
Close the Ultima Online client window.
Changes the color of the text that Injection writes in the console.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.
Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
Removes items from both hands (right and left) into the character's backpack.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
Get off the horse, and put a “saddle” in your backpack - an object associated with the horse, see.
Returns the distance in tiles between two points (X1, Y1) and (X2, Y2).
Reads or mutates the current ClassicUO item/equipment state through the registered runtime route and client action queue.
Writes all things known in the world to a log file, indicating the main parameters.
Old command maintained for compatibility.
Passes the string name of the animation/action to GameActions.EmoteAction. This is a character action, not printing regular text into a journal.
Decodes the letter entry EasyUO into a numeric identifier. Both commands use DecodeEasyUoId; the result is an int, not a hex string.
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.
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.
Returns extended information about a character as a TExtendedInfo entry.
Writes to the Info Window through the client text-information route. It does not merely emit a normal in-game/system chat message.
Reads or updates the current client UI/Gump state through the registered C#/ClassicUO UI route.
Reads, filters or emits speech/journal data through the registered ClassicUO runtime route.
Enables/disables permission to change weather.
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.
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.
Sets your character's speech color.
Removes an object from Injection memory.
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.
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.
Returns 1 if the procedure was found by manager C# and is currently running, otherwise 0. Argument is the name of the procedure.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Returns the "alternative name" of the object with ObjID.
Returns the delay (in milliseconds) applied after each auto-buy operation via AutoBuy or AutoBuyEx .
Returns the delay (in milliseconds) applied after each auto-sell operation through AutoSell .
Returns a list of the character's active buffs and debuffs.
Returns the text of the tooltip of an object with ObjID as a ready-made string.
Returns a localized cliloc string at the specified ClilocID .
Returns the color (hue) of an object with ObjID .
Returns the contents of the container with ID as an array of TContentItemData entries.
Reads Dexterity from PlayerMobile. UO.GetDex() is equivalent to reading the active player's value. UO.GetDex(self) reads the same value.
Returns an object parameter (player character by default) - direction, from 0 to 7
Returns the value of the EasyUO global variable by its index num .
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
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.
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.
Returns an object parameter (player character by default) - object type
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.
Reads Intelligence from PlayerMobile. UO.GetInt() is equivalent to reading the active player's value. UO.GetInt(self) reads the same value.
Reads the loaded character's paralysis flag: 1 - IsParalyzed is set, otherwise 0. Doesn't check chest or door locks.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
Returns detailed data about the mobile from ID as a TMobileData record.
Enumerates loaded World.Mobiles only; ordinary Item objects are excluded. Optional filters and nearest ordering are applied by the shared Search Core.
Returns the name of the object with ObjID .
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.
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.
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.
Returns ID of the parent container of the object with ObjID .
Returns the price of an object with ObjID .
Returns the stack size (count) of the object with ObjID .
Returns the quest-arrow state directly as [exists, x, y]. This is the C# adaptation of the historical Pascal var/out point.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Returns a parameter of the object (by default - the player character) - whether it is running.
Returns the lock status of the specified characteristic.
Reads Strength from PlayerMobile. UO.GetStr() is equivalent to reading the active player's value. UO.GetStr(self) reads the same value.
Returns the average surface height (Z) of landscape tiles at a specified map point.
Returns the title (suffix) of an object or mobile with the specified ObjID.
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.
If structured OPL data is not cached, requests it and waits up to approximately 120 ms without blocking the UI thread.
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).
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.
Returns a special value indicating the ground as a target or destination in item handling and search methods.
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.
Sends a request to the server to display a help window (similar to pressing the “Help” button in the game client).
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
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.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
Operates on the active C#/ClassicUO runtime, network or profile state through the registered implementation route.
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.
Logs the object's color in hexadecimal 0xHHHH. Without an argument, lasttarget is used; there is no return value.
Converts 32-bit serial to literal notation with base 26 (A=0). Serial=0 gives "A". The inverse function is EUO2Inj.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
true if the selected character or creature has the female gender flag set; otherwise false.
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.
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.
Returns true if the specified object is a multi-object (house, ship, or other multi-tile structure), false otherwise.
Returns true if the specified object is movable, otherwise false .
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.
true, if the selected character or creature is paralyzed (frozen); otherwise false.
true if the selected character or creature is currently running; otherwise false.
Returns true if the specified mobile has a yellow health bar (indicating invulnerability or special status), otherwise false .
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.
Runs the external program filename with parameters parameters
Changes the lighting in the game.
Returns the serial number (ID) of the speaker from the last log entry found.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Returns the speaker name from the last log entry found.
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.
Displays the current list of found serial via | in the format 0xXXXXXXXX. Doesn't start a new search.
Returns true if the specified mobile can be renamed (for example, pet or follower), otherwise false .
Changes your character's body to the specified type.
Outputs text to the server.
Sends a request to the server to open the door for the character.
Returns true if own character is currently paralyzed (frozen), false otherwise.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
Reads the currently loaded ClassicUO map/tile/art asset data using the active client asset loaders.
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.
Plays the WAV file asynchronously.
Returns the predicted X coordinate of a character based on the current motion path.
Returns the predicted Y coordinate of a character based on the current motion path.
Returns the predicted Z coordinate (height) of a character based on the current motion path.
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.
Reports proxy state only. It deliberately does not return the game-server IP as a fake proxy address.
Reports proxy state only and does not mirror the game-server port.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
Returns a random integer in the range 0..maxnumber
Sends a request to rename the mobile character to newName. The server decides whether renaming is allowed. The command does not return anything.
Sends a request to the server to rename the specified mobile.
Sends a status request packet to the server for the specified mobile.
Updates at least the exact coordinates of the character, and on many shards also the surrounding objects.
Performs a fireworks animation (emotion) for the character.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
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.
The values are no longer stored as inert runtime-only strings. C# passes them into the actual ClassicUO reconnect selection pipeline:
Remembers the weapon equipped on the character under the name of the set Name.
Sets the delay (in milliseconds) between automatic purchases triggered by AutoBuy / AutoBuyEx .
Sets the delay (in milliseconds) between automatic sales triggered by AutoSell .
Marks a map tile as impassable for the pathfinding system.
Designates a container as a “catch bag” - all items received by the character (loot, exchange, etc.) are automatically moved to this container.
The command is used to set the default rune in the standard runbook.
Writes the value to the EasyUO general registry (Windows only).
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.
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.
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.
Sets the season according to season_num: 0 - default (current) 1 - spring 2 - summer 3 - fall 4 - winter 5 - desolation (drought)
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.
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.
Sends a request to the server to change the lock state of a character's characteristics.
Alias for SetStatLockState .
Returns the name of the shard to which the character is currently connected (or was last connected).
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.
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.
Opens an empty container, similar to Object, or shown by the crosshair if parameters are not specified.
Plays game sound according to sndnumber.
Returns the number of steps the character took in Stealth mode.
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.
Reads or changes the requested mobile/player stat/state through the current ClassicUO world model and registered API bridge.
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.
Returns the stored label UO.Timer for applying the object. The unit is a tenth of a second.
Switches the flight mode for the Gargoyle character.
Removes the stored Name weapon set from memory.
Resets the current "catch bag".
Looks for an object of the specified type and color on the ground, then double-clicks it.
Opens the character status scroll (Character Status, from the paperdoll window) for the specified mobile.
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.
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.
Opens the Character Status scroller (from the paperdoll window) for the current character.
Activates the specified virtue.
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.
ClassicUO — Bad Newbie & C# Scripts IDE