SRL Archive - SRL Archives

login.scar


Gu3st...

2009-05-21 10:14:03

The current login.scar has some big problems, and I think LoginPlayer; needs revision; there is almost NO failsafes
I had to redo the whole procedure (almost) to make it log me in…

A new function that can be just as useful as LoggedIn:
function HandleWelcomeScreen : Boolean;
var
Mark : Integer;
begin
if (GetColor(207, 409) = 238301) then //At Welcome Screen
begin
Wait(500 + Random(1000));
MouseBox(249, 419, 521, 445, 1);
Result := True;
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
end;
I use this in the LoginPlayer procedure like this:
    //Click 'Log In' on main menu
while (GetColor(343, 175) <> 7750) do //while (GetColor(343, 174) <> 7750) do
begin
MouseBox(360, 180, 400, 185, 1);
Wait(100 + Random(100));
if LoggedIn then Exit; //No need to log in if you already are loggedin
if HandleWelcomeScreen then Exit;
end;
This is sort of a rant to the devs, my script always ends in an endless loop while my player are logged in..

EDIT: And the procedure Login_SetGraphics often misses. I solved this by adding
if FindColor(x, y, 16777215, 163, 322, 792, 457) then
Login_SetGraphics(Brightness, vl, rr, gd, td, ia, fe, gt, cs);
to the last line in that procedure

Da 0wner

2009-05-21 10:19:48

Does not ever happen to me.

Gu3st...

2009-05-21 10:35:38

From: Da 0wner
Does not ever happen to me.

Well, this happens alot to me, and I think it is because my computer sucks; when the runescape app is loaded it lags.. :o

marpis

2009-05-22 09:17:51

i bet my computer lags way more than yours, because this piece of junk can't even run my screensaver without lag. still that doesn't happen to me

Da 0wner

2009-05-22 09:19:39

Well my computer is good and not noob so…yeah :D.

Gu3st...

2009-05-22 10:59:42

Hmmm.. well.. I tried running the same script on my laptop (much faster :)) and then I get no problems

But we have to think outside of the box; Why not add an failsafe to the endless loop?