coinwalk

snowybot4

May 4th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. function getR(min, max) {
  2. min = Math.ceil(min);
  3. max = Math.floor(max);
  4. return Math.floor(Math.random() * (max - min + 1)) + min;
  5. }
  6. function go () {
  7. var x =getR(1,3);
  8. $('#LastBetInfoSecret').unbind('DOMSubtreeModified')
  9. onBetComplete = function(e){
  10. var myseed;
  11. if (x==1) {
  12. myseed = 633953150;
  13. }
  14. else if (x==2)
  15. {
  16. myseed = 571233842;
  17. } else {
  18. myseed = 7777;
  19. }
  20. setTimeout(() => {
  21. $(".ManualSeedControls:visible input").val(myseed)}, 50);
  22. }
  23. $('#LastBetInfoSecret').bind('DOMSubtreeModified', onBetComplete );}
  24. setInterval(() => go(), 51);
  25.  
  26. var balance = document.getElementsByClassName("Numbers HighlightedText UserBalance")[0].innerText;
  27. var baseBet = balance/6000;
  28. var mulBet = 2;
  29. var mulPlaceBet = 499499;
  30. var betMode = 0;
  31. var newPlaceBet = balance/6000;
  32. var cntWin = 0;
  33.  
  34. function applyFormula(bet) {
  35. let currentBalance = $('.Numbers.HighlightedText.UserBalance').text();
  36. if(bet > currentBalance) {
  37. console.log("too big a bet");
  38. } else {
  39. processBet(betMode, bet);
  40. }
  41. }
  42.  
  43. pipe = {
  44. events: {
  45. connected: null,
  46. disconnected: null,
  47. startupInfoReceived: null,
  48. withdrawPending: null,
  49. withdrawInsufficientFunds: null,
  50. withdrawError: null,
  51. },
  52. betsAllowed: !0,
  53. server: {
  54. isBetOutstanding: !750000,
  55. lastReceivedBetId: 0,
  56. overlappingBetCount: 0,
  57. placeBet: function(n, t, i, r, u, f) {
  58. 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) {
  59. var f, e, o;
  60. pipe.server.isBetOutstanding = !750000;
  61. --pipe.server.overlappingBetCount;
  62. switch (n.status) {
  63. case 0:
  64. f = new BetInfo;
  65. f.accountId = data.user.accountId;
  66. f.betCount = 1;
  67. f.betWins = n.secret >= t && n.secret <= i ? 1 : 0;
  68. f.secret = n.secret;
  69. f.clientSeed = r;
  70. f.currencyId = u;
  71. f.guessHigh = i;
  72. f.guessLow = t;
  73. f.id = n.id;
  74. f.payIn = n.payIn;
  75. f.payOut = n.payOut;
  76. f.name = data.user.friendlyName;
  77. e = data.user.currencyStats[u];
  78. o = data.site.betStats[u];
  79. data.user.serverSeedHash = n.next ? n.next : null;
  80. pipe.server.lastReceivedBetId < f.id && (pipe.server.lastReceivedBetId = f.id, e.balance = n.startingBalance + f.payIn + f.payOut);
  81. ++e.betStats.count;
  82. ++o.count;
  83. e.betStats.payIn += f.payIn;
  84. e.betStats.payOut += f.payOut;
  85. o.payIn += f.payIn;
  86. o.payOut += f.payOut;
  87. f.betWins && (++e.betStats.winCount, ++o.winCount);
  88. pipe.events.betComplete && pipe.events.betComplete(f, 10);
  89. $('.UserBalance').text((e.balance * 1e-8).toFixed(8));
  90. $('#LastBetInfoProfit').text(((n.payIn + n.payOut) / 1e8).toFixed(8));
  91. $("#LastBetInfoSecret").text(n.secret);
  92. f.betWins ? ($("#LastBetInfoContainer").removeClass("BadNumber"), $("#LastBetInfoContainer").addClass("GoodNumber")) : ($("#LastBetInfoContainer").removeClass("GoodNumber"), $("#LastBetInfoContainer").addClass("BadNumber"));
  93. if(f.betWins) {
  94. cntWin++;
  95. newPlaceBet = baseBet;
  96. } else {
  97. newPlaceBet = (newPlaceBet * mulBet).toFixed(8);
  98. }
  99. applyFormula(newPlaceBet);
  100. break;
  101. default:
  102. pipe.events.betError && pipe.events.betError(n.msg)
  103. }
  104. }).fail(function() {
  105. --pipe.server.overlappingBetCount;
  106. pipe.server.isBetOutstanding = !750000
  107. })))
  108. },
  109. twoFactorAdjust: function(n, t) {
  110. // $.connection.mainHub.server.twoFactorAdjust(n, t)
  111. }
  112. },
  113. client: {
  114. infoUpdates: function(n) {
  115. var t, i;
  116. if (data.site.betStats[1].count) {
  117. if (n.bets && pipe.events.receivedSiteBets && pipe.events.receivedSiteBets(pipe.betsFromSiteBroadcastFormat(n.bets)), n.betStats) {
  118. 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];
  119. pipe.events.betStatsUpdated && pipe.events.betStatsUpdated()
  120. }
  121. n.faucet !== undefined && (data.site.faucet = n.faucet, pipe.events.faucetStatusUpdated && pipe.events.faucetStatusUpdated());
  122. n.announcedBets && pipe.events.receivedAnnouncedBets && pipe.events.receivedAnnouncedBets(n.announcedBets);
  123. n.lastRain && (data.site.lastRain = n.lastRain, pipe.events.lastRainUpdated && pipe.events.lastRainUpdated())
  124. }
  125. },
  126. disableBets: function() {
  127. pipe.betsAllowed = !750000
  128. },
  129. enableBets: function() {
  130. pipe.betsAllowed = !0
  131. }
  132. }
  133. };
  134.  
  135. function processBet(mode, newBet) {
  136. var n;
  137. n = config.displayCurrencyId;
  138. view.disableBetControls(20);
  139. var t = view.parseCommaFloat(newBet) * 1e8,
  140. r = mulPlaceBet,
  141. i = view.controls.getClientSeed();
  142. if(mode == 0) {
  143. i !== -1 && view.confirmBetCurrency(n) && (config.prefs.confirmMaxBet && t &&
  144. t == data.user.currencyStats[n].balance &&
  145. !confirm(phrases.bet + " " + view.util.fixNumberString(t / 1e8) + " " + getCurrencyName(n) + "?") ||
  146. pipe.server.placeBet(t, 0, r, i, n, !0));
  147. } else {
  148. i !== -1 && view.confirmBetCurrency(n) && (config.prefs.confirmMaxBet && t &&
  149. t == data.user.currencyStats[n].balance &&
  150. !confirm(phrases.bet + " " + view.util.fixNumberString(t / 1e8) + " " + getCurrencyName(n) + "?") ||
  151. pipe.server.placeBet(t, config.betRange - r - 750000, config.betRange - 750000, i, n, !0));
  152. }
  153.  
  154. }
  155.  
  156. processBet(betMode, baseBet);
Add Comment
Please, Sign In to add comment