Skip to content

FakeSloth/wulu

Repository files navigation

wulu Version Build Status Dependency Status devDependency Status

Extentions and plugins for Pokemon Showdown

Table of Contents

Prerequisites

Node.js

MongoDB

Getting Started

The easiest way to get started is to clone the repository:

$ git clone https://github.com/FakeSloth/wulu.git

You can plug in and replace the revelant files to start up the server with wulu using Pokemon-Showdown.

wulu requires MongoDB. Open up another command prompt or terminal:

$ mongod

Documentation

Wulu is contain in modules. Currently, there are 4 modules: Bot, Mongo, Commands, and Emoticons. In addition to Economy.

Economy

To set a currency_name for you Economy, do this:

Wulu.Economy.currency_name = 'goat';

Mongo

Mongo contains functions to interact with a MongoDB database. The first function connect_database connects to a MongoDB database. It has an optional parameter where you can put in a database url that is store elsewhere such as mongolab. importUsergroups and exportUsergroups are MongoDB replacements of the original csv version of importUsergroups and exportUsergroups.

Commands

Commands are modular as well. You can pick and choose which commands you would like to use. To use all of them use the init command:

Wulu.Commands.init();

This will load up all commands and merge them into CommandParser for you.

You can load up individual commands like this:

Wulu.Commands.away();

Some commands have parameters for custom stuff such as the /away command. You can pass in a string for a different /away message.

Wulu.Command.away('Gaming');

Be sure to check more of the documentation to see what each command has to offer.

Bot

To create a new bot:

var Bot = new Wulu.Bot();

Connecting the Bot to the server:

Bot.connect();

You can pass arguments to the bot. The four parameters that it has are name, avatar, group, and rooms.

var Bot = new Wulu.Bot('Bender', 'bender.png', '&', ['global', 'lobby', 'tournaments']);

To join all rooms:

var rooms = Object.keys(Rooms.rooms);
var Bot = new Wulu.Bot('Bender', 'bender.png', '&', rooms);

Emoticons

To start using emoticons:

Wulu.Emoticons();

You may pass in your custom emoticons:

var emotes = {
  'Kappa': 'kappa.png',
  'feelsgd': 'feelsgd.png'
};
Wulu.Emoticons(emotes);

To make the username look like the chat when using emoticons, put this in your css:

.emote-chat {
  background: none;
  border: 0;
  padding: 0 5px 0 0;
  font-family: Verdana;
  font-size: 9pt;
}

Versioning

2.x.x

Stable Release of wulu. Most features implemented. Should work with few or no bugs.

1.x.x

Development of wulu. This is the so called "beta" of wulu. Has a high chance of lots of bugs or glitches.

0.x.x

This is the version where the official Pokemon Showdown main repository left off at.

License

MIT