Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LocateFishingspots(runs:Int32=4; wt:Int32=90): TPointArray;
- var
- area:TBox = [0,0,515,337];
- j,i,x,y:Int32;
- BMP1,BMP2:TMufasaBitmap;
- begin
- SetColorToleranceSpeed(2);
- SetToleranceSpeed2Modifiers(0.2,0.7);
- SetLength(Result, 512);
- for j:=0 to runs do
- begin
- BMP1 := GetMufasaBitmap( BitmapFromClient(area) );
- Wait(wt);
- BMP2 := GetMufasaBitmap( BitmapFromClient(area) );
- for y:=0 to BMP1.GetHeight()-1 do
- for x:=0 to BMP1.GetWidth()-1 do
- if SimilarColors(BMP1.GetPixel(x,y), 9270889, 25) and
- (BMP1.GetPixel(x,y) <> BMP2.GetPixel(x,y)) then
- begin
- if i = Length(Result) then
- SetLength(Result, i*2);
- Result[i] := Point(x,y);
- Inc(i);
- end;
- BMP1.Free();
- BMP2.Free();
- end;
- SetLength(Result, i);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement