Created
March 16, 2023 08:28
-
-
Save mdashlw/bd72d8480ef5caeb7ef141be9ac76c9d to your computer and use it in GitHub Desktop.
Hypixel Ranked SkyWars rating calculator. Same algorithm as used by Wrench; 100% accurate.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const args = process.argv.slice(2); | |
const oldRating = parseInt(args[0]); | |
const newRating = parseInt(args[1]); | |
var rating = oldRating; | |
var wins = 0; | |
while (rating < newRating) { | |
if (rating <= 450) { | |
var win = 50; | |
} else if (rating >= 2000) { | |
var win = 10; | |
} else { | |
var win = 50 - Math.trunc(rating / 100) * 2; | |
} | |
console.log(`Win on ${rating}: ${win}`); | |
rating += win; | |
wins += 1; | |
} | |
console.log(`Wins: ${wins}`) | |
console.log(`Rating: ${rating}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment