Element17
04-06-2012, 09:02 PM
Function FindYew: Integer; //Credit to Kyle for the TUT
Var
a :Integer;
TPA: TPointArray;
ATPA : T2DPointArray;
MP :TPoint;
tmpCTS :Integer;
Box :TBox;
Begin
If(Not(LoggedIn))Then Exit;
tmpCTS :=GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.12, 0.12)
FindColorsSpiralTolerance(MSCX, MSCY, TPA, VeYew, MSX1, MSY1, MSX2, MSY2, 5);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
For a := 0 To High(ATPA) Do
Begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART}
SMART_DrawBoxEx(True, Box, clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
If(WaitUptext('Tree', 750))Then
Begin
X := MP.X; Y := MP.Y;
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;
This part :
Result := True;
does it matter than im not using smart right now as im just testing it
Var
a :Integer;
TPA: TPointArray;
ATPA : T2DPointArray;
MP :TPoint;
tmpCTS :Integer;
Box :TBox;
Begin
If(Not(LoggedIn))Then Exit;
tmpCTS :=GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.12, 0.12)
FindColorsSpiralTolerance(MSCX, MSCY, TPA, VeYew, MSX1, MSY1, MSX2, MSY2, 5);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
For a := 0 To High(ATPA) Do
Begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART}
SMART_DrawBoxEx(True, Box, clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
If(WaitUptext('Tree', 750))Then
Begin
X := MP.X; Y := MP.Y;
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;
This part :
Result := True;
does it matter than im not using smart right now as im just testing it