Guest User

Deobfusicated code

a guest
Jun 22nd, 2016
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document) .ready(function () {
  2.     $('.history-block-item .user .username') .each(function () {
  3.         $(this) .text(replaceLogin($(this) .text()))
  4.     });
  5.     $('.deposit-item:not(.card)') .tooltip({
  6.         container: 'body'
  7.     });
  8.     $('[data-toggle="popover"]') .popover({
  9.         container: 'body'
  10.     });
  11.     EZYSKINS.init();
  12.     $('.close-eto-delo') .click(function (_0x5db3x1) {
  13.         $(this) .parent('.msg-wrap') .slideUp()
  14.     });
  15.     $(document) .on('click', '.no-link', function () {
  16.         $('#linkBlock') .slideDown();
  17.         return false
  18.     });
  19.     $(document) .on('click', '#cardDepModal', function () {
  20.         $('#cardDepositModal') .arcticmodal()
  21.     });
  22.     $(document) .on('click', '#settings', function () {
  23.         $('#setting') .arcticmodal()
  24.     });
  25.     $(document) .on('click', '.deposit-no-link', function () {
  26.         $('#linkBlock') .slideDown();
  27.         return false
  28.     });
  29.     $(document) .on('click', '.tooltip-btn.level', function () {
  30.         $('.profile-level') .tooltip('hide');
  31.         $('#level-popup') .arcticmodal()
  32.     });
  33.     $(document) .on('click', '.tooltip-btn.card', function () {
  34.         $('.deposit-item.card') .tooltip('hide');
  35.         $('#card-popup') .arcticmodal()
  36.     });
  37.     $(document) .on('click', '.tooltip-btn.ticket', function () {
  38.         $('.ticket-number') .tooltip('hide');
  39.         $('#ticket-popup') .arcticmodal()
  40.     });
  41.     $(document) .on('click', '#user-level-btn', function () {
  42.         $('.level-badge') .tooltip('hide');
  43.         $('#level-popup') .arcticmodal()
  44.     });
  45.     $('.tooltip') .remove();
  46.     $('.ticket-number') .tooltip({
  47.         html: true,
  48.         trigger: 'hover',
  49.         delay: {
  50.             show: 50,
  51.             hide: 200
  52.         },
  53.         title: function () {
  54.             var _0x5db3x2 = '1 ????? = 1 ???';
  55.             var _0x5db3x3 = '??? ???? ????? ??????';
  56.             return '<span class="tooltip-title ticket">' + _0x5db3x2 + '</span><br/><span class="tooltip-btn ticket">' + _0x5db3x3 + '</span>'
  57.         }
  58.     });
  59.     $('.deposit-item:not(.card)') .tooltip({
  60.         container: 'body'
  61.     });
  62.     $('.deposit-item.card') .each(function () {
  63.         var _0x5db3x4 = $(this);
  64.         _0x5db3x4.data('old-title', _0x5db3x4.attr('title'));
  65.         _0x5db3x4.attr('title', null);
  66.         _0x5db3x4.tooltip({
  67.             html: true,
  68.             trigger: 'hover',
  69.             delay: {
  70.                 show: 50,
  71.                 hide: 200
  72.             },
  73.             title: function () {
  74.                 var _0x5db3x2 = $(this) .data('old-title');
  75.                 var _0x5db3x3 = '??? ???? ????? ?????????';
  76.                 return '<span class="tooltip-title card">' + _0x5db3x2 + '</span><br/><span class="tooltip-btn card">' + _0x5db3x3 + '</span>'
  77.             }
  78.         })
  79.     });
  80.     $('.save-trade-link-input') .keypress(function (_0x5db3x1) {
  81.         if (_0x5db3x1.which == 13) {
  82.             $(this) .next() .click()
  83.         }
  84.     }) .on('paste', function () {
  85.         var _0x5db3x4 = $(this);
  86.         setTimeout(function () {
  87.             _0x5db3x4.next() .click()
  88.         }, 0)
  89.     });
  90.     $('.save-link2') .click(function () {
  91.         var _0x5db3x4 = $(this) .prev();
  92.         $.ajax({
  93.             url: '/settings/save',
  94.             type: 'POST',
  95.             dataType: 'json',
  96.             data: {
  97.                 trade_link: $(this) .prev() .val()
  98.             },
  99.             success: function (_0x5db3x5) {
  100.                 if (_0x5db3x5.status == 'success') {
  101.                     $('.givetradelink') .slideUp();
  102.                     $('#cardDepModal') .show();
  103.                     $('#addbet') .show();
  104.                     if (_0x5db3x5.msg) {
  105.                         return $.notify(_0x5db3x5.msg, 'success')
  106.                     }
  107.                 };
  108.                 if (_0x5db3x5.msg) {
  109.                     $.notify(_0x5db3x5.msg, 'error')
  110.                 }
  111.             },
  112.             error: function () {
  113.                 ajaxError()
  114.             }
  115.         });
  116.         return false
  117.     });
  118.     $('.tooltip') .remove();
  119.     $('.current-user') .tooltip({
  120.         container: 'body'
  121.     })
  122. });
  123. function updateBackground() {
  124.     var _0x5db3x7 = $('.dad-container') .height();
  125.     var _0x5db3x8 = $(window) .height();
  126.     if (_0x5db3x7 > _0x5db3x8) {
  127.         $('.main-container') .height('auto')
  128.     } else {
  129.         $('.main-container') .height('100%')
  130.     }
  131. }
  132. function replaceLogin(_0x5db3xa) {
  133.     function _0x5db3xb(_0x5db3xc, _0x5db3xd, _0x5db3xe, _0x5db3xf, _0x5db3x10, _0x5db3x11) {
  134.         var _0x5db3x12 = [
  135.             'CSGO-LIFE.ru',
  136.             'CSGO-LIFE.com'
  137.         ];
  138.         return _0x5db3x12.indexOf(_0x5db3xc.toLowerCase()) == - 1 ? '' : _0x5db3xc
  139.     }
  140.     _0x5db3xa = _0x5db3xa.replace('?om', 'com') .replace('c?m', 'com') .replace('??m', 'com');
  141.     var _0x5db3x13 = _0x5db3xa.replace(/([?-?a-z0-9-]+) *\. *(ru|com|net|gl|su|red|ws|us)+/i, _0x5db3xb);
  142.     if (!_0x5db3x13.trim()) {
  143.         var _0x5db3x14 = _0x5db3xa.toLowerCase() .split('CSGO-LIFE.ru') .length > 1 || _0x5db3xa.toLowerCase() .split('CSGO-LIFE.com') .length > 1;
  144.         if (_0x5db3x14) {
  145.             _0x5db3x13 = _0x5db3xa
  146.         } else {
  147.             _0x5db3x13 = _0x5db3xa.replace(/csgo/i, '') .replace(/ *\. *ru/i, '') .replace(/ *\. *com/i, '');
  148.             if (!_0x5db3x13.trim()) {
  149.                 _0x5db3x13 = 'UNKNOWN'
  150.             }
  151.         }
  152.     };
  153.     _0x5db3x13 = _0x5db3x13.split('script') .join('srcipt');
  154.     return _0x5db3x13
  155. }
  156. updateBackground();
  157. function getRarity(_0x5db3x16) {
  158.     var _0x5db3x17 = '';
  159.     var _0x5db3x18 = _0x5db3x16.split(',');
  160.     if (_0x5db3x18.length == 2) {
  161.         _0x5db3x16 = _0x5db3x18[1].trim()
  162.     };
  163.     if (_0x5db3x18.length == 3) {
  164.         _0x5db3x16 = _0x5db3x18[2].trim()
  165.     };
  166.     if (_0x5db3x18.length && _0x5db3x18[0] == '???') {
  167.         _0x5db3x16 = '?'
  168.     };
  169.     switch (_0x5db3x16) {
  170.         case '????????? ????????':
  171.             _0x5db3x17 = 'milspec';
  172.             break;
  173.         case '???????????':
  174.             _0x5db3x17 = 'restricted';
  175.             break;
  176.         case '?????????????':
  177.             _0x5db3x17 = 'classified';
  178.             break;
  179.         case '??????':
  180.             _0x5db3x17 = 'covert';
  181.             break;
  182.         case '?????????':
  183.             _0x5db3x17 = 'common';
  184.             break;
  185.         case '???????????? ????????':
  186.             _0x5db3x17 = 'common';
  187.             break;
  188.         case '?':
  189.             _0x5db3x17 = 'rare';
  190.             break;
  191.         case 'card':
  192.             _0x5db3x17 = 'card';
  193.             break
  194.     };
  195.     return _0x5db3x17
  196. }
  197. function n2w(_0x5db3x1a, _0x5db3x1b) {
  198.     _0x5db3x1a %= 100;
  199.     if (_0x5db3x1a > 19) {
  200.         _0x5db3x1a %= 10
  201.     };
  202.     switch (_0x5db3x1a) {
  203.         case 1:
  204.             return _0x5db3x1b[0];
  205.         case 2:
  206.             ;
  207.         case 3:
  208.             ;
  209.         case 4:
  210.             return _0x5db3x1b[1];
  211.         default:
  212.             return _0x5db3x1b[2]
  213.     }
  214. }
  215. function lpad(_0x5db3x1d, _0x5db3x1e) {
  216.     while (_0x5db3x1d.toString() .length < _0x5db3x1e) {
  217.         _0x5db3x1d = '0' + _0x5db3x1d
  218.     };
  219.     return _0x5db3x1d
  220. }
  221. $(document) .on('click', '#showUsers, #showItems', function () {
  222.     if ($(this) .is('.active')) {
  223.         return
  224.     };
  225.     $('#showUsers, #showItems') .removeClass('active');
  226.     $(this) .addClass('active');
  227.     $('#usersChances .users') .toggle();
  228.     $('#usersChances .items') .toggle();
  229.     updateScrollbar()
  230. });
  231. $(document) .on('click', '.firsttime.tutorialopen', function () {
  232.     $('.tutorial.start') .removeClass('hidden');
  233.     $('.tutorial.start') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  234.         $(this) .removeClass('animated fadeIn')
  235.     });
  236.     $('.round-givemeitems') .css('z-index', '0')
  237. });
  238. $(document) .on('click', '.green.fadeInMove', function () {
  239.     $('.tutorial.start') .addClass('animated fadeOut') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  240.         $(this) .removeClass('animated fadeOut');
  241.         $('.tutorial.start') .addClass('hidden')
  242.     });
  243.     $('.round-givemeitems') .css('z-index', '100')
  244. });
  245. $('#usersChances') .hover(function () {
  246.     var _0x5db3x1f = $('#showUsers') .is('.active') ? $('.current-chance-block.users')  : $('.current-chance-block.items');
  247.     var _0x5db3x20 = $('#showUsers') .is('.active') ? 10 : 9;
  248.     if (_0x5db3x1f.find('.current-chance-wrap') .children() .length > _0x5db3x20) {
  249.         $('.arrowscroll') .show()
  250.     }
  251. }, function () {
  252.     $('.arrowscroll') .hide()
  253. });
  254. $('.arrowscroll') .click(function () {
  255.     var _0x5db3x1f = $('#showUsers') .is('.active') ? $('.current-chance-block.users')  : $('.current-chance-block.items');
  256.     var _0x5db3x21 = $(this) .is('.left') ? '-' : '+';
  257.     _0x5db3x1f.stop(true, false) .animate({
  258.         scrollLeft: _0x5db3x21 + '=250'
  259.     })
  260. });
  261. $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  262.     $(this) .removeClass('animated bounce')
  263. });
  264. $('.history-block.black-block') .addClass('animated shake') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  265.     $(this) .removeClass('animated shake')
  266. });
  267. $('.kbf-fillnow') .addClass('animated fadeInDown') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  268.     $(this) .removeClass('animated fadeInDown')
  269. });
  270. $('.round-givemeitems.msg1') .show();
  271. $('.round-givemeitems.msg1') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  272.     $(this) .removeClass('animated fadeIn')
  273. });
  274. $(document) .on('click', '.smiles-button.open', function (_0x5db3x1) {
  275.     $('.smiles-block') .slideDown();
  276.     $('.smiles-button.open') .hide();
  277.     $('.smiles-button.closed') .show()
  278. });
  279. $(document) .on('click', '.smiles-button.closed', function (_0x5db3x1) {
  280.     $('.smiles-block') .slideUp();
  281.     $('.smiles-button.closed') .hide();
  282.     $('.smiles-button.open') .show()
  283. });
  284. var sounds = $.cookie('sounds');
  285. if (sounds == 'on') {
  286.     $('#on') .addClass('hidden');
  287.     $('#off') .removeClass('hidden')
  288. } else {
  289.     $('#on') .removeClass('hidden');
  290.     $('#off') .addClass('hidden')
  291. };
  292. $(document) .on('click', '#on', function (_0x5db3x1) {
  293.     _0x5db3x1.preventDefault();
  294.     $('#on') .addClass('hidden');
  295.     $('#off') .removeClass('hidden');
  296.     sounds = 'on';
  297.     $.cookie('sounds', 'on', {
  298.         expires: 365
  299.     })
  300. });
  301. $(document) .on('click', '#off', function (_0x5db3x1) {
  302.     _0x5db3x1.preventDefault();
  303.     $('#on') .removeClass('hidden');
  304.     $('#off') .addClass('hidden');
  305.     sounds = 'off';
  306.     $.cookie('sounds', 'off', {
  307.         expires: 365
  308.     })
  309. });
  310. $(document) .on('click', '.poplight.open', function (_0x5db3x1) {
  311.     $('.chat-block.black-block.balance') .slideDown();
  312.     $('.poplight.open') .hide();
  313.     $('.poplight.closed') .show()
  314. });
  315. $(document) .on('click', '.poplight.closed', function (_0x5db3x1) {
  316.     $('.chat-block.black-block.balance') .slideUp();
  317.     $('.poplight.closed') .hide();
  318.     $('.poplight.open') .show()
  319. });
  320. $('.ip-icon') .addClass('active');
  321. function newAvatarSound() {
  322.     var _0x5db3x24 = new Audio();
  323.     _0x5db3x24.src = '/assets/sounds/closed.mp3';
  324.     _0x5db3x24.volume = 0.9;
  325.     _0x5db3x24.play()
  326. }
  327. if (sounds == 'on') {
  328.     newAvatarSound()
  329. };
  330. function newTimerSound() {
  331.     var _0x5db3x24 = new Audio();
  332.     _0x5db3x24.src = '/assets/sounds/timer-tick-quiet.mp3';
  333.     _0x5db3x24.volume = 0.9;
  334.     _0x5db3x24.play()
  335. }
  336. function newTimerSound5sec() {
  337.     var _0x5db3x24 = new Audio();
  338.     _0x5db3x24.src = '/assets/sounds/timer-tick-last-5-seconds.mp3';
  339.     _0x5db3x24.volume = 0.9;
  340.     _0x5db3x24.play()
  341. }
  342. function newRouletteSound() {
  343.     var _0x5db3x24 = new Audio();
  344.     _0x5db3x24.src = '/assets/sounds/roulette-start-2.mp3';
  345.     _0x5db3x24.volume = 0.9;
  346.     _0x5db3x24.play()
  347. }
  348. function newGameKnife() {
  349.     var _0x5db3x24 = new Audio();
  350.     _0x5db3x24.src = '/assets/sounds/bet-in-other-room-5.mp3';
  351.     _0x5db3x24.volume = 0.9;
  352.     _0x5db3x24.play()
  353. }
  354. function betsNotySound() {
  355.     var _0x5db3x24 = new Audio();
  356.     _0x5db3x24.src = '/assets/sounds/notif3.mp3';
  357.     _0x5db3x24.volume = 0.9;
  358.     _0x5db3x24.play()
  359. }
  360. if (CARDS) {
  361.     $('.kartochki') .show();
  362.     $('.kartochki') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  363.         $(this) .removeClass('animated fadeIn')
  364.     })
  365. };
  366. if (STARTSYSTEM) {
  367.     updateBackground();
  368.     var socket = io.connect('151.80.220.120:7923');
  369.     if (checkUrl()) {
  370.         socket.on('connect', function () {
  371.             $('.preloader') .hide()
  372.         }) .on('disconnect', function () {
  373.             $('.preloader') .show()
  374.         }) .on('online', function (_0x5db3x5) {
  375.             $('.stats-onlineNow') .text(Math.abs(_0x5db3x5))
  376.         }) .on('newDeposit', function (_0x5db3x5) {
  377.             updateBackground();
  378.             _0x5db3x5 = JSON.parse(_0x5db3x5);
  379.             $('#deposits') .prepend(_0x5db3x5.html);
  380.             $('#adminlogs') .prepend(_0x5db3x5.html_adminlogs);
  381.             $('.betinfo') .prepend(_0x5db3x5.html);
  382.             var _0x5db3x30 = $('#bet_' + _0x5db3x5.id + ' .history-block-item .user .username') .text();
  383.             $('#bet_' + _0x5db3x5.id + ' .history-block-item .user .username') .text(replaceLogin(_0x5db3x30));
  384.             $('#round-money') .html(Math.round(_0x5db3x5.gamePrice) + '?');
  385.             $('title') .text(Math.round(_0x5db3x5.gamePrice) + ' ??? - CSGO-LIFE.COM');
  386.             $('#round-items') .html(_0x5db3x5.itemsCount);
  387.             $('.item-bar') .css('width', _0x5db3x5.itemsCount + '%');
  388.             $('.deposit-item') .tooltip({
  389.                 container: 'body',
  390.                 placement: 'top'
  391.             });
  392.             $('.round-givemeitems.msg1') .hide();
  393.             $('.round-givemeitems.msg1') .addClass('hidden');
  394.             $('.main_banner') .addClass('hidden');
  395.             $('.round-items-text') .addClass('hidden');
  396.             $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  397.                 $(this) .removeClass('animated bounce')
  398.             });
  399.             $('.history-block.black-block') .addClass('animated shake') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  400.                 $(this) .removeClass('animated shake')
  401.             });
  402.             $('.kbf-fillnow') .addClass('animated fadeInDown') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  403.                 $(this) .removeClass('animated fadeInDown')
  404.             });
  405.             $('.kb-active-knife') .removeClass('hidden');
  406.             $('#betinfo') .html('');
  407.             console.log(_0x5db3x5.chances);
  408.             html_chances = '';
  409.             html_knifechances = '';
  410.             html_betsDown = '';
  411.             _0x5db3x5.chances = sortByChance(_0x5db3x5.chances);
  412.             _0x5db3x5.chances.forEach(function (_0x5db3x31) {
  413.                 html_chances += '<div class="current-user" title="' + replaceLogin(_0x5db3x31.username) + '"><a class="img-wrap" href="/user/' + _0x5db3x31.steamid64 + '" target="_blank"><img src="' + _0x5db3x31.avatar + '" /></a><div class="chance">' + _0x5db3x31.chance + '%</div></div>';
  414.                 if (_0x5db3x31.chance <= 3) {
  415.                     html_knifechances += '<div class="kbf player-' + _0x5db3x31.place + ' kbf-mini2" style="height: ' + _0x5db3x31.chance + '%;">'
  416.                 } else {
  417.                     html_knifechances += '<div class="kbf player-' + _0x5db3x31.place + '" style="height: ' + _0x5db3x31.chance + '%;">'
  418.                 };
  419.                 html_knifechances += '<div class="kbf-user">';
  420.                 html_knifechances += '<div class="kfbu-avatar" style="background-image: url(' + _0x5db3x31.avatar + ');"></div>';
  421.                 html_knifechances += '<div class="kfbu-betinfo"><a href="/user/' + _0x5db3x31.steamid64 + '">' + _0x5db3x31.username + '</a><span>' + _0x5db3x31.items + ' ????????? ?? <em>' + _0x5db3x31.priceall + '<small>o</small></em></span></div></div>';
  422.                 html_knifechances += '<span class="kbf-perc">' + _0x5db3x31.chance + '%</span></div>';
  423.                 html_betsDown += '<div class="deposit player-' + _0x5db3x31.place + '"><a href="/user/' + _0x5db3x31.steamid64 + '" title="8Vandal8" class="d-user" style="width: 56%;">';
  424.                 html_betsDown += '<img src="' + _0x5db3x31.avatar + '" class="du-avatar"><div class="du-name">' + _0x5db3x31.username + '</div></a>';
  425.                 html_betsDown += '<div class="d-chance">' + _0x5db3x31.chance + '%</div>';
  426.                 html_betsDown += '<div class="d-items">' + _0x5db3x31.items + '</div>';
  427.                 html_betsDown += '<div class="d-money">' + _0x5db3x31.priceall + '<small>o</small></div>';
  428.                 html_betsDown += '</div>'
  429.             });
  430.             $('#usersChances .users .current-chance-wrap') .html(html_chances);
  431.             $('#usersChances') .show();
  432.             $('#knifechances') .html(html_knifechances);
  433.             $('#knifechances') .show();
  434.             $('#betsDown') .html(html_betsDown);
  435.             $('#betsDown') .show();
  436.             $('.tooltip') .remove();
  437.             $('.current-user') .tooltip({
  438.                 container: 'body'
  439.             });
  440.             function _0x5db3x32(_0x5db3x20, _0x5db3x33) {
  441.                 return Math.random() * (_0x5db3x33 - _0x5db3x20) + _0x5db3x20
  442.             }
  443.             function _0x5db3x34() {
  444.                 var _0x5db3x24 = new Audio();
  445.                 _0x5db3x24.src = '/assets/sounds/knife' + Math.round(_0x5db3x32(1, 3)) + '.mp3';
  446.                 _0x5db3x24.volume = 0.9;
  447.                 _0x5db3x24.play()
  448.             }
  449.             if (sounds == 'on') {
  450.                 _0x5db3x34()
  451.             };
  452.             EZYSKINS.initTheme()
  453.         }) .on('forceClose', function () {
  454.             $('.forceClose') .removeClass('msgs-not-visible')
  455.         }) .on('timer', function (_0x5db3x2f) {
  456.             $('#gameTimer .countMinutes') .text(lpad(Math.floor(_0x5db3x2f / 60), 2));
  457.             $('#gameTimer .countSeconds') .text(lpad(_0x5db3x2f - Math.floor(_0x5db3x2f / 60) * 60, 2));
  458.             if (_0x5db3x2f <= 20) {
  459.                 if (sounds == 'on') {
  460.                     newTimerSound()
  461.                 }
  462.             };
  463.             if (_0x5db3x2f == 30) {
  464.                 if (sounds == 'on') {
  465.                     betsNotySound()
  466.                 };
  467.                 $('.betsnoty') .show() .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  468.                     $(this) .removeClass('animated bounceInRight')
  469.                 })
  470.             };
  471.             if (_0x5db3x2f <= 1) {
  472.                 $('#newGameTimer') .show();
  473.                 $('#gameTimer') .hide();
  474.                 $('#newGameTimerText') .show();
  475.                 $('#gameTimerText') .hide()
  476.             };
  477.             if (_0x5db3x2f == 13) {
  478.                 $('.betsnoty') .addClass('animated bounceOutRight') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  479.                     $(this) .hide();
  480.                     $(this) .removeClass('animated bounceOutRight');
  481.                     $(this) .addClass('animated bounceInRight')
  482.                 })
  483.             }
  484.         }) .on('slider', function (_0x5db3x5) {
  485.             $('#newGameTimer .countSeconds') .text(lpad(_0x5db3x5.time - Math.floor(_0x5db3x5.time / 60) * 60, 2));
  486.             if (_0x5db3x5.time == 19) {
  487.                 $('.rr') .slideUp(300);
  488.                 $('.round-winner') .slideDown(300);
  489.                 $('.rw-avatar') .addClass('animated rotateIn');
  490.                 if (sounds == 'on') {
  491.                     newAvatarSound()
  492.                 }
  493.             };
  494.             if (ngtimerStatus) {
  495.                 ngtimerStatus = false;
  496.                 var _0x5db3x2b = _0x5db3x5.users;
  497.                 _0x5db3x2b = mulAndShuffle(_0x5db3x2b, Math.ceil(130 / _0x5db3x2b.length));
  498.                 _0x5db3x2b[112] = _0x5db3x5.winner;
  499.                 html = '';
  500.                 _0x5db3x2b.forEach(function (_0x5db3x2c) {
  501.                     html += '<img src="' + _0x5db3x2c.avatar + '">'
  502.                 });
  503.                 $('#usersCarousel') .html(html);
  504.                 $('#barContainer') .hide();
  505.                 $('#usersCarouselConatiner') .slideDown(300);
  506.                 if (_0x5db3x5.showCarousel) {
  507.                     $('#depositButtonsBlock') .slideUp()
  508.                 } else {
  509.                     $('#depositButtonsBlock') .hide()
  510.                 };
  511.                 _0x5db3x2d(_0x5db3x5);
  512.                 $('#roundFinishBlock .number') .text(_0x5db3x5.round_number);
  513.                 $('#usersCarousel') .css('margin-left', - 2000);
  514.                 if (_0x5db3x5.showSlider) {
  515.                     $('#usersCarousel') .animate({
  516.                         marginLeft: - 8728
  517.                     }, 1000 * 10, function () {
  518.                         $('#winnerInfo .winner-info-holder') .slideDown()
  519.                     });
  520.                     if (sounds == 'on') {
  521.                         newRouletteSound()
  522.                     }
  523.                 };
  524.                 function _0x5db3x2d(_0x5db3x5) {
  525.                     _0x5db3x5 = _0x5db3x5 || {
  526.                         winner: {
  527.                         }
  528.                     };
  529.                     var _0x5db3x2e = {
  530.                         totalPrice: _0x5db3x5.game.price || 0,
  531.                         number: _0x5db3x5.game.price ? ('#' + Math.floor(_0x5db3x5.round_number * _0x5db3x5.game.price))  : '???',
  532.                         tickets: _0x5db3x5.tickets || 0,
  533.                         winner: {
  534.                             image: _0x5db3x5.winner.avatar || '???',
  535.                             login: _0x5db3x5.winner.username || '???',
  536.                             id: _0x5db3x5.winner.steamid64 || '#',
  537.                             chance: _0x5db3x5.chance || 0,
  538.                             winTicket: _0x5db3x5.ticket || '???'
  539.                         }
  540.                     };
  541.                     $('#winnerInfo #winTicket') .text('#' + _0x5db3x2e.winner.winTicket);
  542.                     $('#winnerInfo #totalTickets') .text(_0x5db3x2e.tickets);
  543.                     $('#winnerInfo .rw-avatar') .attr('src', _0x5db3x2e.winner.image);
  544.                     $('#winnerInfo #winnerLink') .text(replaceLogin(_0x5db3x2e.winner.login));
  545.                     $('#winnerInfo .winlink') .attr('href', '/user/' + _0x5db3x2e.winner.id);
  546.                     $('#winnerInfo #winnerLink') .attr('href', '/user/' + _0x5db3x2e.winner.id);
  547.                     $('#winnerInfo .rw-steamlink') .attr('href', 'http://steamcommunity.com/profiles/' + _0x5db3x2e.winner.id);
  548.                     $('#winnerInfo #winnerChance') .text(_0x5db3x2e.winner.chance.toFixed(2) + '%');
  549.                     $('#winnerInfo #winnerSum') .text(_0x5db3x2e.totalPrice)
  550.                 }
  551.             }
  552.         }) .on('newGame', function (_0x5db3x5) {
  553.             updateBackground();
  554.             if (sounds == 'on') {
  555.                 newGameKnife()
  556.             };
  557.             $('#usersChances .users .current-chance-wrap') .html('');
  558.             $('#usersChances .items .current-chance-wrap') .html('');
  559.             $('#usersChances') .hide();
  560.             $('#deposits') .html('');
  561.             $('#adminlogs') .html('');
  562.             $('#knifechances') .html('');
  563.             $('#betsDown') .html('');
  564.             $('#betinfo') .html('');
  565.             $('#myItemsCount') .html('0 <span style="font-size: 12px;"> ?????????</span>');
  566.             $('#myChance') .text('0%');
  567.             $('#roundId') .text(_0x5db3x5.id);
  568.             $('#roundHash') .text(_0x5db3x5.hash);
  569.             $('#round-money') .html('0?');
  570.             $('#hash') .text(_0x5db3x5.hash);
  571.             $('#round-items') .html('0');
  572.             $('.item-bar') .css('width', '0%');
  573.             $('#roundFinishBlock') .hide();
  574.             $('#barContainer') .show();
  575.             $('#usersCarouselConatiner') .hide();
  576.             $('#depositButtonsBlock') .slideDown();
  577.             $('#winnerInfo') .hide();
  578.             $('.round-givemeitems.msg1') .show();
  579.             $('.round-givemeitems.msg1') .removeClass('hidden');
  580.             $('.round-givemeitems.msg1') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  581.                 $(this) .removeClass('animated fadeIn')
  582.             });
  583.             $('.rr') .slideDown(300);
  584.             $('.rw-avatar') .removeClass('animated rotateIn');
  585.             $('#newGameTimer') .hide();
  586.             $('#gameTimer') .show();
  587.             $('#newGameTimerText') .hide();
  588.             $('#gameTimerText') .show();
  589.             $('.kb-active-knife') .addClass('hidden');
  590.             $('.main_banner') .removeClass('hidden');
  591.             $('.round-items-text') .removeClass('hidden');
  592.             $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  593.                 $(this) .removeClass('animated bounce')
  594.             });
  595.             $('.history-block.black-block') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
  596.                 $(this) .removeClass('animated bounce')
  597.             });
  598.             $('#gameTimer .countMinutes') .text('02');
  599.             $('#gameTimer .countSeconds') .text('00');
  600.             $('title') .text('0 ??? - CSGO-LIFE.COM');
  601.             setTimeout(updateBackground, 1000);
  602.             ngtimerStatus = true
  603.         }) .on('queue', function (_0x5db3x5) {
  604.             console.log(_0x5db3x5);
  605.             if (_0x5db3x5) {
  606.                 var _0x5db3x1a = _0x5db3x5.indexOf(USER_ID);
  607.                 if (_0x5db3x1a !== - 1) {
  608.                     $.notify('??? ??????? ??????????????. ????????!', {
  609.                         clickToHide: 'false',
  610.                         autoHide: 'false',
  611.                         className: 'success'
  612.                     })
  613.                 }
  614.             }
  615.         }) .on('depositDecline', function (_0x5db3x5) {
  616.             _0x5db3x5 = JSON.parse(_0x5db3x5);
  617.             if (_0x5db3x5.user == USER_ID) {
  618.                 clearTimeout(declineTimeout);
  619.                 declineTimeout = setTimeout(function () {
  620.                     $('#errorBlock') .slideUp()
  621.                 }, 1000 * 10);
  622.                 $('#errorBlock p') .text(_0x5db3x5.msg);
  623.                 $('#errorBlock') .slideDown()
  624.             }
  625.         })
  626.     } else {
  627.         socket.on('online', function (_0x5db3x5) {
  628.             $('.stats-onlineNow') .text(Math.abs(_0x5db3x5))
  629.         })
  630.     };
  631.     var declineTimeout,
  632.     timerStatus = true,
  633.     ngtimerStatus = true
  634. };
  635. function loadMyInventory() {
  636.     $('thead') .hide();
  637.     $.ajax({
  638.         url: '/myinventory',
  639.         type: 'POST',
  640.         dataType: 'json',
  641.         success: function (_0x5db3x5) {
  642.             var _0x5db3x2 = '<tr><td colspan="4" style="text-align: center">?????????·???€?»?° ???€???±???°. ???????????±?????‚?µ ?µ?‰?µ ???°?·</td></tr>';
  643.             var _0x5db3x39 = 0;
  644.             if (!_0x5db3x5.success && _0x5db3x5.Error) {
  645.                 _0x5db3x2 = '<tr><td colspan="4" style="text-align: center">' + _0x5db3x5.Error + '</td></tr>'
  646.             };
  647.             if (_0x5db3x5.success && _0x5db3x5.rgInventory && _0x5db3x5.rgDescriptions) {
  648.                 _0x5db3x2 = '';
  649.                 var _0x5db3x3a = mergeWithDescriptions(_0x5db3x5.rgInventory, _0x5db3x5.rgDescriptions);
  650.                 console.table(_0x5db3x3a);
  651.                 _0x5db3x3a.sort(function (_0x5db3x3b, _0x5db3x3c) {
  652.                     return parseFloat(_0x5db3x3c.price) - parseFloat(_0x5db3x3b.price)
  653.                 });
  654.                 _.each(_0x5db3x3a, function (_0x5db3x3d) {
  655.                     _0x5db3x3d.price = _0x5db3x3d.price || 0;
  656.                     _0x5db3x39 += parseFloat(_0x5db3x3d.price);
  657.                     _0x5db3x3d.price = _0x5db3x3d.price;
  658.                     _0x5db3x3d.image = 'https://steamcommunity-a.akamaihd.net/economy/image/class/730/' + _0x5db3x3d.classid + '/200fx200f';
  659.                     _0x5db3x3d.market_name = _0x5db3x3d.market_name || '';
  660.                     _0x5db3x2 += '' + '<tr>' + '<td class="item-image"><div class="item-image-wrap">' + '<img src="' + _0x5db3x3d.image + '">' + '</div></td>' + '<td class="item-name">' + _0x5db3x3d.name + '</td>' + '<td class="item-type">' + _0x5db3x3d.market_name.replace(_0x5db3x3d.name, '') .replace('(', '') .replace(')', '') + '</td>' + '<td class="item-cost">' + (_0x5db3x3d.price || '---') + '</td>' + '</tr>'
  661.                 });
  662.                 $('#totalPrice') .text(_0x5db3x39.toFixed(2));
  663.                 $('thead') .show()
  664.             };
  665.             $('tbody') .html(_0x5db3x2);
  666.             updateBackground()
  667.         },
  668.         error: function () {
  669.             var _0x5db3x2 = isEn() ? 'An error has occurred. Try again' : '?????????·???€?»?° ???€???±???°. ???????????±?????‚?µ ?µ?‰?µ ???°?·';
  670.             $('tbody') .html('<tr><td colspan="4" style="text-align: center">' + _0x5db3x2 + '<td></tr>')
  671.         }
  672.     })
  673. }
  674. function mergeWithDescriptions(_0x5db3x3a, _0x5db3x3f) {
  675.     return Object.keys(_0x5db3x3a) .map(function (_0x5db3x40) {
  676.         var _0x5db3x3d = _0x5db3x3a[_0x5db3x40];
  677.         var _0x5db3x41 = _0x5db3x3f[_0x5db3x3d.classid + '_' + (_0x5db3x3d.instanceid || '0')];
  678.         for (var _0x5db3x42 in _0x5db3x41) {
  679.             _0x5db3x3d[_0x5db3x42] = _0x5db3x41[_0x5db3x42];
  680.             delete _0x5db3x3d.icon_url;
  681.             delete _0x5db3x3d.icon_drag_url;
  682.             delete _0x5db3x3d.icon_url_large
  683.         };
  684.         return _0x5db3x3d
  685.     })
  686. }
  687. function mulAndShuffle(_0x5db3x18, _0x5db3x44) {
  688.     var _0x5db3x13 = [
  689.     ],
  690.     _0x5db3x45 = _0x5db3x18.length,
  691.     _0x5db3x46 = _0x5db3x44 * _0x5db3x45,
  692.     _0x5db3x47,
  693.     _0x5db3x48;
  694.     while (_0x5db3x46) {
  695.         _0x5db3x47 = _0x5db3x18[Math.floor(Math.random() * _0x5db3x45)];
  696.         if (_0x5db3x45 == 1) {
  697.             _0x5db3x13.push(_0x5db3x48 = _0x5db3x47);
  698.             _0x5db3x46--
  699.         } else {
  700.             if (_0x5db3x47 !== _0x5db3x48) {
  701.                 _0x5db3x13.push(_0x5db3x48 = _0x5db3x47);
  702.                 _0x5db3x46--
  703.             }
  704.         }
  705.     };
  706.     return _0x5db3x13
  707. }
  708. $(document) .on('click', '.vote', function () {
  709.     var _0x5db3x4 = $(this);
  710.     $.ajax({
  711.         url: '/ajax',
  712.         type: 'POST',
  713.         dataType: 'json',
  714.         data: {
  715.             action: 'voteUser',
  716.             id: $(this) .data('profile')
  717.         },
  718.         success: function (_0x5db3x5) {
  719.             if (_0x5db3x5.status == 'success') {
  720.                 $('#myProfile') .find('.votes') .text(_0x5db3x5.votes || 0)
  721.             } else {
  722.                 if (_0x5db3x5.msg) {
  723.                     _0x5db3x4.notify(_0x5db3x5.msg, {
  724.                         position: 'bottom middle',
  725.                         className: 'error'
  726.                     })
  727.                 }
  728.             }
  729.         },
  730.         error: function () {
  731.             _0x5db3x4.notify('????????? ??????. ?????????? ??? ???', {
  732.                 position: 'bottom middle',
  733.                 className: 'error'
  734.             })
  735.         }
  736.     })
  737. });
  738. function sortByChance(_0x5db3x4a) {
  739.     var _0x5db3x4b = [
  740.     ],
  741.     _0x5db3x3d = 0;
  742.     for (var _0x5db3x4c = 0; _0x5db3x4c < _0x5db3x4a.length; _0x5db3x4c++) {
  743.         _0x5db3x4b = _0x5db3x4a[_0x5db3x4c];
  744.         _0x5db3x3d = _0x5db3x4c - 1;
  745.         while (_0x5db3x3d >= 0 && _0x5db3x4a[_0x5db3x3d].chance < _0x5db3x4b.chance) {
  746.             _0x5db3x4a[_0x5db3x3d + 1] = _0x5db3x4a[_0x5db3x3d];
  747.             _0x5db3x4a[_0x5db3x3d] = _0x5db3x4b;
  748.             _0x5db3x3d--
  749.         }
  750.     };
  751.     return _0x5db3x4a
  752. }
  753. function checkUrl() {
  754.     var _0x5db3x4e = window.location.pathname;
  755.     if (_0x5db3x4e.indexOf('game') + 1) {
  756.         return false
  757.     } else {
  758.         return true
  759.     }
  760. }
  761. $('.hrp-player') .hover(function () {
  762.     var _0x5db3x4f = $(this) .data('userid') ? $(this) .data('userid')  : '';
  763.     $(this) .parent() .parent() .addClass('hoveraction') .find('.hri[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
  764. }, function () {
  765.     $('.hri') .removeClass('hoverplayeritems'),
  766.     $('.history-round-stat') .removeClass('hoveraction')
  767. }),
  768. $('.hri') .hover(function () {
  769.     var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price')  : '',
  770.     _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid')  : '',
  771.     _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon')  : '';
  772.     $(this) .addClass('active'),
  773.     $('.weapon-history-hover span') .html(('?? ' + _0x5db3x4f), $('.weapon-history-hover b') .html(_0x5db3x3b), $(this) .parent() .parent() .find('.hrp-player[data-userid=\'' + _0x5db3x1 + '\']') .addClass('hover'));
  774.     var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
  775.     _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
  776.     _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
  777.     $('.weapon-history-hover') .css({
  778.         left: _0x5db3x2c,
  779.         top: _0x5db3x50
  780.     }),
  781.     $('.weapon-history-hover') .removeClass('hidden')
  782. }, function () {
  783.     $(this) .removeClass('active'),
  784.     $('.hrp-player') .removeClass('hover'),
  785.     setTimeout(function () {
  786.         0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
  787.     }, 100)
  788. });
  789. $('.rh-content .deposit') .hover(function () {
  790.     var _0x5db3x4f = $(this) .data('user') ? $(this) .data('user')  : '';
  791.     $(this) .closest('.rh-content') .addClass('hoveraction') .find('.hri-round[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
  792. }, function () {
  793.     $('.hri-round') .removeClass('hoverplayeritems'),
  794.     $('.rh-content') .removeClass('hoveraction')
  795. }),
  796. $('.hri-round') .hover(function () {
  797.     var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price')  : '',
  798.     _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid')  : '',
  799.     _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon')  : '';
  800.     $(this) .addClass('active'),
  801.     $('.weapon-history-hover span') .html('?? ' + _0x5db3x4f),
  802.     $('.weapon-history-hover b') .html(_0x5db3x3b),
  803.     $('.rh-content .deposit[data-user=\'' + _0x5db3x1 + '\']') .addClass('hover');
  804.     var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
  805.     _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
  806.     _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
  807.     $('.weapon-history-hover') .css({
  808.         left: _0x5db3x2c,
  809.         top: _0x5db3x50
  810.     }),
  811.     $('.weapon-history-hover') .removeClass('hidden')
  812. }, function () {
  813.     $(this) .removeClass('active'),
  814.     $('.rh-content .deposit') .removeClass('hover'),
  815.     setTimeout(function () {
  816.         0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
  817.     }, 100)
  818. });
  819. $('.ri') .hover(function () {
  820.     var _0x5db3x4f = $(this) .data('player') ? $(this) .data('player')  : '',
  821.     _0x5db3x1 = $(this) .data('weapon') ? $(this) .data('weapon')  : '';
  822.     $(this) .addClass('active'),
  823.     $('.weapon-hover span') .html(('?? ' + _0x5db3x4f), $('.weapon-hover b') .html(_0x5db3x1));
  824.     var _0x5db3x3b = ($('.weapon-hover') .innerHeight(), $(this) .offset() .left + 20),
  825.     _0x5db3x2c = $(this) .offset() .top + $(this) .innerHeight() + 10;
  826.     _0x5db3x3b + 150 > $(window) .innerWidth() && (_0x5db3x3b = $(window) .innerWidth() - 155),
  827.     $('.weapon-hover') .css({
  828.         left: _0x5db3x3b,
  829.         top: _0x5db3x2c
  830.     }),
  831.     $('.weapon-hover') .removeClass('hidden')
  832. }, function () {
  833.     $(this) .removeClass('active'),
  834.     setTimeout(function () {
  835.         0 == $('.ri.active') .length && $('.weapon-hover') .addClass('hidden')
  836.     }, 100)
  837. });
  838. $('.rh-content .deposit') .hover(function () {
  839.     var _0x5db3x4f = $(this) .data('user') ? $(this) .data('user')  : '';
  840.     $(this) .closest('.rh-content') .addClass('hoveraction') .find('.hri-round[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
  841. }, function () {
  842.     $('.hri-round') .removeClass('hoverplayeritems'),
  843.     $('.rh-content') .removeClass('hoveraction')
  844. }),
  845. $('.hri-round') .hover(function () {
  846.     var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price')  : '',
  847.     _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid')  : '',
  848.     _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon')  : '';
  849.     $(this) .addClass('active'),
  850.     $('.weapon-history-hover span') .html(app.poly.t('?·?° ') + _0x5db3x4f),
  851.     $('.weapon-history-hover b') .html(_0x5db3x3b),
  852.     $('.rh-content .deposit[data-user=\'' + _0x5db3x1 + '\']') .addClass('hover');
  853.     var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
  854.     _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
  855.     _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
  856.     $('.weapon-history-hover') .css({
  857.         left: _0x5db3x2c,
  858.         top: _0x5db3x50
  859.     }),
  860.     $('.weapon-history-hover') .removeClass('hidden')
  861. }, function () {
  862.     $(this) .removeClass('active'),
  863.     $('.rh-content .deposit') .removeClass('hover'),
  864.     setTimeout(function () {
  865.         0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
  866.     }, 100)
  867. });
  868. $.notify.addStyle('custom', {
  869.     html: '<div>\n<span data-notify-text></span>\n</div>'
  870. });
  871. $.notify.defaults({
  872.     style: 'custom'
  873. });
  874. $(document) .on('mouseenter', '.iusers, .iskins', function () {
  875.     $(this) .tooltip('show')
  876. })
Add Comment
Please, Sign In to add comment