Fun Economy Cog
The Fun Economy cog implements a coin-based economy system with gambling games, leaderboards, and various ways to earn and spend coins. It’s designed to add fun and engagement to your server.
Features
Currency System
- Coin-based economy with per-server balances
- Individual balance tracking and persistence
- Transfer coins between users
- XP-based reward claiming
Gambling Games
- Blackjack (classic card game with betting)
- Dragon Tower (climbing game)
- Dice rolling (d6 and d20 options)
- Gambling lockout feature (24-hour self-imposed bans)
Leaderboards & Stats
- Top richest members in server
- Personal balance and statistics
- Competitive leaderboards
- Audit logs for all transactions
Perk System
- Purchase timed role perks with coins
- Managers add, enable/disable, and delete perks from an interactive panel (
/eco_manage perks) - Disabled perks are hidden from the shop without being deleted
- Block specific roles from using the shop
- Manager oversight of active perks
Admin Controls
- Add or remove coins from users
- Gambling lock management
- Audit logging of all transactions
- Statistics and reporting
Commands
Economy Commands
| Command | Description |
|---|---|
/eco balance | Check your coin balance |
/eco leaderboard | View richest members in server |
/eco richlist or /eco top | Show top 10 richest members |
/eco claim_rewards | Claim accumulated rewards |
/eco give <member> <amount> | Send coins to another user |
/eco perkshop | Browse and purchase perks |
/eco config | View economy configuration |
/eco help | Display economy system help |
Gambling Commands
| Command | Description |
|---|---|
!blackjack <bet> | Play blackjack card game |
!tower | Climb Dragon Tower climbing game |
!roll [d6 or d20] | Roll dice |
!stopgambling | Lock yourself out of gambling for 24 hours |
Prefix Commands
| Command | Description |
|---|---|
!balance or !bal | Check your coin balance |
!claim | Claim accumulated rewards |
!richlist or !rich or !top | View top richest members |
!give <member> <amount> | Send coins to another user |
!perkshop or !perks or !shop | Browse perks |
!ecoaudit | View economy audit logs |
!startgambling | Enable gambling (manager only) |
Manager Commands
| Command | Description |
|---|---|
/eco_manage adjust <member> <amount> [reason] | Add or remove coins for a member |
/eco_manage view_balance <user> | View any member’s balance |
/eco_manage audit <user> | View a member’s economy audit log |
/eco_manage perks | Open the perk shop management panel |
/eco_manage list_perks | List all configured perks |
/eco_manage active_perks | View active perk purchases |
/eco_manage help | Manager commands help |
Managing Perks
/eco_manage perks opens a panel listing every configured perk, 5 per page. From it you can:
- Add Perk - Opens a form asking for the role to give, a title, a price, and a duration (e.g.
7d,12h,30m) - Toggle - Enable or disable a perk. Disabled perks stay configured but don’t appear in
/eco perkshopand can’t be bought - Delete - Remove a perk, after a confirmation prompt
Rules when adding a perk:
- Up to 10 perks per server
- Titles must be unique, and each role can only be used by one perk
- Price must be a whole number of at least 1 coin
- Duration must be greater than zero
The old
/eco_manage add_perkand/eco_manage remove_perkcommands have been replaced by this panel.
Configuration
Customize your economy system with these settings:
- Enabled - Toggle the economy system
- Log Channel - Where economy activities are logged
- No XP Roles - Roles excluded from XP gain
- No XP Channels - Channels excluded from XP reward
- Min XP Per Message - Minimum XP awarded per message
- Max XP Per Message - Maximum XP awarded per message
- Blacklisted Users - Users blocked from economy system
- Shop Blacklisted Roles - Members with any of these roles (up to 10) can’t open the perk shop (
/eco perkshopor!perkshop)
Game Rules
Blackjack
- Standard blackjack rules with dealer standing on 17
- Blackjack (21 with two cards) pays 3:2
- Push results return original bet
- Insurance and splitting not available
Dragon Tower
- Climbing game with escalating difficulty
- Risk vs. reward mechanics
- Winnings based on tower height reached
Dice Rolling
- d6: Standard six-sided die
- d20: Twenty-sided die for higher variance
Anti-Abuse Features
- Gambling lockout system prevents excessive wagering
- Users can self-impose 24-hour gambling bans
- Managers can manually unlock gambling access
- Audit logging tracks all transactions
-
Configurable bet and balance limits
- Cooldowns: Prevent spamming of reward commands
- Rate Limiting: Gambling attempt limits
- Audit Trails: All transactions logged
- Balance Validation: Prevent negative balances
Integration
Works with other cogs:
- Tiers: XP bonuses for economic activity
- Reputation: Economic rewards for helpful behavior
- Moderation: Economy-related punishments
Best Practices
- Fair Play: Ensure games are balanced and fun
- Reward Activity: Use economy to encourage positive behavior
- Monitor Abuse: Watch for exploitation attempts
- Regular Events: Host economy-based events
- Clear Rules: Communicate game rules clearly