Skip 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.

Get zybez price method.

Featured Replies

Have fun.

/**
* @author FearMe
* @param name the exact item name
* @return the price(not 100% accurate)
* @throws IOException
*/
    private int getPrice(String name) throws IOException {
     if (name.length() <= 3) return 0;
     
        URL url = new URL("http://forums.zybez.net/runescape-2007-prices/api/item/" + name.replace("+", "%2B").replace(' ', '+').replace("'", "%27"));
        URLConnection con = url.openConnection();
        con.addRequestProperty("User-Agent", "Mozilla/5.0");
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String line = "";
        String inputLine;
 
        while ((inputLine = in.readLine()) != null)
                line += inputLine;
 
        in.close();
 
        if (!line.contains("average\":\""))
                return 0;
 
        line = line.substring(line.indexOf("average\":\"")
        + "average\":\"".length());
        line = line.substring(0, line.indexOf("\""));
        return (int) Math.round(Double.parseDouble(line));
    }

Edited by FearMe

If you can extend it to check for buy/sell, and only if there's recent offers, and alch prices, that'd make it a lot more usable. That's what I do for my Slayer script :)

  • Author

If you can extend it to check for buy/sell, and only if there's recent offers, and alch prices, that'd make it a lot more usable. That's what I do for my Slayer script smile.png

This is more for stuff like calculating money gained per hour, nothing big.

If i recall correctly there's a full-fletched library on like the 2nd or 3rd page of this subforum.

This is more for stuff like calculating money gained per hour, nothing big.

If i recall correctly there's a full-fletched library on like the 2nd or 3rd page of this subforum.

There is one but I don't believe it checks for actual offers, and therefor if there's an item with a price of 1,000,000 but that's only people selling, no one buying, it will still return that (incorrect) result.

Note that certain items with apostrophe or plus signs in their name may require URL encoding

replace "+" with %2B and replace " ' " (apostrophe) with %27

  • Author

Note that certain items with apostrophe or plus signs in their name may require URL encoding

replace "+" with %2B and replace " ' " (apostrophe) with %27

Totally forgot that some items have a " ' " in the name, plus sign works fine though.

Totally forgot that some items have a " ' " in the name, plus sign works fine though.

I can't imagine that plus signs would work fine, since they are interpreted as spaces

a Dragon dagger(p+) for example, would be translated to Dragon+dagger(p+) = 3 words: "Dragon", "dagger(p" and ")"

Edited by FrostBug

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.