Advertisement
Guest User

nothing to see here

a guest
Sep 5th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.86 KB | None | 0 0
  1. // GAME SETTINGS
  2. var cashout = 750; //WILL AUTO CASHOUT AT THIS NUMBER IF HASNT DONE ALREADY
  3. var basebet = 15000; //FIRST BET WILL BE IN THIS RANGE
  4. var maxbet = 600000; //WILL NOT EXEED THIS BET
  5. var divide = 9; //BET IS PREVIOUS GAMES TOTAL BETS DIVIDED BY THIS NUMBER
  6. var lowbetthresh = 50000; //CASHOUT IF TOTAL BETS ARE LOWER THAN THIS AT THE START
  7. var highestplayerpercent = 65; // CASHOUT IF HIGHEST PLAYERS BET IS X PERCENT OF THE TOTAL
  8.  
  9. var blacklist = [''];
  10.  
  11. //WITHDRAW SETTINGS
  12. var TargetBits = 10000000000; //WILL CASHOUT EVERYTHING OVER THIS AMOUNT
  13. var password = ''; //PASSWORD FOR THE WITHDRAW
  14. var vault = 'exchangebot'; //ACCOUNT TO WITHDRAW TO
  15.  
  16. // RANDOM BET MULTIPLIERS
  17. var highmultiplyer = 0.4;
  18. var lowmultiplyer = 1.4;
  19.  
  20. // GAME VARIABLES
  21. var playerbets = [];
  22. var cashedoutbets = 0;
  23. var ingame = 0;
  24. var withdrawn = Number(0);
  25. var remaining = Number(0);
  26. var currentBalance = (engine.getBalance() / 100) - withdrawn;
  27. var firstGame = true;
  28. var withdrawn = Number(0);
  29. var currentBalance = (engine.getBalance() / 100) - withdrawn;
  30.  
  31. var totalethos = 0;
  32. var highestbet = 0;
  33. var lastmax = 0;
  34. var first = 0;
  35.  
  36. function precisionRound(number, precision) {
  37. var factor = Math.pow(10, precision);
  38. return Math.round(number * factor) / factor;
  39. }
  40.  
  41.  
  42.  
  43. engine.on('game_starting', function(data) {
  44. if (lastmax >= maxbet) {
  45. basebet = maxbet;
  46. } else {
  47. if (lastmax == 0) {
  48.  
  49. } else {
  50. basebet = lastmax;
  51. }
  52. }
  53. currentBalance = (engine.getBalance() / 100) - withdrawn;
  54. betlow = Math.round(basebet / lowmultiplyer);
  55. bethigh = Math.round(basebet * highmultiplyer);
  56. bet = Math.floor((Math.random() * bethigh) + betlow);
  57. first = 1;
  58. bet = bet * 100;
  59. currentBalance = (engine.getBalance() / 100) - withdrawn;
  60. console.log("Current Balance :" + currentBalance);
  61. console.log("Withdrawn to " + vault + " :" + withdrawn);
  62. console.log("Bet Amount :" + bet / 100);
  63. firstGame = false;
  64. engine.placeBet(Math.round(bet), cashout, false);
  65. });
  66. engine.on('game_started', function(data) {
  67. highestbet = 0;
  68. remaining = Number(0);
  69. highestbetplayer = '';
  70. ingame = 0;
  71. cashedoutbets = 0;
  72. totalbet = 0;
  73. players = 0;
  74. playerbets = [];
  75. for (var key in data) {
  76. if (data.hasOwnProperty(key)) {
  77. if (data[key].bet / 100 > highestbet) {
  78. highestbet = data[key].bet / 100;
  79. highestbetplayer = key;
  80. }
  81.  
  82. if (blacklist.includes(key) == false) {
  83. playerbets.push(key, data[key].bet / 100);
  84. totalbet += data[key].bet;
  85. players++;
  86. } else {
  87. console.log(key + " was not included");
  88. }
  89.  
  90. var key = data[key].bet;
  91. }
  92. }
  93. cashedoutbets += bet / 100;
  94. target = (totalbet / 100) / 1.3;
  95. totalethos = totalbet / 100;
  96. highestpercent = Math.floor((highestbet / totalethos) * 100);
  97. lastmax = totalethos / divide;
  98. console.log("Total Players :" + players);
  99. console.log("Total Bet :" + totalethos);
  100. console.log("Target Cashout :" + target);
  101. console.log("Highest Bet : [" + highestbetplayer + "]:" + highestbet);
  102. console.log("Highest Bet %: [" + highestpercent + "%]");
  103. if (first == 1) {
  104. //console.log(playerbets);
  105. if (totalethos <= lowbetthresh) {
  106. engine.cashOut();
  107. ingame = 1;
  108. console.log("Cashing Out [Total Bet Too Low]");
  109. }
  110. if ((highestbet / totalethos) * 100 > highestplayerpercent) {
  111. engine.cashOut();
  112. ingame = 1;
  113. console.log("Cashing Out [Highest Better Too Big]");
  114. }
  115. }
  116.  
  117. });
  118. engine.on('cashed_out', function(resp) {
  119.  
  120. if (blacklist.includes(resp.username) == false) {
  121. //console.log(resp);
  122. //console.log(playerbets);
  123. player = playerbets.indexOf(resp.username);
  124. playerbet = player + 1;
  125. //console.log(playerbet);
  126. //console.log(playerbets[playerbet]);
  127. cashedoutbets += playerbets[playerbet];
  128. } else {
  129. console.log(resp.username + ' cashed out but i dont care');
  130. }
  131.  
  132.  
  133.  
  134. if (cashedoutbets >= target) {
  135.  
  136. if (ingame == 0) {
  137. console.log("Cashing out");
  138. engine.cashOut();
  139. ingame = 1;
  140. }
  141.  
  142. } else {
  143. if (ingame == 0) {
  144. remaining = Math.round(target - cashedoutbets);
  145. console.clear();
  146. console.log("Current Balance :" + currentBalance);
  147. console.log("Withdrawn to " + vault + " :" + withdrawn);
  148. console.log("Bet Amount :" + bet / 100);
  149. console.log("Target Cashout :" + Math.round(target));
  150. console.log("Cashout Our So far :" + cashedoutbets);
  151. console.log("Remaining :" + remaining);
  152. }
  153. }
  154.  
  155.  
  156. });
  157. engine.on('game_crash', function(data) {
  158. console.log(cashedoutbets);
  159. console.clear();
  160. currentBalance = (engine.getBalance() / 100) - withdrawn;
  161. if (currentBalance > TargetBits) {
  162. excess = currentBalance - TargetBits;
  163. withdrawAmount = Number(0);
  164. withdrawAmount += Number(excess);
  165. withdrawAmount = (withdrawAmount).toFixed(2);
  166. console.log('[Bot] Attempting to withdraw ' + withdrawAmount + ' to ' + vault);
  167. cors = transferRequest('POST', 'https://www.ethcrash.io/transfer-request');
  168. withdrawn += Number(withdrawAmount);
  169. currentBalance = (engine.getBalance() / 100) - withdrawn;
  170. }
  171.  
  172. });
  173. function transferRequest(method, url) {
  174. var xhr = new XMLHttpRequest();
  175. if ("withCredentials" in xhr) {
  176. uuid = uuidv4();
  177. params = 'fakeusernameremembered=&fakepasswordremembered=&amount=' + withdrawAmount + '&to-user=' + vault + '&password=' + password + '&transfer-id=' + uuid;
  178. xhr.open(method, url, true);
  179. xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  180. xhr.onreadystatechange = function() {
  181. if (xhr.readyState == 4 && xhr.status == 200) {}
  182. }
  183. xhr.send(params);
  184. } else if (typeof XDomainRequest != "undefined") {
  185. xhr = new XDomainRequest();
  186. xhr.open(method, url);
  187. xhr.send();
  188. } else {
  189. xhr = null;
  190. xhr.send();
  191. }
  192. return xhr;
  193. xhr.send();
  194. }
  195.  
  196. function uuidv4() {
  197. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  198. var r = Math.random() * 16 | 0,
  199. v = c == 'x' ? r : (r & 0x3 | 0x8);
  200. return v.toString(16);
  201. });
  202. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement