aaa Posted December 22, 2020 Share Posted December 22, 2020 Hello there, I'm trying to figure out if it's possible to define in the script of crash game a way to "not bet/skip" for a given turn, based on condition. Looking quickly at the API help, it seems only possible to stop the engine and hence the script. If I tried to bet a null amount it's obvisouly a non valid input. If you know how to skip a run by script and you could share it, it would be much appreciated ! Thanks ! Link to comment Share on other sites More sharing options...
IndoStorm Posted January 25, 2021 Share Posted January 25, 2021 same with me, i have bustabit script but cant copy here, is any one can change this script for me ? Link to comment Share on other sites More sharing options...
Quiet Earp Posted March 20, 2021 Share Posted March 20, 2021 You need to put your engine.bet() line inside some sort of conditional statement like if(play) { engine.bet(currentBet, currentMultiplier) play = 0; } else { log.info('Not playing'); } Then inside your GAME_ENDED function you will do whatever calculations you do and set play to 1 if you want to play the next round or set it to 0 if you don't. if (conditionsToPlay) { play = 1; } Link to comment Share on other sites More sharing options...
Skele Posted August 16, 2021 Share Posted August 16, 2021 using the newer version of the scripts that uses a delegate instead of game ended game.onBet = function () { // if we are set to skip rounds then do so. if (numberOfRoundsToSkip > 0) { numberOfRoundsToSkip -= 1; log.info('Skipping round to relax, and the next ' + numberOfRoundsToSkip + ' rounds.'); return; } else { if(totalNumberOfGames == 0) { // this is so we account for the first round. currentBet = GetNewBaseBet(); } log.info('Placed bet for the amount of ' + currentBet); game.bet(currentBet, config.payout.value).then(function (payout) { //handle your results here }); }; }; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.