can someone give this a try?
{$i srl/srl.scar}
function ChooseOptionText(x1, y1, x2, y2: Integer; var rx1, ry1, rx2, ry2, rx3, ry3: Integer; Text:TStringArray; TextType: string): Boolean;
var
cx1, cy1, cx2, cy2, px, py, i: Integer;
Colors: TIntegerArray;
There: Boolean;
begin
Colors := [13034990, 4231423, 2070783, 65535, 16776960, 9812166, 16777215];
cx1:= x1;
cy1:= y1;
cx2:= x2;
cy2:= y2;
for i:=0 to High(Text) do
begin
case TextType of
'action', 'player': There := FindTextTPAEx(Colors[0], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[5], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[6], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing);
'item' : There := FindTextTPAEx(Colors[1], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[2], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing);
'npc' : There := FindTextTPAEx(Colors[3], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing);
'object': There := FindTextTPAEx(Colors[4], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing);
else
There := FindTextTPAEx(Colors[0], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[1], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[2], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[3], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[4], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[5], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing) or
FindTextTPAEx(Colors[6], 3, cx1, cy1, cx2, cy2, px, py, Text[i], 'UpChars', Nothing);
end;
if (not(There)) then Break;
cy1:= py-3;
cy2:= py+20;
end;
rx1:= cx1;
ry1:= cy1;
rx2:= cx2;
ry2:= cy2;
rx3:= px;
ry3:= py;
Result:= There;
end;
function Option(First, Second: TStringArray; TextType: string): Boolean;
var
Arrow, ChooseOptionBMP, x, y, cx1, cx2, cy1, cy2, x1, y1, x2, y2, x3: Integer;
There: Boolean;
begin
cx1:= 0;
cy1:= 0;
cx2:= 764;
cy2:= 502;
ChooseOptionBMP := BitmapFromString(14, 10, 'meJxjYGCYuuMYHDHAABoXTQQXG5' +
'cIrVUiu58YM7F6meoqCbIJhjyEDQCSWn6I');
if FindBitmapin(ChooseOptionBMP, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
There:= ChooseOptionText(0, 0, 764, 502, cx1, cy1, cx2, cy2, x1, y1, First, TextType);
if There then
begin
MMouse(x1, y1, 0, 0);
arrow:= BitmapFromString(6, 7, 'meJz7/x8KZNS14eg/uYIkcYEIAPCp' +
'R8g=');
if (not(FindBitmap(arrow, x, y))) then
begin
There:= ChooseOptionText(cx1, cy1, cx2, cy2, cx1, cy1, cx2, cy2, x1, y1, Second, TextType);
end else
begin
Wait(500+Random(500));
FindColor(x2, y2, 1647656, x1, cy1, cx2, cy2);
x3:= x1;
There:= ChooseOptionText(x2, 0, 764, 502, cx1, cy1, cx2, cy2, x1, y1, Second, TextType);
if (not(There)) then
begin
FindColor(x2, y2, 1647656, 0, cy1, x3, cy2);
There:= ChooseOptionText(0, 0, x2, 502, cx1, cy1, cx2, cy2, x1, y1, Second, TextType);
end;
end;
FreeBitmap(Arrow);
end;
end;
Mouse(x1, y1, 0, 0, True);
FreeBitmap(ChooseOptionBMP);
Result:= There;
end;
begin
setupsrl;
wait(5000);
Option(['Ivy'], ['hop'], 'all');
end.
it works well for me :)
~shut