SRL Archive - SRL Bugs

Infinite loop on LoginPlayer


Harry

2011-05-29 22:32:40


SwitchToPlayer(PlayerNo: 60, Active: True);
Welcome to Runescape.
myUsername
World: 141, Players: 1190, Members: False, PvP: False
World 141 selected.
'Login limit exceeded.'
Runescape is lagging or we're logged in too many times. Keep trying!
Welcome to Runescape.
myUsername
'Login limit exceeded.'
myUsername
'Login limit exceeded.'
myUsername
It just has that in the debug then sits there like that.

Edit2:
Here is a proper fix. http://paste.villavu.com/show/684/
Diff:

389a390
> typtmp: integer;
501a503,504
>
> typtmp := 0;
505a509,511
> inc(typtmp);
> if (typtmp > 500) then
> Break;
514,515c520,528
< if (not waitColor(278, 248, LOGIN_TEXTCOLOUR, 5, 2000)) then // check for cursor in password field
< mouseBox(PBX1, PBY1, PBX2, PBY2, 1); // password box
---
> FindColors(TPA, LOGIN_TEXTCOLOUR, PBx1, PBy1, PBx2, PBy2);
> if (Length(TPA) > 0) then
> begin
> SortTPAFrom(TPA, Point(PBx2, PBy1+(PBy2-PBy1) div 2));
> Mouse(TPA[0].X + 20, TPA[0].Y, 5, 5, True);
> end
> else
> MouseBox(PBx1, PBy1, PBx2, PBy2, 1); //Password box
> typtmp := 0;
519a533,535
> inc(typtmp);
> if (typtmp > 500) then
> Break;
538c554
< 763, 2348: Actions := ['Invalid Username / Password', 0, 2, 'PlayerFalse', 'Wrong User/Pass'];
---
> 763, 2348, 2299: Actions := ['Invalid Username / Password', 0, 2, 'PlayerFalse', 'Wrong User/Pass'];
725a742
> Wait(5000+Random(10000));

What I changed:
1) Added a failsafe to break out of the delete cursor while loop if it presses backspace over 500 times.
2) It now clicks properly in the password field to delete the entire password string - before it would random mousebox which would have a chance of clicking before the end of the string, making it return invalid password and infinite loop.
3) Added new colorcount to "Invalid username/pass", which is "2299". It should be "763, 2348, 2299" now.
4) Added a small wait on 'Login limit exceeded.'

Thanks!

Coh3n

2011-05-30 16:09:07

Committed, thanks. :)