Footy
2012-07-20 12:21:24
Can someone quickly help me? I need to know how many ms are inbetween clicking on the make all Green D'hide bodies button, and whtn the inv is done crafting. I'd do it myself, but I dont have the req'd crafting level.
2012-07-20 12:21:24
2012-07-20 12:42:55
function WaitPixelShift(Time, Min, Tol: Integer; Box: TBox): Integer;
var
Color: array[0..1] of TIntegerArray;
hColor, Res, t, i: Integer;
begin
Result := 0;
Color[0] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
hColor := High(Color[0]);
MarkTime(t);
while (TimeFromMark(t) < Time) do
begin
Wait(100);
Color[1] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
Res := 0;
for i := 0 to hColor do
begin
if SimilarColors(Color[0][i], Color[1][i], Tol) then
Continue;
Inc(Res);
end;
if (Res > Min) then
begin
Result := Res;
Exit;
end;
end;
end;
function WaitPixelShiftEx(var Pixels: TIntegerArray; Time, Min, Tol: Integer; Box: TBox): Integer;
var
Color: array[0..1] of TIntegerArray;
hColor, Res, t, i: Integer;
begin
Result := 0;
if (Length(Pixels) = 0) then
begin
Color[0] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
Pixels := Color[0];
end else
Color[0] := Pixels;
hColor := High(Color[0]);
MarkTime(t);
while (TimeFromMark(t) < Time) do
begin
Wait(100);
Color[1] := GetColorsBox(Box.x1, Box.y1, Box.x2, Box.y2, False);
Res := 0;
for i := 0 to hColor do
begin
if SimilarColors(Color[0][i], Color[1][i], Tol) then
Continue;
Inc(Res);
end;
if (Res > Min) then
begin
Result := Res;
Exit;
end;
end;
end;
CraftAll;
if (WaitPixelShift(10 * 1000, 20, 1, InvBox(2)) <> 0) then
begin
while (WaitPixelShiftEx(Pixels, 1000, 20, 1, InvBox(28) = 0) do
begin
Wait(Random(500));
//Antiban;
//Whatever;
end;
Wait(500+Random(1000));
end else
//Failsafe;
2012-07-20 13:54:51