Whats wrong with?
SCAR Code:
{*******************************************************************************
function ExitToLobby: Boolean;
By: Starblaster100, Raymond, & IceFire908
Description: Exits to the Lobby (for breaks?)
*******************************************************************************}
function ExitToLobby: Boolean;
var
x, y, c, i: Integer;
begin
Result := LobbyScreen;
if Result = True then
Exit;
if (SRL_Procs[srl_OnExitToLobby] <> nil) then
SRL_Procs[srl_OnExitToLobby]();
if (not (GameTab(tab_LogOut))) then
Exit;
Wait(200 + Random(100));
while (LoggedIn) and (c < 10) do
begin
Inc(c);
if(FindText(x, y, 'obb', UpChars, MIX1, MIY1, MIX2, MIY2))then
begin
MouseBox(579, 367, 699, 386, 1);
for i := 0 to 10 do
begin
Wait(1000);
if (LobbyScreen) then
begin
Result := True;
Exit;
end;
end;
end else
if(FindText(x, y, 'lick', UpChars, MIX1, MIY1, MIX2, MIY2))then
begin
MouseBox(579, 367, 699, 386, 1);
for i := 0 to 10 do
begin
Wait(1000);
if not(LoggedIn) then
begin
Result := True;
Exit;
end;
end;
end
end;
end;
{*******************************************************************************
function LeaveLobby: Boolean;
By: IceFire908
Description: Logs you out from lobby screen.
*******************************************************************************}
function LeaveLobby: Boolean;
var
T: LongInt;
begin
T := GetSystemTime;
while ((not (Result)) and ((GetSystemTime - T) < 30000)) do
begin
MouseBox(678, 24, 699, 43, 1);
Wait(RandomRange(1000, 2000));
Result := (not (LobbyScreen));
end;
end;
{*******************************************************************************
function Logout: Boolean;
By: IceFire908
Description: Logs you all the way out from ingame.
*******************************************************************************}
function Logout: Boolean;
begin
if (SRL_Procs[srl_OnLogOut] <> nil) then
SRL_Procs[srl_OnLogOut]();
if (ExitToLobby) then
Result := LeaveLobby;
end;