theknig 4 Posted November 30, 2021 (edited) Is it possible to get the item name or buy limit from its ID? for example ID=2 will return Cannonball and 11000. Thanks Edited November 30, 2021 by theknig
Hashtag 8950 Posted November 30, 2021 You can get the name by instantiating a new item object: "new Item(id, 1).getName()". To get the buy limit you'd need to query an online database. theknig 1
Phantomwire 2 Posted December 23, 2021 To follow up on Hashtag's comment - you can use the official OSRS api for pricing (and name to some extent, though it'd be more longwinded than just .getName()). Item Prices - https://prices.runescape.wiki/api/v1/osrs/latest?id=2 Information on how to use - https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices#Query_parameters You can query your item prices here but please don't flood the API by looping through tonnes of IDs, you'd be better off just doing a blind query with no ID set for all items and then looping locally. Item Details - https://prices.runescape.wiki/api/v1/osrs/mapping If you were using the mapping for item names, I'd probably query mapping once at the start then loop through and store item "objects" in a hash map.
Anemyasko 1 Posted June 21, 2023 (edited) Hey there! It's possible to get the item name and buy limit from its ID. You can use the ID=2 to retrieve the item "Cannonball" and its buy limit 11000. You should use an appropriate API or database to access item information based on their IDs. Also, there are services like this one https://fakeyourdrank.com that help solve the issue when you've lost an ID. Good luck with your item retrieval! Edited June 26, 2023 by Anemyasko
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now