Bustabit Basic Script


SUBMITTED BY: Schizophrenia

DATE: April 23, 2016, 6:42 p.m.

FORMAT: Text only

SIZE: 6.8 kB

HITS: 931

  1. var BetStart = 1; // 1.00000000 NXT
  2. var betCrashIncrements = 0.08;
  3. var betCrashStart = 2.1;
  4. var betCrashStop = 2.1;
  5. var SurviveCrashes = 25;
  6. var maxBet = 5;
  7. var failureStreak = 3; // number of failures before going to minimal bets
  8. var site = "nxtbubble";
  9. // nxtbubble -- https://nxt.tothemoon.me -- https://nxt-old.tothemoon.me
  10. // btctothemoon -- https://btc.tothemoon.me -- https://btc-old.tothemoon.me
  11. // bustabit -- https://www.bustabit.com
  12. // bustaclam -- https://bustaclam.com
  13. // DP -- may not be intended for public use, may still be under development
  14. // CR -- may not be intended for public use, may still be under development
  15. // shouldn't need to edit anything below here
  16. var currentBet = BetStart;
  17. var currentCrash = betCrashStart*100;
  18. var lostBet = 0; // set to lost bet from previous round or 0 if new
  19. var betMultiplier = 1;
  20. var cashedout = false;
  21. var UserName = engine.getUsername();
  22. var minBet = 0; // minimum bet variable set below for specific sites
  23. var failureStreakCount = 0; // number of failures in a row
  24. //var lostBet = 10902.009998999587; // nxtbubble lost amount since start of this script - resetting to save for now
  25. if (site == "nxtbubble") {
  26. betMultiplier = 100000000;
  27. minBet = 0.01;
  28. } else if (site == "bustabit") {
  29. betMultiplier = 100;
  30. minBet = 1;
  31. } else if (site == "bustaclam") {
  32. betMultiplier = 100;
  33. minBet = 1;
  34. } else if (site == "btctothemoon") {
  35. betMultiplier = 100;
  36. minBet = 1;
  37. } else if (site == "DP") {
  38. betMultiplier = 100;
  39. minBet = 1;
  40. } else if (site == "CR") {
  41. betMultiplier = 100;
  42. minBet = 1;
  43. }
  44. CalculateBet();
  45. engine.on('game_starting', function(info) {
  46. console.log('Last game status: ', engine.lastGamePlay());
  47. // if (engine.lastGamePlay() == "LOST") {
  48. if (lostBet > 0) {
  49. // lostBet += currentBet;
  50. currentCrash += betCrashIncrements*100;
  51. if (currentCrash > betCrashStop*100) {
  52. currentCrash = betCrashStop*100;
  53. }
  54. //figure out new bet (first calculate)
  55. currentBet = lostBet/(currentCrash/100-1)
  56. if (currentBet > maxBet) {
  57. currentBet = maxBet;
  58. }
  59. if (currentBet < BetStart) {
  60. currentBet = BetStart;
  61. }
  62. // figure out new bet (ignore calculation and go to minimum bet if on failure cooldown)
  63. if (failureStreakCount >= failureStreak && currentBet == maxBet) {
  64. currentBet = minBet;
  65. }
  66. // console.log(lostBet + " " + currentCrash + " " + currentBet);
  67. // rounding to divisible by 100 for bustabit / bustaclam
  68. if (site == "bustabit") {
  69. currentBet = Math.ceil(currentBet);
  70. } else if (site == "bustaclam") {
  71. currentBet = Math.ceil(currentBet);
  72. } else if (site == "btctothemoon") {
  73. currentBet = Math.ceil(currentBet);
  74. } else if (site == "DP") {
  75. currentBet = Math.ceil(currentBet);
  76. } else if (site == "CR") {
  77. currentBet = Math.ceil(currentBet);
  78. } else if (site == "nxtbubble") {
  79. currentBet = Math.ceil(currentBet*100)/100; // move the decimal 2 places to round the 2 decimal up then move back
  80. }
  81. if (currentBet*betMultiplier < engine.getBalance()) {
  82. engine.placeBet(currentBet*betMultiplier, Math.round(currentCrash), false);
  83. console.log('New bet will be ' + currentBet + ' and crash point will be ' + currentCrash);
  84. } else {
  85. console.log('OUT OF COINS - STOPPING');
  86. engine.stop();
  87. // ResetValues();
  88. // engine.placeBet(currentBet*betMultiplier, currentCrash, false);
  89. }
  90. } else { // last game won or starting new
  91. // console.log('Last Game was won or starting new :)');
  92. ResetValues();
  93. engine.placeBet(currentBet*betMultiplier, currentCrash, false);
  94. }
  95. // console.log('Game Starting in ' + info.time_till_start);
  96. });
  97. function CalculateBet() {
  98. // Calculate the new bet based on defined # of crashes to survive
  99. var simuNewTestBet = BetStart
  100. // slowly increase the value
  101. if (site == "nxtbubble") {
  102. simuNewTestBet += 0.01;
  103. } else if (site == "bustabit") {
  104. simuNewTestBet += 1;
  105. } else if (site == "bustaclam") {
  106. simuNewTestBet += 1;
  107. } else if (site == "btctothemoon") {
  108. simuNewTestBet += 1;
  109. }
  110. var simuNewBet = simuNewTestBet;
  111. var simulostBet = 0;
  112. var simuCurrentCrash = betCrashStart*100;
  113. for (var loop = 0; loop < SurviveCrashes; loop++) {
  114. simulostBet += simuNewBet;
  115. simuCurrentCrash += betCrashIncrements*100;
  116. if (simuCurrentCrash > betCrashStop*100) {
  117. simuCurrentCrash = betCrashStop*100;
  118. }
  119. //figure out new bet
  120. simuNewBet = simulostBet/(simuCurrentCrash/100-1)
  121. // rounding to divisible by 100 for bustabit / bustaclam
  122. if (site == "bustabit") {
  123. simuNewBet = Math.floor(simuNewBet) +1;
  124. } else if (site == "bustaclam") {
  125. simuNewBet = Math.floor(simuNewBet) +1;
  126. } else if (site == "btctothemoon") {
  127. simuNewBet = Math.floor(simuNewBet) +1;
  128. } else if (site == "nxtbubble") {
  129. simuNewBet = Math.ceil(simuNewBet*100)/100; // move the decimal 2 places to round the 2 decimal up then move back
  130. }
  131. // console.log('Loop run ' + loop );
  132. }
  133. if (simuNewBet*betMultiplier > engine.getBalance()) {
  134. //console.log('Not increasing bet: ' + simuNewBet);
  135. } else {
  136. console.log('** Increasing bet **' + simuNewBet);
  137. BetStart = simuNewTestBet;
  138. }
  139. }
  140. function ResetValues() {
  141. lostBet = 0;
  142. currentCrash = betCrashStart*100; // 124 = 1.24
  143. currentBet = BetStart;
  144. CalculateBet();
  145. }
  146. // testing...
  147. engine.on('game_started', function(data) {
  148. // console.log('Game started, showing data: ',data);
  149. // console.log('Game started, showing my bet?: ',data[UserName].bet);
  150. if (data[UserName] != "Undefined") {
  151. cashedout = false;
  152. lostBet += data[UserName].bet / betMultiplier;
  153. currentBet = data[UserName].bet / betMultiplier; // set here incase I manually place bet - want to know what was placed to calculate lostBet on cash_out
  154. console.log('Current amount to recover: ',lostBet);
  155. }
  156. // data[UserName].bet
  157. });
  158. engine.on('cashed_out', function(data) {
  159. // * @param {number} resp.amount - The amount the user cashed out
  160. // * @param {number} resp.stopped_at -The percentage at which the user cashed out
  161. if (data.username == UserName) {
  162. cashedout = true;
  163. console.log('Cashed out at: ',data.stopped_at);
  164. lostBet -= currentBet * (data.stopped_at / 100);
  165. console.log("DEBUG: Lost amount is now: ", lostBet);
  166. }
  167. });
  168. engine.on('game_crash', function(data) {
  169. if (data.game_crash < currentCrash) {
  170. failureStreakCount++;
  171. } else {
  172. failureStreakCount = 0;
  173. }
  174. });
  175. /*
  176. v6:
  177. - defined minimum bet variable for each game
  178. - to add: crash cooldown code to bet minimum bet during cooldown phase on failure steaks
  179. Notes:
  180. Calculations...
  181. balance *0.001 rounded becomes max bet
  182. max bet / 10 / 2 rounded down becomes base bet
  183. should survive about 12 rounds
  184. */

comments powered by Disqus