Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Item Name Searcher


    Neffarion
     Share

    Recommended Posts

    Hello everyone, if you have a script with a bunch of ID's and cant be bothered to get all the names for all of them (or the other way around), you can use this small class along with the file to get the name or ID of any item within the game.

     

    I have made an ID File list along with a class you can copy paste into your projects

    Download archive with files | Mirror

     

    How to use:

    String filepath = "PathToFileInsideYourProject/osrs_items.data";
    int id = 952;
    
    ItemsReader reader = new ItemsReader(filepath);
    String itemName = reader.getItemName(id);
    
    // This will give you: Spade
    You can also do

    String filepath = "PathToFileInsideYourProject/osrs_items.data";
    String name = "Spade";
    
    ItemsReader reader = new ItemsReader(filepath);
    int id = reader.getItemId(name);
    
    // This will give you: 952
    To get the path of the id list file just follow your project path from src

    Example:

    /util/osrs_items.data (inside util package/folder inside src)

    or

    /resources/osrs_items.data (inside resources package/folder inside src)

     

    The id list file is about 216 KBytes so it will add just a bit of weight into your project

    Note: If you want to get ID from name take note that some items have same name therefor it will give you the first item id it finds.

    Each search wont be intensive on your client but if you mass search items it wont be good. (Make sure you don't over do it all at once ;))

    Edited by Neffarion
    Link to comment
    Share on other sites

    Could also query something like this https://rsbuddy.com/exchange/names.json which i suppose is only optimal if you are also trying to find prices xd

    True, this is local file however, doesn't need rsbuddy

    This is mostly used for grand exchange, this way you can just pass an ID and get the name of the item you want to buy

    Edited by Neffarion
    Link to comment
    Share on other sites

    The rsbuddy JSON only has items that are tracked by them aka items sellable in GE. It doesn't have untreadable items or tradable items that can't be sold it GE such as partially eaten cake and teleport jewelry with charges missing. Neffarions list is also missing items such as the Hill Giant Club which is one of the newer items.

    Link to comment
    Share on other sites

    The rsbuddy JSON only has items that are tracked by them aka items sellable in GE. It doesn't have untreadable items or tradable items that can't be sold it GE such as partially eaten cake and teleport jewelry with charges missing. Neffarions list is also missing items such as the Hill Giant Club which is one of the newer items.

    You use it for whatever you like, I just gave example for GE. if you really want, you can always just get an updated list to your needs.

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.