hackncrack1
2010-05-21 15:29:51
this checks if im fishing (after clicking fishing spot)
Function CheckIfFishing : Boolean;
Var
Box : TBox;
TPA : TPointArray;
Time, L, X, Y : Integer;
Begin
Result := False;
X := 42 + MSCX;
Y := MSCY;
Box := IntToBox(x - 20, y - 20, x + 20, y + 20);
MarkTime(Time);
Repeat
FindColorsTolerance(TPA, 595487, Box.x1, Box.y1, Box.x2, Box.y2, 20);
L := GetArrayLength(TPA);
Until (TimeFromMark(Time) > 2000);
If InRange(L, 10, 60) Then
Begin
Result := True;
Exit;
End;
End;any constructive criticism is appreciated/feedback :)