Git Product home page Git Product logo

hextechbutefficient's Introduction

πŸ”  HextechButEfficient

League of Legends LCU API scripts for quick & efficient management of some chores in a min-max style.

Note

You can use GUI from Release App as well as run __main__.py or separate scripts from the folder scripts/ yourself.

No more annoying animations, no more chore calculations, no more chore lookups in other tab like "do I have mastery 7 on that champ?". Say "No more" to any inefficiency.

Alt text

πŸ“” Table of Contents

πŸ“ƒ List of Scripts

The checkmark β˜‘οΈ in lists below means script is implemented. If not then it's coming soonℒ️.

πŸ”΅ BE (Blue Essence) management

  • Mass-Disenchant Champion Shards accounting for Mastery levels.
  • Mass-Open BE related loot.
  • Upgrade Champion Mastery if available.

🟠 OE (Orange Essence) management

  • Mass-Disenchant everything that gives OE.
  • Mass-Open OE related loot.
  • Waste all OE to upgrade the cheapest skin shards.
  • Show skin shards for champions without a skin.

βš’οΈ Utilities

  • Remove Challenge Tokens
  • Set Random Owned Icon
  • Combine Key Fragments.
  • Claim all Event Pass rewards.
  • Remove isNew shining (that you need to hover over to remove).

🎭 Skins and Skin Shards related statistics

  • Prints statistic about your skin collection. Number of owned/not-owned skins per RP price tier.
  • Same^ for shards loot.

βš™οΈ Backup/Restore Settings

  • Backup settings to .json files.
  • Restore settings from .json files.

πŸͺ“ Final Chore minimisation

  • Construct your own chore out of available scripts, gather it all in just one button and even schedule it.

πŸͺš Ideas and Contributions

Feel free to make contributions, reach me with your ideas and suggestions, report bugs, etc.

πŸ‘Š Riot Games Approval

This app has been approved by Riot!

Alt text

That means, you will not be banned for using the tool. Either way, many already existing applications: like Mobalytics/Blitz or Open Source ones - honourable mention HextechButBetter (yes, the name of this repository is a reference to it πŸ™‚ ) use LCU API for different purposes without any problems.

🚫 No Personal Responsibility Disclaimer

Despite the section above, I am not to be held responsible for any losses, mistakes and "mistakes", or bugs that can lead to unfortunate situations. Use/modify my scripts on your own risk. Well, I mean, they should be fine, but still, if anything happens - I won't be able to refund those shards back or something.

Also, check out LICENSE for more information about liability and warranty.

πŸš’ No Relation to Riot Games Disclaimer

HextechButEfficient is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc.

hextechbutefficient's People

Contributors

aluerie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

blossomishymae

hextechbutefficient's Issues

[Suggestion] BE Mass Disenchant everything

Hi!

I'm a person who doesn't save shards for mastery since I have never upgraded for Champion Mastery 6 or 7. It would be nice to have another script for people like me who want to disenchant every champion shard possible.

I'm interested in making a PR that implements this feature. :>

[Implement] Cursor waiting animation while script is executing.

Idk, it just doesn't work. II don't know how to go around it. We tried some threading, but it messes other things too.

Well, get it to work.

self.master.config(cursor='watch')

def update_console_box(self):
# idk how to update the cursor - it just does not work
# self.master.master.config(cursor="watch")
the_prefix = f"\n{get_now_string()} | {self.name} | "
# notification about pressing the button
self.console_box.configure(state="normal")
self.console_box.insert("insert", f"{the_prefix} Starting")
self.console_box.configure(state="disabled")
self.console_box.update()
self.console_box.see("end")
connector = self.connector_cls(need_confirmation=True)
connector.start()
# self.master.master.config(cursor="arrow")
# ^this should be in body of ConfirmationBox as self.master.config(cursor="arrow")
# call the script and print the result
self.console_box.configure(state="normal")
self.console_box.insert("insert", f"{the_prefix} {connector.console_text}")
self.console_box.configure(state="disabled")
self.console_box.see("end")

[BUG] Skin Collection Stats throws `KeyError: 910001` on run

Describe the bug

The application fails to run Skin Collection Stats with KeyError: 910001.

To Reproduce

Open the application and run Skin Collection Stats.

Expected behavior

Expected to get stats for skin collection.

Console

HextechButEfficient Console
13:09:18 | Skin Collection Stats |  Starting
13:09:18 | Skin Collection Stats |  Failed with exception. Contact developers about it:
KeyError: 910001

Desktop

  • OS: Windows 10
  • Version: 0.3.0

Additional context

910001 seems to be the skin ID for Winterblessed Hwei.

[BUG] BE Related Loot Mass Opening fails to detect capsules

Describe the bug

The application fails to detect champion and glorious champion capsules in loot inventory.

To Reproduce

Open the application, have champion capsule or glorious champion capsules, and run BE Related Loot Mass Opening.

Expected behavior

Expected to detect champion and glorious champion capsules to disenchant.

Console

HextechButEfficient Console
18:20:41 | BE Related Loot Mass Opening |  Starting
18:20:41 | BE Related Loot Mass Opening |  Opened 0 chests

Inventory

image

Desktop

  • OS: Windows 10
  • Version: 0.4.0

[New Script] Statistic "champion - amount of skins"

There is a challenge

Image

But I have no idea on what champion I have 12 skins X_X So if I actually want to increase it - idk what skin shards to upgrade, maybe i have more for that champion.

Also this challenge

Image

while it has clickable link to open the window with what champs are done - it is not clear what champions have 4 skins, for example. Maybe again, I have some shards to upgrade to get this challenge :D

So let's find out.

Let's implement a script that would show a table like

+----------------+-----------------+
| Champion Name  | Amount of Skins |
+----------------+-----------------+
+           Zeri +              11 +

Also can add a column "Amount of unowned skin Shards" and maybe "total sum" so we know what number we can reach if we invest OE into this :D

[Potential issue] `RuntimeError: Event loop is closed` when not using extra loops

PROBLEM

If we want to use a single event loop over the whole execution then it won't be possible because lcu-driver library closes current event loop by default. Maybe, I don't understand something. But with just

def __init(self, ...):
    super().__init__()
    ...

in AluConnector class it will NOT work on multiple GUI button presses because the first loop is already dead.

The error will be

14:53:41 27/11 | INFO    | connect                        | Icon with Id=25 was set correctly.
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Me\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "d:\LAPTOP\HextechButEfficient\venv\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
    self._command()
  File "D:\LAPTOP\HextechButEfficient\gui\elements.py", line 89, in update_console_box
    connector.start()
  File "d:\LAPTOP\HextechButEfficient\venv\Lib\site-packages\lcu_driver\connector.py", line 70, in start
    wrapper()
  File "d:\LAPTOP\HextechButEfficient\venv\Lib\site-packages\lcu_driver\connector.py", line 64, in wrapper
    self.loop.run_until_complete(connection.init())
  File "C:\Users\Me\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 628, in run_until_complete
    self._check_closed()
  File "C:\Users\Me\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 519, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

CURRENT SOLUTION

One possible solution to this is to register a new loop on each GUI button press. But is it a good practice? I kinda doubt. If anybody knows better - please hit me up.

new_loop = asyncio.new_event_loop()
super().__init__(loop=new_loop)

LINKS

Even tho these are about websocket issue, where the loop won't close (which is the opposite problem lol) because of oversight design; but still they might change the structure of event loops usage after solving those.

Rewrite UI ?

To be honest, this is my first ever experience in writing GUI stuff and I'm not sure if I did a fine job.

And Python doesn't seem to be a convient language for UI purposes either, but I kinda do not want to move to other languages.


So yeah, we need to learn it up and "rewrite some nicer UI, with some better practices". Extremely vague statement, but I really feel like i've taken some wrong lazy noob approach.

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.