Jump to content

Checking If Banned - Custom Login Handler?


LoudPacks

Recommended Posts

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()));

9fff1b60e7b1356c04144c329d38cc47.png

Edited by LoudPacks
Link to comment
Share on other sites

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 by LoudPacks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...