SRL Archive - SRL Archives

[REJECTED] Login.scar - function RSLoading: boolean;


Harry

2008-06-05 17:33:52

Would be nice at the beginning of LoginPlayers :D Instead of a lot of "three minutes have passed" in the debug.

Should be very easy to include into LoginPlayers… it is simple, but gets t3h job done :D

program New;
{.include SRL/SRL.scar}
function RSLoading: boolean; // By Hy71194.
var LoadTime: integer;
begin
Result := False;
if GetColor(400,221) = 16777215 then
begin
WriteLn('RS is Loading - Please wait.');
Result := True;
MarkTime(LoadTime);
repeat
Wait(7000);
Status('RS Loading...');
if TimeFromMark(LoadTime) >= 60000 then
Break;
until (GetColor(400,221) <> 16777215);
WriteLn('RS done Loading...');
Status('RS done Loading...');
Exit;
end;
end;


begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(2000);
if RSLoading then WriteLn('RS Loaded.') else WriteLn('RS loaded already.');
end.

Thanks for reading!!
~ Harry.

Edit: My result when on RS is not loading:

SRL Compiled in 0 msec
RS loaded already.
Successfully executed

Result when loading RS:
SRL Compiled in 16 msec
RS is Loading - Please wait.
RS done Loading…
RS Loaded.
Successfully executed

SKy Scripter

2008-06-05 21:17:46

Hy71194, Uhmm i don't think this is needed.. x)

Re - open if anyone else disagrees.

Thanks anyway Hy.

this could be more of the procedure you should add in your script.