Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {};
- var base_amount = 5;
- var restart_after_win = true;
- var start_after_no90 = 100;
- /* DO NOT EDIT AFTER THIS */
- var amount = base_amount;
- var losses = 0, vlosses = 0, no90 = 0;
- var playing = false, active = true;
- engine.on('GAME_STARTING', function () {
- if(playing) {
- log(losses + ' losses, betting with ' + amount);
- engine.bet(parseInt(amount) * 100, 90);
- }
- });
- engine.on('GAME_ENDED', function (game) {
- var below_90 = parseInt(game.bust) < 90;
- if(playing) {
- if (below_90) {
- losses++;
- if (losses < 125) {
- if (losses >= 80) amount = base_amount * 2;
- } else if (losses == 125) {
- amount = base_amount * 2.5;
- } else if (losses > 125) {
- vlosses++;
- if (vlosses == 22) {
- vlosses = 0;
- amount = amount + amount / 4;
- }
- }
- } else {
- if (restart_after_win) {
- log('won ' + (parseInt(amount) * 90) + ' bits, restarting');
- amount = base_amount;
- losses = vlosses = no90 = 0;
- playing = false;
- }
- else {
- playing = active = false;
- stop('won ' + (parseInt(amount) * 90) + ' bits, stopping');
- }
- }
- }else if(active) {
- if (below_90) {
- no90++;
- } else {
- no90 = 0;
- log('x90 event, counter reset');
- }
- if (no90 >= start_after_no90) playing = true;
- log('no x90 counter: ' + no90);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement