npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lol-tournament-code

v1.0.1

Published

A League of Legends tournament code generator

Downloads

14

Readme

lol-tournament-code

This is an utility module that allows the creation of custom games for tournament purposes. It provides the possibility to receive the in game statistics, after the game has eneded, to a specified URL.

Download

lol-tournament-code is installable via:

  • GitHub git clone https://github.com/Pupix/lol-tournament-code.git
  • bower: bower install lol-tournament-code
  • npm: npm install lol-tournament-code

Quick Examples

opt = {
  name: 'TournamentGame'
}

tournmentCode(opt)
// => "pvpnet://lol/customgame/joinorcreate/map11/pick6/team5/specDROPINONLY/eyJuYW1lIjoiVG91cm5hbW5ldEdhbWUiLCJleHRyYSI6IiJ9"

opt = {
  name: '3v3Tournament',
  password: 'qweasdzxc',
  map: 10,
  type: 6,
  size: 3,
  spectators: 'DROPINONLY',
  reportURL: 'https://example.com/game-reports',
  extra: 'This was an awesome tournmanet'
}

tournmentCode(opt)
// => "pvpnet://lol/customgame/joinorcreate/map10/pick6/team5/specDROPINONLY/eyJuY…YzVG91cm5hbWVudCIsImV4dHJhIjoiVGhpcyB3YXMgYW4gYXdlc29tZSB0b3Vybm1hbmV0In0="

Usage

node

var tournamentCode = require('lol-tournament-code');

tournamentCode({name: 'TournamentGame'});
// => "pvpnet://lol/customgame/joinorcreate/map11/pick6/team5/specDROPINONLY/eyJuYW1lIjoiVG91cm5hbW5ldEdhbWUiLCJleHRyYSI6IiJ9"

browser

You can either import the .js files or import the .html file

HTML Import

<link rel="import" href="bower_components/lol-tournament-code.html">
<script>
  LoL.tournamentCode({name: 'TournamentGame'});
  // => "pvpnet://lol/customgame/joinorcreate/map11/pick6/team5/specDROPINONLY/eyJuYW1lIjoiVG91cm5hbW5ldEdhbWUiLCJleHRyYSI6IiJ9"
</script>

Script

<script src="bower_components/expandjs/dist/expandjs.min.js"></script>
<script src="bower_components/lol-tournament-code/dist/lol-tournament-code.min.js"></script>

<script>
  LoL.tournamentCode({name: 'TournamentGame'});
  // => "pvpnet://lol/customgame/joinorcreate/map11/pick6/team5/specDROPINONLY/eyJuYW1lIjoiVG91cm5hbW5ldEdhbWUiLCJleHRyYSI6IiJ9"
</script>

Documentation

The generator works based on a configuration object with various options passed to it.

opt.name

This is the name of the lobby that will be shows in the custom games list. This is only required option.

opt.password (Default: '')

The password of the lobby, it's recommended to set one so random players don't access your lobby via the Custom Game iterface of the game client.

opt.map (Default: 11)

The map ID where the game will be played, it defaults to the new Summoner's Rift. Possible IDs are the following:

  • 1: Summoner's Rift (Summer)
  • 2: Summoner's Rift (Autumn)
  • 3: Proving Grounds
  • 4: Twisted Treeline
  • 8: Crystal Scar
  • 10: Twisted Treeline (New)
  • 11: Summoner's Rift (New)
  • 12: Howling Abyss

opt.type (Default: 6)

The game type to be palyed, it defaults to Tournament Draft. Possible IDs are the following:

  • 1: Blind Pick
  • 2: Draft Mode
  • 4: All Random
  • 6: Tournament Draft

opt.size (Default: 5)

The maximum number of players allowed for each team in the game to be played. Valid values are from 1 throgh 5.

opt.spectators (Default: 'DROPINONLY')

Option defining if if the game can be spectated or not. Possible values are:

  • NONE: Nobody can spectate the game
  • DROPINONLY: Only members of the lobby can spectate the game
  • FRIENDS: Only friends of the players can spectate the game
  • ALL: Everybody can spectate the game

opt.report

An URL where to receive a game report after the game is over.

opt.extra (Default: '')

Any message you may want to be appended to the game report that will be sent.