Skip to content

ZH TW API UO Hide

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

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

UO.Hide

C# 簽章

void UO.Hide();
void UO.Hide(object? serial);
string UO.Hide(object? type, object? x, object? y);
string UO.Hide(object? type, object? x, object? y, object? z);

行為與結果

Hide 只在本機隱藏已載入物件,不使用 Hiding 技能。Resend/Resync 清除這種隱藏並還原原先的繪製狀態,重複 Hide 後亦然。物件資料和伺服器 Hidden 旗標不會改變。

參數

  • serial — 物件序號或已儲存的別名。
  • type — 物品圖形 ID;-1 表示指定位置的任何類型。
  • x — 世界 X 座標。
  • y — 世界 Y 座標。
  • z — Z 高度;簡短形式使用 0。

在 C# Scripts IDE 設定前綴;# 僅為範例。參數以空白分隔,引號將文字保留為單一參數。id 是 serial,type 是 graphic。xy x y [z] 選擇該位置第一個已載入物件;只有 type 時選第一個符合物件。InfoTile(x,y,map) 第三個參數是地圖,不是 Z。

聊天指令

#hide
#hide id 0x40001234
#hide type 0x0EED
#hide xy 1450 1690
#hide type 0x0EED xy 1450 1690 0

完整 C# 範例

每個程式碼區塊都是完整的獨立 .csx。請替換範例 serial、type 與座標;參數順序及 C# 具名參數依照簽章。

1

UO.Hide(0x40001234);

2

UO.Print(UO.Hide(0x0EED, 1450, 1690, 0));

3

foreach (int serial in new[] { 0x40001234, 0x40005678 })
    UO.Hide(serial);

4

new CommandSample().Execute(UO);

sealed class CommandSample
{
    public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
    {
        api.Hide(0x40001234);
    }
}

內部呼叫

CSharpGameApi.Hide
  -> CSharpScriptGlobals
  -> InjectionScript.Runtime.InjectionApiUO.Hide
ClassicUOInjectionApiBridge -> target / serial / type-position selection
  -> local hidden-object state -> renderer visibility

Clone this wiki locally