Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- bet: {
- value: 23000, type: 'balance', label: 'Bet'},
- payout: {
- value: 10, type: 'multiplier', label: 'Payout' },
- martin: {
- value: 1.11, type: 'multiplier', label: 'Martin' },
- pause: {
- value: 20, type: 'text', label: 'Pause For' }
- };
- var lastlost = false;
- var currentBet = config. bet.value;
- var currentMultiplier = config. bet.value;
- var lossStreak = 0;
- var pausefor = 0;
- var templastlost = false;
- var firstgame = true
- var paused = true;
- engine.on('GAME_STARTING', function() {
- if (paused) {
- return;
- }
- if (pausefor > 0) {
- pausefor--;
- return;
- }
- if (lastlost) {
- lossStreak++;
- currentBet *= config.martin.value;
- if (lossStreak >= 35) {
- lastlost = false;
- return;
- }
- } else {
- currentBet = config.bet.value;
- currentMultiplier = config.payout.value;
- lossStreak = 0;
- if(!firstgame) {
- pausefor = config.pause.value;
- firstgame = false;
- }
- }
- engine.bet(currentBet, currentMultiplier);
- });
- engine.on('GAME_ENDED', function() {
- var lastGame = engine.history.first();
- if (lastGame.bust >= config.multiplier.value) {
- paused = false;
- pausefor = config.pause.value;
- }
- if (!lastGame.wager) {
- return;
- }
- if (lastGame.cashedAt) {
- lastlost = false
- } else {
- lastlost = true;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement