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.

Getting a specific object (Lumby bank)

Featured Replies

Is there a way to get an object that has the same ID as another?

 

For example, in the lumbridge bank, there are two staircases. They have the same object ID, so what would be the way to get the one that was farther away?

Is there a way to get an object that has the same ID as another?

 

For example, in the lumbridge bank, there are two staircases. They have the same object ID, so what would be the way to get the one that was farther away?

 

 

You could use an area. Get the object that is inside of the correct area, and then use that object. Also, dont use object ids unless you are automatically grabbing the ids each time the script runs. Otherwise you will need to update your script each time the object ids change, which is sometimes weekly. ^_^

  • Author

Thank you for the response!

 

And I don't use IDs too often, but I was giving it a try this time. Anyways, I am trying an area now, and it seems to be a better solution what I was going to try and conjure up ^_^.

Is there a way to get an object that has the same ID as another?

For example, in the lumbridge bank, there are two staircases. They have the same object ID, so what would be the way to get the one that was farther away?

I wouldn't reccomend using IDs in your scripts as you will need to update them everytime RS updates (bleh). You can save the objects and then filter them to find the one you want

I wouldn't reccomend using IDs in your scripts as you will need to update them everytime RS updates (bleh). You can save the objects and then filter them to find the one you want

Not necessarily, item/npc ID's hardly (if ever) change. The only things that switch up a lot are ID's for randoms and things that allow passage like doors and gates.

Well for staircases remember that they have a different z value

 

the bottom staircase is most likely z = 0

when u climb up it the z = 1

and on the top floor the z = 2

 

Entity ladder = this.objects.closest("Stairs");

if (ladder != null && ladder.getZ() == 1) {

//climb

}

 

^basic idea of what im trying to say

 

Also you can use this system to check whether you've climbed up the stairs

 

eg:

boolean climbedUpFirstSetOfStairs;

 

if (this.myPlayer().getZ() == 1) {

climbedUpFirstSetOfStairs = true;

}

 

^ for example. Even if flags are messy / unideal, they do the job.

 

Hope I helped!

-apaec

 


public class PositionFilter<E extends Entity> implements Filter<E>{

private final Position pos;

private final String name;

public PositionFilter(Position pos, String name) {

this.pos = pos;

this.name = name;

}

@Override

public boolean match(E e) {

return e.getPosition().equals(pos) && e.getName().equalsIgnoreCase(name);

}

}

Guest
This topic is now closed to further replies.

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.