Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Connect

Connects the current character to the UO server using the settings from the active profile.

If the character is already connected, the method does nothing.

After calling Connect, it is recommended to wait several seconds for the connection to complete before performing other actions.

Подключает текущего персонажа к серверу UO, используя настройки из активного профиля.

Если персонаж уже подключён, метод ничего не делает.

После вызова Connect рекомендуется подождать несколько секунд для завершения подключения, прежде чем выполнять другие действия.

Pascal

procedure Connect;

Python

def Connect() -> None: ...

Pascal Example

begin
  if not Connected then
  begin
    Connect;
    Wait(10000);
    if Connected then
      AddToSystemJournal('Successfully connected')
    else
      AddToSystemJournal('Connection failed');
  end;
end.

Python Example

if not Connected():
    Connect()
    Wait(10000)
    if Connected():
        AddToSystemJournal('Successfully connected')
    else:
        AddToSystemJournal('Connection failed')

See Also

Connected, Disconnect