Skip 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.

Excluding an Object from interaction.

Featured Replies

I want to mine only a certain set of rocks but I can't seem to exclude others, this is my pseudo code:

RS2Object rock1 = getObjects().closest(7454);

if (rock1.getGridX() != 10176){
	// mine rock
}

Is there a proper way instead of looking at the object's grid coordinates?

Thanks

Edited by Zummy

  • Author

Nevermind, I found the flaw. Apparently gridX can change?

Edited by Zummy

2 hours ago, Zummy said:

I want to mine only a certain set of rocks but I can't seem to exclude others, this is my pseudo code:


RS2Object rock1 = getObjects().closest(7454);

if (rock1.getGridX() != 10176){
	// mine rock
}

Is there a proper way instead of looking at the object's grid coordinates?

Thanks


1. Use colours instead of IDs for rocks:
 


2. Use an Area to filter the rocks, not gridX and gridY:
 

private static final Area ROCK_AREA = new Area(1, 2, 3, 4);

RS2Object tinRock = getObjects().closest(obj -> ROCK_AREA.contains(obj) && Rock.TIN.hasOre(obj));


Areas can be calculated using the OSBot entity hover setting, or using my map https://explv.github.io/

  • Author
1 hour ago, Explv said:


1. Use colours instead of IDs for rocks:

2. Use an Area to filter the rocks, not gridX and gridY:

Areas can be calculated using the OSBot entity hover setting, or using my map https://explv.github.io/

Thank you again! I really appreciate all the help, that map tool is absolutely great! I do get a warning tho on my getObjects().closest() code -> Unchecked generics array creation for varargs parameter.

10 minutes ago, Zummy said:

Thank you again! I really appreciate all the help, that map tool is absolutely great! I do get a warning tho on my getObjects().closest() code -> Unchecked generics array creation for varargs parameter.

You can ignore that warning

  • Author
7 minutes ago, Explv said:

You can ignore that warning

Cool, thanks again! :) 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.