Advertisement
Guest User

Untitled

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