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 Search For Number Of Players Visible?

Featured Replies

I feel so stupid asking this, but I've spent awhile searching through the forums for similar issues and tried figuring it out reading the api without any success.

How can I search for how many people are visible on my minimap? (does it include me?)

Please include required imports, thanks so much.

 

Also a small request: I feel a tutorial regarding navigating throughout the api effectively would be very beneficial for new users trying to learn to script. If someone finds spare time to create an informative thread about the api library I would greatly appreciate it.

 

Thanks for reading :D

x = 0

 

For (Player p : all players) {

if (p is visible) {

add 1 to x

}

}

 

To get all players -> getPlayers().getAll() @ org.osbot.rs07.api.Players

Visibility check -> p.isVisible() (don't worry about the import it should come via the Players one)

 

Edit: this isn't for minimap visibility, an easy way to do that would be to iterate through all players and check for their distance (from you) instead of visibility smile.png

 

Edit 2: getPlayers().getAll() returns a list that does include your player, you can start x at -1 or subtract 1 after counting all players if you don't want the number to include you.

 

Hope this helps.

Edited by Botrepreneur

  • Author

Thanks so much for your speedy replies!

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.