[ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4)

Newbie Spellweaver
Joined
Sep 2, 2024
Messages
7
Reaction score
5
React Lottery Plugin (Arcturus 3.5.4)

A full-featured in-game lottery system for Arcturus 3.5.4. Handles ticket purchases, scheduled draws, winner selection, prize awarding (credits, diamonds, rares), and announcements. Uses a single database table: react_lottery. Portable across hotels with optional Mod Tools panel for in-game admin management.

Features
  • Single-table storage (react_lottery) for config, state, tickets, prizes, logs, audits
  • Scheduled draws: weekly or interval
  • Multiple winners per draw
  • Prize modes: info, random, pool (weighted)
  • Auto-switch prize groups: fixed, daily, weekly, monthly
  • Supports credits, diamonds, rares
  • Ticket limits per user/IP and daily caps
  • In-game admin panel + commands (Classic & Nitro)
  • Offline prize awarding supported

Requirements
  • Arcturus Morningstar 3.5.4
  • Database access to emulator schema
  • Java 8+ for plugin build
  • Optional: Nitro React UI or clientnew UI source for Mod Tools panel

Client UI (Mod Tools Panel)
  • Fully in-game, requires admin_min_rank
  • Syncs settings via commands
  • Porting options:
    1. Use commands only
    2. Integrate Mod Tools panel in client UI

Database: react_lottery
  • Row types: config, ticket, prize, log, audit

Config & State
  • Core: enabled, polling interval, lottery status
  • Schedule: weekly/interval, day/hour/minute, timezone
  • Announcements: predraw/winner/no-ticket messages
  • Ticket price & limits: currency type, per-user/IP, staff exclusion
  • Prize selection: mode, number of winners, repeat rules, prize pool group/mode
  • Info & next prize: name/value, autofill, update settings
  • State: next draw, tickets left, total tickets, last winner, predraw alerts

Prize Modes
  • Info: fixed prize
  • Random: weighted random credits/diamonds
  • Pool: weighted prize pool, fallback if empty
  • Auto-switching: fixed, daily, weekly, monthly

Announcements
  • Placeholders: %time%, %prize%, %winners%, %next%

Player Command
  • :buylotto <amount> (respects price, limits, currency)

Admin Commands
  • Manage config, prizes, stats, start/stop/reset lottery
  • Requires admin_min_rank
  • Silent mode available
  • :lotterypanel # Opens the in-game admin panel (UI)
    :lotterystats # Shows current lottery stats
    :lotteryconfig [key] [value] # Updates a specific config key
    :lotteryconfiginfo # Shows all config values in-game
    :lotteryconfigjson # Outputs full config as JSON (for UI sync)
    :lotteryprice <credits|diamonds> <amount> # Sets ticket price
    :lotterystart [now] # Starts the lottery manually (optionally immediately)
    :lotterystop # Stops the lottery
    :lotteryreset # Resets lottery tickets and state
    :lotteryprize add|remove|list # Manage prize pool entries

    Most admin commands support --silent (or -s) to skip success whispers:
    :lotteryconfig enabled 1 --silent
    :lotteryprice credits 10 --silent

Security & Abuse Prevention
  • Server-side validation
  • IP/daily caps
  • Staff exclusion
  • Offline prize awarding
  • All actions logged

Troubleshooting
  • Check react_lottery table and config row
  • Verify prize settings/modes
  • Confirm announcements are enabled
  • Ensure lottery is active and polling interval > 0

Porting to Another Hotel
  • Copy plugin JAR
  • Run lottery table SQL
  • Update config for timezone, pricing, limits, prize mode
  • Optionally integrate Mod Tools panel
  • Restart emulator or reload plugins

Quick Config Notes
  • Enable weekly draws at a specific day/time
  • Set ticket prices
  • Configure info or pool mode
  • All configuration stored in DB, no external files

I need to reiterate, the GUI does not come pre-injected, you must add this to client yourself, should you wish to use. This is the first time I have showcased any kind of plugin, this thread will be updated accordingly when needed. Feedback, opinions, ideas are more than welcome.

Screenshots:

Console log - Showing that the plugin has registered and loaded successfully.

22:26:38.591 [main ] INFO LegacyLogger - [LOADING] [ReactLottery] Started Lottery Plugin!


:buylotto <amount>
will allow you to purchase X amount of tickets up to the limit, once the limit is reached you will receive another message if you try to purchase more than what is allowed
1767487243988 - [ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4) - RaGEZONE Forums


Alert showing the winner, next draw date, prize won:

1767487286468 - [ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4) - RaGEZONE Forums


Interval alert when there is one minute until the lottery is drawn, an alert will appear to inform you of this:

1767487312358 - [ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4) - RaGEZONE Forums


Use the GUI buttons to stop, start, reset, draw now - optionally commands can be used instead.

1767487348842 - [ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4) - RaGEZONE Forums



As of now, this is not a release. More so a show case of what's going on, there are minor inconsistencies with several things related to the design, e.g no need for four "apply" buttons. This is something I'll continue to work on, only thing I ask is that this thread is kept on track, criticism, opinions and pointers are more than welcome, anything else is not.
 

Attachments

  • 1767487190624 - [ReactLottery] Highly Configurable Lottery System Plugin (Arcturus 3.5.4) - RaGEZONE Forums
    1767487190624.webp
    4.9 KB · Views: 55
Back