Guias e estratégias

How to Write a Script for Crash Game on BC.GAME

BC.GAME recently rolled out a new version of the site, which slightly changed the logic of the scripts in the game Crash. Let’s remind you of the principle.

1. Create a Configuration Object

This is actually a user input interface, allowing the script to read user-defined variables and make the script run according to different user configurations (bet size, multiplier, etc.). It is always placed at the very beginning of the script.

var config = {
  bet: { value: 1, type: 'number', label: 'Bet' },
  x: { value: 1.98, type: 'number', label: 'Multiplier' }
};

2. Main Function

Next comes the main() function. All of your program logic should be implemented inside the main function, which runs after the user clicks on Run Script, providing you with objects that you can use to interact with the game.

function main () {
  console.log(config.bet.value);
}

3. Game Starting Event

Inside the main() function write methods game.onBet (or game.on("GAME_STARTING", function () {})) and game.onGameEnd where game.onBet—the game is ready to start, you can only guess at this time, game.onGameEnd—game over.

function main () {
  game.onBet = function() {
    console.log('a game is starting')
  }
  game.onGameEnd = function(arrayOfRecentGameObjects) {
    console.log('game over')
    console.log(arrayOfRecentGameObjects[0]); // -> recent game object
  }
}

4. Faça sua aposta

Inside the method game.onBet we make a bet game.bet. The method takes 2 parameters, the bet size and the desired multiplier. It returns a promise with the value of the multiplier.

game.bet(config.bet.value, config.x.value).then(function(payout) {
  console.log(`Payout: ${payout}`);
  console.log(payout >= config.x.value ? 'Win :-)' : 'Lost :-/');
});

The Sequence of Method Calls

  1. main()
  2. game.onBet
  3. game.bet
  4. game.onGameEnd
  5. promise<number> of game.bet that returns payout

BC.GAME’s Crash Script Complete Code

var config = {  
  bet: { value: 1, type: 'number', label: 'Bet' },  
  x: { value: 1.98, type: 'number', label: 'Multiplier' }
};

function main() {
  log.info("Starting a Strategy for Crash Game");

  game.on("GAME_STARTING", function () {
    game.bet(config.bet.value, config.x.value).then(function(payout) {
      console.log(`Payout: ${payout}`);
      console.log(payout >= config.x.value ? 'Win :-)' : 'Lost :-/');
    })
  });

  game.onGameEnd = function(arrayOfRecentGameObjects) {
    console.log(arrayOfRecentGameObjects[0]); // -> recent game object
    console.log(arrayOfRecentGameObjects); // -> array of recent game objects
  }
}

Here, we should note the following: Before the update, the game.onGameEnd method (event GAME_ENDED) was always triggered, regardless of whether a bet was placed. This allowed users to access an array of recent game objects for analysis and identifying favourable betting opportunities.

However, after the update, this data is only available when a bet is placed, requiring the use of the game.bet method. As a result, it is no longer possible to track “red streaks” without making a bet.

Congratulations to those who successfully utilised this feature before the update! Now, strategies that analyse previous games must include a bet. To minimise risk, you can place a min bet with a minimum multiplier of 1.01 (with a 98.02% probability of winning) to access this data:

game.bet(currency.minAmount, 1.01);

Crash Bet Guru

CrashBet’s run by a crew that actually plays — none of that armchair expert nonsense. We know the sites that pay, the ones that stall, and the ones that vanish when it’s cashout time. We’ve lost, we’ve won, we’ve seen the fine print after it’s too late. Point is, we’ve done the legwork — so you don’t have to.

View Comments

Publicações recentes

Fire in the Hole 3 Slot by Nolimit City – Blow Up the Mine or Bust

Nolimit City drops Fire in the Hole 3 on June 3, and it’s a beast.…

6 dias ago

June’s Getting Wild at Crypto’s Roarest Casino

Welcome to the jungle! This month, Roobet is letting loose with a full month of…

6 dias ago

Play Football Plinko by BGaming – Win Up to €250,000

Football Plinko by BGaming is a casual, low-volatility game with 99.00% RTP and a max…

6 dias ago

Play Loki Loot by BGaming – Claim the God’s Gold and Multiply It

Loki Loot is a 20-line slot from BGaming, with 97.20% RTP, medium volatility, and wins…

6 dias ago

Play Boom Farm by Peter & Sons — Break Open Boxes, Explode Wins

Boom Farm by Peter & Sons throws you into a 6x6 grid packed with chaos,…

1 semana ago

Dodge Traffic, Cash Out, Win Big — Play Uncrossable Rush by Evoplay Now

Uncrossable Rush by Evoplay is a hardcore cross-the-road betting game with real stakes and real…

1 semana ago