SRL Archive - SRL Bugs

didred click


Scaper

2012-02-14 16:45:59

is that stuffed up again? doesnt seem to reconise no longer if it did or didnt

Kyle Undefined

2012-02-14 17:23:43

Try this, I updated both the orange and red colors and got the colors from several browsers and client refreshes, it's working for me :)


function DidClick(Red: Boolean; Time: integer): boolean;
var
TimeOut, x, y, w, h, R, O: integer;
B: TBox;
begin
GetMousePos(x, y);
GetClientDimensions(w, h);
B := IntToBox(x - 20, y - 20, x + 20, y + 20);
if B.x1 < 0 then B.x1 := 0;
if B.y1 < 0 then B.y1 := 0;
if B.x2 > w then B.x2 := w;
if B.y2 > h then B.y2 := h;
TimeOut := GetSystemTime + Time;
while (GetSystemTime < TimeOut) do
begin
R := CountColorTolerance(10915, B.x1, B.y1, B.x2, B.y2, 2);//Red (Orange = 4 to 8)
O := CountColorTolerance(1623784, B.x1, B.y1, B.x2, B.y2, 2);//Orange/Yellow (max red = 52)
if Red then
begin
Result := (R > 32) and (O < 5);
if (O > 8) then
Exit;
end else
begin
Result := (O > 8);
if (R > 52) then
Exit;
end;
if Result then
Exit;
end;
end;

Coh3n

2012-02-14 18:32:59

This is fixed in the most recent version.