Skip to content

DE API UO Mount

Bad Newbie edited this page Oct 16, 2026 · 3 revisions

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

UO.Mount

C#-Signaturen

int UO.Mount();
int UO.Mount(object? mount);

Verhalten und Ergebnis

Mount und Dismount senden die Objektbenutzung ohne manuellen Doppelklick oder Angriff im Kampfmodus. int ist die aktuelle serial des Gegenstands auf Layer Mount, kein Erfolgsflag. Die Serverantwort erfolgt später: Mount kann noch 0 und Dismount die serial vor dem Absteigen liefern. Prüfen Sie danach ObjAtLayer("Mount").

Parameter

  • mount — Seriennummer des Reittiers; sonst letztes Ziel.

Jeder Block ist eine vollständige .csx-Datei. Ersetzen Sie Beispiel-serials, Typen und Koordinaten. Parameterreihenfolge und benannte C#-Argumente folgen der Signatur.

Chatbefehle

#mount 0x00001234
#mount

Vollständige C#-Beispiele

Jeder Block ist eine vollständige .csx-Datei. Ersetzen Sie Beispiel-serials, Typen und Koordinaten. Parameterreihenfolge und benannte C#-Argumente folgen der Signatur.

1

int mountLayerSerial = UO.Mount(0x00001234);
UO.Print(UO.Int2Hex(mountLayerSerial));

2

int currentSerial = UO.Mount();
UO.Print(UO.Int2Hex(currentSerial));

3

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);
}

4

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));
    }
}

Interne Aufrufe

CSharpGameApi.Mount
  -> CSharpScriptGlobals
  -> InjectionScript.Runtime.InjectionApiUO.Mount
ClassicUOInjectionApiBridge -> NativeMountController.Request
  -> OutgoingPackets.Send_UseObjectRequest (0x06)
  -> MountedLayerSerialUnsafe -> Player.FindItemByLayer(Layer.Mount)

Quellen

ClassicUO · ServUO BaseMount

ClassicUO.Game.Managers.NativeMountController.Request

Clone this wiki locally