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.

player in an area or not

Featured Replies

Is it possible to determin wether ANOTHER player (someone you dont know the name of) is in a certain area with like a boolean? (for example the area where u are in). Is there a method for that or do u have to create something urself?

 

for example:

 

final Area YOUR_AREA = new Area(bla,bla,bla,bla);

 

if(YOUR_AREA.contains(/*a player*/)){

       //...

}

 

 

Edited by dokato

Is it possible to determin wether another player is in a certain area with like a boolean? (for example the area where u are in). Is there a method for that or do u have to create something urself?

 

for example:

 

final Area YOUR_AREA = new Area(bla,bla,bla,bla);

 

if(YOUR_AREA.contains(/*a player*/)){

       //...

}

yes you can

  • Author

yes you can

 

fuck Obama

But i can't, plz tell me how then

spoonfeed me a bit :)

Player otherPlayer = getPlayers().closest("OtherPlayerName");

 

if(YOUR_AREA.contains(otherPlayer.getPosition()) {

    //Interesting things happen

}

 

EDIT:

 

to get a list of players in your area, you can do:

 

List<Player> playersInArea = getPlayers().filter(new AreaFilter<Player>(YOUR_AREA));

Edited by FrostBug

fuck Obama

But i can't, plz tell me how then

spoonfeed me a bit smile.png

 

 

Player otherPlayer = getPlayers().closest("OtherPlayerName");

 

if(YOUR_AREA.contains(otherPlayer.getPosition()) {

    //Interesting things happen

}

 

EDIT:

 

to get a list of players in your area, you can do:

 

List<Player> playersInArea = getPlayers().filter(new AreaFilter<Player>(YOUR_AREA));

what Frostbug said ^_^ i forgot to post code lmao xD

  • Author

Ow sry my bad, 

i meant if that player is a random player who u dont know the name of, but just happens to be in that area. What to do then?

Edited by dokato

Ow sry my bad, 

i meant if that player is a random player who u dont know the name of, but just happens to be in that area. What to do then?

 like frostbug said:

 

List<Player> playersInArea = getPlayers().filter(new AreaFilter<Player>(YOUR_AREA));

 

this will return a list of all the players in the area.

Ow sry my bad, 

i meant if that player is a random player who u dont know the name of, but just happens to be in that area. What to do then?

you create the list and do a simple list#isEmpty() boolean check. 

 

empty == what you want :D

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.