Currency - Casino Roulette A Casino Roulette Style Game using a Point System like the one from VRFlad  Twitch     YouTube Display Image Last update: Dec 18 2023, Version: 3, SB Version: 0.2.0+.

In Streamer.bot

Once imported, you will notice like all of my chat games it includes an Action called [Currency] - [Set Triggers]. This Action will create a .json file in your data folder. It will only update when there is an update to be pulled from the site, also note it could create triggers for games or extensions you do not have, this is nothing to worry about.

If you already have this Action I would reccommend you choose to replace it as it might change, but I am taking every effort it doesn’t change.

You should then restart Streamer.bot so it can create the Triggers you need as the Triggers will create themselves every time you start Streamer.bot. If done correctly you should receieve a Toast Notification confirming this.

This import will contain 4 Actions, 1 Command and a Queue.

Actions

This game has 1 Admin action. This should not be edited and you do so at your own risk!

[Currency Admin] - [CasinoRoulette] - Spin this action handles all the logic for the spin, working out what is span, if the user has won and adjusting points accordingly. To use this action the best way I found was to use a command called !spin then you can use !spin <betAmount> <betRequest> for example !spin 500 black. You can also use k for 1000s, m for millions, all and a %.

Triggers Avaliable

7 New Triggers can be found under Custom >> Currency >> Casino Roulette

Trigger NameWhen Triggered
All In WinTriggered when a user goes all-in and wins.
All In LossTriggered when a user goes all-in and loses.
Any WinTriggered on any win.
Any LossTriggered on any Loss.
WinTriggered when a user wins but not an all-in win.
LossTriggered when a user loses but not an all-in loss.
Bet FailTriggered when your bet fails

Arguments Populated

Each Trigger will populate it’s own arguments.

ArgumentDescription
%gameName%This is the name of the current game.
%betSize%This is how many points have been bet.
%betOn%This is what has been bet on.
%color%This is the colour the of the outcome (Red/Black)
%number%This is the number of the outcome (0-36)
%parity%This is the parity of the number (Odd/Even)
%newPoints%This is how many points the user now has after the bet
%winnings%This is how much the user has won (Does not populate on the Loss Triggers)
%result%This is if the result was a Win or a Loss.

Fail Codes

Fail Codes are a way to explain why something went wrong if something did go wrong, they will be populated from the Fail Trigger, and will be failCode and failReason. Using these you can create a single currency game fail action if you wish!

CodeReason
1User Has No Points

Configuration

This game will work on Twitch and YouTube so you will need to make sure the commands are sourced to both, (the import should do this by default but its wise to double check)!

Most of the configuration comes from how you want the send messages to look, but because of the Triggers you can add sounds and other things for the different types of things.

If an invalid bet request is given one will be chosen at random.

The 2 main setting however are in the [Currency Admin] - [CasinoRoulette] - Spin Action.

SettingPurpose
defaultBetThis is the bet that will be used if none is given
defaultPointsThis is the amount of Points a user will have if they have none

Changelog

Version 3

  • Version Numbers Added
  • Logic now handles points as type long rather than int incase anyone goes over the β€˜2,147,483,647’ mark. Points can now go upto β€˜9,223,372,036,854,775,807’
ddd