1.18.7 • Published 13 days ago

skyhelper-networth v1.18.7

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days ago

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%
  • Pet Candied: -35%
    • Except Ender Dragon, Golden Dragon, and Scatha

Functions

getNetworth()

Returns the networth of a profile

Arguments

ArgumentDescription
profileDataThe profile player data from the Hypixel API profile.members[uuid]
bankBalanceThe player's bank balance from the Hypixel API profile.banking?.balance
optionsSee 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

ArgumentDescription
profileDataThe profile player data from the Hypixel API profile.members[uuid]
itemsDecoded and simplified inventories { armor, equipment, wardrobe, inventory, enderchest, storage, accessories, personal_vault, fishing_bag, potion_bag, candy_inventory, museum }, museum is an array of memberuuid.items and memberuuid.special combined
bankBalanceThe player's bank balance from the Hypixel API profile.banking?.balance
optionsSee table below
options
OptionDescription
v2EndpointBy default false, must be set to true if you are using the profile data of hypixel's v2 endpoints
cacheBy default true (5 minute cache), if set to false it will always make a request to get the latest prices from github
onlyNetworthOnly return a player's networth without showing all player's items
pricesProvide prices from the getPrices() function for the bot not to request SkyHelper's prices each time the getNetworth() function is called
returnItemDataWill also return the item data that was used to calculate the item worth
museumDataRetrieved from the Hypixel API with the /skyblock/museum endpoint: museum.membersuuid

getItemNetworth()

Returns the networth of an item

Arguments

ArgumentDescription
itemThe data of an item (either pet or item)
optionsSee table below
options
OptionDescription
cacheBy default true (5 minute cache), if set to false it will always make a request to get the latest prices from github
pricesProvide prices from the getPrices() function for the bot not to request SkyHelper's prices each time the getNetworth() function is call
returnItemDataWill 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);
1.18.7

13 days ago

1.18.6

26 days ago

1.18.5

2 months ago

1.18.4

3 months ago

1.18.3

3 months ago

1.18.2

4 months ago

1.18.1

4 months ago

1.18.0

5 months ago

1.17.6

5 months ago

1.16.6

6 months ago

1.16.5

7 months ago

1.17.2

6 months ago

1.17.1

6 months ago

1.17.0

6 months ago

1.17.5

6 months ago

1.17.4

6 months ago

1.17.3

6 months ago

1.16.4

8 months ago

1.14.1

11 months ago

1.14.0

11 months ago

1.16.3

8 months ago

1.16.2

9 months ago

1.14.4

10 months ago

1.16.1

9 months ago

1.14.3

10 months ago

1.16.0

9 months ago

1.14.2

11 months ago

1.15.0

9 months ago

1.13.1

12 months ago

1.13.0

12 months ago

1.15.1

9 months ago

1.12.3

1 year ago

1.12.2

1 year ago

1.12.1

1 year ago

1.12.0

1 year ago

1.12.7

1 year ago

1.12.6

1 year ago

1.12.5

1 year ago

1.12.4

1 year ago

1.12.9

1 year ago

1.12.8

1 year ago

1.12.10

1 year ago

1.12.11

1 year ago

1.11.0

1 year ago

1.11.4

1 year ago

1.11.3

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.11.8

1 year ago

1.11.7

1 year ago

1.11.6

1 year ago

1.11.5

1 year ago

1.9.0

1 year ago

1.10.0

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.2.6

2 years ago

1.7.0

1 year ago

1.6.1

1 year ago

1.2.5

2 years ago

1.6.0

1 year ago

1.2.4

2 years ago

1.5.0

1 year ago

1.2.3

2 years ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

2 years ago

1.8.7

1 year ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago