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.

Distance to x and y position

Featured Replies

I'm asking to see if it's possible to see how close you are to a specific tile. something like this:

 

if (distanceTo(tile) <6) {

bank();

}else{

webwalk(varrockeast);

}

I know syntax is not correct in example just looking to see if it is possible. I know you can check areas and such but i want to see if you can do it this way. In API I can only see distanceto entity. I'm probably being a bad. Can someone help? if you find it in api can you tell me where you found it too. thanks :)

 

EDIT:

Would shift clicking be hard to implement too? wouldn't know where to start with this.

Edited by mr bot420

use the.distance(entity) method when trying to calculate the distance

e.g

	if(Banks.GRAND_EXCHANGE.getRandomPosition().distance(myPosition()) < 6) {
	//code
	}
	 
	//another example
	private final Position alohaSnackbar = new Position(x,y,z);
	if(alohaSnackbar.distance(myPosition()) <= 6) //less than or equal to 6 {
	//code
	}
	

21 minutes ago, mr bot420 said:

I'm asking to see if it's possible to see how close you are to a specific tile. something like this:

 

if (distanceTo(tile) <6) {

bank();

}else{

webwalk(varrockeast);

}

I know syntax is not correct in example just looking to see if it is possible. I know you can check areas and such but i want to see if you can do it this way. In API I can only see distanceto entity. I'm probably being a bad. Can someone help? if you find it in api can you tell me where you found it too. thanks :)

 

EDIT:

Would shift clicking be hard to implement too? wouldn't know where to start with this.

P.S your player is a entity so .distance(entity) will apply to myPlayer().getPosition() or simply myPosition() both r the same thing i guess

1 hour ago, mr bot420 said:

EDIT:

Would shift clicking be hard to implement too? wouldn't know where to start with this.

I think Alek added shift click dropping in the latest build, which is enabled only if your settings allow it.

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.