Jump to content

Having Trouble with Simple Login Handler


Recommended Posts

Posted

Hey all, I ran into some trouble trying to use Explv's login handler:

Here's my onStart():

private LoginEvent loginEvent;
	
	@Override
	public void onStart() {
		loginEvent = new LoginEvent("username/email", "password");
		getBot().addLoginListener(loginEvent);
	}

Here's how I'm attempting to use the login handler in my onLoop():

if (getClient().getLoginStateValue() == 10) {
        		loginEvent.execute(loginEvent);
}

All I'm getting in the logger when the bot should be logging in is this spammed over and over again.

Capture.PNG.f31c92eb106a1b44acd48c803d2b164b.PNG

Unsure what I'm missing, any and all help is appreciated :)

Posted (edited)
3 hours ago, Jack Shep said:

I've tried a few things and still am getting the same results. Perhaps I don't fully understand what you're saying, either way, I don't know what else to try. 

hes saying u should execute from methodprovider,

execute(loginEvent); will work since script extends methodprovider

but NPE could be anything. the 1st thing i would make sure is that ur client is actually logged out

sometimes state values change too early

use like 7 second sleep after logout method, just for debugging purposes

 

Edited by extatus
Posted
On 3/7/2019 at 4:25 AM, extatus said:

hes saying u should execute from methodprovider,

execute(loginEvent); will work since script extends methodprovider

but NPE could be anything. the 1st thing i would make sure is that ur client is actually logged out

sometimes state values change too early

use like 7 second sleep after logout method, just for debugging purposes

 

Still getting the NPE even though the client is logged out, going to continue trouble shooting to try and figure out the issue. Any other ideas of what it might be?

Posted
1 hour ago, Jack Shep said:

Still getting the NPE even though the client is logged out, going to continue trouble shooting to try and figure out the issue. Any other ideas of what it might be?

No clue. Maybe try different login credentials?Something very basic with no  special characters

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...