Repository navigation
EN API UO Mount
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
int UO.Mount();
int UO.Mount(object? mount);Mount and Dismount send a protocol use-object request without a manual double-click or the war-mode attack policy. The int result is the current Mount-layer item serial, not a success flag. Server confirmation is asynchronous: Mount may still return 0 and Dismount may return the serial before removal is confirmed. Read ObjAtLayer("Mount") after the server reply.
-
mount— Mount creature serial; omitted means the last target.
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.
#mount 0x00001234
#mount
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.
int mountLayerSerial = UO.Mount(0x00001234);
UO.Print(UO.Int2Hex(mountLayerSerial));int currentSerial = UO.Mount();
UO.Print(UO.Int2Hex(currentSerial));UO.Mount(0x00001234);
for (int attempt = 0; attempt < 40; attempt++)
{
var serial = UO.ObjAtLayer("Mount");
if (Convert.ToString(serial) != "0" && Convert.ToString(serial) != "0x00000000")
{
UO.Print(Convert.ToString(serial));
break;
}
await WaitAsync(50);
}new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
int mountLayerSerial = api.Mount(0x00001234);
api.Print(api.Int2Hex(mountLayerSerial));
}
}CSharpGameApi.Mount
-> CSharpScriptGlobals
-> InjectionScript.Runtime.InjectionApiUO.Mount
ClassicUOInjectionApiBridge -> NativeMountController.Request
-> OutgoingPackets.Send_UseObjectRequest (0x06)
-> MountedLayerSerialUnsafe -> Player.FindItemByLayer(Layer.Mount)
ClassicUO — Bad Newbie & C# Scripts IDE