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

CheckLag

Sends a ping request to the UO server and waits for a response within the specified timeout.

Returns True if the server responded within timeoutMS milliseconds, False if the timeout expired (lag or connection issue).

Commonly used to ensure the server has processed previous actions before sending new ones.

In Python, the default timeout is 10000 ms if not specified.

Отправляет пинг-запрос серверу UO и ждёт ответа в течение указанного таймаута.

Возвращает True, если сервер ответил в пределах timeoutMS миллисекунд, False, если таймаут истёк (лаг или проблема соединения).

Часто используется для проверки того, что сервер обработал предыдущие действия, перед отправкой новых.

В Python таймаут по умолчанию — 10000 мс.

Pascal

function CheckLag(timeoutMS: Integer): Boolean;

Parameters:

  • timeoutMS — maximum wait time in milliseconds.

Python

def CheckLag(timeout_ms: int = 10000) -> bool: ...

Pascal Example

begin
  CheckLag(1000);
  UseObject(runebook);
  CheckLag(1000);
  AddToSystemJournal('Server is responsive');
end.

Python Example

CheckLag(1000)
UseObject(runebook)
CheckLag()  # default 10000ms
AddToSystemJournal('Server is responsive')

See Also

Connected, Wait