SHOW:
|
|
- or go back to the newest paste.
| 1 | var config = {
| |
| 2 | baseBet: { value: 10000, type: 'balance', label: 'Base Bet' },
| |
| 3 | crashTarget: { value: 1.1, type: 'multiplier', label: 'Cash Out' },
| |
| 4 | multiOnloss: { value: 1.1, type: 'multiplier', label: 'Increase Bet on Loss' },
| |
| 5 | playafterXgames: { value: 1, type: 'multiplier', label: 'Play after games under Xgames Multiplier' },
| |
| 6 | underXgames: { value: 1.1, type: 'multiplier', label: 'Xgames Multiplier' },
| |
| 7 | stopLoss: { value: 100000, type: 'balance', label: 'Stop if loss greater than'},
| |
| 8 | stopProfit: { value: 1000000, type: 'balance', label: 'Stop if profit greater than'},
| |
| 9 | }; | |
| 10 | ||
| 11 | log('Script is running...');
| |
| 12 | ||
| 13 | //Game Variables | |
| 14 | var currentBet = 0; | |
| 15 | var Xgames = 0; | |
| 16 | var counter = 0; | |
| 17 | var betNow = true; | |
| 18 | //Log Variables | |
| 19 | var sessionProfit = 0; | |
| 20 | ||
| 21 | ||
| 22 | //Events to follow | |
| 23 | engine.on('GAME_STARTING', ongamestart);
| |
| 24 | engine.on('GAME_ENDED', ongameend);
| |
| 25 | ||
| 26 | //Game Starting Event | |
| 27 | function ongamestart() {
| |
| 28 | engine.bet(roundBit(currentBet), config.crashTarget.value); | |
| 29 | } | |
| 30 | ||
| 31 | //Game Ending Event | |
| 32 | function ongameend() {
| |
| 33 | var lastGame = engine.history.first() | |
| 34 | ||
| 35 | // Xgames counter | |
| 36 | if (lastGame.bust < config.underXgames.value && betNow == true) {
| |
| 37 | Xgames++; | |
| 38 | } else {
| |
| 39 | Xgames = 0; | |
| 40 | } | |
| 41 | ||
| 42 | // Did we bet last round? | |
| 43 | if (lastGame.wager) {
| |
| 44 | //We Won | |
| 45 | if (lastGame.cashedAt) {
| |
| 46 | currentBet = currentBet * 1.1; | |
| 47 | counter++; | |
| 48 | betNow = true; | |
| 49 | if (counter >= 8) {
| |
| 50 | counter = 0; | |
| 51 | currentBet = 0; | |
| 52 | betNow = false; | |
| 53 | } | |
| 54 | } else {
| |
| 55 | currentBet *= config.multiOnloss.value; | |
| 56 | log('We lost that round. Lets bet', roundBit(currentBet) / 100, 'next round');
| |
| 57 | } | |
| 58 | } | |
| 59 | } else {
| |
| 60 | //We Didn't Bet | |
| 61 | if (Xgames >= config.playafterXgames.value) {
| |
| 62 | currentBet = config.baseBet.value; | |
| 63 | log('X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet. Current session Profit', sessionProfit);
| |
| 64 | } else {
| |
| 65 | currentBet = 0; | |
| 66 | log('X Games count', Xgames);
| |
| 67 | } | |
| 68 | } | |
| 69 | } | |
| 70 | ||
| 71 | //Math Rounding Function | |
| 72 | function roundBit(bet) {
| |
| 73 | return Math.round(bet / 100) * 100; | |
| 74 | } |