Skip to main content

Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.

Project description

Dota2Monitor

License

Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.

Installation

You can install Dota2Monitor using pip:

pip install dota2monitor

Usage

  1. Place the file gamestate_integration_monitor.cfg into ~\SteamLibrary\steamapps\common\dota 2 beta\game\dota\cfg\gamestate_integration.
"Dota 2 Integration Configuration"
{
    "uri"           "http://localhost:666/"
    "timeout"       "5.0"
    "buffer"        "0.1"
    "throttle"      "0.1"
    "heartbeat"     "30.0"
    "data"
    {
        "provider"      "1"
        "map"           "1"
        "player"        "1"
        "hero"          "1"
        "abilities"     "1"
        "items"         "1"
        "buildings"     "0"
        "draft"         "0"
        "events"        "1"
        "previously"    "0"
    }
}
  1. Add the following code snippet to monitor events:
from dota2monitor.server import Dota2Monitor
from dota2monitor.models import ListeningEvents

def custom_lvl_up_notify():
    print('New level!')

def custom_death_notify():
    print('Dead!')

def custom_smoked_notify():
    print('Smoked!')

if __name__ == '__main__':
    monitor = Dota2Monitor()
    monitor.event_manager.add_event_listener("onDeath", custom_death_notify)
    monitor.event_manager.add_event_listener(ListeningEvents.LVL_UP, custom_lvl_up_notify)
    monitor.event_manager.add_event_listener(ListeningEvents.SMOKED, custom_smoked_notify)

    monitor.run(port = 666)

Contributing

Feel free to contribute by submitting pull requests or raising issues.

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

dota2monitor-0.0.0.2.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

dota2monitor-0.0.0.2-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

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