LoudPacks Posted May 24, 2016 Share Posted May 24, 2016 (edited) Is there a way to check if the account is banned when trying to log in with the login manager disabled? Besides checking for yellow pixels at locations where the account disabled text shows up, is there a better way to check if the account has been banned? I looked at the OSBot login manager code and they have some sort of response codes but its obfuscated so I cant really tell exactly whats going on or how they read those response codes. EDIT SWAG YOLO WITH TOKENS IDEA: package script; import org.osbot.rs07.constants.ResponseCode; import org.osbot.rs07.listener.LoginResponseCodeListener; import org.osbot.rs07.script.Script; public class LoginListener implements LoginResponseCodeListener { Script context; public LoginListener(Script context) { this.context = context; } @Override public void onResponseCode(int response) throws InterruptedException { if (response == ResponseCode.ACCOUNT_DISABLED) { context.log("BANNED"); } } } In my main.java login thread: getBot().getLoginResponseCodeListeners().add(new LoginListener(getScript())); Edited May 24, 2016 by LoudPacks Quote Link to comment Share on other sites More sharing options...
Prozen Posted May 24, 2016 Share Posted May 24, 2016 (edited) Can use their onResponseCode(ResponseCode.ACCOUNT_DISABLED), no? Oops, read it wrong. lol Edited May 24, 2016 by Prozen Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted May 24, 2016 Author Share Posted May 24, 2016 (edited) Can use their onResponseCode(ResponseCode.ACCOUNT_DISABLED), no? Oops, read it wrong. lol That seems like exactly what I would need. Something like this Example: @Override public void onResponseCode(int code) { if(c.getType().equals(ResponseCode.ACCOUNT_DISABLED)) log("BANNED"); } The thing is tho, my code is all ran on a separate thread so how would I make sure that is called since the main thread is sleeping when the login manager is disabled? Edited May 24, 2016 by LoudPacks Quote Link to comment Share on other sites More sharing options...