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

FoundedParamId

Returns index of matched param in multi-strings line in WaitJournalLine, InJournal and similar methods.

For example, search line is “create|make|destroy|already”. Found in journal string with word “destroy”. FoundedParamId will returns 2.

If no strings found, or char disconnected - returns 0.

Pascal

function FoundedParamID : Integer;

Python

def FoundedParamID(): -> int

Example Pascal

	if( ( InJournalBetweenTimes( 'You find|You can''t do much in your current state|You can see nothing hidden there|You are preoccupied|You must wait to perform', timeStamp, Now() ) <> -1 ) and ( LineTextColor() = $03B2 ) and ( LineID() = $FFFFFFFF ) ) then 
	begin
		matchIndex := FoundedParamID();
		matchString := Journal( LineIndex() );
		
		if( matchIndex = 0 ) then result := true;
		
		AddToSystemJournal( 'DetectHidden [ status:FINISHED, reason:''Found a match in the Journal'', text:''' + matchString + ''' ]'  );
		exit;
	end;

Example Python

    WaitJournalLine(datetime.now()-timedelta(milliseconds=1), 'Polymorph|наложено|lack', 1000)
    found = FoundedParamID()
    if found == 1:
      castTargetAndWait('Dispel')