New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

LeagueOfEvents

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

LeagueOfEvents

Create an event system for the League of Legends live game API

  • 1.0.7
  • PyPI
  • Socket score

Maintainers
1

League Of Events

Create custom callbacks to various in game events made possible with the League Client API

Installing

Install the PyPI Package:

pip install LeagueOfEvents

Examples

Basic example:

import leagueofevents

def my_death_function():
    print("oh shucks! I died :(")

def ability_level_up(ability):
    print(f"The ability {ability.name} is now level {ability.level}!")

leagueofevents.subscribe_to_event("onDeath", my_death_function)
leagueofevents.subscribe_to_event("onAbilityLevelUp", ability_level_up)

Events

onKill

Called when the player gets a kill

Returns: Nothing

onDeath

Called when the player dies

Returns: Nothing

onAssist

Called when the player gets an assist

Returns: Nothing

onLevelUp

Called when the player levels up

Returns: Nothing

onGoldGain

Called when the player gains gold

Returns: (int)Gold gained

onGoldLost

Called when the player loses gold

Returns: (int)Gold lost

onRespawn

Called when the player respawns

Returns: Nothing

onAbilityLevelUp

Called when the player levels up an ability

Returns: Ability
ability.name
ability.level
ability.key

onItemAdded

Called when the player gets a new item in their inventory

Returns: Item
item.name
item.count
item.is_consumable

onItemRemoved

Called when the player removes a item from their inventory

Returns: Item
item.name
item.count
item.is_consumable

onGameJoin

Called when the player first joins a game

Returns: Nothing

onGameLeave

Called when the player leaves a game

Returns: Nothing

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc