Jump to content

Custom Login Handler


Recommended Posts

Posted

Hello, I'm trying to detect whether my character is logout out during script runtime:

    public void logoutCheck(){
        if (getClient().getLoginStageValue() == 0){
            log("I'm logged out!");
            loginEvent = new LoginEvent(this.login, this.password);
            getBot().addLoginListener(loginEvent);
            execute(loginEvent);
        }
    }

I added the method in the onLoop but never gets triggered, am I retarded?

Thanks.

Posted
6 minutes ago, FrostBug said:

onLoop will not be called while logged out unless you unregister the OSBot Login Handler

Are you using the correct CLI args to boot osbot without login handler?

Wasn't thinking about that one, thanks! Also should use getLoginUIState instead of getLoginStageValue. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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