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.

Object Help

Featured Replies

What I'm trying to do:

-Two objects are a few tiles apart

-Both have the same ID until you click on one and changes 

-Interact with one, sleep till the ID is changed, interact with the other, sleep, and repeat

 

What I'm having trouble is with how would I differentiate that object ID is changed? I already have defined both IDs of the object but not sure how to compare them.  I would think if i had a CondSleep -> return player.animating; it kind of spam clicks the object because it hasn't changed yet. So with that, I think I need a better sleep, or could i just do sleep(int); 

 

What I'm trying to do:

-Two objects are a few tiles apart

-Both have the same ID until you click on one and changes 

-Interact with one, sleep till the ID is changed, interact with the other, sleep, and repeat

 

What I'm having trouble is with how would I differentiate that object ID is changed? I already have defined both IDs of the object but not sure how to compare them.  I would think if i had a CondSleep -> return player.animating; it kind of spam clicks the object because it hasn't changed yet. So with that, I think I need a better sleep, or could i just do sleep(int); 

ID? why not string name?

ID? why not string name?

 

nvm xD

RS2Object object1 = getObjects().closest(o -> o.getId() == 1 && o.getPosition().getX() == 1 && o.getPosition().getY() == 1);

RS2Object object2 = getObjects().closest(o -> o.getId() == 2 && o.getPosition().getX() == 2 && o.getPosition().getY() == 2);

 

if (object1 != null) {

//interact with object1

} else {

if (object2 != null) {

//interact with object2

}

Edited by iJodix

  • Author

RS2Object object1 = getObjects().closest(o -> o.getId() == 1 && o.getPosition().getX() == 1 && o.getPosition().getY() == 1);

RS2Object object2 = getObjects().closest(o -> o.getId() == 2 && o.getPosition().getX() == 2 && o.getPosition().getY() == 2);

 

if (object1 != null) {

//interact with object1

} else {

if (object2 != null) {

//interact with object2

}

thx :)

RS2Object obj = blah

ConditionalSleep -> return obj.getId() == the changed id

If the objects are not moving position, use the x and y coordinates as iJodix suggested to retrieve a certain object.

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.