Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- BaseSettings: {
- type: 'noop',
- label: 'Base Bet & Payout'
- },
- wager: {
- value: 100,
- type: 'balance',
- label: 'Base bet'
- },
- payout: {
- value: 4.99,
- type: 'multiplier',
- label: 'Payout'
- },
- stopLossWarning: {
- type: 'noop',
- label: 'Stop Loss Settings'
- },
- stopBelow: {
- value: 5000000,
- type: 'balance',
- label: 'Stop if BR Below'
- },
- stopAbove: {
- value: 100000000,
- type: 'balance',
- label: 'Stop if BR Above'
- },
- autoPauseType: {
- value: 'two', type: 'radio', label: 'AutoPause Settings',
- options: {
- one: { value: 'one', type: 'noop', label: 'Go Back In After x Amount of Greens' },
- two: { value: 'two', type: 'noop', label: 'Go Back In After x Amount of Games' },
- }
- },
- warning1: {
- type: 'noop',
- label: 'Pauses bets if x consecutive busts happens'
- },
- lossCounterStop: {
- value: 15,
- type: 'text',
- label: 'AutoStop After:'
- },
- warning2: {
- type: 'noop',
- label: 'Resumes betting after x consecutive greens'
- },
- winCounterGo: {
- value: 1,
- type: 'text',
- label: 'Resume After:'
- },
- };
- let wantedProfitInBits = config.wager.value / 100;
- let netProfit = 0;
- let baseList = [];
- let currentGamesPlayed = 0;
- let maxBet = 0;
- let balanceNeeded = 0;
- let wins = 0;
- let loses = 0;
- let currentlyPlaying = true;
- let SPLIT_INTO = 6;
- var MAX_LOSE = 0;
- var SESSION_NET_PROFIT = 0;
- var SESSION_MAX_BALANCE_NEEDED = 0;
- var ALL_GAMES = [];
- var SESSION_TIMES_ENTERED = 0;
- addLast50();
- var SMALL_SESSION_NET_PROFIT = 0;
- var lossCounter = 0;
- var autoStop = 0;
- var winCounter = 0;
- var sessionBR = userInfo.balance
- var randomNumber = randomInt(153, 162)/100
- function addLast50() {
- var LATEST_50_GAMES = engine.history.toArray();
- // logTime(`LATEST_50 length ${LATEST_50_GAMES.length}`)
- for (let i = 0; i <= LATEST_50_GAMES.length - 1; i++) {
- ALL_GAMES.unshift(LATEST_50_GAMES[i].bust);
- }
- ALL_GAMES.push(engine.history.first().bust)
- for (var i = 0; i < ALL_GAMES.length - 1; i++) {
- // logTime(`id ${i} ${ALL_GAMES[i]}`);
- }
- }
- initScript();
- function getCurrentBetLightGuide() {
- let currentMultiplier = 0;
- let currentBet = null;
- if (netProfit >= 0 && currentGamesPlayed > 0) {
- return currentBet;
- }
- if (baseList.length >= 2) {
- currentMultiplier = baseList[0] + baseList[baseList.length - 1];
- currentBet = (currentMultiplier * config.wager.value);
- } else if (baseList.length === 1) {
- currentMultiplier = baseList[0];
- currentBet = (currentMultiplier * config.wager.value) * 2;
- } else {
- currentMultiplier = null;
- }
- return currentBet;
- }
- logTime(`AutoPause Information:`);
- logTime(`Pause Betting After: ` + config.lossCounterStop.value + ' Consecutive Busts.');
- logTime(' Resume Betting After: ' + config.winCounterGo.value + ' Consecutive Games At ' + config.payout.value + '.0 Or Higher ');
- logTime('Stop script if balance goes below: ' + (config.stopBelow.value)/100 + ' bits, Or if balance goes above: ' + (config.stopAbove.value)/100 + 'bits.');
- function initScript() {
- SESSION_TIMES_ENTERED += 1;
- baseList = [1, 2, 3, 4, 5, 6];
- netProfit = 0;
- currentGamesPlayed = 0;
- maxBet = 0;
- balanceNeeded = 0;
- wins = 0;
- loses = 0;
- currentlyPlaying = true;
- SMALL_SESSION_NET_PROFIT = 0;
- }
- // Try to bet immediately when script starts
- if (engine.gameState === "GAME_STARTING") {
- makeBet();
- }
- engine.on('GAME_STARTING', onGameStarted);
- engine.on('GAME_ENDED', onGameEnded);
- function randomInt(min,max){
- return Math.floor(Math.random()*(max-min+1)+min);
- }
- function onGameStarted() {
- if (!currentlyPlaying) {
- initScript();
- }
- let currentBet = getCurrentBetLightGuide();
- if (!currentBet) {
- currentlyPlaying = false;
- printEndStatus();
- initScript();
- }
- makeBet();
- }
- function onGameEnded() {
- ALL_GAMES.push(engine.history.first().bust);
- let lastGame = engine.history.first();
- if (autoStop >= 1)
- {
- if (lastGame.bust >= config.payout.value)
- {
- winCounter += 1;
- var resume = config.winCounterGo.value - winCounter;
- log('AutoPause: Need (' + resume + ') more consecutive games to go back in');
- if (winCounter >= config.winCounterGo.value)
- {
- log('AutoPause has been disabled. Resumming Betting');
- autoStop *= 0;
- winCounter *= 0;
- }
- }
- else if (lastGame.bust < config.payout.value)
- {
- winCounter *= 0;
- }
- }
- // If we wagered, it means we played
- if (!lastGame.wager) {
- return;
- }
- let lastBet = getCurrentBetLightGuide();
- if (lastGame.cashedAt) // **************************IF PROFIT THEN ********************
- {
- let profit = Math.round(((lastBet * config.payout.value) - lastBet) / 100);
- netProfit += profit;
- SESSION_NET_PROFIT += profit;
- SMALL_SESSION_NET_PROFIT += profit
- logTime(`Won ${profit} bits`);
- if (baseList.length > 1) {
- baseList.splice(baseList.length - 1, 1);
- }
- baseList.splice(0, 1);
- wins += 1;
- lossCounter *= 0;
- }
- else // **********************IF BET BUSTS THEN THIS CODE IS EXECUTED ***********************
- {
- var lost = lastBet / 100;
- logTime(`BUST - ${lost} `);
- netProfit -= lost;
- SESSION_NET_PROFIT -= lost;
- baseList.push(lastBet / config.wager.value);
- loses += 1;
- lossCounter += 1;
- if (lossCounter >= config.lossCounterStop.value)
- {
- autoStop += 1;
- log('AutoPause Enabled -- Detected ' + config.lossCounterStop.value + ' consecutive busts.');
- }
- }
- if(userInfo.balance > config.stopAbove.value || userInfo.balance < config.stopBelow.value)
- {
- stop('Stopping script due to balance being either too high or too low...');
- //stop('Insufficient balance to make the bet')
- }
- currentGamesPlayed += 1;
- // logTime(`Net profit: ${netProfit} Current bet: ${getCurrentBetLightGuide() / 100}`);
- let currentBalanceNeeded = netProfit + ((getCurrentBetLightGuide() / 100) * -1);
- if (currentBalanceNeeded < balanceNeeded) {
- balanceNeeded = currentBalanceNeeded;
- }
- if (currentBalanceNeeded < SESSION_MAX_BALANCE_NEEDED) {
- SESSION_MAX_BALANCE_NEEDED = currentBalanceNeeded;
- }
- logTime('Net profit: ' + netProfit + ' bits.');
- }
- function printEndStatus() {
- logTime(`Played: ` + currentGamesPlayed + ' Net profit: ' + netProfit + ' bits. Balance needed: ' + balanceNeeded * -1 + ' bits Max bet: ' + maxBet / 100 + ' bits. Wins: ' + (wins / (wins + loses) * 100) + ' % Loses: ' + (loses / (wins + loses) * 100) + ' %');
- logTime(`SESSION NET PROFIT ${SESSION_NET_PROFIT} bits');
- logTime('SESSION TIMES ENTERED ${SESSION_TIMES_ENTERED}`);
- }
- function makeBet()
- {
- if (autoStop >= 1)
- {
- log('Skipping Bet...');
- }
- else{
- let currentBet = getCurrentBetLightGuide();
- if (!currentBet) {
- return;
- }
- engine.bet(currentBet, config.payout.value);
- if (currentBet > maxBet) {
- maxBet = currentBet;
- }
- logTime('Betting ' + Math.round(currentBet / 100) + ' bits at ' + config.payout.value + 'x ');
- }
- }
- function logTime(msg) {
- let today = new Date();
- let calendarDate = ``;
- let now = ``;
- log(`${now} ${msg}`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement