SCAR Code:{*******************************************************************************
function LoggedIn: Boolean;
By: TRiLeZ & IceFire908
Description: Detects if you're logged in and compensates for white screen lag,
general lag, and false detections.
*******************************************************************************}
function LoggedIn: Boolean;
var
I: Integer;
begin
for I:= 1 to 40 do
begin
Result := (GetColor(567, 135) = 9288161);
if (not Result) then
begin
if (GetColor(745, 93) = 3102893) then
begin
Result := False;
Exit;
end;
Wait(500);
end else
Exit;
end;
end;
This function checks if your loggedin, if a color from ingame isnt on the screen at one point, the function then checks if your on the login screen. If your on the login screen, the result is false, if your not then theirs a white screen or some lag, and will wait 500 ms then do the checks again and again until your ingame or on the login screen.
If your not on either after 20 seconds of this function being called, this function will end and the result will be false.
This function is very usefull. Before I made this, when my comp lag'd or when I brought up the smart screen resulting in a white screen (for ~2 seconds), SCAR would think Im logged out and the script would go to the next player or terminate.
Now my scripts I have runs forever with this function :) That is until a random comes and SRL fails to solve it.
