WaitJournalLine
Waits for a specific text to appear in the journal, starting from a given timestamp.
StartTime — timestamp (TDateTime in Pascal, datetime.datetime in Python) from which to start scanning the journal. Only entries after this time are checked.
Str — text to search for. Supports the pipe | separator for multi-string search (matches if any of the substrings is found).
MaxWaitTimeMS — maximum wait time in milliseconds. 0 = wait indefinitely.
Returns True if the text was found within the timeout, False otherwise.
Scans the journal repeatedly in a loop until the text is found or the timeout expires. This searches the game journal (messages from server and other players).
For searching the system journal (Stealth’s own messages), use WaitJournalLineSystem.
Ожидает появления указанного текста в журнале, начиная с заданной метки времени.
StartTime — метка времени (TDateTime в Pascal, datetime.datetime в Python), начиная с которой сканируется журнал. Проверяются только записи после этого времени.
Str — искомый текст. Поддерживает разделитель | для поиска нескольких строк (совпадение, если найдена любая из подстрок).
MaxWaitTimeMS — максимальное время ожидания в миллисекундах. 0 — ждать бесконечно.
Возвращает True, если текст найден в пределах таймаута, False — в противном случае.
Сканирует журнал в цикле до нахождения текста или истечения таймаута. Поиск ведётся в игровом журнале (сообщения от сервера и других игроков).
Для поиска в системном журнале (собственные сообщения Stealth) используйте WaitJournalLineSystem.
function WaitJournalLine(StartTime: TDateTime; Str: String; MaxWaitTimeMS: Integer): Boolean;
def WaitJournalLine(start_time: datetime.datetime, text: str, max_wait_ms: int = 0) -> bool: ...
var
T: TDateTime;
begin
T := Now;
UOSay('bank');
if WaitJournalLine(T, 'bank box', 5000) then
AddToSystemJournal('Bank opened')
else
AddToSystemJournal('No bank response');
// Multi-string search
T := Now;
if WaitJournalLine(T, 'You see|You notice', 3000) then
AddToSystemJournal('Message found');
end.
import datetime
t = datetime.datetime.now()
UOSay('bank')
if WaitJournalLine(t, 'bank box', 5000):
AddToSystemJournal('Bank opened')
else:
AddToSystemJournal('No bank response')
# Multi-string search
t = datetime.datetime.now()
if WaitJournalLine(t, 'You see|You notice', 3000):
AddToSystemJournal('Message found')