Advertisement
Guest User

Untitled

a guest
Sep 26th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. const basebet = 1
  2. const payout = 2
  3. const increaseby = 2
  4. const amount = 10
  5. const probg = 50
  6. const probrg = 50
  7. const probrrg = 50
  8. const probrrrg = 50
  9. const proflimit = 500
  10. const losslimit = -500
  11.  
  12. let currentBet = basebet * 100
  13. let history = new Array()
  14. let prob = new Array(4)
  15. let lossStreak = 0
  16. let profit = 0
  17.  
  18. while (true) {
  19. if (history.length < amount) {
  20. const { multiplier } = await this.bet(100, 1.01)
  21. history.push(multiplier)
  22. continue
  23. }
  24. for (let i = 0; i < 4; i++) {
  25. prob[i] = 0;
  26. }
  27. for (let i = 0; i < amount; i++) {
  28. if (history[i] >= 2) {
  29. prob[0]++
  30. }
  31. }
  32. for (let i = 1; i < amount; i++) {
  33. if (history[i] >= 2 && history[i-1] < 2) {
  34. prob[1] += 2
  35. }
  36. }
  37. for (let i = 2; i < amount; i++) {
  38. if (history[i] >= 2 && history[i-1] < 2 && history[i-2] < 2) {
  39. prob[2] += 3
  40. }
  41. }
  42. for (let i = 3; i < amount; i++) {
  43. if (history[i] >= 2 && history[i-1] < 2 && history[i-2] < 2 && history[i-3] < 2) {
  44. prob[3] += 4
  45. }
  46. }
  47. console.log("%cGreen : %c%f%", "color:green", "color.black", prob[0] / amount * 100)
  48. console.log("%cRed%cGreen : %c%f%", "color:red", "color:green", "color.black", prob[1] / amount * 100)
  49. console.log("%cRedRed%cGreen : %c%f%", "color:red", "color:green", "color.black", prob[2] / amount * 100)
  50. console.log("%cRedRedRed%cGreen : %c%f%", "color:red", "color:green", "color.black", prob[3] / amount * 100)
  51. if (lossStreak == 0) {
  52. if (prob[0] / amount * 100 <= probg) {
  53. this.log(`Bet ${Math.round(currentBet / 100)} bits on ${payout}`)
  54. const { multiplier } = await this.bet(Math.round(currentBet / 100) * 100, payout)
  55. history.push(multiplier)
  56. history.shift()
  57. if (multiplier < payout) {
  58. profit -= currentBet
  59. lossStreak++
  60. currentBet *= increaseby
  61. } else {
  62. profit += currentBet * (payout - 1)
  63. lossStreak = 0
  64. currentBet = basebet * 100
  65. }
  66. } else {
  67. const { multiplier } = await this.bet(100, 1.01)
  68. history.push(multiplier)
  69. history.shift()
  70. }
  71. } else if (lossStreak == 1) {
  72. if ((prob[0] / amount * 100 <= probg) || (prob[1] / amount * 100 <= probrg)) {
  73. this.log(`Bet ${Math.round(currentBet / 100)} bits on ${payout}`)
  74. const { multiplier } = await this.bet(Math.round(currentBet / 100) * 100, payout)
  75. history.push(multiplier)
  76. history.shift()
  77. if (multiplier < payout) {
  78. profit -= currentBet
  79. lossStreak++
  80. currentBet *= increaseby
  81. } else {
  82. profit += currentBet * (payout - 1)
  83. lossStreak = 0
  84. currentBet = basebet * 100
  85. }
  86. } else {
  87. const { multiplier } = await this.bet(100, 1.01)
  88. history.push(multiplier)
  89. history.shift()
  90. }
  91. } else if (lossStreak == 2) {
  92. if ((prob[0] / amount * 100 <= probg) || (prob[1] / amount * 100 <= probrg) || (prob[2] / amount * 100 <= probrrg)) {
  93. this.log(`Bet ${Math.round(currentBet / 100)} bits on ${payout}`)
  94. const { multiplier } = await this.bet(Math.round(currentBet / 100) * 100, payout)
  95. history.push(multiplier)
  96. history.shift()
  97. if (multiplier < payout) {
  98. profit -= currentBet
  99. lossStreak++
  100. currentBet *= increaseby
  101. } else {
  102. profit += currentBet * (payout - 1)
  103. lossStreak = 0
  104. currentBet = basebet * 100
  105. }
  106. } else {
  107. const { multiplier } = await this.bet(100, 1.01)
  108. history.push(multiplier)
  109. history.shift()
  110. }
  111. } else if (lossStreak >= 3) {
  112. if ((prob[0] / amount * 100 <= probg) || (prob[1] / amount * 100 <= probrg) || (prob[2] / amount * 100 <= probrrg) || (prob[3] / amount * 100 <= probrrg)) {
  113. this.log(`Bet ${Math.round(currentBet / 100)} bits on ${payout}`)
  114. const { multiplier } = await this.bet(Math.round(currentBet / 100) * 100, payout)
  115. history.push(multiplier)
  116. history.shift()
  117. if (multiplier < payout) {
  118. profit -= currentBet
  119. lossStreak++
  120. currentBet *= increaseby
  121. } else {
  122. profit += currentBet * (payout - 1)
  123. lossStreak = 0
  124. currentBet = basebet * 100
  125. }
  126. } else {
  127. const { multiplier } = await this.bet(100, 1.01)
  128. history.push(multiplier)
  129. history.shift()
  130. }
  131. }
  132. if (profit > proflimit || prof < losslimit) {
  133. this.stop()
  134. }
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement