Jackpot
Notify the bet
For the jackpot plugin to work correctly, indicate the total bet that the game is going to play every time it changes.
This amount is IN currency, if you are using the base amount, remember to transform it to its currency value:
let currencyBet = ETHEREAL.rgs.amountToCurrency(baseBet);
ETHEREAL.notifyBetChange(<totalBetInCurrency>);
Listen to the balance change
As the jackpot runs asynchronously, the balance on the play response may not be the final balance. Once the jackpot is processed the balance will be updated and the connector will notify about it, make sure to listen to the event:
ETHEREAL.onRequestUpdateBalance((balance: number) => { /** Your code **/ });
Move the total bet container
By default, the total bet that will be used on the play (including the play bet + jackpot bet) will be displayed on the left lateral, near the jackpot UI. If you want to display it near your play button for better visibility, you can configure it:
ETHEREAL.ui.config({
[UiComponentType.JACKPOT_TOTALBET]: {
position: (gameWidth: number, gameHeight: number, width: number, height: number) => {
let portrait = gameWidth / gameHeight < 1;
let x, y, anchorX, anchorY;
if(portrait) {
x = gameWidth*.5;
y = gameHeight - 50;
anchorX = .5;
anchorY = 1;
} else {
x = gameWidth - 32;
y = gameHeight - 50;
anchorX = 1;
anchorY = 1;
}
return { x, y, anchorX, anchorY };
},
draggable: true,
padding: "10px",
showOnZeroBet: false,
}
});
- position: Position the container every time the game resizes.
- draggable: If the container can be moved around by the player.
- padding: Padding of the container
- showOnZeroBet: If the container is going to be visible always or only when there is a jackpot active and a bet selected.
Test it
- Contact with an Ethereal team member to check which jackpots are active on the test environment.
- Select the casino, a player and currency that matches the jackpot active.
- Open the game, the jackpot info should appear on the left lateral of the game.
- Enable a jackpot to see the total bet container.
- Do a play to check the balance at the end of the round is the correct, after deducting the jackpot bet.
The jackpot plugin is not available in demo mode.
The jackpot plugin is not available when there is promotional rounds active.