ZH TW UO Topic search - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki

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

搜尋

家 · C# · IDE · UO API · A–Z · 範例 · Languages

選擇搜尋區域和篩選器,處理結果、找到的項目清單和例外。檢查命令卡上的「未找到」值:serial、數量和清單 - 結果不同。

部分

主題 命令與解釋
搜尋項目 UO.FindType · UO.FindTypeEx · UO.FindTypesArrayEx · UO.FindAnyType
搜尋手機 UO.FindMobile · UO.FindType ​​
搜尋玩家 UO.FindMobile · UO.FindType ​​
搜尋NPC UO.FindMobile · UO.FindType ​​
搜尋怪物 UO.FindMobile · UO.FindType ​​
依序列搜尋 UO.Exists · UO.GetSerial ​​
按類型搜尋 UO.FindType · UO.FindTypeEx · UO.FindTypesArrayEx
依 Notoriety 搜尋 UO.FindByNotoriety · UO.FindNotoriety ​​
依距離搜尋 UO.FindDistance · UO.FindType ​​
依座標搜尋 UO.FindAtCoord
依 Z 搜尋 UO.FindVertical · UO.FindType ​​
搜尋Ground UO.FindType · UO.CountGround ​​
搜尋貨櫃 UO.FindTypeEx · UO.OpenContainer ​​
FindList UO.AddFindList · UO.FindList · UO.GetFindedList · UO.GetFoundItems · UO.FindItem · UO.FindCount · UO.FindQuantity · UO.FindFullQuantity
Ignore Lists UO.Ignore · UO.IgnoreOff · UO.IgnoreReset · UO.AddIgnoreList · UO.SelectIgnoreList
Bad Objects UO.SetBadObject · UO.ClearBadObjectList
Bad Locations UO.SetBadLocation · UO.ClearBadLocationList

所有主題命令

搜尋項目

UO.FindType · UO.FindTypeEx · UO.FindTypesArrayEx · UO.FindAnyType · UO.FindAtCoord · UO.FindItem · UO.FindCount · UO.FindQuantity · UO.FindFullQuantity · UO.Count · UO.CountEx · UO.CountGround · UO.GetWorldItems · UO.GetFoundItems · UO.GetFindedList

搜尋手機

UO.FindMobile · UO.FindMan · UO.FindByNotoriety · UO.FindNotoriety

按距離/Z 搜尋

UO.FindDistance · UO.FindVertical

FindList

UO.AddFindList · UO.ClearFindList · UO.DeleteFindList · UO.FindList · UO.InfoFindList · UO.MFGI

Ignore 列表

UO.Ignore · UO.IgnoreOff · UO.IgnoreReset · UO.AddIgnoreList · UO.ClearIgnoreList · UO.DeleteIgnoreList · UO.SelectIgnoreList · UO.GetIgnoreList

壞對象

UO.SetBadObject · UO.ClearBadObjectList

不好的地點

UO.SetBadLocation · UO.ClearBadLocationList

關於該主題的範例

每個命令卡都有幾個獨立的場景:直接程式碼、函數和類別。以下是精選的簡短場景;限制和全面分析是有可能的。

UO.FindType

參數、結果及所有場景

var gold = UO.FindType(0x0EED, -1, "backpack");
if (Truth(gold == ""))
{
    UO.Print("Gold was not found in the loaded backpack");
}
else
{
    UO.Print("Gold serial: " + gold);
    UO.Info(gold);
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

UO.FindFullQuantity

參數、結果及所有場景

var found = UO.FindType(0x0EED, -1, "backpack");
var value = UO.FindFullQuantity();
UO.Print(Convert.ToString(value));

參考章節

1 · 2

完整指令說明


UO.AddFindList

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

C# 簽章

void UO.AddFindList(object? list, object? @type);
void UO.AddFindList(object? list, object? @type, object? color);

將規則 type/hue 加入 UO.FindList 的命名集。此集合可讓您重複搜尋多種類型的物件或手機,並按新增順序設定類型的優先順序。

參數

  • list — 規則集的名稱,例如「loot」。傳遞不帶 | 的字串:此字元用作記錄內的分隔符號。該名稱不區分大小寫。這不是 serial 容器或找到的項目數組。
  • type - 某項目或 body mobile 的圖形/type,而非其 serial。通常為int0..65535,包括0x0EED; -1或0xFFFF表示搜尋時任意type。為每個條目提供一個值。透過單獨的呼叫添加多種類型。
  • color — 物體/物體的色調,而非 RGB。 int0..65535; 0 - 常規 hue 0、-1 或 0xFFFF - 任意。在AddFindList中,搜尋時跳過顏色意味著任意hue。

傳回值

void:無回傳值。不要將呼叫分配給變量,也不要在 true/1 上測試它。定義的狀態可以推斷UO.InfoFindList();搜尋本身是透過UO.FindList()單獨啟動的。

行為

  • 定义处于给定脚本运行时的状态。獨立的其他運行時有自己的一套;關閉IDE視窗不會清除這些規則。這不是設定檔或全域遊戲物件列表。
  • AddFindList 將條目追加到最後;重複的內容不會被刪除。若要重新配置您的套件,請先呼叫 ClearFindList(“name”)。更改定義不會清除已收到的FindItem/FindCount/GetFoundItems。
  • 此記錄儲存文字欄位。數位文字0x0EED儲存為“3821”,字串“0x0EED”儲存為“0x0EED”。搜尋將兩個選項轉換為數字,DeleteFindList 比較儲存的文字。新增和刪除時使用相同的形式。
  • FindList 中的未知名稱不是空的註冊集:引擎嘗試將其解析為數字類型清單。非數字名稱會導致轉換錯誤。刪除最後一個條目後,在搜尋該名稱之前建立新集。
  • 參數立即儲存;數字type/hue 檢查在FindList 執行。 AddFindList 不會搜尋、攜帶物品或將serial 加到Ignore。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.AddFindList");
UO.AddFindList("simple_loot", 0x0EED);

1。準備你自己的戰利品集並獲得結果 - 直接腳本

參數與執行流程:

  • 0x0EED 是金色,0x0F7A 是該組的第二個graphic。對於其他伺服器數據,替換圖形。上面給出了完整的BuildLoot過程。
  • FindCount(item) 讀取特定堆疊的單元數; GetFoundItems 包含不同的serial。此範例不執行任何傳輸。
BuildLoot();
var first = UO.FindList("loot", "ground", 2, -1, false, 5, false);
if (Truth(first == ""))
{
    UO.Print("No matching loot nearby");
    return null;
}
var items = UO.GetFoundItems();
foreach (var item in items)
{
    UO.Print(UO.GetName(item) + " | stack: " + Convert.ToString(UO.FindCount(item)));
}

void BuildLoot()
{
    UO.ClearFindList("loot");
    UO.AddFindList("loot", 0x0EED, -1);
    UO.AddFindList("loot", 0x0F7A, -1);
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。僅搜尋背包中所需顏色的物品 - 腳本功能

參數與執行流程:

  • 0x0044過濾器hue;這不是serial。 backpack 搜尋背包中的直接內容。 AddObject 在此運行時以名稱保存所選物件。
return  RunScenario();
 object? RunScenario()
{
    UO.ClearFindList("colored");
    UO.AddFindList("colored", 0x0EED, 0x0044);
    var first = UO.FindList("colored", "backpack");
    if (Truth(first != ""))
    {
        UO.AddObject("colored_item", first);
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。身體類型和多個惡名值 - 腳本類

參數與執行流程:

  • 在每個條目中,缺少的顏色表示任何hue。 「5|6」行允許兩個惡名代碼;此過濾器排除常規項目。搜尋不會攻擊或啟動Follow。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.ClearFindList("watch");
        UO.AddFindList("watch", 0x0190);
        UO.AddFindList("watch", 0x0191);
        var nearby = UO.FindList("watch", "ground", 12, "5|6", true, 10);
        if (Truth(nearby != ""))
        {
            UO.AddObject("watched_mobile", nearby);
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.AddFindList(list, type) — UO.AddFindList(Any,Any)

參數: list (Any), type (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "adddir":

                case "addfindlist":

                case "addgate":

                case "addrecall":

                case "addstep":

                    LegacyList(name).Add(string.Join("|", arguments.Select(value => value.ToString())));

                    break;

UO.AddFindList(list, type, color) — UO.AddFindList(Any,Any,Any)

參數: list (Any), type (Any), color (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "adddir":

                case "addfindlist":

                case "addgate":

                case "addrecall":

                case "addstep":

                    LegacyList(name).Add(string.Join("|", arguments.Select(value => value.ToString())));

                    break;

UO.AddIgnoreList

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

C# 簽章

void UO.AddIgnoreList(object? list, object? @type);
void UO.AddIgnoreList(object? list, object? @type, object? color);

準備一組在搜尋時應跳過的命名事物:例如,不要選擇金色或不要選擇某種顏色的事物。此規則由type和hue指定,因此它適用於所有合適的對象,包括後來出現的對象。設定完成後,透過SelectIgnoreList啟用撥號。

參數

  • list — 任意非空名稱,例如「loot_skip」。該名稱不區分大小寫。這不是物品的名稱,不是serial容器的名稱,也不是FindList的名稱。
  • type - 項目的圖形/type 或body mobile。例如,0x0EED是黃金,0x0191是女性人體。數字或數字字串(“0x0EED”,“3821”); -1/其他負數/0xFFFF - 任何type。不允許大於65535的值。對於多個type,新增多個規則。
  • color - 色調:0 - 僅未著色,0x0044 - 精確顏色的範例;負數或 0xFFFF - 任意。不允许大于65535的值。在添加中默认为1。一條規則內的類型和hue透過AND條件連接;不同的規則 - 或。

傳回值

void - 無值。在沒有 var 結果 = 且沒有檢查 =true 的情況下在單獨的行上使用。此命令改變本機過濾器;不傳回項目數量,也不向伺服器發送任何內容。

行為

  • 新增至由 FIRST 參數指定的列表,無論目前選擇的列表為何。重複的數字相同的對不會重複。
  • 命名清單包含規則graphic/type + hue,常規Ignore包含特定的serial。這些是不同的過濾器:當搜尋支援它們時,它們就會被組合起來。物件保持可見並可直接存取UseObject/MoveItem;這不是Hide或禁止行動。
  • 列表名稱不區分大小寫;邊緣空間被移除。一個命名清單處於活動狀態,最初是預設的。 AddIgnoreList 不會自動選擇它。 SelectIgnoreList("") 僅停用指定的過濾器。
  • 這些規則適用於新搜索,包括新增後上傳的項目。在新的搜尋之前,不會重新計算已接收到的陣列和先前的結果FindCount。除非您想排除所有內容,否則請勿選擇具有規則 -1,-1 的清單。
  • 考慮過濾器 FindType/FindTypeEx/FindTypesArrayEx, FindList, FindAtCoord, FindNotoriety, Count/CountEx 和擴展樣本 GetMobiles, GetWorldItems, UseType, WaitTarget, Attack/AttackNearest/FindMan. includeIgnored=true,如果提供的話,會繞過和 serial, 和 type/hue。完整列表 GetContent/GetEquipment, GetWorldItems() 沒有爭論和言語 FindMobile(人類,附近,...)不要使用這些規則。
  • GetIgnoreList 僅傳回明確新增的serial;指定清單的行不包含在此陣列中。 IgnoreReset 清除整個serial-過濾器,IgnoreOff(serial) 刪除一個serial-異常;命名的規則將被保留。不帶參數的ClearIgnoreList() 會清除兩個視圖。
  • 该状态属于客户端配置文件脚本的一般状态;该更改会影响具有此状态的其他脚本。這些設定包含在已儲存的快照中。更改规则后,另一个脚本已经可以使用之前拍摄的快照执行搜索 - 下一次搜索将看到更新。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.AddIgnoreList");
UO.AddIgnoreList("simple_skip", 0x0EED);

1。在地面搜索時跳過所有金堆 - 直接腳本

參數與執行流程:

  • loot_skip — 設定名稱。缺少的顏色意味著任何hue。 FindType 傳回十六進位字串ID 或空字串;這裡結果儲存在next_loot下,且專案沒有移動。尋找土地也可以找到mobile。
UO.AddIgnoreList("loot_skip", 0x0EED);
UO.SelectIgnoreList("loot_skip");
var item = UO.FindType(-1, -1, "ground");
if (Truth(item == ""))
{
    UO.Print("No unignored ground object found");
    return null;
}
UO.AddObject("next_loot", item);

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。僅排除一種顏色的長袍 - 腳本功能

參數與執行流程:

  • 0x1F03 - graphic 長袍; 0x0044 是受保護顏色的例子。另一個hue搜尋的Robu允許。這是透過過濾搜尋來防止選擇,而不是透過已知的 ID 直接進行MoveItem。
return  RunScenario();
 object? RunScenario()
{
    UO.AddIgnoreList("keep_colored", 0x1F03, 0x0044);
    UO.SelectIgnoreList("keep_colored");
    var robe = UO.FindType(0x1F03, -1, "backpack");
    if (Truth(robe != ""))
    {
        UO.AddObject("candidate_robe", robe);
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。建立兩個獨立的集合並包含一個 - 腳本類

參數與執行流程:

  • 規則儲存在兩個清單中。要同時排除黃金和長袍,請將兩個 type 添加到同一列表中。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.AddIgnoreList("skip_gold", 0x0EED);
        UO.AddIgnoreList("skip_robes", 0x1F03);
        UO.SelectIgnoreList("skip_gold");
        UO.SelectIgnoreList("skip_robes");
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.AddIgnoreList(list, type) — UO.AddIgnoreList(Any,Any)

參數: list (Any), type (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "addignorelist":

                    state.IgnoreTypeLists.Add(Text(0), ResolveType(arguments[1]),

                        arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : -1);

                    break;

UO.AddIgnoreList(list, type, color) — UO.AddIgnoreList(Any,Any,Any)

參數: list (Any), type (Any), color (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "addignorelist":

                    state.IgnoreTypeLists.Add(Text(0), ResolveType(arguments[1]),

                        arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : -1);

                    break;

UO.ClearBadLocationList

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

C# 簽章

void UO.ClearBadLocationList();

刪除SetBadLocation保存的所有對。

參數

沒有參數。

傳回值

void - 無回傳值。使用單獨的線路撥打電話;它不是 true/false 或步數。

行為

  • 不改變伺服器上的地圖、人物或障礙物。僅清除應用程式運行時清單。
  • 已接收到的路徑數組和運行路徑的禁止快照不會改變。對於新結果,重複路徑請求或再次開始移動。列表SetBadObject單獨清除。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.ClearBadLocationList");
UO.ClearBadLocationList();

1。清除清單 - 直接腳本

參數與執行流程:

  • 沒有參數。
  • 沒有回傳值。
UO.ClearBadLocationList();

2。開始一套新的禁令-腳本功能

參數與執行流程:

  • 首先,刪除先前的對,然後新增新的對。
  • 這不是物理障礙或對客戶端卡的更改。
return  RunScenario();
 object? RunScenario()
{
    UO.ClearBadLocationList();
    UO.SetBadLocation(1445, 1690);
    return null;
}

3。清理後重複計算-場景類

參數與執行流程:

  • 目標是東邊四個單元格,Optimized=true,Accuracy=0。
  • 清除後的空數組可能是由於常見的阻塞或搜尋限製造成的。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.ClearBadLocationList();
        var path = UO.GetPathArray(UO.GetX() + 4, UO.GetY(), true, 0);
        if (Truth(ArrayLength(path) == 0))
        {
            UO.Print("No complete path under current constraints");
        }

        return null;
    }

    int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.ClearBadLocationList() — UO.ClearBadLocationList()

參數: 沒有參數。

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearbadlocationlist": state.BadLocations.Clear(); return InjectionValue.Unit;

UO.ClearBadObjectList

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

C# 簽章

void UO.ClearBadObjectList();

刪除目前運行時由SetBadObject新增的所有type/hue/半徑規則。

參數

沒有參數。

傳回值

void - 無回傳值。使用單獨的線路撥打電話;它不是 true/false 或步數。

行為

  • 沒有參數。當列表為空時再次呼叫是安全的。
  • 不清潔SetBadLocation或移除自然障礙物。新的移動或路徑請求使用已清除的清單;先前啟動的路線會儲存自己的快照。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.ClearBadObjectList");
UO.ClearBadObjectList();

1。重設專案規則 - 直接腳本

參數與執行流程:

  • 沒有爭論;通話記錄在單獨的線路上。
  • 沒有結果true/false,也沒有刪除的規則數。
UO.ClearBadObjectList();

2。替換規則集 - 腳本函數

參數與執行流程:

  • 清除後,只加入任意顏色的type=0x398C。
  • Radius=2 排除下一條路線中適當物品周圍的 5×5 正方形。
return  RunScenario();
 object? RunScenario()
{
    UO.ClearBadObjectList();
    UO.SetBadObject(0x398C, -1, 2);
    return null;
}

3。完全重置應用程式禁止後重新計算路徑 - 腳本類

參數與執行流程:

  • 這兩個列表是獨立的:呼叫兩個命令來重置兩者。
  • 東邊的三個方塊是目標的一個例子。保留地圖通行性、海拔高度和搜尋限制;空數組仍然是有效結果。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.ClearBadObjectList();
        UO.ClearBadLocationList();
        var path = UO.GetPathArray(UO.GetX() + 3, UO.GetY(), true, 0);
        UO.Print(Convert.ToString(ArrayLength(path)));
        return null;
    }

    int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.ClearBadObjectList() — UO.ClearBadObjectList()

參數: 沒有參數。

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearbadobjectlist": state.BadObjects.Clear(); return InjectionValue.Unit;

UO.ClearFindList

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

C# 簽章

void UO.ClearFindList();
void UO.ClearFindList(object? list);

刪除目前運行時的一個命名搜尋集或所有集AddFindList的定義。在重新配置過濾器之前使用,以防止規則堆積。

參數

  • list — 规则集的名称,例如“loot”。传递不带 | 的字符串:此字符用作记录内的分隔符。該名稱不區分大小寫。这不是 serial 容器或找到的项目数组。如果缺少参数,则删除此运行时中 AddFindList 的所有定义。

傳回值

void:無回傳值。不要將呼叫分配給變量,也不要在 true/1 上測試它。定義的狀態可以推斷UO.InfoFindList();搜尋本身是透過UO.FindList()單獨啟動的。

行為

  • 定义处于给定脚本运行时的状态。獨立的其他運行時有自己的一套;關閉IDE視窗不會清除這些規則。這不是設定檔或全域遊戲物件列表。
  • AddFindList 將條目追加到最後;重複的內容不會被刪除。若要重新配置您的套件,請先呼叫 ClearFindList(“name”)。更改定義不會清除已收到的FindItem/FindCount/GetFoundItems。
  • 此記錄儲存文字欄位。數位文字0x0EED儲存為“3821”,字串“0x0EED”儲存為“0x0EED”。搜尋將兩個選項轉換為數字,DeleteFindList 比較儲存的文字。新增和刪除時使用相同的形式。
  • FindList 中的未知名稱不是空的註冊集:引擎嘗試將其解析為數字類型清單。非數字名稱會導致轉換錯誤。刪除最後一個條目後,在搜尋該名稱之前建立新集。
  • 不存在的名稱是安全的:不會刪除任何內容。此指令不會刪除遊戲物品、清除Ignore或取消移動。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.ClearFindList");
UO.ClearFindList();

1。重新配置一套 - 直接腳本

參數與執行流程:

  • 在BuildLoot內,僅清除戰利品。該腳本的其他命名集將被保留。
BuildLoot();
BuildLoot();
UO.InfoFindList();

void BuildLoot()
{
    UO.ClearFindList("loot");
    UO.AddFindList("loot", 0x0EED, -1);
    UO.AddFindList("loot", 0x0F7A, -1);
}

2。更換季節性套裝,保留備用 - 腳本功能

參數與執行流程:

  • SEASON寄存器並不重要。儲備剩餘;現在季節只有新的type/hue。清理後,首先新增記錄,然後允許按名稱搜尋。
return  RunScenario();
 object? RunScenario()
{
    UO.AddFindList("reserve", 0x0EED);
    UO.AddFindList("season", 0x0F7A);
    UO.ClearFindList("SEASON");
    UO.AddFindList("season", 0x0EED, 0x0044);
    UO.InfoFindList();
    return null;
}

3。新腳本模式之前完全重置 - 腳本類

參數與執行流程:

  • ClearFindList() 影響目前運行時的所有定義,因此自命名形式通常更適合庫過程。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.AddFindList("old_loot", 0x0EED);
        UO.AddFindList("old_watch", 0x0190);
        UO.AddFindList("old_watch", 0x0191);
        UO.ClearFindList();
        UO.AddFindList("current", 0x0F7A, -1);
        var found = UO.FindList("current", "backpack");
        if (Truth(found != ""))
        {
            UO.AddObject("current_supply", found);
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.ClearFindList() — UO.ClearFindList()

參數: 沒有參數。

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearfindlist":

                    if (arguments.Length == 0) LegacyList("AddFindList").Clear();

                    else LegacyList("AddFindList").RemoveAll(value => value.Split('|')[0]

                        .Equals(Text(0), StringComparison.OrdinalIgnoreCase));

                    break;

UO.ClearFindList(list) — UO.ClearFindList(Any)

參數: list (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearfindlist":

                    if (arguments.Length == 0) LegacyList("AddFindList").Clear();

                    else LegacyList("AddFindList").RemoveAll(value => value.Split('|')[0]

                        .Equals(Text(0), StringComparison.OrdinalIgnoreCase));

                    break;

UO.ClearIgnoreList

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

C# 簽章

void UO.ClearIgnoreList();
void UO.ClearIgnoreList(object? list);

重置搜尋例外。有名字 - 只有一套type/hue。無參數 - 所有命名集和所有透過 Ignore 新增的 serial。使用乾淨的規則開始新的排序很有用。

參數

  • list — 任意非空名稱,例如「loot_skip」。該名稱不區分大小寫。這不是物品的名稱,不是serial容器的名稱,也不是FindList的名稱。選修的。它的缺失意味著全面重置,而不僅僅是活動清單。

傳回值

void - 無值。在沒有 var 結果 = 且沒有檢查 =true 的情況下在單獨的行上使用。此命令改變本機過濾器;不傳回項目數量,也不向伺服器發送任何內容。

行為

  • ClearIgnoreList("name") 的結果與 DeleteIgnoreList("name") 等效。這裡不允許有空字串;要停用而不刪除,請使用 SelectIgnoreList("")。
  • 命名清單包含規則graphic/type + hue,常規Ignore包含特定的serial。這些是不同的過濾器:當搜尋支援它們時,它們就會被組合起來。物件保持可見並可直接存取UseObject/MoveItem;這不是Hide或禁止行動。
  • 列表名稱不區分大小寫;邊緣空間被移除。一個命名清單處於活動狀態,最初是預設的。 AddIgnoreList 不會自動選擇它。 SelectIgnoreList("") 僅停用指定的過濾器。
  • 這些規則適用於新搜索,包括新增後上傳的項目。在新的搜尋之前,不會重新計算已接收到的陣列和先前的結果FindCount。除非您想排除所有內容,否則請勿選擇具有規則 -1,-1 的清單。
  • 考慮過濾器 FindType/FindTypeEx/FindTypesArrayEx, FindList, FindAtCoord, FindNotoriety, Count/CountEx 和擴展樣本 GetMobiles, GetWorldItems, UseType, WaitTarget, Attack/AttackNearest/FindMan. includeIgnored=true,如果提供的話,會繞過和 serial, 和 type/hue。完整列表 GetContent/GetEquipment, GetWorldItems() 沒有爭論和言語 FindMobile(人類,附近,...)不要使用這些規則。
  • GetIgnoreList 僅傳回明確新增的serial;指定清單的行不包含在此陣列中。 IgnoreReset 清除整個serial-過濾器,IgnoreOff(serial) 刪除一個serial-異常;命名的規則將被保留。不帶參數的ClearIgnoreList() 會清除兩個視圖。
  • 该状态属于客户端配置文件脚本的一般状态;该更改会影响具有此状态的其他脚本。這些設定包含在已儲存的快照中。更改规则后,另一个脚本已经可以使用之前拍摄的快照执行搜索 - 下一次搜索将看到更新。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.Print("Calling UO.ClearIgnoreList");
UO.ClearIgnoreList();

1。清除臨時設置,保留其餘內容 - 直接腳本

參數與執行流程:

  • 暫時除去,保留繼續排除長袍。常規清單serial未清除。
UO.AddIgnoreList("temporary", 0x0EED);
UO.AddIgnoreList("keep", 0x1F03);
UO.ClearIgnoreList("temporary");
UO.SelectIgnoreList("keep");

2。開始搜索,沒有先前的異常 - 腳本功能

參數與執行流程:

  • 如果沒有參數,兩種類型的異常都會拋出。舊變數/陣列不會被清除。新的FindType重新產生結果。
return  RunScenario();
 object? RunScenario()
{
    UO.ClearIgnoreList();
    var item = UO.FindType(0x0EED, -1, "ground");
    if (Truth(item != ""))
    {
        UO.AddObject("fresh_gold", item);
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。替換設定內容 - 腳本類

參數與執行流程:

  • 在新增規則之前,舊的排序規則已被刪除:所有金色,只有長袍上的0x0044顏色。在單獨的命令之間,另一個腳本可能會看到中間狀態。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.ClearIgnoreList("sorting");
        UO.AddIgnoreList("sorting", 0x0EED);
        UO.AddIgnoreList("sorting", 0x1F03, 0x0044);
        UO.SelectIgnoreList("sorting");
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.ClearIgnoreList() — UO.ClearIgnoreList()

參數: 沒有參數。

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearignorelist":

                    if (arguments.Length == 0)

                    {

                        IgnoreReset();

                        state.IgnoreTypeLists.Clear();

                    }

                    else

                        state.IgnoreTypeLists.Remove(Text(0));

                    break;

UO.ClearIgnoreList(list) — UO.ClearIgnoreList(Any)

參數: list (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "clearignorelist":

                    if (arguments.Length == 0)

                    {

                        IgnoreReset();

                        state.IgnoreTypeLists.Clear();

                    }

                    else

                        state.IgnoreTypeLists.Remove(Text(0));

                    break;

UO.Count

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

C# 簽章

int UO.Count(object? @type);
int UO.Count(object? @type, object? color);
int UO.Count(object? @type, object? color, object? container);

執行搜尋並彙總找到的項目的單位。

參數

  • type - 項目的圖形/type(例如0x0EED),而不是serial。 -1 或0xFFFF - 任何type。
  • color——項目的色調; -1 或 0xFFFF - 任何顏色。在Count(type)和CountGround(type)中,預設為1。
  • container - 在 Count(type,color,container): my 或數字 -1 - 其根所有者的所有項目 self (包括設備和隨附的包); backpack/serial — 指定容器的內容物是遞歸的; UO.Ground(), 明確的 0/"0", ground 或者 1 — 地面上的物品和移動設備。在 CountEx 數字 -1 和 0xFFFFFFFF 也指地球,具體的 serial - 僅直接內容。 CountEx 接受 backpack 和名字 AddObject;未知名稱會導致腳本錯誤。檢查您收到了什麼 serial 呼叫前:顯式 null 選擇地面而不是遺失容器。

傳回值

int — 找到的物品的總和 max(1, 數量);每個手機都會增加1。 0 沒有匹配項。這是單位數,不是堆疊數。 FindItem、FindCount、FindFullQuantity、GetFoundItems同時更新。

行為

  • Count,帶有一個或兩個參數,搜尋self擁有的物品,包括設備和嵌套包。 CountGround 始終搜尋土地,包括相符的手機,但不包括self。
  • Count(type,顏色,serial) 繞過嵌套袋,CountEx(type,顏色,serial) - 僅直接內容。限制 FindDistance/FindVertical適用於土地; Ignore 適用於找到的物件。
  • 結果取決於已收到的容器中的內容。沒有自動開啟或伺服器請求完整庫存。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.Count(0x0EED, -1, "backpack");
UO.Print("Count: " + Convert.ToString(result));

1。計算黃金單位 - 直接腳本

參數與執行流程:

  • type=0x0EED,顏色=-1。區域-背包;考慮遞歸差異Count/CountEx。
  • 距1000 dast 單位一英尺=1000,而非1。
var units = UO.Count(0x0EED, -1, "backpack");
UO.Print("Units: " + Convert.ToString(units));

2。分別顯示物件的單位和數量 - 腳本功能

參數與執行流程:

  • FindCount 在 Count 之後、另一次搜尋前立即讀取。
  • 兩堆50產生2物品和100單位。
return  RunScenario();
 object? RunScenario()
{
    var units = UO.Count(0x0EED, -1, "backpack");
    var items = UO.FindCount();
    UO.Print(Convert.ToString(items) + " items, " + Convert.ToString(units) + " units");
    return null;
}

3。僅當數量足夠時才繼續 - 場景類

參數與執行流程:

  • 100 是本例中的單位閾值。
  • 這是快照檢查,而不是專案預訂。審核和轉移之間的數量可能會發生變化。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var units = UO.Count(0x0EED, -1, "backpack");
        if (Truth(units >= 100))
        {
            UO.Print("Enough units known to the client");
        }
        else
        {
            UO.Print("Not enough known units");
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.Count(type) — UO.Count(Any)

參數: type (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int Count(InjectionValue type) 

            => Count(ResolveType(type), -1, -1);

UO.Count(type, color) — UO.Count(Any,Any)

參數: type (Any), color (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int Count(InjectionValue type, InjectionValue color) 

            => Count(ResolveType(type), NumberConversions.ToInt(color), 0);

UO.Count(type, color, container) — UO.Count(Any,Any,Any)

參數: type (Any), color (Any), container (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int Count(InjectionValue type, InjectionValue color, InjectionValue container)

            => Count(ResolveType(type), NumberConversions.ToInt(color), ConvertContainer(container));

UO.CountEx

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

UO.CountEx

int UO.CountEx(object? objType, object? color, object? container);

計算容器直接內容的物品數量,不搜尋巢狀袋子。地面搜尋也會計入符合條件的角色/NPC,每個算一個。FindDistance、FindVertical 與 Ignore 仍然有效。不會改變 FindItem、FindCount、FindFullQuantity 或 GetFoundItems。

objType 是圖形/type,不是序號;color 是色調。-1 或 0xFFFF 表示任何類型/色調。container 是容器 ID:背包使用 UO.Backpack(),地面使用 UO.Ground()。傳回 int,為 max(1, Amount) 的總和,0 表示沒有符合項目。只計算已收到的內容,不會自動開啟袋子。

範例

int goldUnits = UO.CountEx(0x0EED, -1, UO.Backpack());
UO.Print(goldUnits.ToString());
UO.FindTypeEx(0x0EED, -1, UO.Backpack(), false);
int previousFoundItem = UO.FindItem();
int bandages = UO.CountEx(0x0E21, -1, UO.Backpack());
bool searchPreserved = UO.FindItem() == previousFoundItem;
UO.Print($"{bandages}; {searchPreserved}");
int units = CountBackpackUnits(0x0EED);
UO.Print(units.ToString());

int CountBackpackUnits(int graphic)
{
    return UO.CountEx(graphic, -1, UO.Backpack());
}
var counter = new InventoryCounter(UO);
UO.Print(counter.CountGold().ToString());

class InventoryCounter(ClassicUO.CSharp.CSharpGameApi api)
{
    public int CountGold() => api.CountEx(0x0EED, -1, api.Backpack());
}

實作

ClassicUOInjectionApiBridge.CountDirectItems → MatchesFindIdentity / MatchesFindContainer / MatchesFindMobile.

UO.CountGround

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

C# 簽章

int UO.CountGround(object? @type);
int UO.CountGround(object? @type, object? color);

執行搜尋並彙總找到的項目的單位。

參數

  • type - 項目的圖形/type(例如0x0EED),而不是serial。 -1 或0xFFFF - 任何type。
  • color——項目的色調; -1 或 0xFFFF - 任何顏色。在Count(type)和CountGround(type)中,預設為1。

傳回值

int — 找到的物品的總和 max(1, 數量);每個手機都會增加1。 0 沒有匹配項。這是單位數,不是堆疊數。 FindItem、FindCount、FindFullQuantity、GetFoundItems同時更新。

行為

  • Count,帶有一個或兩個參數,搜尋self擁有的物品,包括設備和嵌套包。 CountGround 始終搜尋土地,包括相符的手機,但不包括self。
  • Count(type,顏色,serial) 繞過嵌套袋,CountEx(type,顏色,serial) - 僅直接內容。限制 FindDistance/FindVertical適用於土地; Ignore 適用於找到的物件。
  • 結果取決於已收到的容器中的內容。沒有自動開啟或伺服器請求完整庫存。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.CountGround(0x0EED, -1);
UO.Print("CountGround: " + Convert.ToString(result));

1。計算黃金單位 - 直接腳本

參數與執行流程:

  • type=0x0EED,顏色=-1。區域是角色旁邊的土地。
  • 距1000 dast 單位一英尺=1000,而非1。
var units = UO.CountGround(0x0EED, -1);
UO.Print("Units: " + Convert.ToString(units));

2。分別顯示物件的單位和數量 - 腳本功能

參數與執行流程:

  • FindCount 在 Count 之後、另一次搜尋前立即讀取。
  • 兩堆50產生2物品和100單位。
return  RunScenario();
 object? RunScenario()
{
    var units = UO.CountGround(0x0EED, -1);
    var items = UO.FindCount();
    UO.Print(Convert.ToString(items) + " items, " + Convert.ToString(units) + " units");
    return null;
}

3。僅當數量足夠時才繼續 - 場景類

參數與執行流程:

  • 100 是本例中的單位閾值。
  • 這是快照檢查,而不是專案預訂。審核和轉移之間的數量可能會發生變化。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var units = UO.CountGround(0x0EED, -1);
        if (Truth(units >= 100))
        {
            UO.Print("Enough units known to the client");
        }
        else
        {
            UO.Print("Not enough known units");
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.CountGround(type) — UO.CountGround(Any)

參數: type (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int CountGround(InjectionValue type)

            => CountGround(type, new InjectionValue(-1));

UO.CountGround(type, color) — UO.CountGround(Any,Any)

參數: type (Any), color (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int CountGround(InjectionValue type, InjectionValue color)

            => bridge.Count(ResolveType(type), NumberConversions.ToInt(color), 1);

UO.DeleteFindList

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

C# 簽章

void UO.DeleteFindList(object? list);
void UO.DeleteFindList(object? list, object? @type);
void UO.DeleteFindList(object? list, object? @type, object? color);

刪除與指定清單、list/type或list/type/color前綴相符的所有定義。允許您刪除一種類型的項目或特定的hue,同時保留其餘的設定規則。

參數

  • list — 規則集的名稱,例如「loot」。傳遞不帶 | 的字串:此字元用作記錄內的分隔符號。該名稱不區分大小寫。這不是 serial 容器或找到的項目數組。
  • type - 某項目或 body mobile 的圖形/type,而非其 serial。通常為int0..65535,包括0x0EED; -1或0xFFFF表示搜尋時任意type。為每個條目提供一個值。透過單獨的呼叫添加多種類型。刪除時,比較欄位文字;跳過會刪除所有名稱條目。
  • color — 物體/物體的色調,而非 RGB。 int0..65535; 0 - 常規 hue 0、-1 或 0xFFFF - 任意。在AddFindList中,搜尋時跳過顏色意味著任意hue。對於刪除,這是一個文字字段,而不是通配符:-1 僅刪除明確儲存的 -1 的條目。忽略顏色會刪除所有清單/type 條目,無論hue 為何。

傳回值

void:無回傳值。不要將呼叫分配給變量,也不要在 true/1 上測試它。定義的狀態可以推斷UO.InfoFindList();搜尋本身是透過UO.FindList()單獨啟動的。

行為

  • 定义处于给定脚本运行时的状态。獨立的其他運行時有自己的一套;關閉IDE視窗不會清除這些規則。這不是設定檔或全域遊戲物件列表。
  • AddFindList 將條目追加到最後;重複的內容不會被刪除。若要重新配置您的套件,請先呼叫 ClearFindList(“name”)。更改定義不會清除已收到的FindItem/FindCount/GetFoundItems。
  • 此記錄儲存文字欄位。數位文字0x0EED儲存為“3821”,字串“0x0EED”儲存為“0x0EED”。搜尋將兩個選項轉換為數字,DeleteFindList 比較儲存的文字。新增和刪除時使用相同的形式。
  • FindList 中的未知名稱不是空的註冊集:引擎嘗試將其解析為數字類型清單。非數字名稱會導致轉換錯誤。刪除最後一個條目後,在搜尋該名稱之前建立新集。
  • DeleteFindList(list,type,-1) 不會刪除二參數記錄 AddFindList(list,type):它沒有第三個欄位。匹配的重複項全部刪除;不存在的匹配不會改變任何事情。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.AddFindList("simple_loot", 0x0EED);
UO.Print("Calling UO.DeleteFindList");
UO.DeleteFindList("simple_loot");

1。排除同一類型的所有顏色 - 直接腳本

參數與執行流程:

  • 兩個參數刪除兩個黃金條目:任何hue和hue0x0044。
UO.ClearFindList("loot");
UO.AddFindList("loot", 0x0EED, -1);
UO.AddFindList("loot", 0x0EED, 0x0044);
UO.AddFindList("loot", 0x0F7A);
UO.DeleteFindList("loot", 0x0EED);
var found = UO.FindList("loot", "backpack");
if (Truth(found != ""))
{
    UO.AddObject("remaining_supply", found);
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。只刪除一個hue - 腳本函數

參數與執行流程:

  • 三個參數:顏色、graphic金色、特定hue。剩下的就是hue0。在其他集合中,這個graphic不會被刪除。
return  RunScenario();
 object? RunScenario()
{
    UO.ClearFindList("colors");
    UO.AddFindList("colors", 0x0EED, 0);
    UO.AddFindList("colors", 0x0EED, 0x0044);
    UO.DeleteFindList("colors", 0x0EED, 0x0044);
    UO.InfoFindList();
    return null;
}

3。刪除整個集並建立替換 - 腳本類

參數與執行流程:

  • 一個參數會刪除所有舊條目。如果規則是由「0x0190」行指定的,則刪除同一行的規則或按名稱刪除該群組。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.AddFindList("old", 0x0190);
        UO.AddFindList("old", 0x0191);
        UO.DeleteFindList("OLD");
        UO.AddFindList("new_watch", 0x0190, -1);
        UO.AddFindList("new_watch", 0x0191, -1);
        UO.InfoFindList();
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.DeleteFindList(list) — UO.DeleteFindList(Any)

參數: list (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deletefindlist":

                    LegacyList("AddFindList").RemoveAll(value => LegacyListEntryMatches(value,

                        arguments));

                    break;

UO.DeleteFindList(list, type) — UO.DeleteFindList(Any,Any)

參數: list (Any), type (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deletefindlist":

                    LegacyList("AddFindList").RemoveAll(value => LegacyListEntryMatches(value,

                        arguments));

                    break;

UO.DeleteFindList(list, type, color) — UO.DeleteFindList(Any,Any,Any)

參數: list (Any), type (Any), color (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deletefindlist":

                    LegacyList("AddFindList").RemoveAll(value => LegacyListEntryMatches(value,

                        arguments));

                    break;

UO.DeleteIgnoreList

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

C# 簽章

void UO.DeleteIgnoreList(object? list);
void UO.DeleteIgnoreList(object? list, object? @type);
void UO.DeleteIgnoreList(object? list, object? @type, object? color);

刪除整個命名過濾器或其中選定的規則。當需要允許特定的 type 或 hue 返回搜尋時使用,保留其他例外。

參數

  • list — 任意非空名稱,例如「loot_skip」。該名稱不區分大小寫。這不是物品的名稱,不是serial容器的名稱,也不是FindList的名稱。
  • type - 項目的圖形/type 或body mobile。例如,0x0EED是黃金,0x0191是女性人體。數字或數字字串(“0x0EED”,“3821”); -1/其他負數/0xFFFF - 任何type。不允許大於65535的值。對於多個type,新增多個規則。如果沒有轉移,則刪除整個清單;如果不加顏色就通過了,所有的規則就是這個type。
  • color - 色調:0 - 僅未著色,0x0044 - 精確顏色的範例;負數或 0xFFFF - 任意。不允許大於65535的值。在添加中預設為1。一條規則內的類型和hue透過AND條件連接;不同的規則 - 或。刪除時,設定精確的規則遮罩; -1 刪除「任何顏色」規則而不是所有單獨的顏色。

傳回值

void - 無值。在沒有 var 結果 = 且沒有檢查 =true 的情況下在單獨的行上使用。此命令改變本機過濾器;不傳回項目數量,也不向伺服器發送任何內容。

行為

  • 數字3821和字串「0x0EED」代表一個type。刪除不存在的規則不會改變任何內容。即使清單本身被刪除,所選清單的名稱也會保留;它變得空了。
  • 命名清單包含規則graphic/type + hue,常規Ignore包含特定的serial。這些是不同的過濾器:當搜尋支援它們時,它們就會被組合起來。物件保持可見並可直接存取UseObject/MoveItem;這不是Hide或禁止行動。
  • 列表名稱不區分大小寫;邊緣空間被移除。一個命名清單處於活動狀態,最初是預設的。 AddIgnoreList 不會自動選擇它。 SelectIgnoreList("") 僅停用指定的過濾器。
  • 這些規則適用於新搜索,包括新增後上傳的項目。在新的搜尋之前,不會重新計算已接收到的陣列和先前的結果FindCount。除非您想排除所有內容,否則請勿選擇具有規則 -1,-1 的清單。
  • 考慮過濾器 FindType/FindTypeEx/FindTypesArrayEx, FindList, FindAtCoord, FindNotoriety, Count/CountEx 和擴展樣本 GetMobiles, GetWorldItems, UseType, WaitTarget, Attack/AttackNearest/FindMan. includeIgnored=true,如果提供的話,會繞過和 serial, 和 type/hue。完整列表 GetContent/GetEquipment, GetWorldItems() 沒有爭論和言語 FindMobile(人類,附近,...)不要使用這些規則。
  • GetIgnoreList 僅傳回明確新增的serial;指定清單的行不包含在此陣列中。 IgnoreReset 清除整個serial-過濾器,IgnoreOff(serial) 刪除一個serial-異常;命名的規則將被保留。不帶參數的ClearIgnoreList() 會清除兩個視圖。
  • 该状态属于客户端配置文件脚本的一般状态;该更改会影响具有此状态的其他脚本。這些設定包含在已儲存的快照中。更改规则后,另一个脚本已经可以使用之前拍摄的快照执行搜索 - 下一次搜索将看到更新。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

指令是獨立的陳述式。前面的訊息表示呼叫開始,並非伺服器已完成動作的確認。

UO.AddIgnoreList("simple_skip", 0x0EED);
UO.Print("Calling UO.DeleteIgnoreList");
UO.DeleteIgnoreList("simple_skip");

1。刪除整個集合 - 直接腳本

參數與執行流程:

  • 僅刪除暫時的。其他列表和Ignore(serial)被保留。
UO.AddIgnoreList("temporary", 0x0EED);
UO.SelectIgnoreList("temporary");
UO.DeleteIgnoreList("temporary");
var gold = UO.FindType(0x0EED, -1, "ground");

2。允許一個type的所有著色 - 腳本函數

參數與執行流程:

  • 兩條長袍規則都已被刪除,但黃金規則仍然存在。一般規則-1,type-任何其他類型,如果添加,本身不會被刪除。
return  RunScenario();
 object? RunScenario()
{
    UO.AddIgnoreList("sort", 0x1F03, 0);
    UO.AddIgnoreList("sort", 0x1F03, 0x0044);
    UO.AddIgnoreList("sort", 0x0EED);
    UO.DeleteIgnoreList("sort", 0x1F03);
    UO.SelectIgnoreList("sort");
    return null;
}

3。僅刪除精確顏色規則 - 腳本類

參數與執行流程:

  • 68 = 0x0044:數的形式相同。未染色的長袍仍然被排除在外。如果這個type還有hue=-1的規則,則會繼續排除顏色68。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        UO.AddIgnoreList("robes", 0x1F03, 0);
        UO.AddIgnoreList("robes", 0x1F03, 0x0044);
        UO.DeleteIgnoreList("robes", "0x1F03", 68);
        UO.SelectIgnoreList("robes");
        var robe = UO.FindType(0x1F03, 0x0044, "backpack");
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.DeleteIgnoreList(list) — UO.DeleteIgnoreList(Any)

參數: list (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deleteignorelist":

                    state.IgnoreTypeLists.Remove(Text(0), arguments.Length > 1 ? ResolveType(arguments[1]) : (int?)null,

                        arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : (int?)null);

                    break;

UO.DeleteIgnoreList(list, type) — UO.DeleteIgnoreList(Any,Any)

參數: list (Any), type (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deleteignorelist":

                    state.IgnoreTypeLists.Remove(Text(0), arguments.Length > 1 ? ResolveType(arguments[1]) : (int?)null,

                        arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : (int?)null);

                    break;

UO.DeleteIgnoreList(list, type, color) — UO.DeleteIgnoreList(Any,Any,Any)

參數: list (Any), type (Any), color (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "deleteignorelist":

                    state.IgnoreTypeLists.Remove(Text(0), arguments.Length > 1 ? ResolveType(arguments[1]) : (int?)null,

                        arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : (int?)null);

                    break;

UO.FindAnyType

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

C# 簽章

int UO.FindAnyType(object? distance, object? @type);
int UO.FindAnyType(object? distance, object? @type, object? type2);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26, object? type27);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26, object? type27, object? type28);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26, object? type27, object? type28, object? type29);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26, object? type27, object? type28, object? type29, object? type30);
int UO.FindAnyType(object? distance, object? @type, object? type2, object? type3, object? type4, object? type5, object? type6, object? type7, object? type8, object? type9, object? type10, object? type11, object? type12, object? type13, object? type14, object? type15, object? type16, object? type17, object? type18, object? type19, object? type20, object? type21, object? type22, object? type23, object? type24, object? type25, object? type26, object? type27, object? type28, object? type29, object? type30, object? type31);

尋找與給定 graphic 實體之一最接近的載入 mobile。用於搜尋特定類型的生物。團隊不會尋找箱子中或地面上的物品:他們需要FindType/FindList。

參數

  • distance — 單元格中的水平半徑(含):5 允許距離 0..5。距離為 max(abs(dx),abs(dy)),因此相鄰對角線也是 1。預設情況下或如果數字為負數,則採用UO.FindDistance()而非無限搜尋。 0 留下相同的 X/Y 單元。不是路線的長度;此參數不檢查障礙物和地板。
  • type — mobile 主體的圖形,不是 serial 也不是 graphic 物件。數字0..65534或十六進位字串,例如0x003B。多個值組合為OR:數字5、字串「5|6」或數字/數字字串的平面數組。您可以混合平面數組和單一參數。值的順序不設定優先權。排除非數字標記;完全錯誤的遮罩什麼也找不到。嵌套數組不是數字,會被視為無效元素而被忽略;不支援多維遮罩。
  • type2 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type3 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type4 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type5 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type6 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type7 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type8 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type9 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type10 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type11 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type12 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type13 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type14 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type15 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type16 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type17 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type18 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type19 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type20 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type21 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type22 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type23 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type24 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type25 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type26 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type27 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type28 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type29 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type30 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • type31 — 可選附加遮罩type;與type相同的形狀。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。

傳回值

int — serial 已選擇 mobile 或者 0,如果沒有合適的。這 ID,而不是 graphic/type,找到的物體數量或 true/false:使用 if (找到!= 0) { ... }, 找到 == true。成立 ID 可以轉移 UO.AddObject, UO.Attack 或者 UO.Follow,但是每個遊戲動作都是單獨調用的。

行為

  • 搜尋僅讀取客戶端已下載的手機;已銷毀的記錄和 Ignore 被排除在外。呼叫本身不打開目標,不攻擊,不去目標,也不向伺服器請求遠端物件。
  • 距離是幾何 max(abs(dx),abs(dy)),而不是路線長度。鄰近並不能保證沒有牆壁或可以到達另一層樓。返回時情況可能會改變。
  • 生命、隱身和視線不會自動檢查。如果它們很重要,請將 GetMobiles 與 aliveOnly/visibleOnly 或您自己的支票一起使用。擁有敵方狀態的伺服器並不能使任何NPC符合資格。
  • 不改變 FindItem、FindCount 或 GetFoundItems。這些欄位可能包含先前其他命令的結果:直接使用傳回的ID。
  • 從2到32參數:距離和到31掩碼type。平面數組允許您傳遞更多值。 type之後的每個後續值仍然是body/type,而不是hue或惡名。
  • 此指令沒有Z、惡名、玩家種族或服裝類別過濾器。不排除Self:如果您自己的graphic包含在面罩中,並且self不在Ignore中,則您可以在0的距離處獲得您的serial。
  • 選擇最接近的一個;較小的serial允許相等的距離。 -1/any/0xFFFF/沒有特定類型的空遮罩給出0:此指令需要至少一個明確type。接近特定的 type 通配符將被忽略。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.FindAnyType(10, 0x003B);
UO.Print("FindAnyType: " + Convert.ToString(result));

1。儲存所需類型的最近的生物 - 直接腳本

參數與執行流程:

  • 0x003B - body,而非 ID。返回特定找到的 mobile 的生物 - ID。團隊不檢查Z、健康狀況或攻擊性。
var creature = UO.FindAnyType(10, 0x003B);
if (Truth(creature != 0))
{
    UO.AddObject("creature", creature);
    UO.Print("Distance: " + Convert.ToString(UO.GetDistance(creature)));
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。視圖數組和附加視圖 - 腳本函數

參數與執行流程:

  • 主體和單獨的0x000C組合在一起。如果找到 self,此範例將簡單地跳過該操作;他並不是在尋找下一個候選人。若要在請求本身中排除 self,請使用適當的過濾器GetMobiles。
return  RunScenario();
 object? RunScenario()
{
    dynamic[] bodies = new dynamic[checked((int)(0) + 1)];
    bodies[0] = 0x003B;
    var creature = UO.FindAnyType(18, bodies, 0x000C);
    if (Truth(creature != 0) && Truth(creature != Asc(UO.GetSerial("self"), 0)))
    {
        UO.AddObject("observed_creature", creature);
    }

    return null;
}

int Asc(object? value, int fallback = 0)
{
    string text = Convert.ToString(value) ?? "";
    if (text.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
        return int.TryParse(text[2..], System.Globalization.NumberStyles.HexNumber, System.Globalization.CultureInfo.InvariantCulture, out int hex) ? hex : fallback;
    return int.TryParse(text, out int number) ? number : fallback;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。返回到最近所需視圖的距離 - 腳本類

參數與執行流程:

  • body - graphic,半徑 - 搜尋限制X/Y。助手返回距離或它自己的代碼-1;UO.FindAnyType本身返回serial或0。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var distance = DistanceToBody(0x003B, 8);
        if (Truth(distance >= 0) && Truth(distance <= 3))
        {
            UO.Print("Creature is within three cells");
        }

        return null;
    }

    dynamic DistanceToBody(dynamic body, dynamic radius)
    {
        var found = UO.FindAnyType(radius, body);
        if (Truth(found == 0))
        {
            return -1;
        }

        return UO.GetDistance(found);
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindAnyType(distance, type) — UO.FindAnyType(Any,Any)

參數: distance (Any), type (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2) — UO.FindAnyType(Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3) — UO.FindAnyType(Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4) — UO.FindAnyType(Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5) — UO.FindAnyType(Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26, type27) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any), type27 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26, type27, type28) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any), type27 (Any), type28 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26, type27, type28, type29) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any), type27 (Any), type28 (Any), type29 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26, type27, type28, type29, type30) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any), type27 (Any), type28 (Any), type29 (Any), type30 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAnyType(distance, type, type2, type3, type4, type5, type6, type7, type8, type9, type10, type11, type12, type13, type14, type15, type16, type17, type18, type19, type20, type21, type22, type23, type24, type25, type26, type27, type28, type29, type30, type31) — UO.FindAnyType(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), type (Any), type2 (Any), type3 (Any), type4 (Any), type5 (Any), type6 (Any), type7 (Any), type8 (Any), type9 (Any), type10 (Any), type11 (Any), type12 (Any), type13 (Any), type14 (Any), type15 (Any), type16 (Any), type17 (Any), type18 (Any), type19 (Any), type20 (Any), type21 (Any), type22 (Any), type23 (Any), type24 (Any), type25 (Any), type26 (Any), type27 (Any), type28 (Any), type29 (Any), type30 (Any), type31 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))

UO.FindAtCoord

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

C# 簽章

int UO.FindAtCoord(object? x, object? y);

在目前地圖的一個精確的 X/Y 圖塊上搜尋載入的世界物件。

參數

  • x — 水平世界座標,int 0..65535。強制的;這些不是容器視窗像素。
  • y是垂直世界坐标,int0..65535。必需的。 Z、地图、type 或半径没有其他选项。

傳回值

int - serial 該客戶端結果清單中的第一個符合項。 0:無匹配項、字元缺失/刪除或座標位於0..65535 之外。這是物件的 ID,而不是 type、數量或 bool。所有32位均被保存;檢查 != 0,而非 == true 且不 > 0。同樣的ID被寫入FindItem()。

行為

  • 檢查地面和行動裝置上未刪除的物品,包括該儲存格上的角色本人。容器和磨損物品的內容被排除在外:它們的X/Y不能被視為世界座標。系列不包括在列表Ignore 中。
  • 給定 X/Y 處的所有 Z 高度都是適當的。 FindDistance 和 FindVertical 不將此搜尋限製到確切的儲存格。只有當前世界的載入物件是可見的;景觀、靜態和其他地圖不會載入。資料包未發送,目標未打開,物品未移動。
  • 每次呼叫都會先清除先前的搜尋。 FindCount() 對物件進行計數,FindFullQuantity() 將堆疊中的單位求和(Mobile 加 1),GetFoundItems() 傳回在 serial 中找到的內容。首先搜尋 Item,然後搜尋 Mobile;在集合中,套用目前的枚舉順序。儲存清單以供下次搜尋以取代結果。
  • 上面的選擇順序和過濾器描述了該客戶端的實作。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.FindAtCoord(1445, 1690);
UO.Print("FindAtCoord: " + Convert.ToString(result));

1。取得一個ID - 直接腳本

參數與執行流程:

  • 1445 和 1690 是世界上的 X/Y 的例子:用您的手機替換它們。 id保存一個serial;HEX 以十六進位輸出。 != 0 檢查結果是否存在,而非數量。
var id = UO.FindAtCoord(1445, 1690);
if (Truth(id != 0))
{
    UO.Print(Hex(id));
}
else
{
    UO.Print("No loaded object");
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。查看字元方塊上的所有物件 - 腳本功能

參數與執行流程:

  • x/y 是從字元中讀取的; ids 儲存目前搜尋的清單。每個id代表一個對象,包括整個堆疊。 GetType(id) 讀取graphic/body。未選擇或使用項目。
return  RunScenario();
 object? RunScenario()
{
    var x = UO.GetX("self");
    var y = UO.GetY("self");
    UO.FindAtCoord(x, y);
    var ids = UO.GetFoundItems();
    foreach (var id in ids)
    {
        UO.Print(Hex(id) + " type=" + Hex(UO.GetType(id)));
    }

    return null;
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");

3。全功能CountGraphicAt——腳本類

參數與執行流程:

  • CountGraphicAt(x, y, graphic) 搜尋一個單元格一次,迭代保存的 ID 併計算具有所需圖形的物件。 graphic=0x0EED – 黄金。傳回物件/堆疊的數量,不是個數和,也不是true/false;一疊就是一。該函數在Main之後完全定義。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var count = CountGraphicAt(1445, 1690, 0x0EED);
        UO.Print("Objects/stacks: " + Convert.ToString(count));
        return null;
    }

    dynamic CountGraphicAt(dynamic x, dynamic y, dynamic graphic)
    {
        UO.FindAtCoord(x, y);
        var ids = UO.GetFoundItems();
        var count = 0;
        foreach (var id in ids)
        {
            if (Truth(UO.GetType(id) == graphic))
            {
                count += 1;
            }
        }

        return count;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindAtCoord(x, y) — UO.FindAtCoord(Any,Any)

參數: x (Any), y (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "findatcoord": return new InjectionValue(bridge.FindAtCoord(Arg(0), Arg(1)));

UO.FindByNotoriety

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

C# 簽章

int UO.FindByNotoriety(object? distance, object? notoriety);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26, object? notoriety27);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26, object? notoriety27, object? notoriety28);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26, object? notoriety27, object? notoriety28, object? notoriety29);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26, object? notoriety27, object? notoriety28, object? notoriety29, object? notoriety30);
int UO.FindByNotoriety(object? distance, object? notoriety, object? notoriety2, object? notoriety3, object? notoriety4, object? notoriety5, object? notoriety6, object? notoriety7, object? notoriety8, object? notoriety9, object? notoriety10, object? notoriety11, object? notoriety12, object? notoriety13, object? notoriety14, object? notoriety15, object? notoriety16, object? notoriety17, object? notoriety18, object? notoriety19, object? notoriety20, object? notoriety21, object? notoriety22, object? notoriety23, object? notoriety24, object? notoriety25, object? notoriety26, object? notoriety27, object? notoriety28, object? notoriety29, object? notoriety30, object? notoriety31);

尋找具有指定惡名狀態之一的最接近的其他角色/NPC。當您需要先選擇敵人、盟友或觀察目標,然後再分別決定是攻擊還是跟隨它時,這很有用。

參數

  • distance — 單元格中的水平半徑(含):5 允許距離 0..5。距離為 max(abs(dx),abs(dy)),因此相鄰對角線也是 1。預設情況下或如果數字為負數,則採用UO.FindDistance()而非無限搜尋。 0 留下相同的 X/Y 單元。不是路線的長度;此參數不檢查障礙物和地板。
  • notoriety — 與從伺服器接收的角色的關係狀態: 0 - 未知, 1 — Innocent, 2 — Ally, 3 — Gray, 4 — Criminal, 5 — Enemy, 6 — Murderer, 7 - 刀槍不入。數字表示一種狀態; ”5|6" 或數字數組 - 以上任何一個。這不是衣服或班級的顏色。負數(通常 -1), 0xFFFF、「any」、空字串或空數組分別停用此過濾器。沒有有效數字的無效字串找不到任何人。狀態的順序不設定優先順序。篩選 5 選擇敵人,而不是自動選擇任何人 NPC/怪物;實際值取決於伺服器。多個值組合為 OR: 數字 5, 線 ”5|6" 或數字/數字字串的平面數組。您可以混合平面數組和單獨的參數。值的順序不具有優先權。排除非數字標記;完全錯誤的遮罩不會找到任何內容。嵌套數組不是數字,會被視為錯誤元素而被忽略;不支援多維遮罩。
  • notoriety2 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety3 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety4 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety5 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety6 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety7 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety8 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety9 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety10 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety11 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety12 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety13 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety14 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety15 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety16 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety17 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety18 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety19 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety20 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety21 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety22 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety23 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety24 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety25 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety26 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety27 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety28 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety29 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety30 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。
  • notoriety31 - 可選的附加惡名面具;與惡名的形式相同。透過 OR 與先前的組合,不設定單獨的半徑、hue、Z 或優先權。

傳回值

int — serial 已選擇 mobile 或者 0,如果沒有合適的。這 ID,而不是 graphic/type,找到的物體數量或 true/false:使用 if (找到!= 0) { ... }, 找到 == true。成立 ID 可以轉移 UO.AddObject, UO.Attack 或者 UO.Follow,但是每個遊戲動作都是單獨調用的。

行為

  • 搜尋僅讀取客戶端已下載的手機;已銷毀的記錄和 Ignore 被排除在外。呼叫本身不打開目標,不攻擊,不去目標,也不向伺服器請求遠端物件。
  • 距離是幾何 max(abs(dx),abs(dy)),而不是路線長度。鄰近並不能保證沒有牆壁或可以到達另一層樓。返回時情況可能會改變。
  • 生命、隱身和視線不會自動檢查。如果它們很重要,請將 GetMobiles 與 aliveOnly/visibleOnly 或您自己的支票一起使用。擁有敵方狀態的伺服器並不能使任何NPC符合資格。
  • 不改變 FindItem、FindCount 或 GetFoundItems。這些欄位可能包含先前其他命令的結果:直接使用傳回的ID。
  • 至少有兩個論點:距離、惡名。最大32:半徑和最大31掩模。對於更多值,請將平面數組作為一個參數傳遞。刪除過濾器:-1/any/0xFFFF/空字串或空數組。如果特定代碼彼此相鄰列出,則它們保留限制。
  • 不包括self。符合UO.FindVertical()作為差值Z的限制;此指令中沒有參數maxZ。在相等的情況下,始終選擇最接近的一個 - 較小的一個serial。惡名之後的爭論仍是惡名,不是最近的,也不是body。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.FindByNotoriety(12, "5|6");
UO.Print("FindByNotoriety: " + Convert.ToString(result));

1。選擇最近的目標並儲存其名稱 - 直接腳本

參數與執行流程:

  • 保存的對手可以稍後使用;這個例子不攻擊。即使目標在 X/Y 上很接近,當前 FindVertical 也適用。
var found = UO.FindByNotoriety(12, "5|6");
if (Truth(found != 0))
{
    UO.AddObject("opponent", found);
    UO.Print("Selected: " + UO.GetName(found));
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。數組中的狀態列表加上單獨的程式碼 - 腳本函數

參數與執行流程:

  • 允許包含敵人,單獨的6添加兇手。狀態是組合的,而不是按優先順序排序的。此範例請求對發現的活著的mobile進行攻擊;伺服器規則決定什麼是可接受的。
return  RunScenario();
 object? RunScenario()
{
    dynamic[] allowed = new dynamic[checked((int)(0) + 1)];
    allowed[0] = 5;
    var found = UO.FindByNotoriety(8, allowed, 6);
    if (Truth(found != 0) && !(Truth(UO.IsDead(found))))
    {
        UO.Attack(found);
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。完整的等高搜尋功能-腳本類

參數與執行流程:

  • radius — 單元格中 X/Y 的半徑。 FindVertical(0)需要相同的Z;這不是地板或牆壁檢查。函數傳回ID/0,最後儲存腳本其他部分的設定。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var found = FindOpponentAtSameLevel(10);
        if (Truth(found != 0))
        {
            UO.AddObject("same_level", found);
        }

        return null;
    }

    dynamic FindOpponentAtSameLevel(dynamic radius)
    {
        var previous = UO.FindVertical();
        try
        {
            UO.FindVertical(0);
            return UO.FindByNotoriety(radius, "5|6");
        }
        finally
        {
            UO.FindVertical(previous);
        }
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindByNotoriety(distance, notoriety) — UO.FindByNotoriety(Any,Any)

參數: distance (Any), notoriety (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2) — UO.FindByNotoriety(Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3) — UO.FindByNotoriety(Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4) — UO.FindByNotoriety(Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26, notoriety27) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any), notoriety27 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26, notoriety27, notoriety28) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any), notoriety27 (Any), notoriety28 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26, notoriety27, notoriety28, notoriety29) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any), notoriety27 (Any), notoriety28 (Any), notoriety29 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26, notoriety27, notoriety28, notoriety29, notoriety30) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any), notoriety27 (Any), notoriety28 (Any), notoriety29 (Any), notoriety30 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindByNotoriety(distance, notoriety, notoriety2, notoriety3, notoriety4, notoriety5, notoriety6, notoriety7, notoriety8, notoriety9, notoriety10, notoriety11, notoriety12, notoriety13, notoriety14, notoriety15, notoriety16, notoriety17, notoriety18, notoriety19, notoriety20, notoriety21, notoriety22, notoriety23, notoriety24, notoriety25, notoriety26, notoriety27, notoriety28, notoriety29, notoriety30, notoriety31) — UO.FindByNotoriety(Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any)

參數: distance (Any), notoriety (Any), notoriety2 (Any), notoriety3 (Any), notoriety4 (Any), notoriety5 (Any), notoriety6 (Any), notoriety7 (Any), notoriety8 (Any), notoriety9 (Any), notoriety10 (Any), notoriety11 (Any), notoriety12 (Any), notoriety13 (Any), notoriety14 (Any), notoriety15 (Any), notoriety16 (Any), notoriety17 (Any), notoriety18 (Any), notoriety19 (Any), notoriety20 (Any), notoriety21 (Any), notoriety22 (Any), notoriety23 (Any), notoriety24 (Any), notoriety25 (Any), notoriety26 (Any), notoriety27 (Any), notoriety28 (Any), notoriety29 (Any), notoriety30 (Any), notoriety31 (Any)

結果: int / Integer.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(FindFilteredMobileSerial(-1, CombineMask(values, 1),

                        NumberConversions.ToInt(values[0]), true, bridge.GetFindVertical(), -1, false))

UO.FindCount

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

C# 簽章

int UO.FindCount();
int UO.FindCount(object? id);

如果傳遞 ID,則讀取指定堆疊中 1 的數量。不帶參數的形式保留單獨的意義:上次搜尋的物件數。

參數

  • id — Serial/ID 具體對象: int、十進制/十六進位字串或已建立的別名 self, backpack, lasttarget, lastobject 或姓名 AddObject。這不是 graphic/type。可選參數。傳送時 ID 讀取該特定項目的當前金額。 finditem 別名明確地選擇第一個搜尋結果。如果沒有參數,則傳回找到的物件的數量。

傳回值

int: FindCount(id) — 指定堆疊中的單元數量(數量);常規單品給出 1、未知/已刪除項目、錯誤別名或手機給出 0. FindCount() 沒有 ID — 上次搜尋中的物件數量:無論數量如何,一個堆疊都被視為一個物件。例如,每層三疊 20, 50 和 100: FindCount()=3, FindCount(ID 第二堆)=50, FindFullQuantity()=170.

行為

  • FindCount(id)相當於讀取GetQuantity(id),不會觸發搜索,也不會修改FindItem/FindCount()/FindFullQuantity/GetFoundItems。
  • ID 表示特定項目的serial,而不是type。下次呼叫 FindCount(id) 時會反映數量的變化。移除物品中的數量為0;它不會自動搜尋另一個堆疊。
  • 保留了不帶參數的原始相容性:FindCount() 計算物件。 FindQuantity() 讀取找到的一個堆疊,FindFullQuantity() 對上次搜尋的單位求和。
  • 該數據屬於該腳本最後一次正常搜尋的數據。 FindType 與 1–5 參數、FindTypeEx、Count/CountEx/CountGround 替換結果。更改此快照不需要高級過濾字元命令。
  • 沒有匹配項的新搜尋將清除 FindItem、FindCount 和 FindFullQuantity,並清除 GetFoundItems。單獨讀取結果不會觸發新的搜尋。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

UO.FindType(0x0EED, -1, "backpack");
var result = UO.FindCount();
UO.Print("FindCount: " + Convert.ToString(result));

1。透過 ID 確定特定堆疊中的數量 - 直接腳本

參數與執行流程:

  • id=0x40001234 是serial 堆疊的範例。將項目的 ID 替換為您的。
  • 一堆50單位將返回50;單一項目 - 1;未知ID - 0。
var amount = UO.FindCount("0x40001234");
UO.Print("Units: " + Convert.ToString(amount));

2。尋找一個項目並讀取其數量 - 腳本函數

參數與執行流程:

  • FindType收到type金幣0x0EED,任意hue=-1,區域backpack並回傳serial。
  • 回傳的serial項傳遞到FindCount。 type 0x0EED 本身無法在這裡傳輸。
return  RunScenario();
 object? RunScenario()
{
    var item = UO.FindType(0x0EED, -1, "backpack");
    if (Truth(item != ""))
    {
        var units = UO.FindCount(item);
        UO.Print(Convert.ToString(units));
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。最後一個目標和保存的名稱中的數量是場景類

參數與執行流程:

  • lasttarget 必須表示一個物件。 AddObject 將此serial 儲存在名稱 selected_stack 下。
  • FindCount 將名稱解析為 ID 並讀取金額。如果選擇了角色目標,則回傳0。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var item = UO.GetSerial("lasttarget");
        if (Truth(UO.Exists(item)))
        {
            UO.AddObject("selected_stack", item);
            UO.Print(Convert.ToString(UO.FindCount("selected_stack")));
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

4。測量黃金搜尋結果 - 直接腳本

參數與執行流程:

  • type=0x0EED – 金;顏色=-1 — 任何hue; backpack - 僅背包的直接內容以此形式FindType。
  • int — 找到的項目/字元數,0 沒有匹配項。一疊 1000 單位算一個物體。這不是單位的總和;而是單位的總和。它需要FindFullQuantity。
var found = UO.FindType(0x0EED, -1, "backpack");
var value = UO.FindCount();
UO.Print(Convert.ToString(value));

5。比較項目和單位 - 腳本函數

參數與執行流程:

  • 所有四個讀取都屬於一次搜索,直到在其間調用另一次搜索。
  • 例如兩疊50:物品=2,第一疊=50,所有單位=100;第一個ID包含一個堆疊的唯一ID。
return  RunScenario();
 object? RunScenario()
{
    var found = UO.FindType(0x0EED, -1, "backpack");
    UO.Print("Items: " + Convert.ToString(UO.FindCount()));
    UO.Print("First stack: " + Convert.ToString(UO.FindQuantity()));
    UO.Print("All units: " + Convert.ToString(UO.FindFullQuantity()));
    UO.Print("First ID: 0x" + Hex(UO.FindItem()));
    return null;
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");

6。儲存結果直到下一次搜尋 - 腳本類

參數與執行流程:

  • 第一個type是金,第二個0x0F7A是一種單獨類型的試劑。新團隊改變了整體鏡頭。
  • 保存的仍然是第一次搜尋的號碼。即使沒有匹配,第二個讀數也適用於試劑。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var found = UO.FindType(0x0EED, -1, "backpack");
        var saved = UO.FindCount();
        found = UO.FindType(0x0F7A, -1, "backpack");
        UO.Print("Saved: " + Convert.ToString(saved));
        UO.Print("Current: " + Convert.ToString(UO.FindCount()));
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindCount() — UO.FindCount()

參數: 沒有參數。

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int FindCount() => bridge.FindCount();

UO.FindCount(id) — UO.FindCount(Any)

參數: id (Any)

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

public int FindCount(InjectionValue id) => bridge.GetQuantity(GetObject(id));

UO.FindDistance

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

C# 簽章

int UO.FindDistance();
void UO.FindDistance(object? value);

讀取或修改預設水平搜尋半徑。

參數

  • value - 可選int。不帶爭論——閱讀;值——設定。值限制在0..255範圍內;負數變為0而非無限制。在新的運行時中:18;恢復的狀態可能包含不同的值。小數被截斷為零;數字字串 double/0x 也是可接受的。使用int來避免隱式轉換。

傳回值

不含參數:int是目前限制(單元格中的距離),找不到ID、物件數量或bool。 0的意思是零極限,不是失敗。有值:void——無值;這不是 true/false 或舊設定。安裝後,讀取FindDistance()以找出儲存的值。

行為

  • 距離:距離客戶端範圍目前參考點的max(abs(dx),abs(dy));對角線的正方形算 1。邊框已開啟。對於0,只有位於相同 X/Y 上的物件才適用。對於移動移動設備,距離會考慮步驟隊列的最終位置。
  • 該設定儲存在目前腳本的執行時間;它的過程使用單一值。獨立的運行時有單獨的設定。讀取和寫入不會觸發搜尋、清除FindItem/FindCount/GetFoundItems、傳送封包、移動角色或載入遠端物件。
  • FindTypeEx 和 FindTypesArrayEx 在地面搜尋時使用這些限制,但不在容器內搜尋。其餘過濾器是type、hue、Ignore 以及是否存在已載入物件。 FindAtCoord 忽略這兩個限制。在擴展命令中,明確距離/maxZ可以覆蓋設定;此類參數中的 -1 表示採用該設置,而不是將設定本身設為 -1。 FindList 在搜尋容器時也會過濾Z;指定的容器例外不適用於它。
  • 在臨時搜尋之前,請儲存該值並將其恢復到Finally。安裝不會自動取消。最後可以正常完成並捕捉腳本錯誤;緊急停止不能用作清潔機制。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.FindDistance();
UO.Print("FindDistance: " + Convert.ToString(result));

1。讀取、設定和範圍限制 - 直接腳本

參數與執行流程:

  • previous 儲存實際設定。 value:=5 設定正常限值; 1000 顯示255 的極限。 Print 將結果作為不帶參數的單獨呼叫讀取。終於恢復以前的樣子了。
var previous = UO.FindDistance();
try
{
    UO.FindDistance(5);
    UO.Print(Convert.ToString(UO.FindDistance()));
    UO.FindDistance(1000);
    UO.Print(Convert.ToString(UO.FindDistance()));
}
finally
{
    UO.FindDistance(previous);
}

2。臨時地面搜尋 - 腳本功能

參數與執行流程:

  • previous 保存呼叫程式碼的設定。 5僅改FindDistance;第二個限制不變。 0x0EED - 金色圖形,-1 - 任何 hue,Container=-1 - 世界,false - 無容器遞歸。 id - 一個serial; != 0 檢查可用性。 FindCount 計算整個物件/堆疊。最後恢復設置,而不是結果列表。
return  RunScenario();
 object? RunScenario()
{
    var previous = UO.FindDistance();
    try
    {
        UO.FindDistance(5);
        var id = UO.FindTypeEx(0x0EED, -1, -1, false);
        if (Truth(id != 0))
        {
            UO.Print(Hex(id) + ":" + Convert.ToString(UO.FindCount()));
        }
        else
        {
            UO.Print("0");
        }
    }
    finally
    {
        UO.FindDistance(previous);
    }

    return null;
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。全功能CountGroundInRange——腳本類

參數與執行流程:

  • CountGroundInRange(graphic,半徑,高度)儲存兩個限制,設定半徑=5和高度=10,找出graphic=0x0EED並回傳FindCount()。堆疊被視為一個物件。完整的函數在Main之後給出。最後,即使透過返回退出,也會恢復這兩個限制;搜尋結果仍然可用。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var count = CountGroundInRange(0x0EED, 5, 10);
        UO.Print(Convert.ToString(count));
        return null;
    }

    dynamic CountGroundInRange(dynamic graphic, dynamic radius, dynamic height)
    {
        var oldDistance = UO.FindDistance();
        var oldVertical = UO.FindVertical();
        try
        {
            UO.FindDistance(radius);
            UO.FindVertical(height);
            UO.FindTypeEx(graphic, -1, -1, false);
            return UO.FindCount();
        }
        finally
        {
            UO.FindDistance(oldDistance);
            UO.FindVertical(oldVertical);
        }
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindDistance() — UO.FindDistance()

參數: 沒有參數。

結果: int / Integer.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "finddistance":

                    if (arguments.Length > 0) { bridge.SetFindDistance(Arg(0)); return InjectionValue.Unit; }

                    return new InjectionValue(bridge.GetFindDistance());

UO.FindDistance(value) — UO.FindDistance(Any)

參數: value (Any)

結果: void / Unit.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "finddistance":

                    if (arguments.Length > 0) { bridge.SetFindDistance(Arg(0)); return InjectionValue.Unit; }

                    return new InjectionValue(bridge.GetFindDistance());

UO.FindFullQuantity

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

C# 簽章

dynamic UO.FindFullQuantity();

讀取上次搜尋快照中的單元總數。

參數

沒有參數。

傳回值

int — 找到的項目的總和 max(1, 數量);找到的每個字元都會加1。 0 沒有匹配項。兩堆50產生100,FindCount產生2。這是搜尋時的快照,而不是不斷更新的數量。

行為

  • 該數據屬於該腳本最後一次正常搜尋的數據。 FindType 與 1–5 參數、FindTypeEx、Count/CountEx/CountGround 替換結果。更改此快照不需要高級過濾字元命令。
  • 沒有匹配項的新搜尋將清除 FindItem、FindCount 和 FindFullQuantity,並清除 GetFoundItems。單獨讀取結果不會觸發新的搜尋。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

UO.FindType(0x0EED, -1, "backpack");
object? result = UO.FindFullQuantity();
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));

1。測量黃金搜尋結果 - 直接腳本

參數與執行流程:

  • type=0x0EED – 金;顏色=-1 — 任何hue; backpack - 僅背包的直接內容以此形式FindType。
  • int — 找到的項目的總和 max(1, 數量);找到的每個字元都會加1。 0 沒有匹配項。兩堆50產生100,FindCount產生2。這是搜尋時的快照,而不是不斷更新的數量。
var found = UO.FindType(0x0EED, -1, "backpack");
var value = UO.FindFullQuantity();
UO.Print(Convert.ToString(value));

2。比較項目和單位 - 腳本函數

參數與執行流程:

  • 所有四個讀取都屬於一次搜索,直到在其間調用另一次搜索。
  • 例如兩疊50:物品=2,第一疊=50,所有單位=100;第一個ID包含一個堆疊的唯一ID。
return  RunScenario();
 object? RunScenario()
{
    var found = UO.FindType(0x0EED, -1, "backpack");
    UO.Print("Items: " + Convert.ToString(UO.FindCount()));
    UO.Print("First stack: " + Convert.ToString(UO.FindQuantity()));
    UO.Print("All units: " + Convert.ToString(UO.FindFullQuantity()));
    UO.Print("First ID: 0x" + Hex(UO.FindItem()));
    return null;
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");

3。儲存結果直到下一次搜尋 - 腳本類

參數與執行流程:

  • 第一個type是金,第二個0x0F7A是一種單獨類型的試劑。新團隊改變了整體鏡頭。
  • 保存的仍然是第一次搜尋的號碼。即使沒有匹配,第二個讀數也適用於試劑。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var found = UO.FindType(0x0EED, -1, "backpack");
        var saved = UO.FindFullQuantity();
        found = UO.FindType(0x0F7A, -1, "backpack");
        UO.Print("Saved: " + Convert.ToString(saved));
        UO.Print("Current: " + Convert.ToString(UO.FindFullQuantity()));
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindFullQuantity() — UO.FindFullQuantity()

參數: 沒有參數。

結果: dynamic / Any.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "findfullquantity": return new InjectionValue(bridge.FindFullQuantity());

UO.FindItem

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

C# 簽章

dynamic UO.FindItem();

讀取上次常規搜尋的第一個結果的serial。

參數

沒有參數。

傳回值

第一個找到的物件的int - serial/ID,如果沒有結果則0。這是數字 serial,而 FindType 傳回十六進位字串或空字串。不返回type。

行為

  • 該數據屬於該腳本最後一次正常搜尋的數據。 FindType 與 1–5 參數、FindTypeEx、Count/CountEx/CountGround 替換結果。更改此快照不需要高級過濾字元命令。
  • 沒有匹配項的新搜尋將清除 FindItem、FindCount 和 FindFullQuantity,並清除 GetFoundItems。單獨讀取結果不會觸發新的搜尋。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

UO.FindType(0x0EED, -1, "backpack");
object? result = UO.FindItem();
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));

1。測量黃金搜尋結果 - 直接腳本

參數與執行流程:

  • type=0x0EED – 金;顏色=-1 — 任何hue; backpack - 僅背包的直接內容以此形式FindType。
  • 第一個找到的物件的int - serial/ID,如果沒有結果則0。這是數字 serial,而 FindType 傳回十六進位字串或空字串。不返回type。
var found = UO.FindType(0x0EED, -1, "backpack");
var value = UO.FindItem();
UO.Print(Convert.ToString(value));

2。比較項目和單位 - 腳本函數

參數與執行流程:

  • 所有四個讀取都屬於一次搜索,直到在其間調用另一次搜索。
  • 例如兩疊50:物品=2,第一疊=50,所有單位=100;第一個ID包含一個堆疊的唯一ID。
return  RunScenario();
 object? RunScenario()
{
    var found = UO.FindType(0x0EED, -1, "backpack");
    UO.Print("Items: " + Convert.ToString(UO.FindCount()));
    UO.Print("First stack: " + Convert.ToString(UO.FindQuantity()));
    UO.Print("All units: " + Convert.ToString(UO.FindFullQuantity()));
    UO.Print("First ID: 0x" + Hex(UO.FindItem()));
    return null;
}

string Hex(object? value) => Convert.ToInt64(value).ToString("X");

3。儲存結果直到下一次搜尋 - 腳本類

參數與執行流程:

  • 第一個type是金,第二個0x0F7A是一種單獨類型的試劑。新團隊改變了整體鏡頭。
  • 保存的仍然是第一次搜尋的號碼。即使沒有匹配,第二個讀數也適用於試劑。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        var found = UO.FindType(0x0EED, -1, "backpack");
        var saved = UO.FindItem();
        found = UO.FindType(0x0F7A, -1, "backpack");
        UO.Print("Saved: " + Convert.ToString(saved));
        UO.Print("Current: " + Convert.ToString(UO.FindItem()));
        return null;
    }
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindItem() — UO.FindItem()

參數: 沒有參數。

結果: dynamic / Any.

呼叫時:

內部實作程式碼,不能作為獨立腳本執行。

case "finditem": return new InjectionValue(bridge.FindItem);

UO.FindList

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

C# 簽章

string UO.FindList(object? list);
string UO.FindList(object? list, object? container);
string UO.FindList(object? list, object? container, object? distance);
string UO.FindList(object? list, object? container, object? distance, object? notoriety);
string UO.FindList(object? list, object? container, object? distance, object? notoriety, object? nearest);
string UO.FindList(object? list, object? container, object? distance, object? notoriety, object? nearest, object? maxZ);
string UO.FindList(object? list, object? container, object? distance, object? notoriety, object? nearest, object? maxZ, object? includeIgnored);

跨多個type/hue搜尋下載的項目或手機。以字串形式傳回第一個 serial 並儲存 FindItem、FindCount 和 GetFoundItems 的整個排序結果。

參數

  • list — 非空集合AddFindList的名稱;或數字 type 的平面數組;或由 |、逗號、分號或空格分隔的型別字串,例如「0x0EED|0x0F7A」。数组/字符串类型使用任何hue。不支援數組內的 [type,hue] 對;對於hue,建立一個命名集。条目的顺序决定了优先级。該項目的圖形/type是bodymobile而不是serial。通常為int0..65535,包括0x0EED; -1或0xFFFF表示搜尋時任意type。為每個條目提供一個值。透過單獨的呼叫添加多種類型。
  • container — 預設 -1:根容器為角色的物品(包括嵌套的袋子和裝備)。 “my”=-1。 ground、「ground」、UO.Ground()、數字0或1選擇世界:地面和行動裝置上的物品,self除外。容器的「backpack」或serial >1 僅搜尋直接內容,不進行遞迴。物件別名解析為serial;錯誤的別名可能會給出0,因此請提前使用GetSerial進行檢查。
  • distance — 非負單元格半徑 max(abs(dx),abs(dy));對角線 - 一個單元格。適用於搜尋ground;容器的直接內容物不受距離限制。預設情況下,如果參數為負,則採用 UO.FindDistance()。 0 - 相同的X/Y。
  • notoriety — 預設 - 1,任何代碼。單一數字、字串「5|6」或平面數字陣列指定允許的手機代碼;使用此過濾器,項目將被排除。代碼:0未知,1無辜,2盟友,3灰色,4罪犯,5敵人,6兇手,7伺服器確定關係的含義無敵伺服器。沒有特定程式碼的空遮罩/any/-1不進行限制。當混合通配符和代碼時,特定代碼仍然是一個限制。有效標記旁邊的非數字標記將被忽略;僅包含錯誤標記的遮罩找不到任何內容。
  • nearest — 預設false。 false/0:先列出條目優先級,然後是較低優先級serial。 true/1:距離優先,然後錄製優先級,然後serial。這是一個命令,而不是額外的過濾器。
  • maxZ — Z 與字元之間可接受的絕對差異(包括邊界值)。預設或負參數是UO.FindVertical(); 0 只允許相同的Z。對於顯式的serial容器>1,取已加載容器的Z(如果沒有,則取Z東西);對於其他模式 - Z 候選。阿甘中某個物體的座標並不是世界的高度。
  • includeIgnored — 預設情況下 false:排除此運行時的 Ignore 中的 serial。 true/1 僅包含在本次搜尋中,不清除 Ignore。

傳回值

string:第一个结果的十六进制-serial(例如“0x40000011”)或空字符串“”(如果没有匹配项)。这是ID,不是type,数量而不是bool:检查结果! =“”,而不是結果==true。對於普通的非空查詢,FindItem儲存相同的ID數字,FindCount() - 不同物件的數量,GetFoundItems() - 其數字serial的陣列。

行為

  • 1 到 7 位置參數;你只能跳過尾巴。若要指定 maxZ,請明確傳遞前面的參數。搜尋是基於本機載入狀態同步的:不開啟容器、不載入內容、不檢查視線/可用性、不攻擊。
  • 每個物件都被包含一次,即使它符合多個規則。它的優先順序是第一個匹配的條目。未知名稱嘗試被解析為類型字串;不可讀的type/hue會導致轉換錯誤。
  • 非空查詢會在選擇前清除之前的FindItem/FindCount/GetFoundItems;沒有匹配項留下空結果。例外:空數組或空字串列表在搜尋之前返回“”並保留先前的結果。在此類呼叫之後,不要將 FindCount 算作新結果。
  • 更改 AddFindList/ClearFindList/DeleteFindList 的定義不會更改已找到的集合。此運行時中的其他搜尋替換了FindItem和整個數組,因此在嵌套搜尋之前保存GetFoundItems。
  • 定义处于给定脚本运行时的状态。獨立的其他運行時有自己的一套;關閉IDE視窗不會清除這些規則。這不是設定檔或全域遊戲物件列表。
  • AddFindList 將條目追加到最後;重複的內容不會被刪除。若要重新配置您的套件,請先呼叫 ClearFindList(“name”)。更改定義不會清除已收到的FindItem/FindCount/GetFoundItems。
  • 此記錄儲存文字欄位。數位文字0x0EED儲存為“3821”,字串“0x0EED”儲存為“0x0EED”。搜尋將兩個選項轉換為數字,DeleteFindList 比較儲存的文字。新增和刪除時使用相同的形式。
  • FindList 中的未知名稱不是空的註冊集:引擎嘗試將其解析為數字類型清單。非數字名稱會導致轉換錯誤。刪除最後一個條目後,在搜尋該名稱之前建立新集。

獨立的 C# 腳本

每個範例都可以儲存為單獨的檔案.csx並在IDE中運行。 UO物件和等待函數提供當前遊戲會話的主機。將演示 serial 名稱、座標和地址替換為您自己的。

簡單範例

將這段程式碼存為獨立的 .csx 檔案執行。參數直接出現在呼叫中;請將範例名稱、serial 和網址替換成自己的值。

將一次呼叫的結果輸出到日誌。數值不會轉換成 bool;若結果是陣列,則顯示元素數量。

var result = UO.FindList(new[] { 0x0EED }, "backpack");
UO.Print("FindList: " + Convert.ToString(result));

1。按優先順序選擇資源並傳輸一個堆疊 - 直接腳本

參數與執行流程:

  • 在false,即使距離更遠,黃金也優先於第二type。半徑2和maxZ=5限制了候選者;他們不保證拿起該東西的權利。
  • 這是一個真實的遊戲動作:僅傳輸找到的第一個物件。結果MoveItem並不表示伺服器已經確認了整個動作。
BuildLoot();
var item = UO.FindList("loot", "ground", 2, -1, false, 5);
if (Truth(item == ""))
{
    return null;
}
var accepted = UO.MoveItem(item, 0, "backpack");
if (Truth(accepted == 0))
{
    UO.Print("Move was not accepted");
}

void BuildLoot()
{
    UO.ClearFindList("loot");
    UO.AddFindList("loot", 0x0EED, -1);
    UO.AddFindList("loot", 0x0F7A, -1);
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

2。保存兩個臭名昭著的最近的mobile - 腳本函數

參數與執行流程:

  • 七個參數:兩個body,世界,半徑12,代碼5或6,最接近的在前,差值Z不大於10,忽略排除。只有選擇和保存;攻擊腳本必須單獨檢查合適的條件。
return  RunScenario();
 object? RunScenario()
{
    var target = UO.FindList("0x0190|0x0191", "ground", 12, "5|6", true, 10, false);
    if (Truth(target != ""))
    {
        UO.AddObject("candidate", target);
        UO.Print("Candidate: " + UO.GetName(target));
    }

    return null;
}

bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;

3。從陣列中計算多種類型的股票 - 腳本類

參數與執行流程:

  • 宣告變數類型[1]會在此引擎中建立索引0和1。兩種類型的單位是相加的,而不是堆疊的數量。 backpack僅限於直接內容;這裡不包括插入式袋子。
return  new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
    private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
    private readonly Func<int, Task> WaitAsync;
    private readonly string[] Args;
    private readonly CancellationToken Cancellation;
    private readonly Action Checkpoint;
    public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
    {
        UO = api;
        WaitAsync = wait;
        Args = args;
        Cancellation = cancellation;
        Checkpoint = checkpoint;
    }

     public object? RunScenario()
    {
        dynamic[] types = new dynamic[checked((int)(1) + 1)];
        types[0] = 0x0EED;
        types[1] = 0x0F7A;
        var first = UO.FindList(types, "backpack");
        var total = 0;
        if (Truth(first != ""))
        {
            var items = UO.GetFoundItems();
            foreach (var item in items)
            {
                total += UO.FindCount(item);
            }
        }

        if (Truth(total < 100))
        {
            UO.Print("Stock below limit: " + Convert.ToString(total));
        }

        return null;
    }

    bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}

命令實作

C# 區分大小寫。請使用正確的 UO 名稱。數值旗標應與 0 比較;只有回傳型別為 bool 時才使用 bool。

UO.FindList(list) — UO.FindList(Any)

參數: list (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container) — UO.FindList(Any,Any)

參數: list (Any), container (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container, distance) — UO.FindList(Any,Any,Any)

參數: list (Any), container (Any), distance (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container, distance, notoriety) — UO.FindList(Any,Any,Any,Any)

參數: list (Any), container (Any), distance (Any), notoriety (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container, distance, notoriety, nearest) — UO.FindList(Any,Any,Any,Any,Any)

參數: list (Any), container (Any), distance (Any), notoriety (Any), nearest (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container, distance, notoriety, nearest, maxZ) — UO.FindList(Any,Any,Any,Any,Any,Any)

參數: list (Any), container (Any), distance (Any), notoriety (Any), nearest (Any), maxZ (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))

UO.FindList(list, container, distance, notoriety, nearest, maxZ, includeIgnored) — UO.FindList(Any,Any,Any,Any,Any,Any,Any)

參數: list (Any), container (Any), distance (Any), notoriety (Any), nearest (Any), maxZ (Any), includeIgnored (Any)

結果: string / String.

呼叫時:

呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。

內部實作程式碼,不能作為獨立腳本執行。

values => new InjectionValue(CompactFindList(values))
⚠️ **GitHub.com Fallback** ⚠️