Repository navigation
EN API UO Dismount
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
int UO.Dismount();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.
No parameters.
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.
#dismount
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.Dismount();
UO.Print(UO.Int2Hex(mountLayerSerial));var before = UO.ObjAtLayer("Mount");
int currentSerial = UO.Dismount();
UO.Print($"{before} -> {UO.Int2Hex(currentSerial)}");UO.Dismount();
await WaitAsync(250);
UO.Print(Convert.ToString(UO.ObjAtLayer("Mount")));new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
int mountLayerSerial = api.Dismount();
api.Print(api.Int2Hex(mountLayerSerial));
}
}CSharpGameApi.Dismount
-> CSharpScriptGlobals
-> InjectionScript.Runtime.InjectionApiUO.Dismount
ClassicUOInjectionApiBridge -> NativeMountController.Request
-> OutgoingPackets.Send_UseObjectRequest (0x06)
-> MountedLayerSerialUnsafe -> Player.FindItemByLayer(Layer.Mount)
ClassicUO — Bad Newbie & C# Scripts IDE