Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LeagueOfEvents-1.0.5.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file LeagueOfEvents-1.0.5.tar.gz.

File metadata

  • Download URL: LeagueOfEvents-1.0.5.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for LeagueOfEvents-1.0.5.tar.gz
Algorithm Hash digest
SHA256 c9dd95c41d5120d014c7d6ee96fb2fdcc55daad1c25f6f35c76da548bfe82752
MD5 c07b0818b6d4b3bb854986c7e3bb2c4f
BLAKE2b-256 db13735e0d12e6e151a51ea1e26856561d5bf6b26cca6bee202d27d35fc2599c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page