A classic DarkRP lottery. Type /lotto (or /lottery) to start a lottery and buy a ticket; others join with the same command; when the timer ends, one random entrant wins the whole pot. Fully zero-sum and economy-safe — cancelled lotteries refund everyone.
Super basic it will be a good ground to build from.
# 🎟️ Classic Lottery — Server Owner Guide
*Updated for the Announcements & Stats update (July 2026).*
Everything you need to get Classic Lottery set up and running on your server.
Three systems in one addon: **Scratchers** (11 instant-win tickets), **Powerball** (progressive jackpot draw), and the classic **/lotto** pot lottery — now with server-wide win announcements, a public odds panel, and an admin economy dashboard.
---
## 📦 Installation
1. Add **Classic Lottery** (`classic-lottery`) to your network via the DXRP portal.
2. That's it — no map entities, no spawning, no setup. Everything opens through chat commands.
3. Requires your server's economy to be on (`MoneyEnabled`). If money is disabled, all lottery actions are disabled automatically.
On first run the addon creates `classic_lottery.json` in the host's data folder — your settings, the jackpot, all pending tickets, and the economy stats live there from then on.
---
## 💬 Player Commands
| Command | What it does |
|---|---|
| `/scratchers` | Opens the scratcher shop. Buy tickets ×1 / ×5 / ×10. The header shows the **live Powerball jackpot**. |
| `/scratch` | Opens your ticket fan. Scratch one by hand — or hit **⚡ Scratch All** to burn through the whole stack. |
| `/powerball` | Opens the Powerball picker — choose 5 numbers (1–35) + 1 Powerball (1–12), or Quick Pick. |
| `/lottoodds` | Opens the **Odds & Payouts** panel — every ticket's real win chance (1 in X) and the full Powerball prize ladder. Also a button in the shop. |
| `/lotto` (or `/lottery`) | Buys a $50 ticket in the classic pot lottery and starts the 60-second draw. |
| `/lottohelp` | Prints the command list in chat. |
There is **no keybind** — `/scratch` is the universal opener (DXRP addons can't register custom keybinds).
**Wins pay out instantly.** A fully scratched winner is removed and paid on the spot — no redeem step. Powerball winners are paid automatically after each draw, even if they've logged off. Winners get a chime; hitting a ticket's **top prize** gets a little rising fanfare. Losing cards that were one symbol short show a "😩 SO CLOSE" call-out.
Players holding unscratched tickets get a **one-time reminder** in chat when they first spawn each session.
---
## 🛠️ Admin Commands
All require the **Spawn Entity** permission (`CommandSpawnEntity`) in your rank setup.
| Command | What it does |
|---|---|
| `/lottoconfig` | Opens the in-game admin config panel. |
| `/lottostats` | Opens the **economy dashboard** — total wagered, paid out, house net, and payout % per game, with a reset button. |
| `/powerballdraw` | Forces an immediate Powerball draw. |
---
## ⚙️ Configuration (`/lottoconfig`)
Changes apply **live**, are **saved automatically**, and are **synced to every player's screens** — prices shown in the shop, on card faces, and in the odds panel always match what's charged.
**Scratchers**
| Setting | Default | Range | What it does |
|---|---|---|---|
| Ticket Price × | 1.00× | 0.25–5.00 | Scales every scratcher's cost. |
| Reward × | 1.00× | 0.25–3.00 | Scales every payout **and** the prize numbers shown on the card. |
**Powerball**
| Setting | Default | Range | What it does |
|---|---|---|---|
| Draw Frequency | 30 min | 5–120 min | Time between automatic draws. |
| Ticket Price | $500 | $0–$100,000 | Cost per Powerball entry. |
| Jackpot Seed | $50,000 | $0–$10,000,000 | The jackpot's **reset floor** after a jackpot win. Editing it only moves the live jackpot if the pot hasn't grown yet — an accumulated jackpot is never wiped. |
| Jackpot Rake | 40% | 0–100% | Share of each ticket price added to the jackpot. |
| Jackpot Ticker | 10 min | 0–60 min | How often the server announces the current jackpot + time to next draw. **0 = off.** |
**Announcements**
| Setting | Default | Range | What it does |
|---|---|---|---|
| Big-Win Feed | $1,000 | $0–$1,000,000 | Any scratcher or Powerball win at/above this amount is announced server-wide ("🎉 {player} won $X on {ticket}!"). **0 = off.** |
---
## 🎫 Scratcher Tiers
11 tickets, cheap to premium. Match 3 symbols to win (Golden Ticket needs 4). Every ticket's true odds are public — players can check the **1 in X** win chance per tier in `/lottoodds`. Overall the tiers return roughly 75–82% to players, making the lottery a healthy money **sink**.
| Ticket | Price | Top Prize |
|---|---|---|
| Lucky 7s | $50 | $500 |
| Cash Splash | $100 | $1,000 |
| Neon Sevens | $150 | $2,000 |
| Wildcard × | $200 | $4,000 |
| Gold Rush | $250 | $5,000 |
| Triple Threat | $400 | $10,000 |
| Bank Heist | $600 | $15,000 |
| High Roller | $800 | $25,000 |
| Diamond Jackpot | $1,000 | $50,000 |
| Platinum Vault | $2,500 | $125,000 |
| Golden Ticket | $5,000 | $500,000 |
Limits: max **250** unredeemed tickets per player, max **25** per purchase.
Every ticket's outcome is decided **server-side at purchase** — a client can never fabricate a win, and **⚡ Scratch All** resolves on the server too (one summary line: tickets scratched, wins, total won).
---
## ⭐ Powerball
- Pick **5 main numbers (1–35)** + **1 Powerball (1–12)**. Max **10 tickets per player per draw**.
- Default **40%** of every ticket price feeds the jackpot; the rest is a money sink.
- The jackpot **rolls over** every draw with no winner. Jackpot winners split it evenly.
- The **jackpot ticker** keeps the pot visible: every 10 minutes (configurable) the server announces the jackpot and the countdown to the next draw.
| Match | Prize |
|---|---|
| 5 + PB | 💰 **JACKPOT** |
| 5 | $50,000 |
| 4 + PB | $10,000 |
| 4 | $2,500 |
| 3 + PB | $1,000 |
| 3 | $250 |
| 2 + PB | $100 |
| 1 + PB | $50 |
| 0 + PB | $25 |
Draws run automatically on the host every 30 minutes (configurable). Offline winners are still paid — prizes go to their account balance.
---
## 🎰 Classic Pot Lottery (`/lotto`)
The old-school DarkRP lottery: $50 a ticket, one entry per player, 60-second countdown, one random winner takes the whole pot. If fewer than 2 players enter, everyone is refunded. Fully zero-sum.
---
## 📈 Economy Dashboard (`/lottostats`)
Admin-only. Live totals since the last reset, persisted across restarts:
- **Scratchers** — tickets sold, total wagered, total paid out, house net, payout %.
- **Powerball** — tickets sold, wagered, paid, rake collected, house net, payout %.
- **House net total** across both games, and a **Reset stats** button (admin-gated).
Use it to sanity-check the sink: if payout % drifts far above ~80%, someone's been lucky — or you've set Reward × generously.
---
## 💾 Persistence & Restarts
Everything important survives a restart: all `/lottoconfig` settings, the live Powerball jackpot, **all pending Powerball tickets**, **all unscratched scratcher tickets**, and the economy stats.
Scratcher tickets also **survive disconnects** — a player who logs off with 20 unscratched tickets gets them right back in `/scratch` next session (outcomes were locked in at purchase, so nothing can change in between). The only things that reset on reboot are the in-progress `/lotto` pot (refund-safe, it just clears) and the Powerball draw countdown, which restarts from full.
---
## ❓ FAQ
**Nothing happens when players use the commands.**
Check that money/economy is enabled on your server — every lottery action is gated on it.
**Who can access the admin panels?**
Anyone with the `CommandSpawnEntity` permission (config, stats, and forced draws). There is no separate lottery-admin rank, so grant that permission carefully.
**The announcements are too chatty / not chatty enough.**
Both knobs are yours: set **Jackpot Ticker** to 0 to silence the jackpot announcements, and raise or lower the **Big-Win Feed** threshold (or set it to 0) to control which wins get celebrated server-wide.
**Can players see the real odds?**
Yes — `/lottoodds` shows the genuine per-ticket win chance computed from the actual prize tables, plus the full Powerball ladder and live jackpot. Transparency is a feature: it builds trust in the games.
**If I raise the Jackpot Seed, will it wipe a big rolled-over jackpot?**
No. The seed is the reset floor for after a jackpot win. Editing it only moves the live pot if the jackpot hasn't accumulated anything yet.
**Is it exploit-proof?**
Ticket outcomes are rolled on the host at purchase, all payments and Scratch All resolve host-side, and failed payouts are rolled back. Clients only ever reveal what the server already decided.
---
*Made by StellarFrog - community & support at Cosmic-Networks*
configs saves to its own file, classic_lottery.json, in the game's FileSystem.Data folder — not in Config.Current, so the snapshot system doesn't touch it. Host writes it on any /lottoconfig change, rake, or draw, and reloads it on start. Should survive restarts and snapshot restores fine.
For more updates and more teasers for future developments/help or more detailed question come to https://discord.gg/3S8WkmmfQp My discord username is StellarFrog