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
Printable View
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
yup I get this too.
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.
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.
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.
I got it fixed by adding this code right after initializing all of my SRL/Smart and initializing the client.
Simba Code:while not R_LoginScreen do Wait(3000);
Or you just add a few seconds wait before LoginPlayer, that's what I do on my slow-ass laptop ^^
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.
Its happened for MSI btw and other scripts:
Simba Code:LoginPlayer;
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.
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.
Tried 3 times before setting the player to false.Progress Report:[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);
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)
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 :).
sometimes my typing cursor is in the password field
edit: sometimes the username is intermingled with the password too. like Theabc123Pwnerabc
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.
or retry the whole loggin in thing instead of typing random stuff
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:
Simba 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:
Simba Code:Members, RetryLogin: Boolean;
Actions: TVariantArray;
T, Attempts{, I}, Num, Counter, Counter2: LongInt;
//ATPA: T2dPointArray;
TPA, Cursor: TPointArray;
//B: TBox;
New Code:
Simba 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.
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.
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,
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.
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:
http://img22.imageshack.us/img22/4228/problemcp.jpg
Oh my apologies. I didn't think they were the same color. Have you tried the update I made yesterday?
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.
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):
Or something like that, I just did that quickly. I don't have the time right now to test it properly.Simba Code: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');
I get it. Check if the color is greater than previous color
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.
Yes, but there's lag to take into account. Sometimes it just skips right over it.
WaitCountColor?