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.

HighScores - Other Players

Featured Replies

Good use-cases are for stakers to check stats of other players, pkers, etc, Mostly PvP usages.

 

USAGE:
 

        Highscores highscores = new Highscores("Zezima");
        System.out.println(highscores.getSkillLevel(Skill.HERBLORE));

CODE:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Arrays;

import org.osbot.rs07.api.ui.Skill;

import java.net.MalformedURLException;
import java.util.ArrayList;

public class Highscores {

	private final ArrayList<String> stats = new ArrayList<String>();

	public Highscores(final String player) {
		getStats(player);
	}

	public int getSkillLevel(final Skill skill) {
		int index = getSkillIndex(skill);
		String[] array = stats.get(index).split(",");
		return Integer.parseInt(array[1]);
	}

	public int getSkillExperience(final Skill skill) {
		int index = getSkillIndex(skill);
		String[] array = stats.get(index).split(",");
		return Integer.parseInt(array[2]);
	}

	private void getStats(final String player) {
		try {
			URL url = new URL("https://secure.runescape.com/m=hiscore_oldschool/index_lite.ws?player=" + player);
			URLConnection con = url.openConnection();
			BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));

			String inputLine;
			while ((inputLine = in.readLine()) != null) {
				stats.add(inputLine);
			}
			in.close();
		} catch (MalformedURLException e) {
			// CATCH
		} catch (IOException e) {
			// CATCH
		}
	}

	private int getSkillIndex(final Skill skill) {
		return Arrays.asList(Skill.values()).indexOf(skill) + 1;
	}
}

Too bad jagex highscores website is shit and often doesnt load :x 

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.