First off, continue makes a loop hold (not continue).
SCAR Code:
program New;
var
i: Integer;
begin
for i := 0 to 3 do
begin
if (i = 2) then
Continue;
WriteLn(IntToStr(i));
end;
end.
SCAR Code:
If Length(z) <= 10 then //Why check for z here?
Continue;
You have a double array, which means you have an array of an array. You loop through the first array to find an array that matches your needs. If you keep checking the same array, it wont work
Check the array you are going to use if it's a possible furnace. To find a proper length, let it write it out a few times:
SCAR Code:
Function HandleFurnace:Boolean;
Var
TPA: TPointArray;
Temp: T2DPointArray;
h, x, y, MouseSpeed2, z, t, CTS: Integer;
begin
If not LoggedIn then Exit;
MouseSpeed2 := MouseSpeed;
MouseSpeed := 25;
t := GetSystemTime;
CTS := ColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(x, y, TPA, 2500137, MSX1, MSY1, MSX2, MSY2, 5);
Temp := TPAtoATPAex(TPA, 40, 40);
SortATPASize(Temp, True);
h := High(Temp);
For z := 0 to h do
Begin
WriteLn(IntToStr(Length(Temp[z])));
MiddleTPAex(Temp[z], x, y);
MMouse(x, y, 5, 5);
Result := IsUpText('melt');
If Result then
Begin
WriteLN('Found the furnace in '+IntToStr((GetSystemTime) - t)+' msecs');
Writeln(inttostr(Length(Temp[z])) + ' is the length of the TPA');
break;
end;
Wait(100);
end;
If Result then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;
If Not Result then
WriteLN('Couldn'#39't find a furnace');
MouseSpeed := MouseSpeed2;
ColorToleranceSpeed(CTS);
end;