Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- baseBet: { value: 10000, type: 'balance', label: 'Base Bet' },
- crashTarget: { value: 1.1, type: 'multiplier', label: 'Cash Out' },
- multiOnloss: { value: 1.1, type: 'multiplier', label: 'Increase Bet on Loss' },
- playafterXgames: { value: 1, type: 'multiplier', label: 'Play after games under Xgames Multiplier' },
- underXgames: { value: 1.1, type: 'multiplier', label: 'Xgames Multiplier' },
- stopLoss: { value: 100000, type: 'balance', label: 'Stop if loss greater than'},
- stopProfit: { value: 1000000, type: 'balance', label: 'Stop if profit greater than'},
- };
- log('Script is running...');
- //Game Variables
- var currentBet = 0;
- var Xgames = 0;
- var counter = 0;
- var betNow = true;
- //Log Variables
- var sessionProfit = 0;
- //Events to follow
- engine.on('GAME_STARTING', ongamestart);
- engine.on('GAME_ENDED', ongameend);
- //Game Starting Event
- function ongamestart() {
- engine.bet(roundBit(currentBet), config.crashTarget.value);
- }
- //Game Ending Event
- function ongameend() {
- var lastGame = engine.history.first()
- // Xgames counter
- if (lastGame.bust < config.underXgames.value && betNow == true) {
- Xgames++;
- } else {
- Xgames = 0;
- }
- // Did we bet last round?
- if (lastGame.wager) {
- //We Won
- if (lastGame.cashedAt) {
- currentBet = currentBet * 1.1;
- counter++;
- betNow = true;
- if (counter >= 8) {
- counter = 0;
- currentBet = 0;
- betNow = false;
- }
- } else {
- currentBet *= config.multiOnloss.value;
- log('We lost that round. Lets bet', roundBit(currentBet) / 100, 'next round');
- }
- }
- } else {
- //We Didn't Bet
- if (Xgames >= config.playafterXgames.value) {
- currentBet = config.baseBet.value;
- log('X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet. Current session Profit', sessionProfit);
- } else {
- currentBet = 0;
- log('X Games count', Xgames);
- }
- }
- }
- //Math Rounding Function
- function roundBit(bet) {
- return Math.round(bet / 100) * 100;
- }
Advertisement
Add Comment
Please, Sign In to add comment