Giter VIP home page Giter VIP logo

lilyweight's Introduction

lilyweight

discord license pypi

Hypixel SkyBlock Weight Calculator

Information

This is a reimplementation of https://github.com/Antonio32A/lilyweight in Python. Which is a reimplementation of https://github.com/LappySheep/hypixel-skyblock-weight

Written without any external libraries other than aiohttp which is used to fetch data from the Hypixel API.

This requires a Hypixel API key. You may obtain one by logging onto hypixel.net with your Minecraft client and typing /api new.

Credits

  • LappySheep - Original author of the calculator
  • Desco - Ported the calculator to JavaScript.
  • Antonio32A - Ported the calculator to JavaScript.
  • timnoot - Ported the calculator to Python.

Usage

import asyncio

from lilyweight import LilyWeight

# replace HYPIXEL_API_KEY with your Hypixel API key
lily = LilyWeight("HYPIXEL_API_KEY")


async def main():
    # using a UUID
    print(await lily.get_weight("e710ff36fe334c0e8401bda9d24fa121"))

    # using a username
    print(await lily.get_weight_from_name("timnoot"))

    # functions for if you wish to see a certain profile instead of the most recently used profile
    print(await lily.get_weight_from_name("MooshiMochi", "Orange"))
    print(await lily.get_weight("0ce87d5afa5f4619ae78872d9c5e07fe", "Mango"))

    # get raw weight from raw data, read the JSDoc for more information
    # this does not return the uuid and username fields but it does not make any requests
    print(LilyWeight.get_weight_raw(
        {  # Skill levels in a dict
            'enchanting': 60,
            'taming': 60,
            'alchemy': 60,
            'mining': 60,
            'farming': 60,
            'foraging': 52,
            'combat': 60,
            'fishing': 60
        },
        {  # Skill experience in a dict
            'enchanting': 842351020.815073,
            'taming': 2884548541.3704095,
            'alchemy': 125648244.46351068,
            'mining': 510669860.4613964,
            'farming': 200263881.0307403,
            'foraging': 68274086.12834656,
            'combat': 3590591634.1474257,
            'fishing': 227814154.47671163
        },
        {  # Dungeon completions in a dict
            '0': 22.0, '1': 138.0, '2': 967.0, '3': 100.0, '4': 172.0, '5': 323.0, '6': 578.0, '7': 1201.0
        },
        {  # Master dungeon completions in a dict
            '1': 907.0, '2': 40.0, '3': 1100.0, '4': 873.0, '5': 2729.0, '6': 1508.0, '7': 974.0
        },
        1316600722.1128976,  # Total experience in the catacombs
        **{  # Slayer experience as kwargs
            'zombie': 34954055, 'spider': 64968075, 'wolf': 1526995, 'enderman': 3575580, 'blaze': 259305
        }

    ))


asyncio.run(main())

Example output of one of the functions, in JSON:

{
    "total": 14439.880600696824,
    "skill_weight": {
        "base": 10346.795817290036,
        "overflow": 173.30267908613297
    },
    "catacombs": {
        "completion": {
            "base": 1226.2725420124711,
            "master": 532.7492424907152
        },
        "experience": 1057.0997512507508
    },
    "slayer": 1103.6605685667157
}

API

If you aren't using Python or JavaScript and you need an API, take a look at lilyweight-worker.

lilyweight's People

Contributors

timnoot avatar

Stargazers

 avatar  avatar _BattleB0t_ avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.