SRL Archive - Discussion

Reflect.Login.GetClientState results


Fitta

2015-06-10 15:15:04

At the moment Reflect.Login.GetClientState is used to see if we're logged in. When the client is loading up a new map area we won't get the same result as we want, typically we want 30, as that's the state of us being logged in. When the client loads up a new map area we get 45, and therefor we won't be "Logged in" in terms of Reflect.Login.GetClientState.

Discussion, how do we handle this in the best possible way? I want a stable and safe include that can handle the major network problems that OSRS is having.

Should we just put all the client states into a TIntarray and declare it a win?

Harrier

2015-06-10 15:22:01

Just check if the client state is 10 for the loginscreen instead then?

KeepBotting

2015-06-10 15:52:06

if (result = 30) or (result = 45) then
exit(true);

From: Hawker
Just check if the client state is 10 for the loginscreen instead then?

How many other states are there though. Say the state for a "incorrect password" response is 25, therefore something like:

if (not(result = 10))) then
exit(true);
would return the wrong value.

Fitta

2015-06-10 15:58:16

https://github.com/FittaVillavu/OSR-Reflection/commit/4e1b99a5f8ea5d2de992f51dc8f38b643d754d6f

That's how it'll look for now,

Only problem and reason I'm asking is, I for one, need it to say that it's online even when it's loading. I do NOT know if it's a viable solution due to it might be the same client state when dc'ing :)

KeepBotting

2015-06-10 16:02:00

From: Fitta
https://github.com/FittaVillavu/OSR-Reflection/commit/4e1b99a5f8ea5d2de992f51dc8f38b643d754d6f

That's how it'll look for now,

Only problem and reason I'm asking is, I for one, need it to say that it's online even when it's loading. I do NOT know if it's a viable solution due to it might be the same client state when dc'ing :)


Create a separate routine that looks for the "Connection lost" message.


if (result = 30) or (result = 45) then
if (not(isDisconnecting())) then
exit(true);