Wire
2014-07-14 12:06:42
Why doesn't this actually move the mouse to the Rough Wall. I'm following a tutorial on TPAs/CTS2 but don't quite understand it fully yet. I understand the beginning of the script is simply changing the color tolerance speed from normal to custom then back to normal. This is then saved to tmpCTS, but then what happens after this exactly? When trying to run the script, i do receive they found the wall but no action is taken. I tried changing MMouse to Mouse for the button variant but to no avail. Any help would be greatly appreciated, Wire.
procedure AlRoughWall;
var
tmpCTS, i, l, r, counter:integer;
RWallTPA:TPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.24, 0.14);
FindColorsTolerance(RWallTPA, 2243404, MSX1, MSY1, MSX2, MSY2, 1);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
l := High(RWallTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
MMouse(RWallTPA[r].x, RWallTPA[r].y, 2, 2);
if waituptextmulti(['lim', 'oug', 'al'], randomrange(200, 300)) then
ClickMouse2(True);
Break;
if timefrommark(counter) > 3000 then
begin
writeln('We failed to find the Wall!');
Terminatescript;
end;
end;
writeln('We found the Wall');
clickmouse2(mouse_right);
end;