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.

Getting Item Prices

Featured Replies

I've tried playing around with many of the snippets in the snippet section but just can't seem to get anything working that pulls the price of an item.

What I'm trying to do (think I should be doing...) is looking up the item name or ID against the RSBuddy data (https://rsbuddy.com/exchange/summary.json) and then outputting this as an integer.

Can anyone point me in the right direction?

  • Author

Changing source and using the official osrs database.
Came across this snippet of code but can't wrap my head around it:

 

	private Optional<Integer> getPrice(int id){
	    Optional<Integer> price = Optional.empty();

	    try {
	        URL url = new URL("http://services.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=" + id);
	        url.openConnection().setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36");
	        url.openConnection().setUseCaches(true);
	        BufferedReader br = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream()));
	        String[] data = br.readLine().replace("{", "").replace("}", "").split(",");
	        br.close();
	        price = Optional.of(Integer.parseInt(data[0].split(":")[1]));
	    } catch(Exception e){
	        e.printStackTrace();
	    }
	    return price;
	}

 

  • Author
6 minutes ago, Gunman said:

@CrashBandiboob If you didn't know OSBot API can do this it's in this section of it https://osbot.org/api/org/osbot/rs07/api/GrandExchange.html

But if you didn't wanna use the API then sorry I got no snippet for you. I think the OSBot API uses OSBuddy's GE prices.



 

Oh wow! I should really read through the API doc one of these days....

21 hours ago, Gunman said:

@CrashBandiboob If you didn't know OSBot API can do this it's in this section of it https://osbot.org/api/org/osbot/rs07/api/GrandExchange.html

But if you didn't wanna use the API then sorry I got no snippet for you. I think the OSBot API uses OSBuddy's GE prices.
 

That only gets the price of the item your buying/selling in the grand exchange. 

edit: read post below :boge: 

Edited by FuryShark

8 hours ago, FuryShark said:

That only gets the price of the item your buying/selling in the grand exchange. 

Not 

getGrandExchange().getOverallPrice(id of item goes here)

It will grab the GE price not what you're buying/selling it for in the GE offer slots.

Edited by Gunman

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.