Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Having Trouble with Simple Login Handler

Featured Replies

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

ur not even executing right

 

you should be using MethodProvider/Script.execute(Event event);

  • Author
On 3/5/2019 at 11:09 AM, Chris said:

ur not even executing right

 

you should be using MethodProvider/Script.execute(Event event);

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. 

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

  • Author
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?

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

  • Author
13 hours ago, extatus said:

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

I messed around with it some more and ended up figuring it out, thanks for your suggestions and help :) 

4 hours ago, Jack Shep said:

I messed around with it some more and ended up figuring it out, thanks for your suggestions and help :) 

No problem. What was it though? :)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.