npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

skyhelper-networth

v1.20.0

Published

SkyHelper's Networth Calculation for Hypixel SkyBlock

Downloads

3,547

Readme

SkyHelper-Networth

discord license npm downloads

About

SkyHelper's Networth Calculation as a Node.js module to calculate a player's SkyBlock networth by using their profile data provided by the Hypixel API.

Installation

npm install skyhelper-networth

Networth Calculation

The following list shows how much each modifier counts towards an item's worth

Items:

  • Enrichments: 50%
  • Farming for Dummies: 50%
  • Wood Singularity: 50%
  • Art of War: 60%
  • Fuming Potato Books: 60%
  • Gemstone Slot Unlocks (only crimson armor): 60%
  • Popular Runes: 60%
    • Music, Enchanting, and Grand Searing Runes only
  • Transmission Tuners: 70%
  • Essence: 75%
  • Silex: 75%
  • Art of Peace: 80%
  • Jalapeno Book: 80%
  • Mana Disintegrator: 80%
  • Recombobulators: 80%
    • Bonemerangs: 40%
  • Thunder In A Bottle: 80%
  • Enchantments: 85%
    • Counter Strike: 20%
    • Big Brain, Inferno, Overload, and Soul Eater: 35%
    • Fatal Tempo: 65%
  • Shen's Auction Price Paid: 85%
  • Dyes: 90%
  • Gemstone Chambers: 90%
  • Attributes: 100%
    • Based off the corresponding attribute shard's price
    • Lava Fishing rods and Crimson Hunter set use their base item's price instead
    • Kuudra Armor sets use the average sale value of all types with the same attribute
  • Drill Upgrades: 100%
  • Etherwarp Conduit: 100%
  • Dungeon Master Stars: 100%
  • Gemstones: 100%
  • Hot Potato Books: 100%
  • Necron Blade Scrolls: 100%
  • Prestige Item: 100%
  • Reforges: 100%
  • Winning Bid: 100%

Pets:

  • Pet Item: 100%
  • Soulbound Pet Skins: 80%
  • Pet Candied: -35%
    • Except Ender Dragon, Golden Dragon, and Scatha

Functions

getNetworth()

Returns the networth of a profile

Arguments

| Argument | Description | | ----------- | ------------------------------------------------------------------------- | | profileData | The profile player data from the Hypixel API profile.members[uuid] | | bankBalance | The player's bank balance from the Hypixel API profile.banking?.balance | | options | See table below |

getPreDecodedNetworth()

Returns the networth of a profile using pre-decoded items (used to save resources if you already have decoded the profile's inventories)

Arguments

| Argument | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | profileData | The profile player data from the Hypixel API profile.members[uuid] | | items | Decoded and simplified inventories { armor, equipment, wardrobe, inventory, enderchest, storage, accessories, personal_vault, fishing_bag, potion_bag, candy_inventory, museum }, museum is an array of member[uuid].items and member[uuid].special combined | | bankBalance | The player's bank balance from the Hypixel API profile.banking?.balance | | options | See table below |

options

| Option | Description | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | v2Endpoint | By default false, must be set to true if you are using the profile data of hypixel's v2 endpoints | | cache | By default true (5 minute cache), if set to false it will always make a request to get the latest prices from github | | onlyNetworth | Only return a player's networth without showing all player's items | | prices | Provide prices from the getPrices() function for the bot not to request SkyHelper's prices each time the getNetworth() function is called | | returnItemData | Will also return the item data that was used to calculate the item worth | | museumData | Retrieved from the Hypixel API with the /skyblock/museum endpoint: museum.members[uuid] |

getItemNetworth()

Returns the networth of an item

Arguments

| Argument | Description | | -------- | ---------------------------------------- | | item | The data of an item (either pet or item) | | options | See table below |

options

| Option | Description | | -------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | cache | By default true (5 minute cache), if set to false it will always make a request to get the latest prices from github | | prices | Provide prices from the getPrices() function for the bot not to request SkyHelper's prices each time the getNetworth() function is call | | returnItemData | Will also return the item data that was used to calculate the item worth |

getPrices()

Returns the prices used in the networth calculation, optimally this can be cached and used when calling getNetworth

Example Usage

Calculate Networth:

const { getNetworth } = require('skyhelper-networth');

const profile = // Retrieved from the Hypixel API with the /v2/skyblock/profiles endpoint: profiles[index]
const museumData = // Retrieved from the Hypixel API with the /v2/skyblock/museum endpoint: museum.members[uuid]

const profileData = profile.members['<UUID HERE>'];
const bankBalance = profile.banking?.balance;

const networth = await getNetworth(profileData, bankBalance, { v2Endpoint: true, museumData });
console.log(networth);

Calculate Networth using pre-decoded items:

const { getPreDecodedNetworth } = require('skyhelper-networth');

const profile = // Retrieved from the Hypixel API with the /v2/skyblock/profiles endpoint: profiles[index]
const museumData = // Retrieved from the Hypixel API with the /v2/skyblock/museum endpoint: museum.members[uuid]

const profileData = profile.members['<UUID HERE>'];
const bankBalance = profile.banking?.balance;

const parsedInventoryExample = NBT.simplify(await NBT.parse(Buffer.from(profileData.inventory.inv_contents, 'base64')));
const items = { inventory: parsedInventoryExample, ... }; // Parsed inventories see ./examples/items.json for object format and required keys

const networth = await getPreDecodedNetworth(profileData, items, bankBalance, { v2Endpoint: true });
console.log(networth);

Retrieve prices and calculate Networth: Note: Prices are cached for 5 minutes by default. Retrieving prices before is not needed for most users

const { getNetworth, getPrices } = require('skyhelper-networth');

let prices = await getPrices();
setInterval(async () => {
	prices = await getPrices();
}, 1000 * 60 * 5); // Retrieve prices every 5 minutes

const profile = // Retrieved from the Hypixel API with the /v2/skyblock/profiles endpoint: profiles[index]
const museumData = // Retrieved from the Hypixel API with the /v2/skyblock/museum endpoint: museum.members[uuid]

const profileData = profile.members['<UUID HERE>'];
const bankBalance = profile.banking?.balance;

const networth = await getNetworth(profileData, bankBalance, { v2Endpoint: true, prices, museumData });
console.log(networth);