About LuckyBlock
Looting is the most predictable part of a wipe: you know what a barrel holds before you break it. Lucky Blocks fix that. Any container on the map can quietly turn into one, wrapped on all six faces in the texture of its rarity, and opening it doesn't give loot — it rolls. A Common block pays a few scrap; a Legendary one drops an airdrop on your head. A Cursed one has nothing good inside it at all, and the player can see that before deciding to touch it.
|
31
Event types built in
|
5
Tiers, Common to Cursed
|
|
35
Events preconfigured
|
0
Dependencies
|
| ✓ | Rarity you can read across the field — every tier carries its own workshop decal, colour and name |
| ✓ | The Cursed tier only hurts — a visible risk your players choose to take, and no competitor has one |
| ✓ | Hand blocks out as an item — a shop reward the player places where they want and opens when they want |
| ✓ | Any event is a list of server commands — whatever your other plugins can do belongs on the wheel too |
| ✓ | Rare blocks announce themselves — chat with a grid reference, a marker on the map, an embed in Discord |
A block belongs to a tier from the moment it spawns until somebody opens it. The tier decides how the block looks, how often it appears, who is allowed to open it and which events can come out of it. Common, Rare, Epic, Legendary and Cursed ship configured, with the events already spread across them by weight.
An event is a list of server commands with a weight and a description, so the built-in ones and yours sit in the same table and roll against each other. %steamid% in a command is replaced with the player who opened the block.
Fill the item skin id on a tier and that tier becomes a box in the inventory. One console command hands it out, so your shop, your cases and your event plugin can all give lucky blocks as a reward without knowing anything about this plugin.
Announcements are set per tier, so Common blocks stay quiet and a Legendary one starts a race. Spawn and opening are separate switches — announce the find without telling everyone what came out of it, or the other way round.
| ✓ | Blocks are never written into the save, so a restart leaves no leftovers — only blocks placed by players come back, from the plugin's own data file |
| ✓ | A block costs seven network entities, and a limit in the config keeps that budget where you put it |
| ✓ | Configs from 1.x upgrade themselves: the old event list becomes the Common tier and keeps its skin |
| ✓ | Hooks the setup does not need stay unsubscribed, so a server that gives out no blocks as items never listens for deployables |
| ✓ | Spawns can be blocked underwater, above the ocean and inside any monument — the monument list fills itself from your map |
| ✓ | Runs on Oxide and Carbon, needs no other plugin, and every message lives in the language files, English and Russian included |
| /lbtop | Top ten openers on the server. Open to everyone. |
| /lbtest [tier] | Puts a block of that tier where you are looking, or a random one. Needs luckyblock.admin. |
| luckyblock.give | Console or RCON: luckyblock.give <steamID|name> <tier> [amount], the line your shop calls. |
| luckyblock.admin | Spawning blocks and handing them out. |
| luckyblock.<tier> | Whatever you write in a tier's permission field, registered on load. Leave it empty and the tier is open to everyone. |
A tier is always named by its key in the config, Common, Rare, Legendary and so on: that is what the hooks hand you and what every method takes. Everything goes through a plain plugin reference, LuckyBlock?.Call<bool>("GiveLuckyBlock", player, "Legendary", 1), nothing to add as a dependency.
| IsLuckyBlock |
(BaseEntity entity) → bool True for a live lucky block of this plugin, so your loot or damage rules can step around it. |
| GetLuckyBlockTier |
(BaseEntity entity) → string Tier name of that block, null when the entity is not one. |
| SpawnLuckyBlock |
(Vector3 position, string tier) → bool Puts a block of that tier at the position, an empty tier rolls a random one by weight. It behaves like a natural spawn: despawns by the timer, gets announced and marked on the map when the tier says so. False when the tier is not in the config, or nothing can roll because every weight is zero. |
| GiveLuckyBlock |
(BasePlayer player, string tier, int amount) → bool Hands the block over as an item, amount clamped to 1..100. False when the tier does not exist or has no item skin id, such a tier can only spawn on the map. |
| OnLuckyBlockSpawned |
(LootContainer block, string tier) A block appeared: spawned on the map, placed by a player, or restored after a restart. |
| CanOpenLuckyBlock |
(BasePlayer player, LootContainer block, string tier) → object A player is trying to open one. Return anything but null to veto. It runs after the tier permission and before the cooldown and the daily limit, so your refusal shows before the built-in ones. |
| OnLuckyBlockOpened |
(BasePlayer player, LootContainer block, string tier) The tier event has already fired, the block is about to vanish. |