Simba Code:
procedure VRoughWall;
var
RWallTPA, BWallTPA:TPointArray;
RWallATPA:T2DPointArray;
RWallBox:TBox;
tmpCTs, i, l, r, counter:Integer;
begin
tmpCTS := GetToleranceSpeed;
MakeCompass(315)
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.48, 0.43);
FindColorsTolerance(RWallTPA, 2111560, MSX1, MSY1, MSX2, MSY2, 1)
L := High(RWallTPA) //Counts how many TP's are found
marktime(counter);
for i := 0 to L do
begin
wait(randomrange(60, 200));
WriteLn('FoundColorWALL');
RWallATPA := SplitTPAEx(RWallTPA, 5, 5); //Makes Arrays of TPAs
SortATPASize(RWallATPA, True); //Sorts the ATPAs by size
for i := 0 to high(RWallATPA) do
begin
WriteLn('TPA');
RWallBox := GetTPABounds(RWallATPA[i]); //Searches within a TPA from sorted ATPAs
SetColorSpeed2Modifiers(0.00, 0.23);
if findcolorstolerance(BWallTPA, 4672588, RWallBox.x1, RWallBox.y1, RWallBox.x2, RWallBox.y2, 5) then //Looks for color inside ATPAs
begin
r := random(length(BWallTPA));
writeln('trying to click');
mmouse(BWallTPA[r].x, BWallTPA[r].y, 5, 7); //changed from i to r
if WaitUpTextMulti(['Climb', 'lim', 'oug', 'Rough', 'all'], randomrange(200, 300)) then
begin
mouse(BWallTPA[r].x, BWallTPA[r].y, 2, 2, true);
WriteLn('Found Rough Wall');
end;
end;
end;
end;
SetColorToleranceSpeed(tmpCTS); //Returns base CTS
SetToleranceSpeed2Modifiers(0.02, 0.02); //Orginal CTS Mods
end;