Advertisement
progto

Untitled

Mar 28th, 2020
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. const baseMultiplier = 1.08;
  2. const lossMultiplier = 1.25;
  3. const difference = 391000;
  4. const maxStreak = 9;
  5. const divisionToBackup = 1;
  6.  
  7. let lossStreak = 0;
  8. let currentBet = 0;
  9. let currentMultiplier = 0;
  10. this.log('= ScriptStartsHere =');
  11. let self = this;
  12.  
  13. while (true) {
  14. await calculateBet(this.balance);
  15. const { multiplier } = await this.bet(currentBet, currentMultiplier);
  16.  
  17. if ((lossStreak === 0 && multiplier < baseMultiplier) || (lossStreak > 0 && multiplier < lossMultiplier)) { // loss
  18. lossStreak++;
  19. } else { // win
  20. lossStreak = 0;
  21. }
  22. }
  23.  
  24. async function calculateBet(balance) {
  25. if (lossStreak >= maxStreak) {
  26. self.log('reset because of 6 lose in a row');
  27. lossStreak = 0;
  28. }
  29.  
  30. if (lossStreak > 1) {
  31. await refreshSeed();
  32. }
  33.  
  34. if (lossStreak === 0) {
  35. currentBet = Math.floor(balance / difference / divisionToBackup / 100) * 100;
  36. currentMultiplier = baseMultiplier;
  37. } else if (lossStreak === 1) {
  38. currentBet *= 4;
  39. currentMultiplier = lossMultiplier;
  40. } else {
  41. currentBet *= 5;
  42. currentMultiplier = lossMultiplier;
  43. }
  44. }
  45.  
  46. async function refreshSeed() {
  47. const clientSeed = await generateClientSeed();
  48.  
  49. // request a new server seed using a random client seed
  50. const { server_seed_hash } = await self.newSeedPair();
  51. // set the client seed
  52. await self.setClientSeed(clientSeed);
  53. }
  54.  
  55. async function generateClientSeed() {
  56. let text = "";
  57. const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  58.  
  59. for (let i = 0; i < 16; i++)
  60. text += possible.charAt(Math.floor(Math.random() * possible.length));
  61.  
  62. return text;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement