SkyWars Level & Prestige Info

Helpers
  • Helper
  • Skywars
  • Level
  • Prestige

# SkyWars Level & Prestige Info

# Introduction

The getSkyWarsLevelInfo() helper calculates level & prestige info from SkyWars experience or the /api/player endpoint. If you supply a player object it will throw an error if they have no SkyWars experience. You can also get the prestige for a certain level using the getSkyWarsPrestigeForLevel() helper.

# Example

import { Client as Hypixel, getSkyWarsLevelInfo, getSkyWarsPrestigeForLevel } from "@zikeji/hypixel";
const client = new Hypixel("API_KEY");
(async () => {
  const virmah = await client.player.uuid("3cdbba7d55f8484e81a30a74a6fb7998"); // Virmah
  const typify = await client.player.uuid("deb8dbdbce1e4ec7addf93bce1b3dbb3"); // Typify

  const virmahSkywars = NodeHypixel.getSkyWarsLevelInfo(virmah, true);
  console.log(virmahSkywars);
  // output:
  {
    level: 88,
    preciseLevel: 88.409,
    currentExp: 779090,
    expToLevel: 775000,
    expToNextLevel: 10000,
    remainingExpToNextLevel: 5910,
    prestige: {
      id: 'MYTHIC',
      name: 'Mythic',
      color: '§f',
      colorHex: 'FFFFFF',
      minimumLevel: 60,
      icon: { version: 1, material: 'SKULL_ITEM', typeId: 397, data: 1 },
      textIcon: 'ಠ_ಠ'
    },
    expToPrestige: 495000
  }

  const typifySkywars = NodeHypixel.getSkyWarsLevelInfo(typify, true);
  console.log(typifySkywars);
  // output:
  {
    level: 25,
    preciseLevel: 25.936,
    currentExp: 154360,
    expToLevel: 145000,
    expToNextLevel: 10000,
    remainingExpToNextLevel: 640,
    prestige: {
      id: 'SAPPHIRE',
      name: 'Sapphire',
      color: '§3',
      colorHex: '00AAAA',
      minimumLevel: 25,
      icon: { version: 1, material: 'SKULL_ITEM', typeId: 397, data: 3 },
      textIcon: '✌'
    },
    expToPrestige: 145000,
    nextPrestige: {
      id: 'RUBY',
      name: 'Ruby',
      color: '§4',
      colorHex: 'AA0000',
      minimumLevel: 30,
      icon: { version: 1, material: 'SKULL_ITEM', typeId: 397, data: 3 },
      textIcon: '❦'
    },
    expToNextPrestige: 195000,
    remainingExpToNextPrestige: 40640,
    progressToNextPrestige: 0.7915897435897435
  }

  const skyWarsData = NodeHypixel.getSkyWarsLevelInfo(696969);
  console.log(skyWarsData);
  // output:
  {
    level: 80,
    preciseLevel: 80.1969,
    currentExp: 696969,
    expToLevel: 695000,
    expToNextLevel: 10000,
    remainingExpToNextLevel: 8031
  }

  const prestige = NodeHypixel.getSkyWarsPrestigeForLevel(69);
  console.log(prestige);
  // output:
  {
    id: 'MYTHIC',
    name: 'Mythic',
    color: '§f',
    colorHex: 'FFFFFF',
    minimumLevel: 60,
    icon: { version: 1, material: 'SKULL_ITEM', typeId: 397, data: 1 },
    textIcon: 'ಠ_ಠ'
  }
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Last update: March 30, 2021 05:37