EN Runtime API 24 Persistent State - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki

Українська · Русский · 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.

UO.AddDir

Movement

UO.AddFigure

Client UI

Adds a local figure to the ClassicUO world map and returns its ID. The figure is stored on the client side, the game server is not notified.

UO.AddGate

Magic

UO.Alarm

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.

UO.AlwaysRun

Movement

Reads or changes the constant running setting of the current ClassicUO profile.

UO.ApiNameExists

Diagnostics & Introspection

Checks the registration of the name of the native function being called.

UO.ApiParameterExists

Diagnostics & Introspection

Checks whether a runtime value or named object is registered.

UO.ApiSignatureExists

Diagnostics & Introspection

Tests the registration of a name with the given number of arguments.

UO.Arm

Character

Restores a previously saved named set of weapons and shields.

UO.AutoBuy

Shops & Vendors

Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.

UO.AutoBuyEx

Shops & Vendors

Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.

UO.AutoSell

Shops & Vendors

Creates, updates or deletes an automatic sale rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.

UO.BandageSelf

Combat

Places the character as UO.Wait-target and uses a bandage of type 0x0E21 selected from the backpack. The operation is sent by the client and executed asynchronously by the server.

UO.BookSetHeader

Books

Specifies the title and author of the open editable book.

UO.Bow

Speech & Chat

Sends the bow character's action via GameActions.EmoteAction.

UO.BoxHack

Conversion & Compatibility

Prints a notice that the legacy native client patch BoxHack is not required by ClassicUO.

UO.Buy

Shops & Vendors

Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.

UO.CanChangeName

Characters and creatures

Checks the client's known sign of the ability to rename mobile.

UO.CheckLag

Client & Connection

Checks whether a fresh response from the game server has been received within the allotted time. Convenient before continuing the script after a network delay.

UO.CheckLOS

World & Geometry

Checks the local passability of a line between two map points via CheckPortableLineOfSight.

UO.CircleTrans

Client UI

Reads or changes the active profile's transparency circle setting.

UO.ClearFigures

Client UI

Deletes all custom map shapes and their runtime entries.

UO.ClearInfoWindow

Client UI

Clears the lines of the client text window.

UO.CloseUO

Client & Connection

Requests the current client application to exit via Client.Game.Exit.

UO.ConColor

Client UI

Sets UO hue for subsequent system messages of this script runtime.

UO.Connect

Client & Connection

Requests connection or reconnection of the current client session.

UO.ConsoleEntryReply

Menus & Context Menus

Replies with text to the active server prompt via MessageManager.SendServerPromptResponse.

UO.ConsoleEntryUnicodeReply

Menus & Context Menus

Replies with text to the active server prompt via MessageManager.SendServerPromptResponse.

UO.ConvertIntegerToFlags

World & Geometry

Parses a numeric mask of tile flags into an array of enumeration names TileFlag.

UO.Disarm

Character

Removes weapons and shields from hands: layers 1 and 2. Does not affect clothing.

UO.Disconnect

Client & Connection

Disconnects the current or installed client transport and prepares scripts for reconnection.

UO.Dismount

Character

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

UO.Dist

World & Geometry

Calculates the distance in cells between two world points: the greatest of the absolute differences between X and Y.

UO.Drag

Items

Raises a specific item to the cursor; a separate four-argument form drags the mouse in a Windows window.

UO.Dump

Diagnostics & Introspection

Prints a diagnostic snapshot of an object known to the client.

UO.Dye

Items

Uses the transferred coloring item; the second argument presets the object UO.Wait-target.

UO.EmoteAction

Speech & Chat

Sends the character action/animation string name to GameActions.EmoteAction.

UO.EUO2ID

Conversion & Compatibility

Decodes the EasyUO literal notation in radix 26 with A=0.

UO.EUO2Inj

Conversion & Compatibility

Decodes the EasyUO literal notation in radix 26 with A=0.

UO.Exists

Items

Checks the presence of a non-deleted object in the client's local world.

UO.ExtendedInfo

Diagnostics & Introspection

Returns four fields of the current client connection configuration.

UO.FillInfoWindow

Client UI

Adds one line to a text window and displays it.

UO.FillNewWindow

Client UI

Clears the text window, adds one line and shows it.

UO.FilterSpeech

Speech & Chat

Enables or disables the client speech filter.

UO.FilterWeather

Sound & Visual Environment

Enables or disables the client weather filter.

UO.FixTalk

Speech & Chat

Prints a notice that the legacy native client patch FixTalk is not required by ClassicUO.

UO.Flying

Character

Checks if the character is currently flying. This is usually needed for Gargoyle: for example, before starting a route or before requesting to enable a flight. Answers the question “is my character flying now?” without argument. The command only reads the state: it does not enable flight, land or move the character.

UO.FontColor

Client UI

Sets the hue of subsequent local UO.UOAMessage of this script. Does not change the character's speech color, normal UO.Print, InfoFindList, or IDE theme.

UO.Forget

Items

Without a message, removes the stored name from runtime Objects.

UO.FoundedParamId

Journal

Returns the number of the matched search pattern alternative.

UO.Frozen

Character

Checks the character's paralysis flag known to the client.

UO.FunRunning

Scripts & Runtime

Checks whether the registered C#-callback with the specified name is executed. Result 1 enables manual pause; a completed or canceled task gives 0.

UO.GameServerIPString

Client & Connection

Reads the configured server address from the client's global settings.

UO.GetAltName

Items

Reads the character's title known to the client: for example, profession or signature after the name.

UO.GetAutoBuyDelay

Shops & Vendors

Reads the current automatic purchase delay from the customer profile.

UO.GetAutoSellDelay

Shops & Vendors

Reads the current automatic sale delay from the customer profile.

UO.GetBuffBarInfo

Buffs & Effects

Returns a snapshot of the current character's buff icons.

UO.GetCliloc

Localization

Reads the finished object properties text from OPL. GetTooltip and GetCliloc are synonyms.

UO.GetClilocByID

Localization

Translates the cliloc template from game files and substitutes the passed parameters.

UO.GetColor

Items

Reads the hue of an object and formats it as a hexadecimal string.

UO.GetContent

Containers

Reads the direct contents of a container or loaded items on the ground.

UO.GetDex

Character

Reads the character's current Dexterity, DEX.

UO.GetDir

Movement

Reads the character direction from the client model.

UO.GetEasyUO

Profiles & Configuration

Reads a string from the user's Windows registry EasyUO.

UO.GetFlags

Items

Reads the Entity.Flags bitmask from a local known object.

UO.GetFlying

Character

Checks if the character is currently flying. This is usually needed for Gargoyle: for example, before starting a route or before requesting to enable a flight. Answers the question “is my character flying now?” without argument. The command only reads the state: it does not enable flight, land or move the character.

UO.GetFrozen

Character

Checks the character's paralysis flag known to the client.

UO.GetGraphic

Items

Reads the graphic of an item or body of a character and returns it in hexadecimal text.

UO.GetInfo

Diagnostics & Introspection

Returns the character name only for the exact character selector.

UO.GetInt

Character

Reads the character's current Intelligence (INT).

UO.GetLocked

Items

Checks mobile paralysis.

UO.GetMapCell

World & Geometry

Reads graphic, height and land flags in one map cell.

UO.GetMobile

Characters and creatures

Collects a compact record of properties one by one ID.

UO.GetMobiles

Characters and creatures

Gets an array ID of matching loaded characters/NPC. It is needed when the script needs to check several targets, select its own, calculate the environment, or add its own condition before an action.

UO.GetName

Items

Reads the name of an item or character known to the client.

UO.GetParalisa

Character

Checks the character's paralysis flag known to the client.

UO.GetParalysed

Character

Checks the character's paralysis flag known to the client.

UO.GetParalyzed

Character

Checks the character's paralysis flag known to the client.

UO.GetParent

Containers

Reads the item's immediate parent.

UO.GetPrice

Shops & Vendors

Reads the Item.Price known to the client for a serial item.

UO.GetQuantity

Items

Reads the number of units in one item stack.

UO.GetQuestArrow

Quests & Virtues

Reads the position of the server task arrow. Allows the script to know where the arrow received from the server is pointing; She doesn't read the Track command.

UO.GetResist

Character

Reads one of your character's resistances using a numeric or string selector.

UO.GetRun

Movement

Checks the running flag in the last known direction mobile.

UO.GetStatLockState

Character

Reads the local characteristic change mode.

UO.GetStr

Character

Reads the current power (Strength, Str) of the character.

UO.GetSurfaceZ

World & Geometry

Reads the average height of the ground surface in a cell.

UO.GetTitle

Character

Reads the character's title known to the client: for example, profession or signature after the name.

UO.GetTooltip

Items

Reads the finished object properties text from OPL. GetTooltip and GetCliloc are synonyms.

UO.GetTooltipRec

Items

Reads structured properties: cliloc ID and parameters of each entry OPL.

UO.GetUserCodepage

Localization

Returns Encoding.Default.CodePage without reading profile settings.

UO.GetWord

Files / JSON / Data

Gets a single word or field from text. Useful for parsing coordinates, a list of priorities, or saved script settings.

UO.Ground

Containers

Returns a special land designator for the search container parameter or transfer destination.

UO.Help

Diagnostics & Introspection

UO.HelpRequest

Client UI

Requests the server help menu.

UO.Hex2Int

Conversion & Compatibility

Converts a numeric value or numeric text to an int.

UO.HTTP_Body

HTTP

Reads the text of the last HTTP-response of this script. For example, after HTTP_Get you can parse JSON with settings or compare the response of your service with the expected string. The reading itself does not go to the network.

UO.HTTP_Get

HTTP

Loads data on HTTP/HTTPS. Suitable for reading settings from your service or receiving a file; does not manage the game connection or run downloaded code.

UO.HTTP_Header

HTTP

Reads the headers of the last HTTP response of this script: for example, Content-Type, to find out the declared data format. This is not the response body, request headers, or numeric code HTTP.

UO.HTTP_Post

HTTP

Sends a text to its HTTP service using the POST method and returns the response text. For example, a script can report a route stop. This is not a ready-made Telegram/Discord command: their protocol, authorization and request format require separate support.

UO.Info

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.

UO.InfoColor

Diagnostics & Introspection

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

UO.Inj2EUO

Conversion & Compatibility

Encodes the 32-bit number serial with the letters A..Z for EasyUO.

UO.InParty

Party

Checks the presence of a current group based on the client's Party status.

UO.Int

Character

Reads the character's current Intelligence (INT).

UO.Int2Hex

Conversion & Compatibility

Formats an int as a hexadecimal serial string.

UO.InviteToParty

Party

Requests an invitation for a character to join the group.

UO.IsFemale

Character

Checks the sign of female gender mobile.

UO.IsFlying

Character

Checks if the character is currently flying. This is usually needed for Gargoyle: for example, before starting a route or before requesting to enable a flight. Answers the question “is my character flying now?” without argument. The command only reads the state: it does not enable flight, land or move the character.

UO.IsFrozen

Character

Checks the character's paralysis flag known to the client.

UO.IsHouse

Multis & Houses

Checks the multi flag for a loaded object: a house, a ship, or another multi-tile structure.

UO.IsMovable

Items

Checks local signs of portability of a known item using the Classic UO selection rules.

UO.IsParalysed

Character

Checks the character's paralysis flag known to the client.

UO.IsParalyzed

Character

Checks the character's paralysis flag known to the client.

UO.IsRunning

Movement

Checks the running flag in the last known direction mobile.

UO.IsYellowHits

Character

Checks the yellow health bar flag mobile.

UO.KeyPress

Mouse & Keyboard

Synthesizes one or more virtual-key presses.

UO.Launch

Scripts & Runtime

UO.Light

Sound & Visual Environment

Locally sets the overall illumination of the client.

UO.LineID

Journal

Returns the numeric serial of the author of the selected log entry.

UO.LineIndex

Journal

Returns the current index of the selected entry, if it is still stored in the log.

UO.LineName

Journal

Returns the author name of the selected journal entry.

UO.LOSOptions

World & Geometry

Reads or saves the local parameter mask LOS runtime.

UO.MFGI

Search

Prints the current list of search results.

UO.MobileCanBeRenamed

Characters and creatures

Checks the client's known sign of the ability to rename mobile.

UO.Morph

Client UI

Locally changes the current character's graphic.

UO.Msg

Speech & Chat

Shows a local message about script progress or stopping condition. You see it, not other players.

UO.OpenDoor

Movement

Requests the door to be opened for the character.

UO.Paralyzed

Character

Checks the character's paralysis flag known to the client.

UO.PartyAcceptInvite

Party

Accepts the saved invitation to the group.

UO.PartyCanLootMe

Party

Changes whether party members are allowed to remove items from a corpse.

UO.PartyDeclineInvite

Party

Declines a saved group invitation.

UO.PartyLeave

Party

Requests the current character to leave the group.

UO.Picking

Items

Checks whether the client's cursor is occupied by a picked up item.

UO.PlayWav

Sound & Visual Environment

Plays a local audio file.

UO.PredictedX

Movement

Reads the predicted X coordinate after the character's already queued steps.

UO.PredictedY

Movement

Reads the predicted Y coordinate after the character's already queued steps.

UO.PredictedZ

Movement

Reads the predicted Z height after the character's already queued steps.

UO.Press

Mouse & Keyboard

Synthesizes one or more virtual-key presses.

UO.ProxyIP

Proxy

Reads the current profile's proxy address to verify the selected route before connecting.

UO.ProxyPort

Proxy

Reads the proxy port of the current profile to check the address/port pair.

UO.QuestRequest

Quests & Virtues

Requests the server task menu.

UO.Random

Files / JSON / Data

Returns a random integer. The new form UO.Random(min, max) selects the number FROM min TO max inclusive. The previous form UO.Random(max) is retained: it selects from 0 to max−1. The result can be stored in a variable and used as a delay, coordinate, index or condition.

UO.Rename

Characters and creatures

Requests a character/pet name change.

UO.RenameMobile

Characters and creatures

Requests a character/pet name change.

UO.RequestStats

Character

Requests the character's status via serial.

UO.Resend

Client & Connection

Sends a request to resync the world.

UO.Salute

Speech & Chat

Requests a greeting animation.

UO.ScanInt

Conversion & Compatibility

Finds the first signed double/hex number in the string, starting at position.

UO.Set

Profiles & Configuration

Changes one of three legacy settings.

UO.SetARExtParams

Character

Specifies a server from the list of shards and a character for subsequent login. Useful when the script needs to be reconnected by a certain character of the same account.

UO.SetArm

Character

Remembers the current weapon and shield in a named set.

UO.SetAutoBuyDelay

Shops & Vendors

Sets the automatic purchase delay and saves the current profile.

UO.SetAutoSellDelay

Shops & Vendors

Sets the automatic sale delay and saves the current profile.

UO.SetBadLocation

Search

Adds X/Y to the list of prohibited cells for the following routes MoveXY, NewMoveXY, MoveXYZ, PMove and requests GetPathArray/GetPathArray3D.

UO.SetCatchBag

Containers

UO.SetDefault

Profiles & Configuration

Saves the named alias serial in the runtime state.

UO.SetEasyUO

Profiles & Configuration

Writes a string value to the Windows registry EasyUO.

UO.SetEvent

Scripts & Runtime

Enables or disables monitoring of changes in the character's state and allows you to select a one-time or repeating reaction. For example, you can cancel the remaining target once after death or receive warnings about low stamina. The handler is specified separately from the condition; the main script should continue to execute UO.Wait.

UO.SetEventProc

Scripts & Runtime

Designates a procedure that the client will run when an observed state changes: for example, when health is lost, mana changes, or a new mobile appears. Allows you to separate the reaction from the main cycle. Registration itself does not run anything: The main script must remain active; C#-control points, WaitAsync and UO.Wait handle events.

UO.SetRec

Record / Playback

Prepares the recording of the next legacy command UO.

UO.SetSeason

Sound & Visual Environment

Locally changes the displayed season.

UO.SetShowZ

Client UI

Changes the local flag showZ runtime.

UO.SetSilentMode

Client UI

Changes the local flag SilentMode runtime.

UO.SetStatLockState

Character

Requests a change to the characteristic mode.

UO.SetStatState

Character

Requests a change to the characteristic mode.

UO.ShardName

Client & Connection

Reads the shard name.

UO.ShutdownWindows

Conversion & Compatibility

Always rejects an attempt to shutdown Windows from a script.

UO.Snap

Client UI

Saves a snapshot of the client's graphics window.

UO.Snoop

Skills

Uses a container/object, typically requesting that it be opened.

UO.Sound

Sound & Visual Environment

Plays sound on ID from client resources.

UO.StealthCnt

Skills

Reads the character's local stealth offset counter.

UO.ClientInfo

Diagnostics & Introspection

Reads brief information about the running client.

UO.Str

Character

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

UO.TicksAnim

Sound & Visual Environment

Reads the saved mark TicksAnim.

UO.TicksUse

Items

Reads the saved mark TicksUse.

UO.ToggleFly

Character

Requests switching the flight of your own Gargoyle: from ground to flight, from flight to ground. This is an action, and UO.Flying() only checks the status. The command will be useful before a route that requires a certain mode.

UO.UnsetArm

Character

Removes an entry for a named weapon set without disarming the character.

UO.UnsetCatchBag

Containers

Clears the receiving container for Grab.

UO.UseFromGround

Items

Searches for an object of the given graphic on the ground/in the world and immediately calls its application. Typically used for nearby objects, such as opening a backpack. An important feature of this runtime: the search is based on FindType and can also find mobile with the same body; This is not strictly an item-only selection. For items with an explicit radius and closest selection, use UseType(..., ground, ...).

UO.UseOtherPaperdollScroll

Character

Uses the specified serial via bridge.UseObject, usually opening the character's paperdoll.

UO.UseProxy

Proxy

Checks whether this session is configured to connect through a proxy.

UO.UseRec

Record / Playback

Repeats the saved legacy command UO.

UO.UseSelfPaperdollScroll

Character

Uses the current character, usually opening a paperdoll.

UO.UseVirtue

Quests & Virtues

Requests the application of virtue.

UO.Version

Diagnostics & Introspection

Prints the name and runtime version of the product.