Lipcot
2014-08-06 16:33:15
Hey guys, i made a thread a while ago because my client is different from people in other parts of the world (cause of my Latin america IP), thus i can not currently Auto-login using Simba and Smart.
A possible solution proposed to me in the other thread i made was using a VPN, which i believe would solve my problem but this would cost $$$ and would make my connection slower.
So, i started looking around a bit and found that maybe, if someone helped me change the "isClientReady();" function i could make Simba recognize my (custom) login screen and start my script ( in which i added a procedure to make me login).
I´ve been trying to change the function, but due to my limited knowledge on scripting i was unable to do it succesfuly :duh:. So if someone could help me with this i would be really happy :spot:.
This is the screen my RS loads into (in which i have to click "Login To Jagex Account" and i get taken to the original and same as your login screen):

And this is the SRL code regarding the Client Login i believe i should change:
Thank you, Undorak7
A possible solution proposed to me in the other thread i made was using a VPN, which i believe would solve my problem but this would cost $$$ and would make my connection slower.
So, i started looking around a bit and found that maybe, if someone helped me change the "isClientReady();" function i could make Simba recognize my (custom) login screen and start my script ( in which i added a procedure to make me login).
I´ve been trying to change the function, but due to my limited knowledge on scripting i was unable to do it succesfuly :duh:. So if someone could help me with this i would be really happy :spot:.
This is the screen my RS loads into (in which i have to click "Login To Jagex Account" and i get taken to the original and same as your login screen):

And this is the SRL code regarding the Client Login i believe i should change:
(*
Client
======
The Client file holds functions that have anything to do with the RS client or
client settings.
The source for this file can be found `here <https://github.com/SRL/SRL-6/blob/master/lib/core/client.simba>`_.
*)
{$include_once ../interfaces/lobby/lobby.simba}
{$include_once ../core/players.simba}
{$f-}
(*
isClientReady
~~~~~~~~~~~~~
.. code-block:: pascal
function isClientReady: Boolean;
Returns true if we are ready to auto (on loginscreen or logged in).
Useful for waiting until RS has fully loaded.
.. note::
- by ZephyrsFury
- Last updated: 22 July 2013 by Coh3n
Example:
.. code-block:: pascal
while (not isClientReady()) do
SleepAndMoveMouse(100 + Random(500));
*)
function isClientReady(): boolean;
begin
Result := (isLoggedIn() or lobby.isOpen() or __setInputBoxes());
end;
(*
waitClientReady
~~~~~~~~~~~~~~~
.. code-block:: pascal
function waitClientReady(): boolean;
Waits until the client is ready. Will terminate the script if the client loaded
isn't set to fixed size.
.. note::
- by Coh3n
- Last updated: 18/04/2012 by Ollybest
Example:
.. code-block:: pascal
if (waitClientReady()) then
writeln('Client is ready!');
*)
function waitClientReady(): boolean;
var
t: UInt32;
i: integer;
begin
result := false;
t := getSystemTime();
i := 1;
{$IFNDEF SMART}
print('You are not using SMART, be sure to use Simba''s crosshairs'+
' to select the RS client.', TDebug.HINT);
{$ENDIF}
print('Waiting up to 5 minutes for RS to load...');
while ((getSystemTime() - t) < (5 * 60000)) do // 5 minutes
begin
if (isClientReady()) then
exit(true);
if ((getSystemTime() - t) > (i * 60000)) then // each minute
begin
print(intToStr(i) + ' minute(s) have passed, client is not ready yet');
inc(i);
end;
wait(2000);
end;
end;
Thank you, Undorak7

