Jump to content

No configuration Crash script


ToughLuck

Recommended Posts

I just want to share my script, that is all.

Disclaimer

I can not be hold any responsibility for any loss may be caused by using this script.
Gamble only what you afford to lose.

How it works

The script basically waits for opportunities to start martingale betting.
It automatically adjusts bet size, payout (up to 10x) according to your bankroll and selected risk level.
Its purpose is not trying to win anything, it tries to minimize loses to the house edge while generate some wager.

Configuration

With the default setting of risk bankroll 100% and risk level 5, you will see more actions.
Risk level can be reduced down to 2. However, the bot will just sit there do nothing most of the time.

Screenshots

image.png.3b941e06ff277972efa48f5842f46ecb.png image.png.291d5d5cd438dfbe92dc659d958cbe50.png

Source code:

const maxes = [ 3, 3, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 42, 42, 42, 42, 42, 42, 42, 42, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 47, 47, 47, 47, 47, 47, 47, 47, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120 ];

var config = {
  riskBankroll: { label: "risk bankroll (%)", value: '100', type: "number" },
  riskLevel: { label: "risk level", value: '5', type: "number" },
};


function main()
{
	const initialBankroll = currency.amount;
	let streaks = Array(900).fill(0);
	let streaksInit = false;

	let onChase = false;
	let chaseFund = 0;
	let chaseLosses = 0;
	let chaseStreak = 0;
	let chaseMax = 0;
	let chasePayout = 0;
	let chaseStartBet = 0;
	let chaseBet = 0;
	let wagerBet = 0;
	let riskLevel = config.riskLevel.value;
	
	let currentBet = 0;


	const updateStreak = function (r) {
		const i = (r > 1000 ? 1000 : r) - 100;
		for (let x = 0; x < 900; x++) {
			if (x + 1 <= i)
				streaks[x] = 0;
			else
				streaks[x]++;
		}
	}

	const computeBets = function(i) {
		chasePayout = (101 + i) / 100;
		chaseMax = maxes[i] - Math.ceil(maxes[i]/riskLevel) + 1;
		chaseFund = Math.floor(initialBankroll * (config.riskBankroll.value / 100));
		chaseStartBet = (chaseFund/((1+(1/(chasePayout-1)))**chaseMax)/chasePayout)/(chasePayout-1);
		chaseStreak = 1;
		chaseLosses = 0;
		chaseBet = (chaseLosses + (chaseStreak*(chaseStartBet*(chasePayout - 1))))/(chasePayout - 1);

		wagerBet = (chaseStartBet * (chasePayout - 1))/2;
		currentBet = wagerBet + chaseBet;
	}

	const resolveBet = function (pay) {
		if (pay > 0) {
			onChase = false;
			chaseStreak = 0;
			currentBet = 0;
		} else {
			chaseLosses += chaseBet;
	        chaseStreak += 1;
        	chaseBet = (chaseLosses + (chaseStreak*(chaseStartBet*(chasePayout - 1))))/(chasePayout - 1);
        	currentBet = wagerBet + chaseBet;
		}
	}
	

	game.onBet = function() {
		if (!streaksInit) {
			streaksInit = true;
			for (let i = 19; i >= 0; i--) {
				updateStreak(game.history[i].crash);
			}
		} else {
			updateStreak(game.history[0].crash);
		}

		if (!onChase) {
			for (let i = 900; i >= 0; i--) {
				if (streaks[i] >= Math.ceil(maxes[i]/riskLevel)) {
					onChase = true;
					computeBets(i);
					break;
				}
			}
		}

		if (currentBet > 0) {
			game.bet(currentBet, chasePayout).then(resolveBet);
		}
	}

}

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...