Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {};
- var base_amount = 2, amount = base_amount;
- var losses = -1, vlosses = 0;
- var playing = true;
- engine.on('GAME_STARTING', function () {
- if(playing) {
- log(losses + ' losses, betting with ' + amount);
- engine.bet(parseInt(amount) * 100, 80);
- }
- });
- engine.on('GAME_ENDED', function (game) {
- if(parseInt(game.bust) < 80){
- losses++;
- if(losses < 110) {
- if (losses >= 70) amount = base_amount * 2;
- }else if(losses == 110){
- amount = base_amount * 2.5;
- }else if(losses > 110){
- vlosses++;
- if(vlosses == 20){
- vlosses = 0;
- amount = amount + amount/4;
- }
- }
- }else{
- //playing = false;
- log('won ' + (parseInt(amount) * 80)+' bits, restarting');
- amount = base_amount;
- losses = vlosses = 0;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement