Skip to content

API UO FindNotoriety

Codex edited this page Sep 19, 2026 · 4 revisions

UO.FindNotoriety

ClassicUO / Basic IDE

Оглавление · Алфавитный указатель · Search

Scans loaded World.Mobiles using the real Mobile.Notoriety field, body/type, distance/Z and Ignore rules. The registered result uses first-match semantics unless nearest ordering is requested.

Синтаксис

UO.FindNotoriety(type:Any, notoriety:Any) -> Any
UO.FindNotoriety(type:Any, notoriety:Any, distance:Any) -> Any
UO.FindNotoriety(type:Any, notoriety:Any, distance:Any, nearest:Any) -> Any
UO.FindNotoriety(type:Any, notoriety:Any, distance:Any, nearest:Any, maxZ:Any) -> Any
UO.FindNotoriety(type:Any, notoriety:Any, distance:Any, nearest:Any, maxZ:Any, color:Any) -> Any
UO.FindNotoriety(type:Any, notoriety:Any, distance:Any, nearest:Any, maxZ:Any, color:Any, container:Any) -> Any

Регистр имени не важен. Any — динамическое значение Basic; Unit — отсутствие возвращаемого значения. Integer — знаковое 32-битное число, Decimal — число с плавающей точкой. Правила типов, serial, индексов и ожиданий.

Параметры

Имя Назначение
type Графика/цвет объекта: десятичное или 0x-число. Маску -1 используйте только в поисковых перегрузках, где она поддерживается.
notoriety Actual ClassicUO Mobile.Notoriety value or supported mask/string form; it is not inferred from hue/name/body.
distance Distance/radius in tiles. Explicit distance overrides the shared FindDistance state for overloads that provide it.
nearest Boolean ordering flag. TRUE selects/orders nearest matches first; FALSE preserves the runtime search order.
maxZ Позиционный аргумент этой перегрузки. Подробности использования указаны в описании/фактической ветви runtime ниже.
color Hue/color filter. -1 commonly means any hue where the overload supports wildcard filtering.
container Container serial or a runtime container sentinel such as backpack/ground, according to the command contract.

Параметры обязательны внутри каждой показанной сигнатуры. Опустить аргумент можно только при наличии более короткой перегрузки; пропуск позиции посередине не подразумевается.

Ограничения

Uses real notoriety values; do not treat hue, body or name as substitutes. 0 means no matching mobile.

Примеры

Каждый блок — самостоятельный скрипт из мануала проекта. Параметры демонстрационного объекта/контейнера и условия действия необходимо сопоставить с вашей игровой ситуацией.

Пример 1

SUB Main()
    VAR result = UO.FindNotoriety(0x0190, 5)
END SUB

Пример 2

SUB Main()
    VAR result = UO.FindNotoriety(0x0190, 5, 18, TRUE, 12, -1, backpack)
END SUB

Пример 3

SUB Main()
    VAR result = UO.FindNotoriety(0x0EED, -1)
    UO.Print(CStr(result))
END SUB

Пример 4

SUB Main()
    VAR arg1 = 0x0EED # type
    VAR arg2 = -1 # notoriety
    VAR arg3 = 5 # distance
    VAR arg4 = 1 # nearest
    VAR arg5 = 5 # maxZ
    VAR arg6 = -1 # color
    VAR arg7 = backpack # container
    VAR result = UO.FindNotoriety(arg1, arg2, arg3, arg4, arg5, arg6, arg7)
    UO.Print(CStr(result))
END SUB

Пример 5

SUB Main()
    VAR result = UO.FindNotoriety(0x0EED, -1, 5)
    UO.Print(CStr(result))
END SUB

Пример 6

SUB Main()
    VAR result = UO.FindNotoriety(0x0EED, -1, 5, 1)
    UO.Print(CStr(result))
END SUB

Пример 7

SUB Main()
    VAR result = UO.FindNotoriety(0x0EED, -1, 5, 1, 5)
    UO.Print(CStr(result))
END SUB

Пример 8

SUB Main()
    VAR result = UO.FindNotoriety(0x0EED, -1, 5, 1, 5, -1)
    UO.Print(CStr(result))
END SUB

Пример 9

SUB Main()
    VAR arg1 = 0x0EED # type
    VAR arg2 = -1 # notoriety
    VAR result = UO.FindNotoriety(arg1, arg2)
    UO.Print(CStr(result))
END SUB

Пример 10

SUB ReadResult()
    VAR arg1 = 0x0EED # type
    VAR arg2 = -1 # notoriety
    VAR result = UO.FindNotoriety(arg1, arg2)
    UO.Print(CStr(result))
END SUB

SUB Main()
    ReadResult()
END SUB
Реализация и проверка контракта
  • InjectionScript.Runtime.InjectionApiUO.<RegisterCompactSearchApi>b__341_0

Соответствующая ветвь совместимого обработчика в InjectionApiUO.cs. Arg(i)/Text(i) читают позицию с нуля; bridge обращается к клиенту. Прямые типизированные перегрузки перечислены выше и могут иметь отдельный маршрут.

return new InjectionValue(bridge.FindNotoriety(Arg(0), Arg(1)));

Источник реестра и отчёт сверки. Примеры проверяются загрузчиком/парсером включённого runtime. Действия на игровом сервере этой проверкой не исполняются.

Clone this wiki locally