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.

Misclicking objects

Featured Replies

I have an object I an clicking by doing 

obstacle = objects.closest(27985);

obstacle.interact("Climb");

 

However, this object is directly next to another object and it often misclicks the wrong obstacle. How can I stop from misclicking the wrong object? I have tried to have the code stop and stand still before trying to interact with the object, but it still can misclick. Any snippets to help?

The two objects next to each other don't have the same id right? Also note you shouldn't use ids for objects as ids change every update, causing your script to break.

10 hours ago, saurav2008 said:

They don't have the same Id.

 

Didn't know that thanks for tip. 

 

Did you attempt to use a String rather than an ID? If you have, did this seem to fix your issue?

  • Author
20 hours ago, Sphiinx said:

Did you attempt to use a String rather than an ID? If you have, did this seem to fix your issue?

I did, and no that did not fix the issue. If it helps to mention, its the climbing rocks shortcut on zeah between mining spot and dark altar.

Edited by saurav2008

On 2/22/2017 at 1:12 AM, saurav2008 said:

I have an object I an clicking by doing 

obstacle = objects.closest(27985);

obstacle.interact("Climb");

 

However, this object is directly next to another object and it often misclicks the wrong obstacle. How can I stop from misclicking the wrong object? I have tried to have the code stop and stand still before trying to interact with the object, but it still can misclick. Any snippets to help?

Try to get your object by position. Write a filter something like 

	RS2Object ladder = s.objects.closest(new Filter<RS2Object>() {
		@Override
		public boolean match(RS2Object obj) {
			return obj.getName().equals("Ladder") && obj.hasAction("Climb-Up") && obj.getPosition().getX() >= X_COORDINATE; 
		}
	});

And also you can add a fail-safe if he accidentally still misclicks. Something like if you're in an area that you don't want to be in - climb back up and try again

On 2/22/2017 at 1:30 AM, Prozen said:

The two objects next to each other don't have the same id right? Also note you shouldn't use ids for objects as ids change every update, causing your script to break.

Lol they don't change id's each update :D But yeah, you're right, bad practice.

Edited by nosepicker

1 hour ago, nosepicker said:

Lol they don't change id's each update :D But yeah, you're right, bad practice.

1

Not all object ID's get changed each update of course, although they do change object ID's, in general, each update.

click slightly outside of the boundingbox at random times (dont set a specific radius though, or else your clicks will just model the outline of the shape). 

11 hours ago, nosepicker said:

Try to get your object by position. Write a filter something like 


	RS2Object ladder = s.objects.closest(new Filter<RS2Object>() {
		@Override
		public boolean match(RS2Object obj) {
			return obj.getName().equals("Ladder") && obj.hasAction("Climb-Up") && obj.getPosition().getX() >= X_COORDINATE; 
		}
	});

And also you can add a fail-safe if he accidentally still misclicks. Something like if you're in an area that you don't want to be in - climb back up and try again

Lol they don't change id's each update :D But yeah, you're right, bad practice.

A lot of objects ids get changed nearly every update.

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.