function ClickOption(Text: string): Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches: TPointArray;
Search2D: T2DPointArray;
b: TBox;
Height, i, t: Integer;
begin
Result := False;
FindColors(bTxt, 0, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA(Text, NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 2, y2 - 2), 0, 0, True);
t := GetSystemTime;
while ( PleaseWait ) and ( GetSystemTime - t < 3500 ) do
Wait(10 + Random(10));
Break;
end;
end;
end;