Advertisement
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.10, type: 'multiplier', label: 'Cash Out' },
- multiOnloss: { value: 11, type: 'multiplier', label: 'Increase Bet on Loss' },
- playafterXgames: { value: 1, type: 'multiplier', label: 'Play after games under Xgames Multiplier' },
- underXgames: { value: 1.10, 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;
- //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) {
- Xgames++;
- }else{
- Xgames = 0;
- }
- // Did we bet last round?
- if (lastGame.wager){
- //We Won
- if(lastGame.cashedAt){
- currentBet = 0;
- sessionProfit += (((lastGame.cashedAt * lastGame.wager)- lastGame.wager)/100);
- //Check Session Profit
- if ((sessionProfit * 100) > config.stopProfit.value){
- engine.off('GAME_STARTING', ongamestart);
- engine.off('GAME_ENDED', ongameend);
- log ( 'We won that round and session profit is', sessionProfit, 'Script Stopped');
- }else{
- log ( 'We won that round. Lets Restart the Sequence. Session Profit', sessionProfit );
- }
- }else{
- //We Lost
- // Check sessionProfit
- if((sessionProfit*100) < (config.stopLoss.value - (config.stopLoss.value * 2))){
- engine.off('GAME_STARTING', ongamestart);
- engine.off('GAME_ENDED', ongameend);
- log ( 'We lost that round and session profit is', sessionProfit, 'Script Stopped');
- }else{
- currentBet *= config.multiOnloss.value;
- sessionProfit -= (lastGame.wager/100);
- 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
Advertisement