Jump to content

Having Trouble with Simple Login Handler


Jack Shep
 Share

Recommended Posts

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 :)

Link to comment
Share on other sites

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

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?

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.

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.

 Share

  • Recently Browsing   0 members

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