
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 Name | When Triggered |
---|---|
All In Win | Triggered when a user goes all-in and wins. |
All In Loss | Triggered when a user goes all-in and loses. |
Any Win | Triggered on any win. |
Any Loss | Triggered on any Loss. |
Win | Triggered when a user wins but not an all-in win. |
Loss | Triggered when a user loses but not an all-in loss. |
Bet Fail | Triggered when your bet fails |
Arguments Populated
Each Trigger will populate itβs own arguments.
Argument | Description |
---|---|
%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!
Code | Reason |
---|---|
1 | User 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.
Setting | Purpose |
---|---|
defaultBet | This is the bet that will be used if none is given |
defaultPoints | This 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 thanint
incase anyone goes over the β2,147,483,647β mark. Points can now go upto β9,223,372,036,854,775,807β