Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buy OSRS Gold

Sell OSRS Gold
Sign in to follow this  
sporadicx

Is there no "findNearest" method for ALL ground items?

Recommended Posts

I'm not interested in throwing in a filter or to specify a particular item to pick up. Is there any condition where the API covers this? Better yet, has anyone attempted to do this or write their own method?

Yes..

 

GroundItems#findNearest

Edited by erickho123

Share this post


Link to post
Share on other sites

My apologies for the confusion fellas.

Is there a condition for the findNearest method that can get every ground item? If not, is there perhaps an alternative method that can do this?

I've attempted to simply pass null to findNearest but in my attempt it returns no items. Its just a simple function call, but can post code if needed.

Edited by sporadicx
  • Like 1

Share this post


Link to post
Share on other sites

Use this:

RSGroundItem[] items = GroundItems.sortByDistance(Player.getPosition(), GroundItems.getAll());

or:

RSGroundItem[] items = GroundItems.findNearest(new Filter<RSGroundItem>() {			@Override			public boolean accept(RSGroundItem arg0) {				return true;			}		});

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By drunksigma
      I get nothing as output even though my bank  is open.
      @Override public void run() { while(true) { sleep(200); RSItem itemarray[] = Banking.getAll(); for(RSItem index : itemarray) { General.println(index.name + " ID: " + index.getID() + " Stack: " + index.getStack()); } }  
    • By SGMlife.com
      SGMlife Buying RuneScape, Old School Gold, items 24/7
      Online Chat
      Payment Methods:
      1. Paypal (verified paypal account)
      2. Webmoney
      _____________________________________________________________________________
      Contact US:
      Email: [email protected]
      Skype: SGMlife
      _____________________________________________________________________________
    • By themanman
      I'm doing this poll to see if this is a widespread problem or not. This problem has been plaguing me for months and as a result I have not been able to use all the scripts I have purchased to maximum capacity. (No credits = no VIP = no multiple instances/tabbed botting). Frankly, the current "solutions" (e.g. buying credits at 135%-140% over the regular price from third parties) are inadequate for me. Furthermore I have been blocked from using PayPal and Stripe albeit I have never tried to charge-back my credits. On a side note, I'm not going to submit my passport number, driver's license number, state ID number, nor Social Security number to AliPay. I already did that once with PayPal. I don't need my info floating around on multiple platforms. Neither will I start a Bitcoin wallet because I've never used one and will never use one. Besides, there are too many threads where people have posted issues with receiving credits after paying for them with Bitcoins.
      Your responses are appreciated.
       
    • By hobfmule
      I am writing a program with a central while-loop.  The loop has if-statements that call methods.  I am caught between 2 situations: 
      1) My methods contain while loops
      2) Create a boolean for each method so the main loop runs the method until the boolean is satisfied
      Problem with 1): Methods gain full control - while the method is in control, the main loop can't make other checks such as run toggling
      Problems with 2): There are a very large amount of booleans. Complex methods must be broken up into simple tasks, creating more methods
    • By HabbaTheJutt
      Is it safe to transfer items/gold from one bot to another if they are both running on separate proxies? I would most likely be careful and try to keep it to like 3-5 trades between each at most. 
      Thanks
      P.S. Sorry if this is the wrong forum. I'm new. 
       
  • Our picks

    • Hello everyone,

      Last week we tried to roll out Auth0 Login, but we lost that battle. Now it's time to win the war!

      Important changes

      When logging into the client, you'll now have to enter your Auth0 account credentials instead of your forums credentials

      Note: 2FA is still handled through your forums account (for the time being)



      Changes for existing users

      You'll have to link your Auth0 account to your forums account here: https://tribot.org/forums/settings/login/?service=11


      Auth0 accounts have been created for most existing users. Please use your forums email address and password to login.



      Important notes

      Make sure to verify your email address upon creating a new Auth0 account


      When we mention your Auth0 account, we mean your account used for auth.tribot.org as displayed below
      • 65 replies
    • To better support the upcoming changes (TRiBot X, new repository), we're switching our login handler to Auth0. Instead of logging in with the standard form, you'll now be required to login through our Auth0 application.

      All existing accounts which have been used within approximately the past year have been imported into Auth0 using the same email and password combination which has been stored on the forums.

      What does this mean for users?

      Your account credentials are now even more securely stored


      You'll be able to login via Facebook, Google, and others in the future


      Is there anything users have to do differently now?

      Existing users: You'll have to login with the standard login, open your Account Settings, then link your Auth0 account


      New users: You'll be redirected to our Auth0 app (auth.tribot.org) where you'll be able to create an account


      Why was this change made?

      The new apps we are creating (such as the new repository) aren't able to use the forums to handle user logins


      To centralize all user accounts in one area


      To ensure that the client login doesn't go down when the forums are having problems


      To speed up our development


      Other considerations

      There's no documentation or official support for using Invision Community combined with Auth0, so there are still a few kinks we're working out


      We're in the works of creating an account management panel specifically for Auth0 accounts (ETA August)


      It's not possible to change email addresses for the time being (this will be resolved this August)


      Changing passwords is a weird process for the time being. To change your password, you'll have to use the "Don't remember your password" tool on the Auth0 login page
        • Like
      • 11 replies
    • Over the past month, we've been working hard on TRiBot's new repository - a much needed update. This change has been deemed necessary for TRiBot X, and will allow us to really speed up development of all aspects of TRiBot.

      Today we are going to share what we've been working on!


      Now you must be wondering what kind of features the new repository will have.... well, you'll have to be patient for a little while longer. We're still figuring out various technical aspects so we can't provide answers to all possible questions. We're also focusing on development rather than writing about it so that everyone can get access to our latest developments at lightning speed. I will however answer a few users' questions.

      We're planning on a release of this early to mid August, giving users some goodies before TRiBot X's release.

      Thank you all for being patient. I hope everyone is excited as much as I am!
        • Like
      • 17 replies
    • Over the past few months, I’ve been working diligently on a new project - TRiBot X. Everything has been written from the ground up, with all of the best practices of software engineering. Every aspect of TRiBot has been re-imagined to support three main goals: flexibility, useability, and reliability.
        • Like
      • 50 replies
    • Come give us feedback on the next version of TRiBot!
        • Thanks
        • Like
      • 86 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...