Jump to content

onLogin() code handling


darkxor
 Share

Recommended Posts

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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