January 18, 200719 yr hi there. im writing a calculator to show your current xp and lvls for all your skills and then display them in order of which is closest to lvling up. i have made the program already but it needs a seperate text file which lists :(skillname currentlvl current xp) so thats the problem. the solution is to get that data from the highscores but i have found nothing that will help me do that so if any one has any idea how to please could you enlighten me the program is in c++ but i can use a few other languages so it wont take long to rewrite it if nessacery. thanks in advance
January 19, 200719 yr First, punctuation. Use it. Please. I had to read your post 4 times to understand WTH you wanted. :? Anyway, the only current way to get highscore info is to rip/download the html page within your code, remove the html tags, and extract the needed data from there. Ripping this link: http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=zezima will return the html page with Zez's stats, which then has to be cleaned up (remove html) and then parsed in some way to extract the neededs stats.
January 19, 200719 yr Sounds fun but don't expect anyone to use it in less it has something special to offer. It would be cool to see it in a Java applet so people would not have to download anything and could be assured there is no key loggers in it. An idea of how to remove the html tags in a cool way would be to remove all things in <> except if it says table or td or tr or th.
January 19, 200719 yr This is the method I use: int getLevel(String RsName, String Skill) { String level = null; try{ String buffer = null; BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1="+RsName).openStream())); while((buffer = reader.readLine()) != null) { if(buffer.equalsIgnoreCase(Skill)) { reader.readLine(); reader.readLine(); level = reader.readLine().replaceAll("","").replaceAll("",""); break; } } }catch(Exception e) {}; return (Integer.parseInt(level)); } It's not c++ but c++ and Java do look alot like each other.
January 19, 200719 yr Author Hi again. Sorry about my punctuation and probably my spelling but i was in a hurry to post it and finish my program.thanks for the advice ill try and use the advice youve gave me and ill let you know if i can get it to work thanks again :)
January 22, 200719 yr Here is a perl script i use in one of my modules: use LWP::Simple; @runestats = ( 'Attack', 'Defence', 'Strength', 'Hitpoints', 'Ranged', 'Prayer', 'Magic', 'Cooking', 'Woodcutting', 'Fletching', 'Fishing', 'Firemaking', 'Crafting', 'Smithing', 'Mining', 'Herblore', 'Agility', 'Thieving', 'Slayer', 'Farming', 'Runecraft', 'Construction', 'Hunter', ); my $content = get("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=$user"); if($content) { if($content =~ /does not feature/) { $STATS{'Success'} = 0; $STATS{'Error'} = "$user is not in the high score list!"; } else { $STATS{'Success'} = 1; foreach(@runestats) { $content =~ /$_.*?\>(\d{2}|Not Ranked)\; $STATS{$_} = $1; } } } else { $STATS{'Success'} = 0; $STATS{'Error'} = "Could not contact high score list!"; } So $STATS{'Attack'} would contain the level for attack. It currently doesn't get experience. I've been meaning to add that, but have never got around to it.
Create an account or sign in to comment