You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Alexander Yakovlev f353b753cd Trying to get it working 5 years ago
random Trying to get it working 5 years ago
README.md Trying to get it working 5 years ago
mod_muc_rpg.lua Trying to get it working 5 years ago
test.lua Initial commit (unfinished) 5 years ago

README.md

Prosody RPG module

This is a module for Prosody 0.9 (maybe lower, but only maybe) that adds /roll command to every MUC.

The syntax is this:

/roll <times>d<sides>+<bonus>
/roll <times>d<sides>-<bonus>

The <times> bit is optional (default 1), the d letter is optional too if times = 1 and bonus = 0.

Example:

/roll 1d4
/roll 2d5-2
/roll d20+3
/roll 20

Installation

This module uses Mersenne-Twister random-number library for better random number generation.

You can get the newest library version here.

The library uses BSD license so it’s included here (for Lua 5.2). Just compile the random.so and put it in /usr/lib/prosody or /usr/lib/lua/5.1 directory.

Then, drop the module to Prosody dir (usually /usr/lib/prosody/modules) and turn it on in your config.