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 detect if another object is on top of an npc

Featured Replies

How can I tell if an object such as a wall is on top of an NPC? This would be used for when an NPC you want to thieve is totally hidden behind a wall. Yes, you can still thieve the NPC through the wall by simply clicking the wall where the NPC is behind it however seems extremely botlike as a player would rotate the camera to actually see the NPC. I tried to fix this by looping every object and checking if any of them contain the current mouse click x, y of the NPC. However, this also triggers if there is an object such as a wall behind the NPC, as well as when it's in front (which is desired behavior).
Is there some way to check if one object drawn on top of another? Or a better way to do this? Thanks!

Edited by dmmslaver

nevermind, misunderstood the question

Edited by swiffyp

nvm i thought the point was to click the npc even through a wall (eg ardy knights)

 

like teamcape said isVisible() tells you if it is covered or not :)

Edited by House

  • Author

 

isVisible()

 

boolean isVisible()
Checks if an entity is visible on the main game screen.

 

 

 

nvm i thought the point was to click the npc even through a wall (eg ardy knights)

 

like teamcape said isVisible() tells you if it is covered or not smile.png

Seems that isVisible always returns true if the object is clickable. The idea would be to move the camera around so that the player could actually see the npc and it not be totally obscured by a wall, no? It only returns false when the npc is out of camera view range/direction entirely, regardless of if it's obscured behind and object

Seems that isVisible always returns true if the object is clickable. The idea would be to move the camera around so that the player could actually see the npc and it not be totally obscured by a wall, no? It only returns false when the npc is out of camera view range/direction entirely, regardless of if it's obscured behind and object

 

try isOnScreen() or just looking through the API you might find something

 

http://osbot.org/api/org/osbot/rs07/api/model/Entity

Edited by Imateamcape

  • Author

then you need to write your own method.

No kidding mate thats why im here XD to see if the api allows checking to see which bounding box is on top!

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.