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 мс.
function CheckLag(timeoutMS: Integer): Boolean;
Parameters:
- timeoutMS — maximum wait time in milliseconds.
def CheckLag(timeout_ms: int = 10000) -> bool: ...
begin
CheckLag(1000);
UseObject(runebook);
CheckLag(1000);
AddToSystemJournal('Server is responsive');
end.
CheckLag(1000)
UseObject(runebook)
CheckLag() # default 10000ms
AddToSystemJournal('Server is responsive')