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.

Cool Anti-ban skill hovering snippet

Featured Replies

Heyyy. I have noticed that many new scripters are asking for anti-ban codes, like I did just week ago. It was hard to find a anti-ban code and I really needed it, because I didn't know how to write the code. But now I do know how to write a anti-ban code, and I decided to share the code with other newbies:)

 

So here is the method:

public void doAntiban() throws InterruptedException{
		if(random(0, 400) == 43){
			openTab(Tab.SKILLS);
			sleep(random(300, 500));
			if(random(1,5) != 4){
				client.moveMouse(new RectangleDestination(550, 210, 175, 210), false);
				sleep(random(500, 750));				
			}else {
                client.moveMouse(new RectangleDestination(550, 425, 120, 25), false);
                sleep(random(500, 750));
            }
		}else if(random(0, 43) == 10){
			openTab(Tab.INVENTORY);
			sleep(random(500, 750));
		}
	}

Just copy the above code to your script. And how to use it? For example I am cutting trees. I want my script to perform this anti-ban method while my bot is cutting tree. So it could be done like this:

public int onLoop() throws InterruptedException{
	
	while(client.getMyPlayer().isAnimating()){
		doAntiban();
	}
	
	return 50;
}

Sure you don't have to use the while statement, but I just used it for this example.

 

I tested this, should work perfectly, but of course you guys can improve the code to better and tell me if it's not working or something.

 

Have fun.

Impressive, Will use this when I start fully scripting.

This would be better if instead of just one rectangle destination (not sure what skill that one is for), you supported them all so they could be like hoverSkill(Skill.ATTACK)

  • Author

This would be better if instead of just one rectangle destination (not sure what skill that one is for), you supported them all so they could be like hoverSkill(Skill.ATTACK)

I'm not sure what you mean, but this method randomly chooses a skill to hover. It's not always the same skill. You can try it yourself to see

Redundant.

 

Briefly hovering over a random skill wont fool a bot-hunter or any possible detection system. Instead of subjecting every end-user to pointless odd moments of behavioral difference, make a script that's too effective to get caught in the first place. I imagine both bot-hunters and the detection system pray for a consistent failures and flaws. Focus on that.

I'm almost positive each of the skills is an interface child, so no point in create rectangles. Also, take Toph's suggestion, as the random element of the anti-ban should be created by the person using this snippet.

You should make this more dynamic, as in use the interfaces to get the rectangles to use with the hover. Instead of finding the coordinates yourself, all you'd have to do is put in the parent and child interface ID's. Would work great for different types of scripts

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.