Okay, thanks, but I have no clue how to fix this, so it will work. Here is the entire Function/Script:
program New;
{.include SRL/SRL.scar}
var
x,y: Integer;
Function PurposeMistake: Boolean;
Begin
Case random(6) Of
0: Begin
ChooseOption('hop');
Result := True;
End;
1: Begin
ChooseOption('hop');
Result := True;
End;
2: Begin
Chooseoption('xamin');
Result := False;
End;
3: Begin
PickUpMouse;
Result := False;
End;
4: Begin
SleepAndMoveMouse(2000 +random(335) -random(136) +random(500));
Result := False;
End;
5: Begin
ChooseOption('hop');
Result := True;
End;
End;
End;
Function ChopSturTree(Tree: String): Boolean;
Var
i, R, Count, MCX, MCY, SCX, SCY, URX, URY, ULX, ULY, LRX, LRY, LLX, LLY : Integer;
NormalTreeAr, OakTreeAr, WillowTreeAr, YewTreeAr: Array [0..4] Of Integer;
MMTreeColor: Array [0..2] Of Integer;
UpperLeft, LowerLeft, UpperRight, LowerRight: Boolean;
Begin
NormalTreeAr[0] := 2838857;
NormalTreeAr[1] := 397069;
NormalTreeAr[2] := 1977900;
NormalTreeAr[3] := 1260599;
NormalTreeAr[4] := 7708;
OakTreeAr[0] := 1588532;
OakTreeAr[1] := 2901831;
OakTreeAr[2] := 3177324;
OakTreeAr[3] := 417617;
OakTreeAr[4] := 3309167;
WillowTreeAr[0] := 2332287;
WillowTreeAr[1] := 3232844;
WillowTreeAr[2] := 5863298;
WillowTreeAr[3] := 2461562;
WillowTreeAr[4] := 1648941;
YewTreeAr[0] := 4421265;
YewTreeAr[1] := 1923152;
YewTreeAr[2] := 3107424;
YewTreeAr[3] := 531484;
YewTreeAr[4] := 3034181;
MMTreeColor[0] := 14616;
MMTreeColor[1] := 351535;
MMTreeColor[2] := 146258;
Begin
MCX := 627;
MCY := 85;
SCX := 260;
SCY := 220;
R := 15;
URX := 516;
URY := 3;
ULX := 3;
ULY := 3;
LRX := 516;
LRY := 338;
LLX := 3;
LLY := 338;
Begin
Repeat
x := 627;
y := 85;
If FindColorSpiralTolerance(x, y, MMTreeColor[i], MMX1, MMY1, MMX2, MMY2, 5) Then
Begin
For i := 0 To 3 Do
Begin
Case I Of
0: If (x > MCX) And (Y < MCY) Then
Begin
UpperRight := True;
Mouse(x - 4, y + 4, 0, 0, true)
End;
1: If (x > MCX) And (y > MCY) Then
Begin
LowerRight := True;
Mouse(x - 4, y - 4, 0, 0, true)
End;
2: If (x < MCX) And (y < MCY) Then
Begin
UpperLeft := True;
Mouse(x + 4, y + 4, 0, 0, true);
End;
3: If (x < MCX) And (y > MCY) Then
Begin
LowerLeft := True;
Mouse(x + 4, y - 4, 0, 0, true);
End;
End;
End;
wait(102 +random(30));
FFlag(0);
Begin
For i := 0 To 3 Do
Begin
Case i Of
0: If (UpperRight = True) Then
Begin
If (Tree = 'Normal') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, NormalTreeAr[i], SCX, SCY, URX, URY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Oak') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, OakTreeAr[i], SCX, SCY, URX, URY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Willow') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, WillowTreeAr[i], SCX, SCY, URX, URY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Yew') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, YewTreeAr[i], SCX, SCY, URX, URY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
End;
1: If (LowerRight = True) Then
Begin
If (Tree = 'Normal') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, NormalTreeAr[i], SCX, SCY, LRX, LRY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Oak') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, OakTreeAr[i], SCX, SCY, LRX, LRY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Willow') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, WillowTreeAr[i], SCX, SCY, LRX, LRY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Yew') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, YewTreeAr[i], SCX, SCY, LRX, LRY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
End;
2: If (UpperLeft = True) Then
Begin
If (Tree = 'Normal') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, NormalTreeAr[i], SCX, SCY, ULX, ULY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Oak') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, OakTreeAr[i], SCX, SCY, ULX, ULY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Willow') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, WillowTreeAr[i], SCX, SCY, ULX, ULY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Yew') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, YewTreeAr[i], SCX, SCY, ULX, ULY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
End;
3: If (LowerLeft = True) Then
Begin
If (Tree = 'Normal') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, NormalTreeAr[i], SCX, SCY, LLX, LLY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Oak') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, OakTreeAr[i], SCX, SCY, LLX, LLY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Willow') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, WillowTreeAr[i], SCX, SCY, LLX, LLY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
If (Tree = 'Yew') Then
Begin
x := SCX;
y := SCY;
If FindColorSpiralTolerance(x, y, YewTreeAr[i], SCX, SCY, LLX, LLY, 5) Then
Begin
Mouse(x -random(2), y +random(2), 0, 0, False);
Wait(104 +random(24) -random(31));
Repeat
PurposeMistake;
Until (PurposeMistake = True);
Wait(104 +random(24) -random(31));
FFlag(0);
End;
End;
End;
End;
End;
End;
End;
Until (Result = True);
End;
End
End;
Begin
MouseSpeed := 12;
Wait(3000);
If ChopSturTree('Normal') Then
Begin
Writeln('Success');
End Else
Writeln('No Success');
End.
How do I need to change this so it will work? (if you have questions on what it should do, you can check out my thread, it is somewhere in the srl scripting section)