EN Runtime API 33 Lists and Globals - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki

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

Runtime API — Lists and globals

Shared persistent globals

Both forms of UO.SetGlobal and UO.GetGlobal use one persistent cross-process store. Scripts, C# macros, and chat commands in every Manager, Full_Client, and Client profile see the same values.

Manager stores it at Manager/Game Manager/CSharp/globals.json. A standalone client uses a sibling Manager folder when present, otherwise <client folder>/Game Manager/CSharp/globals.json. Writes are atomic and every read obtains fresh data.

Key case matters. The short form and (globalRegion, varName) form are distinct keys in the same store. A missing key returns "N/A" in either form; restoring a checkpoint cannot roll back a newer value from another profile.

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

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

UO.ClearBadLocationList

Search

Deletes all pairs saved by SetBadLocation.

UO.ClearBadObjectList

Search

Removes all type/hue/radius rules added by SetBadObject in the current runtime.

UO.GetGlobal

Profiles & Configuration

Returns the value of the global variable VarName from the specified GlobalRegion .

UO.GListClear

Profiles & Configuration

Clears the entire temporary list before a new series of actions.

UO.GListGet

Profiles & Configuration

Reads a value from a temporary list by rule or counter name.

UO.GListPosName

Profiles & Configuration

Reads the record name by its position to enumerate the rules.

UO.GListPosValue

Profiles & Configuration

Reads the value of an entry by position, for example graphic, from a pre-populated list.

UO.GListSet

Profiles & Configuration

Writes a named value to a temporary list: for example, graphic loot rules or a counter for processed items.

UO.GListSize

Profiles & Configuration

Counts named entries in a temporary list to check for emptiness or limit brute force.

UO.PartyMembersList

Party

Bridge filters out non-empty Party.Members entries and stores them serial in list order.

UO.SetGlobal

Profiles & Configuration

Sets the value of a global variable in the specified scope.

UO.SetGlobalShared

UO.GetGlobalShared