Examples
π Examples
Example 1: Adding Custom Loot Boxes
-- In shared/config.lua, add to config.lootBoxes:
config.lootBoxes.weaponbox = {
name = 'Weapon Box',
rewards = {
{ item = 'weapon_pistol', label = 'Pistol', min = 1, max = 1, rarity = 'rare', chance = 30 },
{ item = 'weapon_knife', label = 'Knife', min = 1, max = 1, rarity = 'uncommon', chance = 50 },
{ item = 'weapon_bat', label = 'Baseball Bat', min = 1, max = 1, rarity = 'common', chance = 20 }
},
bonusItems = {
{ item = 'money', amount = {min = 100, max = 500}, label = 'Bonus Cash' }
}
}Example 2: Adding Custom Items to Existing Boxes
-- In shared/config.lua, modify existing loot box:
config.lootBoxes.ammocratet1.rewards = {
{ item = 'ammo-9', label = '9mm Ammo', min = 50, max = 150, rarity = 'common', chance = 30 },
{ item = 'ammo-50', label = '.50 Cal Ammo', min = 50, max = 150, rarity = 'uncommon', chance = 30 },
{ item = 'ammo-shotgun', label = 'Shotgun Shells', min = 15, max = 35, rarity = 'rare', chance = 20 },
-- Add your new item here
{ item = 'explosive_ammo', label = 'Explosive Rounds', min = 5, max = 15, rarity = 'legendary', chance = 20 }
}Example 3: Custom Inventory System Integration
Example 4: Custom Rarity Tiers
Last updated