SRL Archive - SRL Bugs

LoginPlayer Bug(?)


ShowerThoughts

2010-05-02 11:40:20

Hey,

it is not really a bug, but could some SRL developer add this RunOnceScreen that Runescape pops-up when you have just created a new account?
Example.
Why? It says it is not in the lobby or logged in that means I have to add the clicking Inside the LoginPlayerToLob which means I have to add LoginPLayer to my script also which means I have to add like 1k code to my script which contains 10 lines from me for clicking that screen so my script will work.
Could this screen be added?

Greetings,
Hermen

Coh3n

2010-05-02 12:04:21

From: Hermen
Hey,

it is not really a bug, but could some SRL developer add this RunOnceScreen that Runescape pops-up when you have just created a new account?
Example.
Why? It says it is not in the lobby or logged in that means I have to add the clicking Inside the LoginPlayerToLob which means I have to add LoginPLayer to my script also which means I have to add like 1k code to my script which contains 10 lines from me for clicking that screen so my script will work.
Could this screen be added?

Greetings,
Hermen


I agree. I also think the other popup screens (Error connecting, RS has been updated, etc.) should be handled as well. From what I've seen in the lobby/login screen, there are a lot of similar colors, so text finding may be the best way.

ShowerThoughts

2010-05-02 12:29:19

Do I need to give this a try or let the developers to it right away, in the right way.
Since with this screen you can go to the lobby or join the game directly.

ShowerThoughts

2010-05-02 12:31:11

From: Coh3n
I agree. I also think the other popup screens (Error connecting, RS has been updated, etc.) should be handled as well. From what I've seen in the lobby/login screen, there are a lot of similar colors, so text finding may be the best way.


Btw, you know these error you were talking about are handled while logging in?
I don't know about the handling while in the lobby screen.

Coh3n

2010-05-02 13:00:32

From: Hermen
Btw, you know these error you were talking about are handled while logging in?
I don't know about the handling while in the lobby screen.

Yeah, you'd have to specify when looking for the popups. You could do something like:


function HandlePopups: Boolean;
begin
while (not LoggedIn) or (LobbyScreen) then
if (FindTextProcHere) then
//stuff to do ~ case maybe, idk
end;

And that could be called while waiting to enter the lobby or waiting to login.

ShowerThoughts

2010-05-02 13:04:07

From: Coh3n
Yeah, you'd have to specify when looking for the popups. You could do something like:


function HandlePopups: Boolean;
begin
while (not LoggedIn) or (LobbyScreen) then
if (FindTextProcHere) then
//stuff to do ~ case maybe, idk
end;

And that could be called while waiting to enter the lobby or waiting to login.


Agreed but try reading the old code, so you might understand you can just put something in, you could better use some of the existing code and modify it.

Dgby714

2010-05-02 13:05:16

I was gonna fix it but Simba + Linux = Bad…

Coh3n

2010-05-02 13:07:08

From: Hermen
Agreed but try reading the old code, so you might understand you can just put something in, you could better use some of the existing code and modify it.

I didn't really get that, are you talking about the existing login functions?

From: Dgby714
I was gonna fix it but Simba + Linux = Bad…

Works amazing for me in WINE.

ShowerThoughts

2010-05-02 13:35:04

So :D when is this going to be fixed, cuz I need it for my script to continue developing xD.

Dgby714

2010-05-02 13:41:20

[QUOTE=Coh3n;706958Works amazing for me in WINE.

I meant natively


Here: (Havent Tested it Yet)

{*******************************************************************************
function LoginPlayerToLob: Boolean;
By: The SRL Team
Description: Like LoginPlayer but only to the lobbyscreen.
*******************************************************************************}
function LoginPlayerToLob: Boolean;
var
Members, RetryLogin: Boolean;
Actions: TVariantArray;
T, Attempts: LongInt;
TPA: TPointArray;
label
ProcStart;
begin
ActivateClient;
Wait(100);
TypeByte(vk_Escape);
Wait(500);

{Check for lobby screen already open/ already logged in}

Result := ((LobbyScreen) or (LoggedIn));
if (Result) then
Exit;

{Check for active player.}

if (not (Players[CurrentPlayer].Active)) then
begin
WriteLn('Player is not Active...');
if (AllPlayersInActive) then
begin
WriteLn('All players not active!');
Exit;
end;
NextPlayer(False);
Exit;
end;

{Wait for the client to finish loading.}

T := GetSystemTime;
repeat
if (RSReady) then
Break;
if ((GetSystemTime - T) > 180000) then
begin
WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
TerminateScript;
end;
Wait(RandomRange(1000, 2000));
until (False);
WriteLn('Welcome to Runescape.');

{Click less info if needed.}

if (not (SimilarColors(GetColor(381, 41), 6868097, 15))) then //Runescae sword green bead
begin
MouseBox(212, 479, 550, 495, 1); //Less info button
Wait(RandomRange(1000, 2000));
end;

{Click Members/free.}

Members := Players[CurrentPlayer].Member;
if (Length(Players[CurrentPlayer].WorldInfo) > 0) then
Members := Players[CurrentPlayer].WorldInfo[0];

ProcStart:

if (GetColor(248, 359) <> 1381653) then //Black outline on forgotten pwd button.
begin

if (Members) then
MouseBox(489, 407, 642, 424, 1) //Member's login button
else
MouseBox(314, 408, 457, 421, 1); //Free's login button

T := GetSystemTime; //Black outline on forgotten pwd button.
while ((GetSystemTime - T < 3000) and (GetColor(248, 359) <> 1381653)) do
Wait(RandomRange(100, 200));

end;

{Type in username}

FindColors(TPA, clWhite, 255, 216, 511, 236);
if (Length(TPA) > 0) then
begin
SortTPAFrom(TPA, Point(501, 225));
Mouse(TPA[0].X + 20, TPA[0].Y, 5, 5, True);
end
else
MouseBox(254, 216, 440, 234, 1); //Username box
while (CountColor(16777215, 255, 215, 385, 230) > 0) do
begin
TypeByte(VK_BACK);
Wait(50+Random(50));
end;
Wait(100 + Random(200));
WriteLn(Capitalize(Players[CurrentPlayer].Name));
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(50));

{Type in password}

while (CountColor(16777215, 255, 270, 385, 285) > 0) do
begin
TypeByte(VK_BACK);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
TypeSend(Players[CurrentPlayer].Pass);
Wait(500 + Random(300));

{Check responses}

T := GetSystemTime;
repeat

SetLength(Actions, 0);

if ((GetSystemTime - T) > 60000) then
Actions := ['One minute has passed...', 0, 0, 'PlayerFalse', 'Login Failed']
else
case (CountColor(16777215, 253, 170, 510, 290)) of //text colour points
// WriteLn Error Wait for Retrys Action Player[CurrentPlayer].Loc
949: Actions := ['Invalid Username / Password', 0, 2, 'PlayerFalse', 'Wrong User/Pass'];
1222: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
1316: Actions := ['Runescape has been updated.', 0, 0, 'Terminate', ''];
1506: Actions := ['Your account is already logged in', 5000, 0, 'PlayerTrue', ''];
1608: Actions := ['Not a Members Account', 0, 1, 'PlayerFalse', 'Non-member'];
1610: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'PlayerFalse', ''];
1994: Actions := ['Your account has been disabled', 0, 0, 'PlayerFalse', 'Acc Disabled'];
2398: Actions := ['Found New Player Welcome', 0, 0, 'ClickExplore', ''];
end;
{Respond}

if (Length(Actions) > 0) then
begin
WriteLn(Actions[0]);
if (Actions[0] <> 'Not a Members Account') then
begin
Wait(1000 + Random(500));
TypeByte(vk_Escape);
end;
Wait(Actions[1] + Random(100));
if (Actions[2] <> 0) then
if (Attempts < Actions[2]) or (Actions[2] = -1) then
begin
if (Actions[0] = 'Not a Members Account') then
begin
Players[CurrentPlayer].Member := False;
if (Length(Players[CurrentPlayer].WorldInfo) > 0) then
Players[CurrentPlayer].WorldInfo[0] := False;
MouseBox(267, 321, 496, 350, 1); //Play free game instead button
Wait(3000 + Random(2000));
Result := True;
Exit;
end;
RetryLogin := True;
Wait(2000 + Random(1000));
Break;
end;
if (Actions[4] <> '') then
Players[CurrentPlayer].Loc := Actions[4];
case Actions[3] of
'PlayerFalse': NextPlayer(False);
'PlayerTrue': NextPlayer(True);
'Terminate': TerminateScript;
'ClickExplore': MouseBox(275, 335, 485, 355, 1);
end;
Exit;
end;
Wait(100);
Result := (LobbyScreen) or (LoggedIn);
until (Result);

{Back to main screen if needed}

if (RetryLogin) then
begin
RetryLogin := False;
Inc(Attempts);
goto ProcStart;
end;

end;

Diff Attached =)

Coh3n

2010-05-02 16:50:15

From: Dgby714
I meant natively

Yeah I assumed. I should have suggested you to use it in wine. :p

E: I didn't realize that all the popup windows are already handled, my bad.

Wanted

2010-05-02 19:49:53

I'll update SRL in a minute when I'm done.

I didn't know they gave you this, so if you find anything else like this feel free to say something.

tarajunky

2010-05-03 00:21:45

Meh, with all the nonsense Jagex is adding to the Login process, I'm surprised more people don't just use unsigned.

No lobby screen, no exit to lobby, no tabs everywhere.

It seems to me that with all the new bells and whistles, it's like we're trying to script for high detail when low detail is so much easier. Why not use the simplest login/logout as the standard, instead of rewriting it every week as Jagex adds more useless bunk?

It's actually pretty sad that the unsigned login procedure for 2 months ago is still working, but keeps getting broken over and over in SRL as new bells and whistles are added to the signed login.

Wanted

2010-05-03 00:48:55

Login only broke once, this is an extra feature for what looks like an account creator of sorts.

I like the unsigned client, but it is slower… and doesn't on my computer anymore.

ShowerThoughts

2010-05-03 10:16:10

Yeah, it is for an account creator, but certainly needed :D.

Thanks!

Wanted

2010-05-09 18:47:11

I just made a new account and it seems as if this option no longer appears?

Can anyone confirm?

i luffs yeww

2010-05-09 19:17:12

http://goo.gl/YZkI

The left is unsigned, the right is signed.

Tarajunky has already said that the unsigned version of login has worked for a long time, and we keep making it work for signed rather than unsigned. I don't see why we don't have an option for it (if SMART_Signed then SignedLogin else UnsignedLogin).

Wanted

2010-05-09 21:02:27

From: i luffs yeww
http://goo.gl/YZkI

The left is unsigned, the right is signed.

Tarajunky has already said that the unsigned version of login has worked for a long time, and we keep making it work for signed rather than unsigned. I don't see why we don't have an option for it (if SMART_Signed then SignedLogin else UnsignedLogin).


Unsigned doesn't work on my computer at all :(

i luffs yeww

2010-05-09 21:09:01

You mean www.runescape.com/slu.ws won't even load the game? 'o.O?