EN API UO Info - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
UO.Info
C# signatures
string UO.Info();
string UO.Info(object? serial);
string UO.Info(object? type, object? x = null, object? y = null);
string UO.Info(object? type, object? x, object? y, object? z);
Behavior and result
Invocation origin controls presentation: graphical chat commands and bound console commands open a table with fields, values, Ctrl+C and scrolling. Ordinary C# scripts receive report strings without windows or target cursors, even with an open game window. Only client-known data is available.
Parameterless Info and InfoTile arm a target in graphical chat. In a script, Info() reads the last object target or the player; InfoTile() reads the land under the player. Explicit serial, type and coordinates query the chosen object or tile. The third argument of InfoTile(x,y,map) is a map number.
Parameters
serial— Object serial number or a saved alias.type— Item graphic ID; -1 matches any type at the specified position.x— World X coordinate.y— World Y coordinate.z— Z elevation; the shorter overload uses 0.
UO.Info(type: 0x0EED) reads the nearest loaded object of that type without a target cursor. For a contained item, distance is measured from its root owner; serial breaks distance ties. This command does not load unknown server objects. UO.Info(serial) still means serial, not type. Supply x and y together for coordinates; a single coordinate returns an explanation and never opens a target cursor. The chat form #info type 0x0EED uses the same nearest-object lookup.
Chat commands
#info
#UO.Info id 0x40001234
#info type 0x0EED
#info xy 1450 1690
#info type 0x0EED xy 1450 1690 0
Complete C# examples
Each block is a complete standalone .csx. Replace demonstration serials, types and coordinates. Arguments follow the signature order; named C# arguments make their roles explicit.
1
string report = UO.Info(0x40001234);
UO.Print(report);
2
string InspectSelf() => UO.Info("self");
UO.Print(InspectSelf());
3
foreach (int serial in new[] { 0x40001234, 0x40005678 })
{
string report = UO.Info(serial);
UO.Print(report);
}
4
new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
string report = api.Info(0x40001234);
api.Print(report);
}
}
Internal calls
CSharpGameApi.Info
-> CSharpScriptGlobals
-> InjectionScript.Runtime.InjectionApiUO.Info
ClassicUOInjectionApiBridge -> YokoInfoReport -> YokoInfoGump
ushort goldType = 0x0EED;
string report = UO.Info(type: goldType);
UO.Print(report);
int playerX = UO.GetX();
int playerY = UO.GetY();
int playerZ = UO.GetZ();
string report = UO.Info(type: 0x0EED, x: playerX, y: playerY, z: playerZ);
UO.Print(report);