Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CoolCoop Bustabit Script
- // By: Mayor Pogi
- // Version 0.1.1
- // Switches beteen PlusCoup and Martingale Strategies
- /************************/
- var plusCoupBaseBet = 12;
- var plusCoupCashout = 1.55;
- var martingaleBaseBet = 12;
- var martingaleMultipler = 1.1;
- var martingaleCashout = 10;
- var X = 10;
- var streakX = 5;
- /************************/
- X = Math.round(X * 100);
- plusCoupBaseBet = Math.round(plusCoupBaseBet) * 100;
- plusCoupCashout = Math.round(plusCoupCashout * 100);
- martingaleBaseBet = Math.round(martingaleBaseBet) * 100;
- martingaleCashout = Math.round(martingaleCashout * 100);
- var PLUSCOUP = 'PlusCoup';
- var MARTINGALE = 'Martingale';
- var mode = PLUSCOUP;
- var currentGameData;
- var playedLast = false;
- var wonLast = true;
- var gamesSinceX = 0;
- engine.on('game_started', function(data) {
- currentGameData = data;
- });
- engine.on('game_starting', function(info) {
- if(mode == PLUSCOUP && wonLast && p >= 0 && gamesSinceX >= streakX) {
- console.log("Switching To MARTINGALE");
- mode = MARTINGALE;
- } else if(mode == MARTINGALE && wonLast) {
- console.log("Switching To PLUSCOUP");
- mode = PLUSCOUP;
- }
- if(mode == MARTINGALE) {
- betMartingale();
- } else {
- betPlusCoup();
- }
- });
- engine.on('game_crash', function(data) {
- if(data.game_crash >= X) {
- gamesSinceX = 0;
- } else {
- gamesSinceX++;
- }
- if (!currentGameData || !currentGameData.hasOwnProperty(engine.getUsername())) {
- playedLast = false;
- return;
- };
- playedLast = true;
- if(mode == MARTINGALE) {
- wonLast = data.game_crash >= martingaleCashout;
- postGameMartingale();
- } else {
- wonLast = data.game_crash >= plusCoupCashout;
- postGamePlusCoup();
- }
- });
- /************************/
- var n = 1;
- var p = 0;
- /************************/
- function betPlusCoup() {
- var currentBet = n * plusCoupBaseBet;
- console.log("{n:" + n + ", p:" + p/100 + ", currentBet:" + currentBet/100 + "}");
- engine.placeBet(Math.round(currentBet), plusCoupCashout);
- }
- function postGamePlusCoup() {
- if(playedLast) {
- if(wonLast) {
- p += (n * plusCoupBaseBet * (plusCoupCashout/100 - 1));
- if(p > 0) p = 0;
- if(p < 0) {
- n++;
- } else {
- n = 1;
- }
- } else {
- p -= (n * plusCoupBaseBet);
- }
- }
- }
- /************************/
- var martingaleNextBet = martingaleBaseBet;
- /************************/
- function betMartingale() {
- console.log("{ currentBet:" + martingaleNextBet/100 + "}");
- engine.placeBet(Math.round(martingaleNextBet/100) * 100, martingaleCashout);
- }
- function postGameMartingale() {
- if(!wonLast) {
- martingaleNextBet = martingaleNextBet * martingaleMultipler;
- } else {
- martingaleNextBet = martingaleBaseBet;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment