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.

Getting the Position in a Position

Featured Replies

Hello all, hope your day is going great. 

I am wondering if it is possible to get the coordinates inside of a position.

For example, you have 

Position pos  = new Position (x,y,z);

Now I do

pos.hover(bot); 

This will hover randomly within the position. I was wondering if there is a way to hover a specific point or range within the position. 

Thanks for your help :)

Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call.

 

Position pos  = new Position (1,2,3);

if(pos.isVisible(bot)){
	Polygon p = pos.getPolygon(bot);
	Rectangle bounds = p.getBoundingBox();
}

 

Edited by k9thebeast

adding on to what k9thebeast suggested


aSCvzNS.png  black is Rectangle, white is Polygon (more accurate)

if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions).

 

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints

if you want to mess around with the points

 

Edited by Stimpack

  • Author
6 hours ago, k9thebeast said:

Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call.

 


Position pos  = new Position (1,2,3);

if(pos.isVisible(bot)){
	Polygon p = pos.getPolygon(bot);
	Rectangle bounds = p.getBoundingBox();
}

 

 

5 hours ago, Stimpack said:

adding on to what k9thebeast suggested


aSCvzNS.png  black is Rectangle, white is Polygon (more accurate)

if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions).

 

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints

https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints

if you want to mess around with the points

 

Thank you both!

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.