Skip to content

KO API UO Mount

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

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

UO.Mount

C# 시그니처

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

동작 및 반환값

Mount와 Dismount는 수동 더블 클릭이나 전투 모드 공격 처리를 거치지 않고 개체 사용 요청을 전송합니다. int는 Mount 레이어의 현재 아이템 serial이며 성공 여부가 아닙니다. 서버 응답은 비동기이므로 Mount가 아직 0, Dismount가 제거 전 serial을 반환할 수 있습니다. 응답 후 ObjAtLayer("Mount")를 확인하세요.

매개변수

  • mount — 탈것 시리얼 번호. 생략하면 마지막 대상.

각 코드 블록은 완전한 독립 .csx입니다. 예시 serial, type과 좌표를 바꾸세요. 인수 순서와 C# 명명된 인수는 시그니처를 따릅니다.

채팅 명령

#mount 0x00001234
#mount

완전한 C# 예제

각 코드 블록은 완전한 독립 .csx입니다. 예시 serial, type과 좌표를 바꾸세요. 인수 순서와 C# 명명된 인수는 시그니처를 따릅니다.

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

내부 호출

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

출처

ClassicUO · ServUO BaseMount

ClassicUO.Game.Managers.NativeMountController.Request

Clone this wiki locally