omgnomorenames
07-30-2012, 05:47 PM
It's good, but can you make it better?
program new;
var Color,x,y:Integer;
Text:String;
{$i SRL\SRL.simba}
//515, 387
function FindColorisTextUp (Color,x,y:Integer;Text:String): Boolean;
var LocationX,LocationY :Integer;
begin
For LocationX:= 0 to 102 do
begin
For LocationY:= 0 to 42 do
begin
if (FindColorTolerance(x,y,Color,0+(5*LocationX),0+(9 *LocationY),5+(5*LocationX),9+(9*LocationY),10)) then
begin
MMouse (x,y,0,0);
wait (100);
if (isUpText (Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
end;
begin
setupSRL;
Color := 7434612;
Text := 'ank booth';
if (FindColorisTextUp(Color,x,y,Text)) then begin
writeln ('Success');
end;
end.
program new;
var Color,x,y:Integer;
Text:String;
{$i SRL\SRL.simba}
//515, 387
function FindColorisTextUp (Color,x,y:Integer;Text:String): Boolean;
var LocationX,LocationY :Integer;
begin
For LocationX:= 0 to 102 do
begin
For LocationY:= 0 to 42 do
begin
if (FindColorTolerance(x,y,Color,0+(5*LocationX),0+(9 *LocationY),5+(5*LocationX),9+(9*LocationY),10)) then
begin
MMouse (x,y,0,0);
wait (100);
if (isUpText (Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
end;
begin
setupSRL;
Color := 7434612;
Text := 'ank booth';
if (FindColorisTextUp(Color,x,y,Text)) then begin
writeln ('Success');
end;
end.