Mink Posted October 26, 2014 Share Posted October 26, 2014 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 Link to comment Share on other sites More sharing options...
darkxor Posted October 26, 2014 Share Posted October 26, 2014 Can try players.getAll().size() - 1 Link to comment Share on other sites More sharing options...
Botre Posted October 26, 2014 Share Posted October 26, 2014 (edited) 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 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 October 26, 2014 by Botrepreneur 2 Link to comment Share on other sites More sharing options...
Mink Posted October 26, 2014 Author Share Posted October 26, 2014 Thanks so much for your speedy replies! Link to comment Share on other sites More sharing options...