-
Notifications
You must be signed in to change notification settings - Fork 0
API UO ChangeProfile
ClassicUO / Basic IDE
Оглавление · Алфавитный указатель · Profiles & Configuration
Switches the disconnected Basic/ClassicUO profile selection to another existing character profile on the current server. Character metadata saved with the profile is used to configure the next login/reconnect. The current profile is saved and unloaded before the new selection is accepted.
Profiles are stored under the connected server display name:
Data/Profiles/<server name>/<0xSerial>/
UO.ChangeProfile(Name:Any) -> Any
Регистр имени не важен. Any — динамическое значение Basic; Unit — отсутствие возвращаемого значения. Integer — знаковое 32-битное число, Decimal — число с плавающей точкой. Правила типов, serial, индексов и ожиданий.
| Имя | Назначение |
|---|---|
Name |
Значение для данной позиции; назначение и поддерживаемые варианты показаны в описании и примерах. |
Параметры обязательны внутри каждой показанной сигнатуры. Опустить аргумент можно только при наличии более короткой перегрузки; пропуск позиции посередине не подразумевается.
Name — Quoted BASIC string. Fixed keywords/enums, when present, are listed in Behavior/Notes.
The client must be disconnected; an in-game or connecting client returns -2.
- Only one Basic script may be active; otherwise
-3is returned. -
Nameis case-sensitive at the API level and must resolve to an existing canonical character profile; missing profiles return-4. - The command selects the profile/reconnect target; it does not itself force an immediate network connection. Use
UO.Connect()when appropriate.
Каждый блок — самостоятельный скрипт из мануала проекта. Параметры демонстрационного объекта/контейнера и условия действия необходимо сопоставить с вашей игровой ситуацией.
SUB Main()
VAR rc = UO.ChangeProfile('0x12345678')
IF rc = 0 THEN
UO.Connect()
END IF
END SUBSUB Main()
VAR result = UO.ChangeProfile('example')
UO.Print(CStr(result))
END SUBSUB Main()
VAR arg1 = 'example' # Name
VAR result = UO.ChangeProfile(arg1)
UO.Print(CStr(result))
END SUBSUB ReadResult()
VAR arg1 = 'example' # Name
VAR result = UO.ChangeProfile(arg1)
UO.Print(CStr(result))
END SUB
SUB Main()
ReadResult()
END SUBРеализация и проверка контракта
InjectionScript.Runtime.InjectionApiUO+<>c__DisplayClass38_0.<RegisterStealthCompatibility>b__0
Соответствующая ветвь совместимого обработчика в InjectionApiUO.cs. Arg(i)/Text(i) читают позицию с нуля; bridge обращается к клиенту. Прямые типизированные перегрузки перечислены выше и могут иметь отдельный маршрут.
return new InjectionValue(bridge.ChangeProfileSelection(Text(0), string.Empty, string.Empty));Источник реестра и отчёт сверки. Примеры проверяются загрузчиком/парсером включённого runtime. Действия на игровом сервере этой проверкой не исполняются.
ClassicUO - Bad Newbie & Basic IDE Edition