NCDS
2010-10-11 20:05:17
Just needed to update the colors and Length() checks in FixLock. Once I did that it worked great.
Updated FixLock:
Has only been tested once (successfully), but I don't see what it could break..
Updated FixLock:
function arnav_FixLock: Boolean;
var
t, Target, r, c: Integer;
tpa: TPointArray;
b: TBox;
Col: array[0..2] of Boolean;
begin
ColorToleranceSpeed(2);
Result := False;
if (not arnav_LockScreen) then
Exit;
t := GetSystemTime;
FindColorsTolerance(tpa, 0, 7, 150, 80, 185, 1);
WriteLn(inttostr(Length(tpa)));
case Length(tpa) of
116: Target := 0;//'ring';
84: Target := 1;//'bar';
108: Target := 2;//'bowl';
102: Target := 3;//'coins'; 4.
else
begin
WriteLn('Could not get Arnav target!');
Exit;
end;
end;
while (not Result) and ((GetSystemTime - t) < 30000) and arnav_LockScreen do
begin
for c := 0 to 2 do
begin
if Col[c] then
Continue;
for r := 0 to 2 do
begin
b := IntToBox(91 + (88 * c), 45 + (88 * r), 166 + (88 * c), 112 + (88 * r));
SetColorSpeed2Modifiers(0.02, 0.22);
FindColorsTolerance(tpa, 803162, b.x1, b.y1, b.x2, b.y2, 20);
if (Length(tpa) > 400) then
begin
arnav_ClickArrow(c, Target - r);
Col[c] := True;
Break;
end;
SetColorSpeed2Modifiers(0.02, 0.05);
FindColorsTolerance(tpa, 2281971, b.x1, b.y1, b.x2, b.y2, 20);
if (Length(tpa) > 400) then
begin
arnav_ClickArrow(c, Target - r - 1);
Col[c] := True;
Break;
end;
end;
end;
Result := Col[0] and Col[1] and Col[2];
Wait(60);
end;
end;
Has only been tested once (successfully), but I don't see what it could break..