Skip to content
Contractsv1.7.0

Gamble

⭐ Premium

Requires the player to wager scrap at one of Rust’s four gambling games: the wheel of fortune, a slot machine, a card table dealing Texas Hold’em, or blackjack.

{
"type": "Gamble",
"title": "Bandit's luck",
"description": "",
"amountRequired": 1,
"conditions": {},
"measurement": "Wins",
"games": ["Wheel"],
"wheelMultipliers": [20]
}
FieldTypeDescription
typestringExactly 'Gamble'
titlestringShort, human-readable name. Must not be empty.
descriptionstringA blurb of 1 to 3 sentences. May be empty if the title is self-explanatory.
amountRequiredinteger (≥ 1)How much the player must accumulate, in the unit set by 'measurement': settled bets for 'Wins', 'Losses' and 'Plays', scrap for the scrap measurements.
cooldownobject | nullOptional pacing limit on how fast progress adds up: at most maxAmount units of progress count in any sliding window of windowSeconds. Absent means progress adds up freely. While the window's budget is used up, further progress is ignored and the player sees a countdown to the next available moment.
burstobject | nullOptional clustering requirement: actions only count when they arrive clustered, at least amount units within one trailing window of windowSeconds forming one burst. When present, amountRequired counts completed bursts instead of raw actions. Actions that age out of the window without completing a burst never count. Absent means no clustering.
conditionsmapOptional conditions that restrict when progress counts. Progress is recorded only when the objective's main requirement and all of these conditions are met. Use an empty map for none.
hideDetailsbooleanWhen true, hides this objective's in-game condition strip and details popup, so the description is the only explanation players get. Title, description and progress still show. Absent means false.
measurementenum: Wins | Losses | Plays | ScrapWon | ScrapLost | ScrapWageredWhat to count on each settled bet. 'Wins', 'Losses' and 'Plays' count bets: a win is a bet that ended with positive net scrap, a loss is one that ended negative, and 'Plays' counts every settled bet whichever way it went. 'ScrapWon', 'ScrapLost' and 'ScrapWagered' sum scrap instead, always as positive amounts: net scrap gained, net scrap given up, and total staked. Defaults to 'Plays'.
gamesenum[]: Wheel | Slots | Poker | BlackjackGambling games whose bets count: Wheel (wheel of fortune, played at its betting), Slots (a slot machine), Poker (a card table dealing Texas Hold'em), Blackjack (a blackjack machine). Empty = any game.
minScrapPerBetinteger | null (≥ 1)Optional per-bet floor on the scrap amount the measurement counts: the net won for 'Wins' and 'ScrapWon', the net lost for 'Losses' and 'ScrapLost', the stake for 'Plays' and 'ScrapWagered'. A settled bet below the floor does not count at all, so with 'Wins' this means 'win at least this much on a single bet'.
wheelMultipliersenum[]: 1 | 3 | 5 | 10 | 20Only count wheel bets placed on these color multipliers: 1 (yellow), 3 (green), 5 (blue), 10 (purple), 20 (red). Empty = any color. Requires 'Wheel' in 'games'.
pokerHandsenum[]: RoyalFlush | StraightFlush | FourOfAKind | FullHouse | Flush | Straight | ThreeOfAKind | TwoPair | Pair | HighCardOnly count poker rounds won with one of these hand categories, best first: RoyalFlush, StraightFlush, FourOfAKind, FullHouse, Flush, Straight, ThreeOfAKind, TwoPair, Pair, HighCard. The game evaluates hands only at a showdown, so a pot won because everyone folded matches no category. RoyalFlush and StraightFlush are separate categories, list both to accept either. Empty = any hand. Requires 'Poker' in 'games'.
blackjackResultsenum[]: Bust | Loss | Standoff | Win | BlackjackWinOnly count blackjack rounds that produced one of these results: Bust, Loss, Standoff, Win, BlackjackWin (a natural 21). A round matches when any of its hands ended on a listed result, so a split hand still counts once. Empty = any result. Requires 'Blackjack' in 'games'.

Progress is measured in settled bets: one wager resolving into a win or a loss. What that is depends on the game.

Game One settled bet is
Wheel one color slot resolving when the wheel stops
Slots one spin of a slot machine
Poker one poker round
Blackjack one blackjack round, with its split hand and insurance side bet netted together as one

A bet exists only at the instant it settles:

  • A wheel spin settles one bet per color the player backed. Covering all five colors on one spin is one win, four losses and five plays.
  • Scrap dropped into a betting terminal and pulled back out before the wheel spins never happened. Not a play, not a wager.
  • Folding for free is not a bet. A round the player put nothing into does not count.

Scrap is always counted net excluding the player’s own stake, and the sign of that net decides the outcome: positive is a win, negative is a loss, and exactly zero is neither.

The wheel returns the stake along with the winnings, so a 500 scrap bet on a 1x color pays back 1000 and counts as 500 won, not 1000. A 500 scrap bet on a losing color counts as 500 lost.

That one rule covers all four games:

  • A slot machine payout smaller than the spin cost is a loss, even though the machine paid something.
  • A blackjack standoff and a chopped poker pot are neither a win nor a loss, because the player ended level. They still count for Plays and ScrapWagered.
  • A poker side-pot winner who only made their money back is not a win either.

measurement picks what one unit of amountRequired means. The first three count bets, the last three sum scrap.

Measurement One unit is
Wins one settled bet that ended with positive net scrap
Losses one settled bet that ended with negative net scrap
Plays one settled bet, win or lose
ScrapWon one scrap of net winnings
ScrapLost one scrap of net losses
ScrapWagered one scrap staked, whatever came back
  • Scrap only. A modded slot machine that pays out something other than scrap is ignored.
  • Progress reaches the player who staked the scrap, and it keeps adding up while they are offline: the plugin remembers who put what into a wheel terminal, so two players sharing one terminal each get their own bets. A condition that needs a live player fails for an absent one, as everywhere else.