SRL Archive - SRL Bugs

login


Feroc1ty

2011-03-18 22:59:33

sometimes smart lags a bit and the entering of account name/pass gets messed up, and the login screen gets stuck on invalid account details, it gets unstuck one minute later by switching the player with current player set to inactive

Yago

2011-03-18 23:43:06

yup I get this too.

lordsaturn

2011-03-19 01:24:04

yeah, LoginPlayer needs a rewrite. IMO it's a mess, i.e. clicks on recovery questions.

Coh3n

2011-03-19 03:00:35

From: lordsaturn
yeah, LoginPlayer needs a rewrite. IMO it's a mess, i.e. clicks on recovery questions.

That doesn't happen anymore. I fixed that some time ago. As for the actual procedure, it just needs to be better organized.

@Thread: So it doesn't detect the invalid username/pass pop up? It doesn't try to relogin the same player? If that's the case, it's an easy fix.

Yago

2011-03-19 12:17:06

No, like it types in your username and password in the username field and ends up not logging you on and waiting a long time without doing anything.

CaptainCraven

2011-03-19 12:28:51

This happens all the time with me. I have just gotten into the habit of waiting for a good login untill a leave my bot.

Feroc1ty

2011-03-19 12:51:23

I got it fixed by adding this code right after initializing all of my SRL/Smart and initializing the client.

 while not R_LoginScreen do Wait(3000);

Floor66

2011-03-19 13:29:12

Or you just add a few seconds wait before LoginPlayer, that's what I do on my slow-ass laptop ^^

Feroc1ty

2011-03-19 13:33:21

From: Floor66
Or you just add a few seconds wait before LoginPlayer, that's what I do on my slow-ass laptop ^^


Well it's the same thing as my code, except my code will wait correctly even for 133MHz computers :P.

Coh3n

2011-03-19 15:23:23

From: Yago
No, like it types in your username and password in the username field and ends up not logging you on and waiting a long time without doing anything.

I don't understand. :o

It types in your username/pass, then just does nothing? Like it's as if it doesn't hit enter?

Yago

2011-03-19 16:14:33

correct the password box is empty as if it didnt tab down to the password field and just kept typing the password right after the username. My first and only guess is random lagg.

Coh3n

2011-03-19 16:16:32

From: Yago
correct the password box is empty as if it didnt tab down to the password field and just kept typing the password right after the username. My first and only guess is random lagg.

Weird. I've never experienced this before, and I've watched it recover from lag. Is this reflection's login procedure, or SRL's?

Yago

2011-03-19 16:20:29

Its happened for MSI btw and other scripts:


LoginPlayer;

Floor66

2011-03-19 16:21:48

From: Coh3n
Weird. I've never experienced this before, and I've watched it recover from lag. Is this reflection's login procedure, or SRL's?


I don't think that reflection has a it's own login proc, actually.

Yago

2011-03-19 16:28:49

It just happened to me again… Half the username then half the password then the rest of the username then the rest of the password was all in the username field. The mouse was over the username field and now while I am typing this it fixed itself. I guess the problem before is that It would take a while to fix itself and sometimes never do.

Coh3n

2011-03-19 16:53:42

From: Yago
It just happened to me again… Half the username then half the password then the rest of the username then the rest of the password was all in the username field. The mouse was over the username field and now while I am typing this it fixed itself. I guess the problem before is that It would take a while to fix itself and sometimes never do.

Did anything show in the debug box?

Feroc1ty

2011-03-19 17:02:14

The script doesn't recognize the fact that runescape login screen says "Incorrect Pass," and also doesn't recognize the fact that it didn't property type in the username and/or pass, or simply didn't hit enter after it did those two tasks.

Yago

2011-03-19 17:03:46

From: Coh3n
Did anything show in the debug box?


Nothing. Besides Welcome to runescape and my username

Coh3n

2011-03-19 17:07:29

From: Feroc1ty
The script doesn't recognize the fact that runescape login screen says "Incorrect Pass," and also doesn't recognize the fact that it didn't property type in the username and/or pass, or simply didn't hit enter after it did those two tasks.

Just tested and it detects it just fine for me.

[0:00:04]: Welcome to Runescape.
[0:00:05]: Pty Coeh
[0:00:07]: 'Invalid Username / Password'
[0:00:12]: Pty Coeh
[0:00:15]: 'Invalid Username / Password'
[0:00:20]: Pty Coeh
[0:00:23]: 'Invalid Username / Password'
[0:00:25]: NextPlayer(False)
[0:00:25]: SwitchToPlayer(PlayerNo: 0, Active: False);
Tried 3 times before setting the player to false.

Yago

2011-03-19 17:10:11

that's odd… MSI only does it once before setting me false. Did you try leaving the password at blank? Cause that's pretty much what its doing typing in the pass in the username field right after and it doesn't press enter(or at least I dont get invalid user and pass message so im guessing it doesnt press enter)

LolL

2011-03-19 17:16:06

Yes, this happens to me, too. Yet I have a fast computer. Here's how the login box looks (let's say the username is "ThePwner" and the password is "abc123abc"):

Username: ThePwnerabc123abc (typing cursor is still here)
Password: (blank)

And it basically does nothing. It possibly presses enter but since the password field is blank, enter does nothing. I haven't tested for how long or if it recovers.

I have other bugs to report but let's solve this one first :).

Yago

2011-03-19 17:18:27

sometimes my typing cursor is in the password field

edit: sometimes the username is intermingled with the password too. like Theabc123Pwnerabc

Coh3n

2011-03-19 17:20:24

I may be able to add a failsafe where if there isn't any text in the password field, it'll type some random numbers just so it'll get the invalid username/password error and then retry logging in.

Yago

2011-03-19 17:23:09

or retry the whole loggin in thing instead of typing random stuff

Coh3n

2011-03-19 17:23:32

From: Yago
or retry the whole loggin in thing instead of typing random stuff

Lol yes, that would be smarter. :p I don't have time right now, so someone else is welcome to give it a go. I'll do it when I have time if no one else does.

Yago

2011-03-19 19:26:43

I haven't tested this out yet, but take a look and tell me what you think( I don't know if its any good):

I tested it out and it logged me on a bit slower, but it worked. Now I need to see if it works with the error. It should though

Old Code:

{Type in password}
while (CountColor(LOGIN_TEXTCOLOUR, PBx1, PBy1, PBx2, PBy2) > 0) do
begin
TypeByte(VK_BACK);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
{$ifdef SRL_SMART}
SmartSendKeys(Players[CurrentPlayer].Pass);
TypeByte(VK_Return);
{$else}
TypeSend(Players[CurrentPlayer].Pass);
{$endif}
Wait(500 + Random(300));

{Check responses}


New Variables:
Members, RetryLogin: Boolean;
Actions: TVariantArray;
T, Attempts{, I}, Num, Counter, Counter2: LongInt;
//ATPA: T2dPointArray;
TPA, Cursor: TPointArray;
//B: TBox;


New Code:
{Type in password}
repeat
if (FindColors(Cursor, LOGIN_TEXTCOLOUR, PBx1, PBy1, PBx2, PBy2)) then //Checks For Cursor.
begin
Num := Length(Cursor);
repeat
Wait(50);
Inc(Counter2);
until (Num > CountColor(LOGIN_TEXTCOLOUR, PBx1, PBy1, PBx2, PBy2)) or (Counter2 >= 100); //5 Seconds }
if (Counter2 >= 100) then
TypeByte(VK_Return);//Keeps On Going. By This Time Should Be At Passworld Field.
end
else
begin
Wait(100);
Inc(Counter);
end;
until (Counter >= 30); //3 Seconds.
if (Counter >= 30) then
TypeByte(VK_Return); //Reactivates Cursor. Brings it to password field.
while (CountColor(LOGIN_TEXTCOLOUR, PBx1, PBy1, PBx2, PBy2) > 0) do
begin
TypeByte(VK_BACK);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
{$ifdef SRL_SMART}
SmartSendKeys(Players[CurrentPlayer].Pass);
TypeByte(VK_Return);
{$else}
TypeSend(Players[CurrentPlayer].Pass);
{$endif}
Wait(500 + Random(300));

{Check responses}

BTW, I edited the code a few times after checking it incase you got the first one.

Brandon

2011-03-19 22:53:07

I THINK I have found the problem.. its that smartsendkeys.. its way to friggin fast.. on my computer, the stuff doesnt go in one by one like it used to.. sendkeys just prints out the entire thing really fast.. On my faster computer, it sends them normally.. because its a way faster processor and has more ram to handle sendkeys properly..

I changed mine to TypeSendEx(Players[CurrentPlayer].Pass, False); And it seems it isnt defined so it doesnt work.. but it should as the keys are typed out like a human rather than like a robot just autotyping it at 30 characters per second.. This gives it a few seconds to wait and press tab or move the mouse to type the password and send that one..

Also another contributor to the problem is that smart SOMETIMES never detects that its loaded… even with using while not (RSREADY) do wait(100);


So thats what makes this problem trigger.. Instead it tries to log the player in without seeing the login screen.. or it tries to run the script without smart even fully loaded.

Yago

2011-03-19 23:02:43

exactly it fails to go to the password field cause its too fast so that's what I addressed in the code I posted. I made sure that the text cursor was over the password field.

edit: Ive been using it so far and no problem,

Coh3n

2011-03-20 02:38:25

Yago, that's awesome, thanks! Before committing; however, I'd appreciate if you guys could test something out for me. I just changed SmartSendKeys to SendKeys and we'll see how it goes.

I've commit that so if you could please test this when your SRL updated that would be great. Also Yago, I'm not sure yours works the way you like it/I don't see how it works because LOGIN_TEXTCOLOR isn't the color of the cursor. So essentially all you're doing is waiting 3-5 seconds before typing in your password.

BKNYKavkaz

2011-03-20 02:55:32

From: Feroc1ty
I got it fixed by adding this code right after initializing all of my SRL/Smart and initializing the client.

Simba Code:
[LEFT]while not R_LoginScreen do Wait(3000);
[/LEFT]



Exactly, except i have wait2000

Yago

2011-03-20 19:43:06

LOGIN_TEXTCOLOUR is the color of the text cursor not mouse cursor. I did a color check. The thing that blinks once you click the password/userfield. What mines does is checks for the text cursor in the password field then (since its blinking) checks if it has disappeared. If you think about it … it works even if there is text in the password field cause it does a count color check to see if the color has diminished

Heres an image:


Coh3n

2011-03-21 00:39:58

Oh my apologies. I didn't think they were the same color. Have you tried the update I made yesterday?

Yago

2011-03-21 15:38:06

Yeah so far it works, I used to get the error though like once every 100 logins or something so it was a sort of rare but not too rare error. Hard to replicate and tell if its fixed unless users reply and say they aren't getting the error anymore.

Coh3n

2011-03-21 17:43:33

From: Yago
Yeah so far it works, I used to get the error though like once every 100 logins or something so it was a sort of rare but not too rare error. Hard to replicate and tell if its fixed unless users reply and say they aren't getting the error anymore.

Okay well I'm glad it's working so far. But I'm probably going to do a check to make sure the user actually put in something for the username/password, so it just doesn't wait there, but instead just move on to the next player.

Yago

2011-03-21 17:53:26

A simple countcolor should work using my method or anyother. get the starting color. Backspace all characters. count the new color. if start color is less than new then you typed.

Coh3n

2011-03-21 18:57:09

From: Yago
A simple countcolor should work using my method or anyother. get the starting color. Backspace all characters. count the new color. if start color is less than new then you typed.

It already does a backspace if there's an invalid username/password error. The problem is if it doesn't type anything. Which, like you said can be done with a count color.

I'm thinking something like this right after it hits enter (after typing in the password):

if (CountColor(TEXT_LOGINCOLOR, BoxWhere"LoggingIn..."Shows) <> WhateverTheCountIs) then
if (tries <= 10) then
begin
writeln('May have messed up password field, retrying..');
inc(tries);
goto procStart;
end else
writeln('login failed, tries > 10');
Or something like that, I just did that quickly. I don't have the time right now to test it properly.

Yago

2011-03-21 19:15:26

I get it. Check if the color is greater than previous color

Coh3n

2011-03-21 19:25:41

Not even that. The popup that shows "logging in.." Has a specific count. We just need to get that count and check it after it hits enter for the second time.

Yago

2011-03-21 19:38:38

Yes, but there's lag to take into account. Sometimes it just skips right over it.

Coh3n

2011-03-21 19:41:11

WaitCountColor?

Yago

2011-03-21 19:42:37

Its shaky then though. I feel like make sure the pass and user are in then press enter as many times as needed lol (at most two)

Yago

2011-03-21 21:23:41

Sorry for double post. Hit a lag spike at the login screen and guess what happened. I got the same problem again. User and pass in the username field.

Then I waited and got the one minute has passed thing.

Sgt Soul

2011-03-21 22:01:07

best way I find to overcome this is either log the player in yourself or pause the script until SMART has fully loaded runescape, then click play :)

Yago

2011-03-21 22:17:43

Or fix the thing that waits until fully loaded but sometimes your still get lag

Coh3n

2011-03-22 02:42:29

From: Yago
Or fix the thing that waits until fully loaded but sometimes your still get lag

I've never had it try logging in before SMART loaded, but maybe the max wait time needs to be increased?

And I will commit your fix when I get home tomorrow if no one else has. Just wondering, though, have you seen your fix recover from the problem to begin with?

Coh3n

2011-03-24 15:37:05

This is committed now. Yago, your code isn't bad, but there is a more efficient way of doing the same thing. There are a lot of Wait functions in SRL's timing.scar, that I think you would benefit from in the future. Here's what I added which does basically the same thing yours, but it's much shorter as you can see. ;) Great job though, and thanks for the help.

if (not waitColor(278, 248, LOGIN_TEXTCOLOUR, 5, 2000)) then // check for cursor in password field
mouseBox(292, 244, 400, 259, 1); // password box
I tested this and it works. :)

Yago

2011-03-24 20:14:26

No prob… I was guessing there was a better way just didn't know it. Glad to be of any help though. Make sure that at the co-ords you pick there cant be any characters so that if Simba typed in half the password and it was incorrect and it tried again it would sense those characters there. But I'm sure you thought of it already.

Edit: Also for the mousbox they have the pbx1,pbx2,pby1,pby2 constants if you wanted them :)

Coh3n

2011-03-25 01:54:33

From: Yago
No prob… I was guessing there was a better way just didn't know it. Glad to be of any help though. Make sure that at the co-ords you pick there cant be any characters so that if Simba typed in half the password and it was incorrect and it tried again it would sense those characters there. But I'm sure you thought of it already.

When there's an invalid username/password, SRL will erase (backspace) all the characters in the username/password field.

From: Yago

Edit: Also for the mousbox they have the pbx1,pbx2,pby1,pby2 constants if you wanted them :)

PB, I'm assuming, means "Password Box"? Didn't realize that. :p I'll just leave it for now, but if I think of it I'll make the change next time I commit.

tarajunky

2011-03-25 02:00:59

I just saw it mess up on the login. An account was already logged in, so it tried to erase the username/pass and put in the next account. But when it tried to click on the password field, it clicked in the middle of the old password, so when it tried to erase it there was still text left to the right of the cursor and it got stuck.

I fixed this same problem a while back by making sure all clicks on the User/Pass fields happen on the far right part of the field. Apparently it was changed back again at some point.

Coh3n

2011-03-25 02:03:26

From: tarajunky
I just saw it mess up on the login. An account was already logged in, so it tried to erase the username/pass and put in the next account. But when it tried to click on the password field, it clicked in the middle of the old password, so when it tried to erase it there was still text left to the right of the cursor and it got stuck.

I fixed this same problem a while back by making sure all clicks on the User/Pass fields happen on the far right part of the field. Apparently it was changed back again at some point.

Ah, no I doubt it was changed. I just didn't realize there were password box constants so I just used coords in MouseBox. I'll change that right now. Thanks for letting me know. :)

E: Actually they may have been changed, I'll look into it more.

E2: Fixed.

Brandon

2011-03-25 02:38:22

From: tarajunky
I just saw it mess up on the login. An account was already logged in, so it tried to erase the username/pass and put in the next account. But when it tried to click on the password field, it clicked in the middle of the old password, so when it tried to erase it there was still text left to the right of the cursor and it got stuck.

I fixed this same problem a while back by making sure all clicks on the User/Pass fields happen on the far right part of the field. Apparently it was changed back again at some point.


^This

Just happened to me.. It removed everything to the left of the cursor(backspaced) but it clicked in the middle of my password, and backspaced it.. leaving character to the right side of the cursor and never deleting nor trying again.. it waited forever. But the second I disabled smart and removed the remaining characters, it went and remove my username and retyped it, and it then typed in the password again.

Coh3n

2011-03-25 02:39:21

Read the post before yours…

Just wait for SRL to automatically update.

Yago

2011-04-06 21:45:35

Got random lag and this happened to me again…. Sorry for the bump
I guess it really didn't work. We need to fix it.


Offtopic: What happened to ferocity?

Coh3n

2011-04-07 00:22:07

From: Yago
Got random lag and this happened to me again…. Sorry for the bump
I guess it really didn't work. We need to fix it.


Offtopic: What happened to ferocity?

What..

Did it not click the password box? I've watched it recover from this several times..

Yago

2011-04-07 16:13:01

IDK what happened there was a black screen (so obviously lag) then it typed the user and pass in the username field. I got the message that said one minute has passed… then the nextplayer true/false thing

Coh3n

2011-04-08 06:11:20

From: Yago
IDK what happened there was a black screen (so obviously lag) then it typed the user and pass in the username field. I got the message that said one minute has passed… then the nextplayer true/false thing

I'm not sure. I'll have to look in to an addition failsafe when I get the chance.

Yago

2011-04-08 15:53:53

Sure no problem you can add a failsafe for lagg, for the typing, or for both.

Coh3n

2011-04-08 18:46:20

There already is a failsafe for both, which is why I don't understand how this happened. Maybe your screen was black for too long. I think something could be added where it says "One minute has passed…" to double check that there's a username and password in the field and if not, retry. I'll have to look into it more when I have time though. Sorry it's taking so long, I've been really busy lately.

Yago

2011-04-08 18:49:15

I was only black for half a second to a second. I dont think it makes a difference

Maybe when I maximized it or something …?

Edit: All you need to do is add a color check for both fields. They already have one when typing though …. just not after the one minute pass thing

Coh3n

2011-04-08 19:55:02

From: Yago
I was only black for half a second to a second. I dont think it makes a difference

Maybe when I maximized it or something …?

Edit: All you need to do is add a color check for both fields. They already have one when typing though …. just not after the one minute pass thing

I'll see what I can do. :)

Yago

2011-04-08 20:01:10

Thanks :)

Edit: It happened again, but I didnt see exactly what happened cause it was minimized, just saw the same problem and

'One minute has passed...'
NextPlayer(False)
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active...
All players not active!
NextPlayer(False)

Coh3n

2011-04-09 16:59:22

Okay it should now retry to login if you get the "One minute has passed" message.

Yago

2011-04-09 18:49:46

Thank-you this would fix sooo much

Coh3n

2011-04-09 19:10:25

Let's hope so. :)