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.

onLogin() code handling

Featured Replies

Dear Scripters!

 

It is useful to stop your bots when onLogin() triggers with some error codes:

 

1) 12 - You need a members account to login to this world. Please subscribe, or use a different world.
2) 3 - invalid username or password
3) 32 - Your attempt to log into your account was unsuccessful. Don't worry, you can sort this out by visiting the billing system.
4) 4 - Ban:)
5) 5 - Another person using this account.

 

OsBot automatically stops on error 4 (ban), but dont stop on others.

Also, code 5 is account hack detector. If you get it, warning should appear.

 

Primary code is like

@Override
	public void onLogin(int code){
		if(code==12){
			//You need a members account to login to this world. Please subscribe, or use a different world.
			stop();
		}
		if(code==3){
			//invalid username or password
			stop();
		}
		if(code==32){
			//Your attempt to log into your account was unsuccessful. Don't worry, you can sort this out by visiting the billing system.
			stop();
		}
		if(code==4){
			isBan = true;
			stop();
		}
		if(code==5){
			stop();
		}
	}

Hope this will help you.

I don't think you need to check for every response code. Just stop the script if the response code isn't 2.

If I remember correct the client will keep trying to log you in, if you started a script and your account became non-member while the script ran, I guess this would fix that kind of situation.

Guest
This topic is now closed to further replies.

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.