Bustadice Winner Script


SUBMITTED BY: wecanbothwin

DATE: April 29, 2020, 4:43 p.m.

FORMAT: Text only

SIZE: 1.3 kB

HITS: 2185

  1. const baseBet = 1
  2. const increaseOnLoss = 1.11327
  3. const increaseOnRetart = 1.15
  4. const startCashout = 20
  5. const decreaseOnLoss = 1
  6. const lowestCashout = 5
  7. //------------------------------------------
  8. let currentBet = baseBet
  9. let cashOut = startCashout
  10. let lc = 0
  11. //------------------------------------------
  12. const main = async () => {
  13. await this.log("starting script");
  14. // script logic here, e.g.:
  15. while (true) {
  16. const { multiplier } = await this.bet(Math.round(currentBet)*100, Math.round(cashOut*100)/100)
  17. if (multiplier < cashOut){
  18. if (cashOut > lowestCashout){
  19. cashOut -= decreaseOnLoss
  20. currentBet *= increaseOnLoss
  21. }else{
  22. cashOut = startCashout
  23. currentBet *= increaseOnRetart
  24. }
  25. }else{
  26. cashOut = startCashout
  27. currentBet = baseBet
  28. }
  29. this.clearLog()
  30. this.log(`Current bet = ${Math.round(currentBet)}`)
  31. this.log(`Current cashOut = ${Math.round(cashOut*100)/100}`)
  32. }
  33. }
  34. while (true) {
  35. try {
  36. await main();
  37. } catch (error) {
  38. if (error.message === "connection closed") {
  39. await this.log("connection closed. restarting script");
  40. continue;
  41. } else {
  42. throw error;
  43. }
  44. }
  45. }

comments powered by Disqus