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.

Instances with unique coordinate values

Featured Replies

Does anyone have any suggestions for pathing and interacting within an instance where (x,y) coordinates are dynamic and change every time you enter the instance? 

Currently, since the instances done change only the (x,y) values I was going to create the initial path and interactions, then calculate the correct coordinates based on the players starting position in the instance. However, does anyone have any suggestions for alternative solutions, perhaps a solution that is already solved :)

1 hour ago, Rudolph123 said:

Does anyone have any suggestions for pathing and interacting within an instance where (x,y) coordinates are dynamic and change every time you enter the instance? 

Currently, since the instances done change only the (x,y) values I was going to create the initial path and interactions, then calculate the correct coordinates based on the players starting position in the instance. However, does anyone have any suggestions for alternative solutions, perhaps a solution that is already solved :)

Find an object that will always be there and get its position
Then do some math to set the values of the area you need.

myTipJarSpace = getObjects().closest("Tip jar space");
        if (myTipJarSpace != null) {
          int larderAreaX1 = myTipJarSpace.getX() + 3;
          int larderAreaY1 = myTipJarSpace.getY();
          int larderAreaX2 = myTipJarSpace.getX() + 4;
          int larderAreaY2 = myTipJarSpace.getY() - 1;
          Area buildLarderArea = new Area(larderAreaX1, larderAreaY1, larderAreaX2, larderAreaY2).setPlane(myPosition().getZ());

I do this in a construction script to set the area I want my larder to be when building the kitchen because I have to rotate the room to get the larder where I want it to be.

 

Generally you shouldn't really care about the exact positions or areas of objects, or at least i don't. The only time I did was Areas of banks. 
I rely more on the locations of Rs2Objects or Entitles instead since those objects can be easily interacted with using the api, and that is likely what you're going to do anyway. Your dynamic instance is still going to have common Rs2Objects/Entities right, why not use those to navigate instead?

Edited by yfoo

  • Author
9 hours ago, yfoo said:

Generally you shouldn't really care about the exact positions or areas of objects, or at least i don't. The only time I did was Areas of banks. 
I rely more on the locations of Rs2Objects or Entitles instead since those objects can be easily interacted with using the api, and that is likely what you're going to do anyway. Your dynamic instance is still going to have common Rs2Objects/Entities right, why not use those to navigate instead?

 

12 hours ago, Alakazizam said:

Find an object that will always be there and get its position
Then do some math to set the values of the area you need.

myTipJarSpace = getObjects().closest("Tip jar space");
        if (myTipJarSpace != null) {
          int larderAreaX1 = myTipJarSpace.getX() + 3;
          int larderAreaY1 = myTipJarSpace.getY();
          int larderAreaX2 = myTipJarSpace.getX() + 4;
          int larderAreaY2 = myTipJarSpace.getY() - 1;
          Area buildLarderArea = new Area(larderAreaX1, larderAreaY1, larderAreaX2, larderAreaY2).setPlane(myPosition().getZ());

I do this in a construction script to set the area I want my larder to be when building the kitchen because I have to rotate the room to get the larder where I want it to be.

 


In the case of some instances, there are no objects/entities within render distance. Specifically in my case, the entrance to the instance is the only Rs2Oject within 50+ tiles in any direction. I'm not sure how close I need to be to the Rs2Object in order to interact with it. I suppose I can walk in a general direction of the nearest object I want to interact with until its populated in the script. I will try this, thanks for the input.

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.