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.

Grabbing all the local players.

Featured Replies

Hey im trying to hop as soon as there is another person in my local area.. i got this but it counts myself in too, i dont know what to do its been a while >smile.png

    public void checkforPlayers() throws InterruptedException {
        List<Player> playerss = players.getAll();
        for (Player p : playerss) {
                size++;
            
        }
            if (size >= 1) {
              log("Some dude was nearby.. hopping!");
                     worldHopper.hop(WORLDS[MethodProvider.random(WORLDS.length)]);
                state = "WORLDHOP";
                size = 0;
           
        }
    }

Edited by Daviyow

 

Hey im trying to hop as soon as there is another person in my local area.. i got this but it counts myself in too, i dont know what to do its been a while >smile.png

    public void checkforPlayers() throws InterruptedException {
        List<Player> playerss = players.getAll();
        for (Player p : playerss) {
                size++;
            
        }
            if (size > 1) {
              log("Some dude was nearby.. hopping!");
                     worldHopper.hop(WORLDS[MethodProvider.random(WORLDS.length)]);
                state = "WORLDHOP";
                size = 0;
           
        }
    }

XD if it counts you then just make it activate if there is more than one person (e.g. yourself in the area)? :P Unsure if you're asking for more but that should work fine.


public boolean isMyPlayerAlone(){

return getPlayers().getAll().size() <= 1;

}

Edited by Botre

 public boolean amIForeverAlone(){
       return getPlayers().getAll().size() <= 1;
        }

fixed for you

depending on how you want to do this. Because the method above only applys for people within the same region. Why am i saying this? For my safe cracker i dont want to use a method to see how many people are near the safe. If i use the method above it usually return true. Because youll have people near rouge cooking food or something.

 

So you could make a area and check to see how many people there is.

 

not too sure how you want to make the area but heads up there myPlayer#getArea(raidus).

	public boolean imAlone()	{
		Area area = null;//create your own area
		int amount = 0;
		
		for (Player player: players.getAll())	{
			if (player != null && !player.getName().equalsIgnoreCase(myPlayer().getName())){
				if (area.contains(player))	{
					amount++;
				}
			}
		}
		return amount == 0;	
	}
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.