HZ Scripts

Configuration

HZ-Bets has two config layers:

  1. config/config.lua — structural defaults + things the panel doesn't expose (entry points, NPC coords, source league lists, poll cadence).
  2. HZ-Bridge admin panel (bridge_schema.lua) — live, hot-reloadable gameplay values that override the mirrored defaults. Change them in-game, no restart.

Stake limits & money

SettingDefaultMeaning
minBet / maxBet100 / 50000min & max stake per wager
maxPerEvent1max open bets a player holds on one event (relaxed for the multi-pick scorer market)
maxTotal25max open bets a player holds across all events
accountbankframework money account (bank / cash)

Odds & house risk

SettingDefaultMeaning
Config.Odds.DefaultModelparimutuelfallback model for hand-made events
vig0.05house margin (5%) skimmed off the parimutuel pool
seedPool1000virtual per-outcome seed that stabilises early odds (never real money)
Config.Odds.MinDecimal / MaxDecimal1.01 / 20floor & ceiling on any locked odd
Config.Bet.MaxPayoutPerSelection1000000house-safety cap — max total payout the house will ever owe on one outcome
With live / fixed odds the house carries the risk. MaxPayoutPerSelection is your safety lever: a bet that would push the house's exposure on an outcome past it is refused. Tune it to what your economy can absorb. 0 = no cap (not recommended with live).

See Markets & odds for what each model means.


Stuck-event safety net

Config.AutoVoidStuckAfterSec = 24 * 3600  -- 24h

A LOCKED event whose result never arrives (a dead API feed) is automatically voided and every stake refunded once it is this many seconds past its deadline — so wager money is never frozen forever. Set 0 to disable.


Brand themes (no rebuild)

The whole UI colour scheme is driven by three colours sent from the config and applied at runtime — change them and the app recolours with no web rebuild, just a restart HZ-Bets.

local ThemePresets = {
    red  = { Accent = '#B01024', AccentHi = '#850919', Gold = '#D8A64E' }, -- Rouge Betclic/FDJ (default)
    navy = { Accent = '#152A52', AccentHi = '#0E1C3A', Gold = '#D2A33C' }, -- Navy premium
    cyan = { Accent = '#006C9E', AccentHi = '#00557A', Gold = '#E0A92E' }, -- HZ Cyan
}
Config.Theme = ThemePresets.red   -- swap to .navy / .cyan, or set custom hex

All three presets are WCAG-AA verified (readable white-on-accent, dark-ink-on-gold). The editable header wordmark uses Config.Brand.


Sources

Each event source is toggled and tuned in Config.Sources (and the panel). See the dedicated Event sources page for ESPN, OpenLigaDB and RP.


Language

Config.Locale (panel-overridable) selects the UI language: en, fr, es. Locale files live in config/locales/.lua.