LootBox
Generate loot boxes, with options for transparency
Usage
Firstly install me npm i --save lootbox
Next include me in a file and get started
const LootBox = const lootBox = lootTable boxes 01 // Optional buff /*** Open a box* @method* @description Chooses a box, then loot from that box* @returns */lootBox /*** Open a pack* @method* @description Open a set number of loot boxes* @param* @returns */lootBox /*** Determine odds* @method* @description determines odds of loot boxes, and items within them* @returns */lootBox
Example Loot Table
moduleexports = legendary: id: 'legendary_sword' label: 'Legendary Sword' rare: id: 'rare_sword' label: 'Rare Sword' uncommon: id: 'refined_sword' label: 'Solid Sword' common: id: 'common_sword' label: 'Rusty Sword'
Example Box Config
moduleexports = boxes: label: 'Common' id: 'common' color: '#ecf0f1' chance: 1 label: 'Uncommon' id: 'uncommon' color: '#3498db' chance: 020 label: 'Rare' id: 'rare' color: '#9b59b6' chance: 003 label: 'Legendary' id: 'legendary' color: '#f1c40f' chance: 001