Currency - Slots A Slots Game using a Point System like the one from VRFlad  Twitch     YouTube Display Image Last update: Dec 18 2023, Version: 4, 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 reccomend 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 main action. This should not be edited and you do so at your own risk!

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

Triggers Avaliable

7 New Triggers can be found under Custom >> Currency >> Slots

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.
Slots FailTriggered when your bet fails

Arguments Populated

Each Trigger will populate the following Arguments.

ArgumentDescription
%gameName%This is the name of the current game.
%rolledEmote1%This is the value of the 1st rolled emote.
%rolledEmote2%This is the value of the 2nd rolled emote.
%rolledEmote3%This is the value of the 3rd rolled emote.
%slotResult%This will populate the slots result like ||Slot1||Slot2||Slot3||.
%betAmount%This is the amount that was bet, it will populate the actual value so if you did All, 10% or 5k it will be the number.
%allIn%This is a bool based on if bet was all in or not.
%winnings%This is how much the user has won\ (Does not populate on the Loss Triggers)
%multiplier%This is how much your bet has been multiplied in your win.
%result%This is if the result was a Win or a Loss.
%oldPoints%This is the points the user had prior to the spin.
%newPoints%This is the points the user now has following the spin.

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 Can Not Afford to Make this Bet

Configuration

In [Currency Admin]-[Slot] - Spin you have several Arguments this will have an impact on how your game runs.

You will see there are Currently 6 Folders called Emote Slot X with X been numbers 1 to 6. It is possible to add more numbers and I will explain that later. In each Folder there are 3 Arguments emoteX, percentX and payoutX. There is also an Additional Settings Folder.

All Settings are explained below in the table.

SettingPurpose
emoteThis is the emote that you will use
percentThis is the value of frequency this emote will appear, the higher the more frequent
payoutThis is how much it will payout based on bet size so a 100 bet at 5 will pay 500
defaultBetThis is the bet that will be taken if the user doesnt specify or puts an invalid input
match2OnThis is if you want a win, if emote 1 and 2 are equal
match2PayoutThis is the payout value if you have match2On set to true
percentTotalThis is the total of all the percentX you have, this been off could effect the game Ideally it will be set to 100
defaultPointsThis is the amount of points a person will be given if they have never had any points before in the past
maxBetThis is the max allowed to bet, set this to -1 to have no max
minBetThis is the minBet allowed to bet, set this to 0 to have no min

In Order to add more emotes if you wish you need to just follow these steps.

  1. Duplicate one of the current emote Folders,
  2. For ease rename it Emote Slot X and X been the next number.
  3. Inside the Folder change the 3 Set Arguments so the number matches the Folder.
  4. You can change the values as you see fit.
  5. If you do add an emote ensure that all the Percent Variables when added up do equal to the percentTotal.

Changelog

Version 4

  • Min and Max Bet Added
  • Generic Fail Added
  • Error 1 Reworded

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