None 227 Posted May 1, 2017 Lookup Class 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 java.util.List; public class CheckLevels{ private int targetLevel; public CheckLevels(String username, int levelToCheck) { try { URL url = new URL("http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=" + username); URLConnection urlConnection = url.openConnection(); BufferedReader input = new BufferedReader(new InputStreamReader(urlConnection.getInputStream(), "UTF-8")); StringBuilder sb = new StringBuilder(); String scores; while ((scores = input.readLine()) != null) { sb.append(scores); } input.close(); String jsonResult = sb.toString(); if (jsonResult.contains("404 - Page not found")) { this.targetLevel = 1; } else { List<String> splitSkills = Arrays.asList(jsonResult.split(",")); this.targetLevel = Integer.parseInt(splitSkills.get(levelToCheck)); } } catch (IOException e) { e.printStackTrace(); } } public int getTargetLevel () { return this.targetLevel; } } Main class int overall = 1, attk = 3, defence = 5, str = 7, hp = 10, rng = 11, prayer = 13, magic = 15, cook = 17,wood = 19, fletch = 21, fish = 23, fire = 25,craft=27, smith = 29,mine=31,herb=33,agil=35,theif=37,slay=39,farm=41,rune=43,hunt=45,con=47; int woodLevel = new CheckLevels("PlayerName",wood).getTargetLevel();
LogicSoup 92 Posted May 1, 2017 public final Map<String, Stat> getStats(final String playerName) { final Map<String, Stat> stats = new HashMap<>(24); try { URL url = new URL("http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=" + playerName); URLConnection con = url.openConnection(); con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"); con.setUseCaches(true); try(InputStreamReader inputStreamReader = new InputStreamReader(con.getInputStream()); BufferedReader br = new BufferedReader(inputStreamReader)) { String[] splitVals = br.readLine().split(","); Stat overallStat = new Stat(Integer.parseInt(splitVals[0]), Integer.parseInt(splitVals[1]), Integer.parseInt(splitVals[2])); stats.put("Overall", overallStat); for (final Skill skill : Skill.values()) { splitVals = br.readLine().split(","); stats.put(skill.toString(), new Stat(Integer.parseInt(splitVals[0]), Integer.parseInt(splitVals[1]), Integer.parseInt(splitVals[2]))); } } } catch(final Exception e){ e.printStackTrace(); } return stats; } private final class Stat { private final int rank, level, xp; public Stat(final int rank, final int level, final int xp) { this.rank = rank; this.level = level; this.xp = xp; } public final int getRank() { return rank; } public final int getLevel() { return level; } public final int getXp() { return xp; } @Override public final String toString() { return String.format("Rank: %d, Level: %d, XP: %d", rank, level, xp); } } getStats("Zezima").get(Skill.ATTACK).getLevel()
Nex 2546 Posted May 2, 2017 Wow this would be sick in a staking bot. no it wouldnt, if people havent logged ina while stats are not the same as obtained from the highscore's (used to do this against staking bots in the past) pretty good to abuse it
Nex 2546 Posted May 2, 2017 You do realize, if you are not a bot this is still invisible information for you? Thats why you have a Combat-Level formula and check if the Stats match up to the opponent's combat level. Also it is limited to 6 Hours of unlogged Stats Edit: typos wasnt on the pest control bug a while ago uusing the bug u didnt log untill a game update and the staking bot that was around then (other bot) used highscore's only
MavericKing 6 Posted May 2, 2017 wasnt on the pest control bug a while ago uusing the bug u didnt log untill a game update and the staking bot that was around then (other bot) used highscore's only wat.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.