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.

Hovering over next NPC?

Featured Replies

Im trying to get my fishing script to hover over the next fishing spot to interact with.

 

I use josedpay's hovering snippet from this thread:

http://osbot.org/forum/topic/54533-hovering-snippet-osbot-2/

 

Heres what im currently working with, but it only very rarely hovers over fishing spots.

NPC Fishing_spot = npcs.closest(FISHING_ID);
if(myPlayer().isAnimating()){
	int playerX = myPlayer().getPosition().getX() + 2;
	int playerY =  myPlayer().getPosition().getY() + 2;
	int playerX2 =  myPlayer().getPosition().getX() - 2;
	int playerY2 =  myPlayer().getPosition().getY() - 2;
	Area NearPlayer = new Area(playerX, playerY, playerX2, playerY2);
	if(Docks1.contains(myPlayer())){
		if(Docks1.contains(Fishing_spot)){
			if(!NearPlayer.contains(Fishing_spot)){
				if(Fishing_spot.isVisible()){
					hover(Fishing_spot);
				} else {
					camera.toEntity(Fishing_spot);
				}
			}	
		}
	} else if(Docks2.contains(myPlayer())){
		if(Docks2.contains(Fishing_spot)){
			if(!NearPlayer.contains(Fishing_spot)){
				if(Fishing_spot.isVisible()){
					hover(Fishing_spot);
				} else {
			                camera.toEntity(Fishing_spot);
				}
			}
		}
	}
}

you can hover with entity#hover()

you can get player area player#getArea(radius);

 

filter entity, using name, if entity not interacting with you, and within your area.

 

base snippet

	public boolean hoverNextEntity(String name)	{
		 RS2Object entity = objects.closest(new Filter<RS2Object>()	{
			@Override
			public boolean match(RS2Object o) {
				//filter them out
				return true;
			}
		});			
		 return entity.hover();
	}
  • Author

Oh crap, got a huge brainfart so I didnt figure that out... Thanks though.

Oh crap, got a huge brainfart so I didnt figure that out... Thanks though.

finding the next available entity is he head ache. one you find it. You do entity.hover(); then your done.

Guest
This topic is now closed to further replies.

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.