Advertisement
coinwalk

999diceethbtcltc

Apr 28th, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | None | 0 0
  1. var baseBet = 0.00000001;
  2. var mulBet = 2;
  3. var mulPlaceBet = 499499;
  4. var betMode = 0;
  5. var maxWin = 1000000000;
  6. var newPlaceBet = 0.00000001;
  7. var cntWin = 0;
  8.  
  9. function applyFormula(bet) {
  10. let currentBalance = $('.Numbers.HighlightedText.UserBalance').text();
  11. if(bet > currentBalance) {
  12. console.log("Bạn không còn đủ tiền để cược thêm");
  13. } else {
  14. if(cntWin >= maxWin) {
  15. console.log("Đã thắng đủ " + maxWin + " lần");
  16. } else {
  17. processBet(betMode, bet);
  18. }
  19. }
  20. }
  21.  
  22. pipe = {
  23. events: {
  24. connected: null,
  25. disconnected: null,
  26. startupInfoReceived: null,
  27. withdrawPending: null,
  28. withdrawInsufficientFunds: null,
  29. withdrawError: null,
  30. },
  31. betsAllowed: !0,
  32. server: {
  33. isBetOutstanding: !1,
  34. lastReceivedBetId: 0,
  35. overlappingBetCount: 0,
  36. placeBet: function(n, t, i, r, u, f) {
  37. pipe.betsAllowed && (!pipe.server.isBetOutstanding || config.prefs.overlappingBetsAllowed) && (pipe.server.overlappingBetCount > 5 || (pipe.server.isBetOutstanding = !0, ++pipe.server.overlappingBetCount, $.connection.mainHub.server.placeBet(n, t, i, r, u, f).done(function(n) {
  38. var f, e, o;
  39. pipe.server.isBetOutstanding = !1;
  40. --pipe.server.overlappingBetCount;
  41. switch (n.status) {
  42. case 0:
  43. f = new BetInfo;
  44. f.accountId = data.user.accountId;
  45. f.betCount = 1;
  46. f.betWins = n.secret >= t && n.secret <= i ? 1 : 0;
  47. f.secret = n.secret;
  48. f.clientSeed = r;
  49. f.currencyId = u;
  50. f.guessHigh = i;
  51. f.guessLow = t;
  52. f.id = n.id;
  53. f.payIn = n.payIn;
  54. f.payOut = n.payOut;
  55. f.name = data.user.friendlyName;
  56. e = data.user.currencyStats[u];
  57. o = data.site.betStats[u];
  58. data.user.serverSeedHash = n.next ? n.next : null;
  59. pipe.server.lastReceivedBetId < f.id && (pipe.server.lastReceivedBetId = f.id, e.balance = n.startingBalance + f.payIn + f.payOut);
  60. ++e.betStats.count;
  61. ++o.count;
  62. e.betStats.payIn += f.payIn;
  63. e.betStats.payOut += f.payOut;
  64. o.payIn += f.payIn;
  65. o.payOut += f.payOut;
  66. f.betWins && (++e.betStats.winCount, ++o.winCount);
  67. pipe.events.betComplete && pipe.events.betComplete(f, 10);
  68. $('.UserBalance').text((e.balance * 1e-8).toFixed(8));
  69. $('#LastBetInfoProfit').text(((n.payIn + n.payOut) / 1e8).toFixed(8));
  70. $("#LastBetInfoSecret").text(n.secret);
  71. f.betWins ? ($("#LastBetInfoContainer").removeClass("BadNumber"), $("#LastBetInfoContainer").addClass("GoodNumber")) : ($("#LastBetInfoContainer").removeClass("GoodNumber"), $("#LastBetInfoContainer").addClass("BadNumber"));
  72. if(f.betWins) {
  73. cntWin++;
  74. newPlaceBet = baseBet;
  75. } else {
  76. newPlaceBet = (newPlaceBet * mulBet).toFixed(8);
  77. }
  78. applyFormula(newPlaceBet);
  79. break;
  80. default:
  81. pipe.events.betError && pipe.events.betError(n.msg)
  82. }
  83. }).fail(function() {
  84. --pipe.server.overlappingBetCount;
  85. pipe.server.isBetOutstanding = !1
  86. })))
  87. },
  88. twoFactorAdjust: function(n, t) {
  89. // $.connection.mainHub.server.twoFactorAdjust(n, t)
  90. }
  91. },
  92. client: {
  93. infoUpdates: function(n) {
  94. var t, i;
  95. if (data.site.betStats[1].count) {
  96. if (n.bets && pipe.events.receivedSiteBets && pipe.events.receivedSiteBets(pipe.betsFromSiteBroadcastFormat(n.bets)), n.betStats) {
  97. for (t = 0; t < n.betStats.currencies.length; ++t) i = data.site.betStats[n.betStats.currencies[t]], i.count = n.betStats.counts[t], i.payIn = n.betStats.payIns[t], i.payOut = n.betStats.payOuts[t], i.winCount = n.betStats.winCounts[t];
  98. pipe.events.betStatsUpdated && pipe.events.betStatsUpdated()
  99. }
  100. n.faucet !== undefined && (data.site.faucet = n.faucet, pipe.events.faucetStatusUpdated && pipe.events.faucetStatusUpdated());
  101. n.announcedBets && pipe.events.receivedAnnouncedBets && pipe.events.receivedAnnouncedBets(n.announcedBets);
  102. n.lastRain && (data.site.lastRain = n.lastRain, pipe.events.lastRainUpdated && pipe.events.lastRainUpdated())
  103. }
  104. },
  105. disableBets: function() {
  106. pipe.betsAllowed = !1
  107. },
  108. enableBets: function() {
  109. pipe.betsAllowed = !0
  110. }
  111. }
  112. };
  113.  
  114. function processBet(mode, newBet) {
  115. var n;
  116. n = config.displayCurrencyId;
  117. view.disableBetControls(20);
  118. var t = view.parseCommaFloat(newBet) * 1e8,
  119. r = mulPlaceBet,
  120. i = view.controls.getClientSeed();
  121. if(mode == 0) {
  122. i !== -1 && view.confirmBetCurrency(n) && (config.prefs.confirmMaxBet && t &&
  123. t == data.user.currencyStats[n].balance &&
  124. !confirm(phrases.bet + " " + view.util.fixNumberString(t / 1e8) + " " + getCurrencyName(n) + "?") ||
  125. pipe.server.placeBet(t, 0, r, i, n, !0));
  126. } else {
  127. i !== -1 && view.confirmBetCurrency(n) && (config.prefs.confirmMaxBet && t &&
  128. t == data.user.currencyStats[n].balance &&
  129. !confirm(phrases.bet + " " + view.util.fixNumberString(t / 1e8) + " " + getCurrencyName(n) + "?") ||
  130. pipe.server.placeBet(t, config.betRange - r - 1, config.betRange - 1, i, n, !0));
  131. }
  132.  
  133. }
  134.  
  135. processBet(betMode, baseBet);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement