I highly advise that you use the Project2006 Inlcude which can be found here:http://villavu.com/forum/showthread.php?t=95916
And to make this repeat, you could do something like:
Simba Code:
Function ClickTree: Boolean;
Var
tmpCTS,i, L,Counter: Integer;
ObjTPA: TPointArray;
ObjATPA: T2DPointArray;
X,Y,DMCount,Moves: Integer;
Begin
Moves:=0;
DMCount:=0;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.02, 0.89);
FindColorsTolerance(ObjTPA, 13946995, MSX1, MSY1, MSX2, MSY2, 5);
SplitTPAWrap(ObjTPA, 10, ObjATPA);
SortATPASize(ObjATPA,True);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
DMCount:=RandomRange(3,5);
L := High(ObjATPA)
MarkTime(Counter);
For i := 0 To L Do
Begin
MiddleTPAEx(ObjATPA[i], X, Y);
Repeat Begin
Moves:=Moves+1;
mmouse(x, y, 1, 1);
Wait(RandomRange(140, 200));
If (P06_IsUpTextMultiCustom(['Flax','ick', 'Pick'])) Then
Begin
clickmouse2(mouse_Left);
Wait(700);
while (IsMoving) do
wait(100);
Exit;
End;
End; Until (Moves > DMCount)
If (TimeFromMark(Counter) > 5000) Then
Begin
Break;
End;
End;
Result:=False;
End;
Procedure CheckStuff;
Begin
If (P06_InvFull) Then
Begin
BankFlax;
End;
End;
Begin
CheckStuff;
End.