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.

get the current object we are interacting with?

Featured Replies

  • Author
1 hour ago, Lemons said:

Character.getInteracting() only works if the other Entity is a Character, aka a Player or NPC. To detect which rock is being mined, you can get a good guess via the players rotation. Note you can be mining a rock and not be near the rock under some circumstances, so don't consider this 100% reliable.


	private RS2Object getRock(Player p) {
		Position facing = p.getPosition();
		int rotation = p.getRotation();
		
		// Determine offset
		if (rotation < 256)       facing = facing.translate( 0, -1);
		else if (rotation < 768)  facing = facing.translate(-1,  0);
		else if (rotation < 1280) facing = facing.translate( 0,  1);
		else if (rotation < 1792) facing = facing.translate( 1,  0);
		else                      facing = facing.translate( 0, -1);
		
		// Search objects at facing position for "Rocks"
		return getObjects().get(facing.getX(), facing.getY())
				.stream().filter(o -> "Rocks".equals(o.getName()))
				.findFirst().get();
	}

I haven't tested this code but should be a good start.

Viston already helped me, thanks tho

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.