Author

Topic: can anyone help getting my payout script to work for ethercrash (Read 175 times)

hero member
Activity: 3080
Merit: 603
I'm not a developer but if you still don't have someone to answer this, I think you to offer some money for this task to resolve the problem on your script. Because it seems that no one has ever got the attention of your problem. Try asking or moving this thread to 'Services', most of the developers are hanging out there waiting for offers like this and maybe someone is generous enough there to help your problem without asking for any fee.
newbie
Activity: 4
Merit: 0
Hey I'm trying to create a simple script for ethercrash one that increases payout by 1 on every lose and resets upon win here is my current script it works but It increases payout by a multiplier much like martingale which I don't want.

here is my current working script need help fixing it to only add +1 to basepayout every lose

var baseBetInBits = 100; //base bet
var baseMultiplier = 2; //base multiplier
var baseBetInSatoshis = Math.round(baseBetInBits * 100);
var baseMultiplierInPercentage = Math.round(baseMultiplier * 100);
var currentBet = baseBetInSatoshis;
var currentMulti = baseMultiplierInPercentage;
var gamesLost = 0;
engine.on('game_starting', function (info) {
    if (gamesLost) {
        currentMulti = Math.round(currentMulti + baseMultiplierInPercentage);
        currentBet = baseBetInSatoshis;
    }
    else {
        currentBet = baseBetInSatoshis;
        currentMulti = baseMultiplierInPercentage;
    }
    engine.placeBet(currentBet, currentMulti);
console.log(currentBet, currentMulti);
});
engine.on('game_started', function (data) {
    //console.log('Game Started', data);
});
engine.on('game_crash', function (data) {
    if (data.game_crash < currentMulti) {
        gamesLost++;
    }
    else {
        gamesLost = 0;
    }
    console.log("GamesLost: " + gamesLost);
});
engine.on('player_bet', function (data) {
    //console.log('The player ', data.username, ' placed a bet. This player could be me Shocked.')
});
engine.on('cashed_out', function (resp) {
    //console.log('The player ', resp.username, ' cashed out. This could be me.');
});
engine.on('msg', function (data) {})
Jump to: