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.

how to make an area in the middle of objects

Featured Replies

i noticed that the coordinates X n Y aren't stable when playing a minigame like pest control, i would like to make an area in  the middle of these 4 towers

https://imgur.com/a/O39tL4L

i am making myself a pest control / killer / afker bot what would kill these enemies in that area? any help?

It's an instance, which gets loaded in a random "instance slot" in the instance space; hence the changing coordinates.

What you CAN do is create the area by looking at the 'Local coordinates' of the region that the instance is loaded in. Local coordinates are coordinates relative to the region base (the lower left corner of the currently loaded region). Even though the instance is loaded in different places, the local coordinates of objects, npcs and positions will be the same every time. At least until you wander far enough to trigger a new region load.

So upon entering the instance you could make the Area with something like:

Position southWestCorner = new Position(50, 50, 0).translate(getMap().getBaseX(), getMap().getBaseY());
Position northEastCorner = new Position(100, 100, 0).translate(getMap().getBaseX(), getMap().getBaseY());
Area fightArea = new Area(southWestCorner, northEastCorner);

assuming the Area spans from x:50, y:50 to x:100, y:100 in the local region

  • Author
26 minutes ago, FrostBug said:

It's an instance, which gets loaded in a random "instance slot" in the instance space; hence the changing coordinates.

What you CAN do is create the area by looking at the 'Local coordinates' of the region that the instance is loaded in. Local coordinates are coordinates relative to the region base (the lower left corner of the currently loaded region). Even though the instance is loaded in different places, the local coordinates of objects, npcs and positions will be the same every time. At least until you wander far enough to trigger a new region load.

So upon entering the instance you could make the Area with something like:


Position southWestCorner = new Position(50, 50, 0).translate(getMap().getBaseX(), getMap().getBaseY());
Position northEastCorner = new Position(100, 100, 0).translate(getMap().getBaseX(), getMap().getBaseY());
Area fightArea = new Area(southWestCorner, northEastCorner);

assuming the Area spans from x:50, y:50 to x:100, y:100 in the local region

yes exactly what i was looking for thank you very much!

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.