View Full Version : Reflect.Login.GetClientState results
Fitta
06-10-2015, 07:15 PM
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
06-10-2015, 07:22 PM
Just check if the client state is 10 for the loginscreen instead then?
KeepBotting
06-10-2015, 07:52 PM
if (result = 30) or (result = 45) then
exit(true);
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
06-10-2015, 07:58 PM
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
06-10-2015, 08:02 PM
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);
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.