Giter Club home page Giter Club logo

leagueofevents's Introduction

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

leagueofevents's People

Contributors

agroth01 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.