oldschoolgg / oldschooljs

A utility library for all things oldschool runescape related.
https://docs.oldschool.gg/
MIT License
47 stars 51 forks source link

When fetching the highscores for boss kc the first 4 are incorrect #1

Closed jsasuga closed 4 years ago

jsasuga commented 4 years ago

I've started using the library to get some info for a personal project and I noticed that the first 4 boss kcs are incorrect (excluding callisto and cerberus because I noticed the data on them isn't on the response from the API).

Here's my example code

const Hiscores = require('oldschooljs').Hiscores;

Hiscores.fetch('Inversion').then(player => {
    console.log(player.bossRecords);
}).catch(console.error);

this is the response I get:

{ abyssalSire: { rank: -1, score: -1 },
  alchemicalHydra: { rank: 26144, score: 65 },
  barrowsChests: { rank: 28494, score: 81 },
  bryophyta: { rank: 26211, score: 370 },
  cerberus: { rank: -1, score: -1 },
  chambersofXeric: { rank: 1960, score: 1305 },
  chambersofXericChallengeMode: { rank: 1336, score: 40 },
  chaosElemental: { rank: 4324, score: 141 },
  chaosFanatic: { rank: 9087, score: 104 },
  commanderZilyana: { rank: 4668, score: 654 },
  corporealBeast: { rank: 9551, score: 171 },
  crazyArchaeologist: { rank: 72770, score: 3 },
  dagannothPrime: { rank: 22056, score: 316 },
  dagannothRex: { rank: 25908, score: 358 },
  dagannothSupreme: { rank: 21108, score: 338 },
  derangedArchaeologist: { rank: -1, score: -1 },
  generalGraardor: { rank: 14079, score: 477 },
  giantMole: { rank: 91222, score: 2 },
  grotesqueGuardians: { rank: 9831, score: 205 },
  hespori: { rank: 76628, score: 7 },
  kalphiteQueen: { rank: 12531, score: 202 },
  kingBlackDragon: { rank: 20799, score: 340 },
  kraken: { rank: 19926, score: 2015 },
  kreeArra: { rank: 15894, score: 116 },
  krilTsutsaroth: { rank: 17636, score: 100 },
  mimic: { rank: 5164, score: 2 },
  obor: { rank: -1, score: -1 },
  sarachnis: { rank: 14639, score: 21 },
  scorpia: { rank: 1727, score: 484 },
  skotizo: { rank: 34922, score: 23 },
  theGauntlet: { rank: 1103, score: 89 },
  theCorruptedGauntlet: { rank: 2534, score: 4 },
  theatreofBlood: { rank: 970, score: 915 },
  thermonuclearSmokeDevil: { rank: 13580, score: 724 },
  tzKalZuk: { rank: 2054, score: 1 },
  tzTokJad: { rank: 7240, score: 19 },
  venenatis: { rank: 2721, score: 595 },
  vetion: { rank: 5824, score: 74 },
  vorkath: { rank: 12263, score: 877 },
  wintertodt: { rank: 131007, score: 60 },
  zalcano: { rank: 20517, score: 75 },
  zulrah: { rank: 28225, score: 800 } }

The highscores page for this player: https://secure.runescape.com/m=hiscore_oldschool/a=870/hiscorepersonal?user1=Inversion

You can see there that sire, hydra, barrows and bryophita's scores are wrong.

EDIT:

After going through some other profiles I realized what the problem is, you're not taking into account the highscores for LMS which upsets the first few boss highscores. You should also probably remove Cerberus like you did with Callisto until they make it show up on the api.

gc commented 4 years ago

This should now be fixed. Please re-open or make a new issue if its not.