Coh3n
2010-04-28 11:12:59
They added and "Exit to logout" button in the logout tab. I've tested this and it works.
[PHP]
function Logout: Boolean;
var
x, y, t: Integer;
begin
if (SRL_Procs[srl_OnLogOut] <> nil) then
SRL_Procs[srl_OnLogOut]();
if (not GameTab(tab_Logout)) then
Exit
else
if (FindText(x, y, 'ogin', UpChars, MIX1, MIY1, MIX2, MIY2)) then
begin
MouseBox(606, 416, 675, 421, 1);
t := GetSystemTime + 10000;
while (GetSystemTime < t) do
begin
Wait(RandomRange(50, 100));
if (not LoggedIn) then
begin
Result := True;
Exit;
end;
end;
end;
end;
[/PHP]
I was also thinking about adding a wait for the logout text. Not sure if there's a WaitText function or not. Also wasn't sure if it is really needed seeing as it's never been there before.
Coh3n
[PHP]
function Logout: Boolean;
var
x, y, t: Integer;
begin
if (SRL_Procs[srl_OnLogOut] <> nil) then
SRL_Procs[srl_OnLogOut]();
if (not GameTab(tab_Logout)) then
Exit
else
if (FindText(x, y, 'ogin', UpChars, MIX1, MIY1, MIX2, MIY2)) then
begin
MouseBox(606, 416, 675, 421, 1);
t := GetSystemTime + 10000;
while (GetSystemTime < t) do
begin
Wait(RandomRange(50, 100));
if (not LoggedIn) then
begin
Result := True;
Exit;
end;
end;
end;
end;
[/PHP]
I was also thinking about adding a wait for the logout text. Not sure if there's a WaitText function or not. Also wasn't sure if it is really needed seeing as it's never been there before.
Coh3n