From: Heysus
It really should have a failsafe in my opinion. Maybe something like this:
function LoggedIn: Boolean;
var
cx, cy, i: Integer;
begin
for i:=0 to 2 do
begin
Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
if Result then
exit;
Wait(250);
end;
end;
That and it's the same color as WHITE which is extremely common to be picked up falsely by lag or by SMART's annoying white screen… I think the color should be changed to the red part of the report button and have that wait in there…. this is causing mass havoc in certain scenarios.
I made this
{*******************************************************************************
function LoggedIn: Boolean;
By: IceFire908.
Description: Detects if you're logged in and compensates for white screen lag,
general lag, and false detections.
*******************************************************************************}
function LoggedIn: Boolean;
var
P: TPoint;
I: Byte;
begin
for I := 1 to 10 do
begin
Result := FindColor(P.X, P.Y, 2302834, 404, 481, 514, 502);
if (not (Result)) then
Result := FindColor(P.X, P.Y, 3816406, 404, 481, 514, 502);
if (Result) then
Exit;
Wait(200);
end;
end;