SHARE
TWEET

Untitled

a guest Jul 20th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.log(`Ascent Script 1.06v by baecoin`)
  2.  
  3. const strategy = 7  /* Preset game rules and settings. 1 to turn off; setting it more than 1 will overrides base settings */
  4. /*
  5. ...2 - Normal Mode for normal balance [>8000 bits]
  6. ...3 - Normal Mode for high balance [>16300 bits]
  7. ...4 - Alternative mode for multiplier 3, just for having more than common run
  8. ...5 - Early profit and later normal run for balance [>4500 bits]
  9. ...6 - High profit for medium numbers, for balance [>5000 bits] medium risk
  10. ...7 - 2x Mode, for low balance run [<2000 bits] low risk
  11. ...8 - 2x Mode, for medium balance run [<4000 bits], average risk
  12. ...9 - Soft strategy run, not long term, something like medium term. For balance [>2000 bits] low risk
  13. */
  14. const engine = this
  15.  
  16. var settings = {                                  /*  Settings */
  17.     common: {                                     /*   Common */
  18.         baseBet: 1,                               /* Bet in bits */
  19.         baseTarget: 5,                            /* Leading target in game */
  20.         safety_bits: 23,                          /* Streak to Wait, STW; placing bits to safe from busts, longest streak known 60. 60 - 38 = 22 rolls to be safe */
  21.         safety_bits_bet: 1,                       /* STW amount of bet */
  22.         safety_bits_target: 1.01,                 /* STW target to catch */
  23.         safety_bits_incremental: false,           /* Is STW dynamic by wins increase it */
  24.         safety_bits_decremental_on_seed_every: 0, /* Decrease STW on every X seed times change, set 0 to disable  */
  25.     },
  26.     conditions: {                                 /*   Conditions */
  27.         stopLoss: 0,                              /* Amount bits you set in this parameter will mean script will stop after drop below this value */
  28.         stopProfit: 100000,                       /* Amount bits you set will be targeted by script to win, after reach this value scripts stop */
  29.     },
  30.     seed: {                                       /*   Seed Management */
  31.         changeSeed: 150,
  32.         changeSeedAtResetBet: false,               // TODO
  33.         smart_seed_change: false,                 /* At win drop seed counter */
  34.         change_seed_on_target_reset: false,       /* Target will be changed on trigger target reset at */
  35.         predict_avoid_streaks: false,             // TODO
  36.         reset_seed_after_first_bet_reset: false,
  37.     },
  38.     periods: {                                    /*   Periods - Not Ascent Script part (Don't use it, still to do)*/
  39.         Periods_enabled: false,                   // TODO
  40.         PeriodBet: 1,
  41.         PeriodTarget: 1.01,
  42.         basePrewait: 40,                          /* Periods rolls before attempts to start */
  43.         baseAfterwait: 40,                        /* How much rolls will play without green, before going to prewait */
  44.         baseAfterStartPlay: 2,                    /* How much baseTarget win need to be triggered times by period in prewait */
  45.     },
  46.     modifications: {                              /*   Modifications - all default settings is set to normal Ascent settings to run */
  47.         targetAddition: 0.0,                      /* Add in every roll amount of target after lose wager */
  48.         betAddition: 2,                           /* Add in every roll amount of bet after lose wager */
  49.         increaseBetEvery: 2,                      /* How often bet is going to increase on value setted in betAddition */
  50.         increaseBetEvery_after_bet: 64,
  51.         increaseBetEvery_after: 2,
  52.         resetTargetAt: 40,                        /* Trigger target to set, after hit a limit in bet size */
  53.         resetTargetTo: 7,                         /* Target to set, after hit a limit in target size */
  54.         resetBetAt: 4096,                         /* Trigger reset bet at value when it caught */
  55.         resetBetTo: 100,                          /* Bet to set, after hit a limit in bet size */
  56.         maximum_after_resetBet: 4096,
  57.     },
  58.     options: {                                    /*   Options */
  59.         sleepTimeInMS: 250,                       /* Pause between actual rolls */
  60.         increaseBetOnWin: false,
  61.         multiplyBetInsteadAdd: true,              /* Instead of just add betAddition, do multiply it if value is set to true */
  62.         switch_strategy_after: 0,                 /* TODO */
  63.         enable_game_sounds: true,                 /* Is sound of peak are enabled or disabled */
  64.         log_information: true,                    /* Never clear logs while script run */
  65.         debug: true,
  66.         use_skips: true,                          /* Use skips to reduce loss on 1.0x bets */
  67.     },
  68.     strategy_low: {                                // TODO, not finished yet - Not Ascent Script part
  69.         strategy_low_enabled: false,
  70.         LimitTarget: 256,                         /* If bet reach value or higher, bet will be reset at win to base bet */
  71.         enable_super_profit: false,               /* Only if you handle for balance more than 10000 bits. */
  72.         baseBet: 1,
  73.         baseTarget: 1.5,
  74.     },
  75.     accumulative_strategy: {
  76.         accumulative_strategy_enabled: false,     /* Experimental - Not Ascent Script part. Still TODO */
  77.     }
  78. }
  79. if (strategy != 0) {
  80.     await load_presets_settings(strategy)
  81. }
  82.  
  83. /* Common Script part setup */
  84. var target = settings.common.baseTarget
  85. var bet = settings.common.baseBet
  86. let skip = 0
  87.  
  88. var rolls = 0
  89. let countsbase = 0
  90. let beforechange = 0
  91. let after_seed = settings.common.safety_bits_decremental_on_seed_every
  92.  
  93. /* AntiScript periods part setup */
  94. var formedBet
  95. var formedTarget
  96. let afterwait = 0
  97. let gameStarted = false
  98. let prewait = settings.periods.basePrewait
  99. let AfterStartPlay = settings.periods.baseAfterStartPlay
  100.  
  101. /* Strategy Low numbers part setup */
  102. var multiplier
  103. let playing = false
  104. let count = 0
  105. let lossCount = 0
  106. let lose_rolls = 0
  107. let negative_profit_run = 0
  108. let switcher_strategy = 0
  109. let safety_bit_count = 0
  110. var bets = settings.strategy_low.baseBet
  111. var targets = settings.strategy_low.baseTarget
  112. let strategy_low_play = settings.strategy_low.strategy_low_enabled
  113. let stop_streaks = settings.common.safety_bits
  114. let temp_reset_At = settings.modifications.resetBetAt
  115. let temp_addition = settings.modifications.increaseBetEvery
  116.  
  117. /* TWO LOOPS IN GAME */
  118. while (true) {
  119.     /* Sub-loop - Streak to Wait */
  120.     while (safety_bit_count < settings.common.safety_bits) {
  121.         rolls++
  122.         playing = true
  123.         if (settings.options.log_information != true) { engine.clearLog() }
  124.  
  125.         const { multiplier } = await analyzeBet()
  126.  
  127.         if (multiplier < settings.common.baseTarget) {
  128.             safety_bit_count++
  129.             stop_streaks--
  130.             engine.log(`${safety_bit_count}th safety bet placed, STW(${settings.common.safety_bits}), Seed Roll: ${rolls}/${settings.seed.changeSeed}`)
  131.             await queuedSeedChange()
  132.         } else {
  133.             safety_bit_count = 0
  134.             engine.log(`......Sub-loop finished `)
  135.             playing = false
  136.  
  137.         }
  138.         if (settings.seed.predict_avoid_streaks == true && stop_streaks == 0) {
  139.             engine.log(`Guessing bad streak! Resetting seed`)
  140.             await generateSeed()
  141.             stop_streaks = 0
  142.         }
  143.     }
  144.  
  145.     await check_conditions()
  146.     gong()
  147.     if (settings.accumulative_strategy.accumulative_strategy_enabled == true) {
  148.         await start_accumulative_strategy(1)
  149.     } else {
  150.         if (strategy_low_play == false) {
  151.             // period_addon_formators()
  152.             if (bet > settings.modifications.resetBetAt) {
  153.                 bet = settings.modifications.resetBetTo
  154.                 settings.modifications.resetBetAt = settings.modifications.maximum_after_resetBet
  155.                 if (settings.seed.reset_seed_after_first_bet_reset == true) {
  156.                     do_force_change_seed()
  157.                 }
  158.             }
  159.             rolls++
  160.             playing = true
  161.  
  162.             const { multiplier } = await engine.bet(bet * 100, target)
  163.             // period_addon()
  164.             if (multiplier < target) { /* LOSS */
  165.                 we_lose()
  166.             } else {                   /* WINS */
  167.                 safety_bit_count = 0
  168.                 settings.modifications.resetBetAt = temp_reset_At
  169.                 if (settings.common.safety_bits_incremental == true) {
  170.                     settings.common.safety_bits++
  171.                     if (settings.options.debug == true) {
  172.                         engine.clearLog()
  173.                     }
  174.                     engine.log(`STW: ${settings.common.safety_bits}`)
  175.                 }
  176.                 playing = false
  177.                 // await queuedSeedChange()
  178.                 await resetBetAndSeed()
  179.                 we_won()
  180.             }
  181.             if (multiplier < targets) {
  182.                 switcher_strategy++
  183.                 if (switcher_strategy >= settings.options.switch_strategy_after && settings.options.switch_strategy_after != 0) {
  184.                     switcher_strategy = 0
  185.                     strategy_low_play = true
  186.                     targets = settings.strategy_low.baseTarget
  187.                     bets = settings.strategy_low.baseBet * 100
  188.                     engine.log(`Starting test 1.5x strategy!`)
  189.                 } else {
  190.                     //engine.log(`${switcher_strategy} of ${settings.options.switch_strategy_after} to switch on other script`)
  191.                 }
  192.             } else {
  193.                 switcher_strategy = 0
  194.             }
  195.         } else {
  196.             await start_strategy_low()
  197.         }
  198.     }
  199. }
  200. async function start_accumulative_strategy(bet_amount) {
  201.     let a_bet = bet_amount
  202.     let a_count = 0
  203.  
  204.     while (true) {
  205.         await sleep(settings.options.sleepTimeInMS)
  206.         const { multiplier } = await engine.bet(a_bet * 100, target)
  207.         if (multiplier < target) { //LOSS
  208.             a_count = a_count - a_bet
  209.         } else { //WINS
  210.             a_count = a_count + (a_bet * target)
  211.         }
  212.         if (a_count <= 0) {
  213.             a_count = 0
  214.             a_bet = bet_amount
  215.         }
  216.         if (a_count % a_bet == 0) {
  217.             a_bet = a_bet * 2
  218.         }
  219.     }
  220. }
  221. async function start_strategy_low() {
  222.     if (bets / 100 >= settings.strategy_low.LimitTarget) {  // TODO REMOVE TO OTHER CLASS
  223.         bets = settings.strategy_low.LimitTarget * 100     //
  224.     }
  225.     rolls++                                                      // TODO MAKE CALLBACK FOR ALL BETS
  226.     playing = true                                               //
  227.     const { multiplier } = await engine.bet(bets, targets)       //
  228.     if (multiplier < targets) { /* Lose */
  229.  
  230.         if (bets / 100 >= settings.strategy_low.LimitTarget) {
  231.             strategy_low_play = false
  232.             switcher_strategy = 0
  233.             bet = settings.common.baseBet
  234.             target = settings.common.baseTarget
  235.             engine.log(`Starting main script!`)
  236.         }
  237.         try {
  238.             we_lost_strategy_low()
  239.         } catch (error) {
  240.             engine.log(`Ops`)
  241.         }
  242.  
  243.     } else {                   /* Win */
  244.         we_won_strategy_low()
  245.         await resetBetAndSeed()
  246.     }
  247. }
  248. function we_won_strategy_low() {
  249.     playing = false
  250.     lossCount = 0
  251.     if (bets / 100 >= settings.strategy_low.LimitTarget) {
  252.         engine.log("Limit reached, resetting")
  253.         bets = 100
  254.         count = 0
  255.     }
  256.     if (count > 4) { // 15
  257.         bets = 100 * 4
  258.     } else {
  259.         bets = 100 * 2
  260.     }
  261.     if (count > 16) { // 20
  262.         bets = 100 * 8
  263.     }
  264.     if (count > 32) { // 50
  265.         bets = 100 * 16
  266.     }
  267.     if (count > 64) { // 75
  268.         bets = 100 * 32
  269.     }
  270.     if (count > 128) { // 480
  271.         bets = 100 * 64
  272.     }
  273.     if (count > 256) { // 920
  274.         bets = 100 * 128
  275.     }
  276.     if (count > 512) { // 2000
  277.         bets = 100 * 256
  278.     }
  279.     if (count > 1024) { // 4000
  280.         bets = 100 * 512
  281.     }
  282.     if (settings.strategy_low.enable_super_profit == true) {
  283.         if (count > 2048) {
  284.             bets = 100 * 1024
  285.         }
  286.         if (count > 4096) {
  287.             bets = 100 * 2048
  288.         }
  289.     }
  290.     if (bets / 100 >= 1) {
  291.         count = count + (bets / 100 * 2)
  292.     }
  293.     if (bets / 100 > 2) {
  294.         count = count + (bets / 100 * 2)
  295.     }
  296.     if (bets / 100 > 4) {
  297.         count = count + (bets / 100 * 2)
  298.     }
  299.     if (bets / 100 > 8) {
  300.         count = count + (bets / 100 * lossCount)
  301.     }
  302.     if (bets / 100 > 16) {
  303.         count = count + (bets / 100 * lossCount)
  304.     }
  305.     if (bets / 100 > 32) {
  306.         count = count + (bets / 100 * lossCount)
  307.     }
  308.     if (bets / 100 > 64) {
  309.         count = count + (bets / 100 * lossCount)
  310.     }
  311.     if (bets / 100 > 128) {
  312.         count = count + (bets / 100 * lossCount)
  313.     }
  314.     if (bets / 100 > 256) {
  315.         count = count + (bets / 100 * lossCount)
  316.     }
  317.     if (bets / 100 > 512) {
  318.         count = count + (bets / 100 * lossCount)
  319.     }
  320.     if (settings.strategy_low.enable_super_profit == true) {
  321.         if (bets / 100 > 1024) {
  322.             count = count + (bets / 100 * 1)
  323.         }
  324.         if (bets / 100 > 2048) {
  325.             count = count + (bets / 100 * 1)
  326.         }
  327.     }
  328.     engine.log(`Won, counter ${count}`)
  329. }
  330. function we_lost_strategy_low() {
  331.     lossCount++
  332.     if (bets / 100 >= 2) {
  333.         count = count - (bets / 100 * lossCount)
  334.     } else {
  335.         count = count - (bets / 100)
  336.     }
  337.     if (bets / 100 >= 4) {
  338.         count = count - (bets / 100)
  339.     }
  340.     if (bets / 100 >= 8) {
  341.         count = count - (bets / 100) - (20)
  342.     }
  343.     if (bets / 100 >= 16) {
  344.         count = count - (bets / 100) - (50)
  345.     }
  346.     if (bets / 100 >= 32) {
  347.         count = count - (bets / 100 * lossCount) //75
  348.     }
  349.     if (bets / 100 >= 64) {
  350.         count = count - (bets / 100 * lossCount) //480
  351.     }
  352.     if (bets / 100 >= 128) {
  353.         count = count - (bets / 100 * lossCount) //920
  354.     }
  355.     if (bets / 100 >= 256) {
  356.         count = count - (bets / 100 * lossCount) //2000
  357.     }
  358.     if (bets / 100 >= 512) {
  359.         count = count - (bets / 100 * lossCount) //4000
  360.     }
  361.     if (settings.enable_super_profit == true) {
  362.         if (bets / 100 >= 1024) {
  363.             count = count - (bets / 100) - (8000 * lossCount)
  364.         }
  365.         if (bets / 100 >= 2048) {
  366.             count = count - (bets / 100) - (16000 * lossCount)
  367.         }
  368.     }
  369.     if (count <= 0) {
  370.         count = 0
  371.         bets = 100
  372.         lossCount = 0
  373.     }
  374.     engine.log(`Lost, counter ${count}`)
  375. }
  376. function we_lose() {
  377.     let local_IncreaseBetEvery = settings.modifications.increaseBetEvery
  378.  
  379.     lose_rolls++
  380.     negative_profit_run = negative_profit_run + bet
  381.     target = target + settings.modifications.targetAddition
  382.     if (bet > settings.modifications.increaseBetEvery_after_bet) {
  383.         local_IncreaseBetEvery = settings.modifications.increaseBetEvery_after
  384.     }
  385.     if (countsbase >= local_IncreaseBetEvery) {
  386.         if (settings.options.multiplyBetInsteadAdd == true) {
  387.             bet = bet * settings.modifications.betAddition
  388.         } else {
  389.             bet = bet + settings.modifications.betAddition
  390.         }
  391.  
  392.         countsbase = 0
  393.     }
  394.     if (settings.options.increaseBetOnWin == true) { // Experimental feature, on every winning increase bet
  395.         if (beforechange <= 0) {
  396.             beforechange = 0
  397.             bet = settings.common.baseBet
  398.         } else {
  399.             beforechange = beforechange - 1
  400.         }
  401.     }
  402.     if (settings.options.log_information != true) { engine.clearLog() }
  403.     engine.log(`Lose ${settings.common.safety_bits + lose_rolls}th bet in amount of ${bet}, total cost from first lose ${negative_profit_run} bits `)
  404. }
  405. function we_won() {
  406.     countsbase = 0
  407.     lose_rolls = 0
  408.     if (settings.options.log_information != true) { engine.clearLog() }
  409.     engine.log(`Success. Total Profit from last run is ${Math.round(bet * target) - negative_profit_run}`)
  410.     negative_profit_run = 0
  411.  
  412.     if (settings.options.increaseBetOnWin == true) { // Experimental feature, on every winning increase bet
  413.         bet = bet + settings.modifications.betAddition
  414.         beforechange = bet
  415.     } else {
  416.         bet = settings.common.baseBet
  417.     }
  418.     if (settings.seed.smart_seed_change == true) { // Reset seed counter at catch and win
  419.         rolls = 0
  420.     }
  421.     target = settings.common.baseTarget
  422.  
  423.     afterwait = 0
  424.     AfterStartPlay--
  425. }
  426. async function check_conditions() {
  427.     if (settings.conditions.stopLoss >= engine.balance / 100) {
  428.         engine.log(`Lose Stopper was triggered by ${settings.conditions.stopLoss} value! Script is shutdown now.`)
  429.         await engine.stop()
  430.     }
  431.     if (settings.conditions.stopProfit <= engine.balance / 100) {
  432.         engine.log(`Profit Stopper was triggered by ${settings.conditions.stopProfit} value! Script is shutdown now.`)
  433.         await engine.stop()
  434.     }
  435.     if (settings.options.sleepTimeInMS != 0) {
  436.         await sleep(settings.options.sleepTimeInMS)
  437.     }
  438.     if (target >= settings.modifications.resetTargetAt) {
  439.         target = settings.modifications.resetTargetTo
  440.         if (settings.seed.change_seed_on_target_reset == true) {
  441.             await generateSeed()
  442.         }
  443.  
  444.     }
  445.     //await resetBetAndSeed()
  446.     countsbase++
  447. }
  448. /**
  449.  * Checks if bet is reached its limit, then bet will be set
  450.  * to his limit specified in settings, and then with that
  451.  * seed will be generated also.
  452.  */
  453. async function resetBetAndSeed() {
  454.     if (settings.seed.changeSeedAtResetBet == true) {
  455.         if (bet > settings.modifications.resetBetAt) {
  456.             bet = settings.modifications.resetBetTo
  457.             await generateSeed()
  458.         }
  459.     }
  460. }
  461. function period_addon_formators() {
  462.     if (gameStarted == true) { afterwait++ } else { prewait-- }
  463.     if (gameStarted == true) {
  464.         formedTarget = target
  465.     } else {
  466.         formedTarget = settings.periods.PeriodTarget
  467.     }
  468.     if (prewait <= 0) { resetPrewait() }
  469.  
  470.     if (AfterStartPlay <= 0) { gamePeriod(true) }
  471.     if (afterwait >= settings.periods.baseAfterwait) { gamePeriod(false) }
  472.  
  473.     if (formedTarget == null) { formedTarget = settings.periods.PeriodTarget }
  474.     if (gameStarted == true) {
  475.         formedBet = bet
  476.     } else {
  477.         formedBet = settings.periods.PeriodBet
  478.     }
  479. }
  480. function period_addon() {
  481.     if (settings.options.log_information != true) { engine.clearLog() }
  482.  
  483.     engine.log(`Starting in: ${AfterStartPlay}, Prewait: ${prewait}, Afterwait: ${afterwait}(${settings.periods.baseAfterwait})`)
  484.     if (multiplier > settings.common.baseTarget) {
  485.         formedTarget = settings.periods.PeriodTarget
  486.         if (gameStarted == true) {
  487.             formedTarget = settings.common.baseTarget
  488.         }
  489.     }
  490. }
  491. function gamePeriod(state) {
  492.     gameStarted = state
  493.     prewait = settings.periods.basePrewait
  494.     afterwait = 0
  495.     if (AfterStartPlay - 1 <= 1) {
  496.         AfterStartPlay = 1
  497.     } else {
  498.         AfterStartPlay = settings.periods.baseAfterStartPlay - 1
  499.     }
  500. }
  501. function resetPrewait() {
  502.     prewait = settings.periods.basePrewait
  503.     AfterStartPlay = settings.periods.baseAfterStartPlay - 1
  504. }
  505. async function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) }
  506. /**
  507.  * Places bet with specified satoshi and get promises on async function,
  508.  * Fill value with bet object and parameters
  509.  * @param {number} wager Amount of satoshi to place for bet
  510.  */
  511. async function doBet(wager) { return new Promise(resolve => engine.bet(wager, target)) } // UNTESTED
  512.  
  513. async function queuedSeedChange() {
  514.     //engine.log(`Seed Task, Roll: ${rolls}(${settings.seed.changeSeed})`)
  515.     if (rolls >= settings.seed.changeSeed) {
  516.         await generateSeed()
  517.         safety_bit_count = 0
  518.         //if (settings.options.debug == true){
  519.         //    //engine.log("Queued seed change completed task.")
  520.         //}
  521.     }
  522. }
  523. /**
  524.  * Decreases streak to wait value.
  525.  */
  526. function decrement_streak_to_wait() {
  527.     if (settings.common.safety_bits_decremental_on_seed_every > 0) {
  528.         if (after_seed > 0) {
  529.             after_seed--
  530.         } else {
  531.             settings.common.safety_bits--
  532.             after_seed = settings.common.safety_bits_decremental_on_seed_every
  533.         }
  534.     }
  535. }
  536. function increment_streak_to_wait() {
  537.     // TODO
  538. }
  539. async function analyzeBet() {
  540.     if (settings.options.use_skips = true && skip == 1) {
  541.         skip = 0
  542.         return await engine.skip(settings.common.safety_bits_bet * 100, settings.common.safety_bits_target)
  543.     } else {
  544.         skip = 1
  545.         settings.options.use_skips = false
  546.         return await engine.bet(settings.common.safety_bits_bet * 100, settings.common.safety_bits_target)
  547.     }
  548. }
  549. /**
  550.  * Generating new seed pair for client and hash server.
  551.  */
  552. async function generateSeed() {
  553.     try {
  554.         const { server_seed_hash } = await engine.newSeedPair()
  555.         engine.log(`Server hash: ${server_seed_hash}`)
  556.     }
  557.     catch (e) {
  558.         engine.log(`Seed is already was reset`)
  559.     }
  560.     try {
  561.         const clientSeed = randomSeed()
  562.         await engine.setClientSeed(clientSeed)
  563.         engine.log(`Seed was set to: ${clientSeed}`)
  564.         decrement_streak_to_wait()
  565.     }
  566.     catch (e) {
  567.         engine.log(`Client seed already is used`)
  568.     }
  569.     rolls = 0
  570. }
  571. /**
  572.  * Returns a random word for seed generation.
  573.  */
  574. function randomSeed() {
  575.     const words = [ 'aAld5hegra ', 'aBravhd5n ', 'aCh5arhdlik ', 'aDel5hadgo ', 'aZech5hso ', 'aFordehxt5romb ', 'aHoth5elshsa ', 'aGndhomu5s ', 'aAddd5ihc6ted ', 'aAu5dh6relia ', 'aZi56dgalo ', 'aWiverm66dda ',
  576.         'aMarid5dnher ', 'aOctoberdd5hfest ', 'aNd5ashcar ', 'aPdd5ahpaja ', 'aAlbeh55dds ', 'aGohdm5us ', 'aFihedrra ', 'aGT5hddO ', 'aUn5dhicorn ', 'aVicdnht5us ', 'aShi65dski ', 'aXda6v5ier ', 'aPoid66uplddet ', 'aAdntu66tdssulika ' ]
  577.  
  578.     return words[ Math.floor(words.length * Math.random()) ] + words[ Math.floor(words.length * Math.random()) ] + words[ Math.floor(words.length * Math.random()) ]
  579. }
  580. /**
  581.  * Play sound peak.
  582.  */
  583. async function gong() {
  584.     const audio = new Audio("https://bustadice.com/5bb187b7ef764e76fb519939f77288c1.mp3")
  585.     if (settings.options.enable_game_sounds != false) { await audio.play() }
  586.     return new Promise(resolve => audio.onended = resolve)
  587. }
  588. /**
  589.  * Force seed change by generating new one.
  590.  */
  591. async function do_force_change_seed() {
  592.     await generateSeed()
  593. }
  594. /**
  595.  * Number of preset settings to load into script.
  596.  * @param {number} strategy
  597.  */
  598. async function load_presets_settings(strategy) {        /* Templates/Patterns Setting for various run */
  599.     let strategy_choose = strategy
  600.     switch (strategy_choose) {
  601.         case 2: /* Normal Mode for normal balance [>8000 bits] */
  602.             settings.modifications.betAddition = 2 /* Multiplier on lost bet size */
  603.             settings.modifications.increaseBetEvery = 2 /* How much time repeat same amount bet before increase it */
  604.             settings.modifications.increaseBetEvery_after_bet = 64 /* After reach this size, which was met reset bet, use new rules on repeating bets */
  605.             settings.modifications.increaseBetEvery_after = 2 /* After reset bet, how much repeat bet will happen */
  606.             settings.modifications.resetBetAt = 2048 /* Maximum bet size(wager) can be placed, after it game will reset to variable you set below */
  607.             settings.modifications.resetBetTo = 32  /* Bet size to start count up after resetbetAT was reached */
  608.             settings.modifications.maximum_after_resetBet = 2048  /* After resetting bet use new or keep same betting amount size rules */
  609.             settings.common.safety_bits_decremental_on_seed_every = 0 /* Decrease STW(safety bits) by one after amount of seeds was reset, 0 to disable it */
  610.             settings.common.safety_bits_incremental = false /* Increases after success run STW by one, default is set to false, for users who know what they doing */
  611.             engine.log(`Strategy Normal mode is selected. [>8000 bits]`)
  612.             break;
  613.         case 3:  /* Normal Mode for high balance [>16300 bits] */
  614.             settings.modifications.betAddition = 2 /* Multiplier on lost bet size */
  615.             settings.modifications.increaseBetEvery = 2 /* How much time repeat same amount bet before increase it */
  616.             settings.modifications.increaseBetEvery_after_bet = 64 /* After reach this size, which was met reset bet, use new rules on repeating bets */
  617.             settings.modifications.increaseBetEvery_after = 2 /* After reset bet, how much repeat bet will happen */
  618.             settings.modifications.resetBetAt = 4096 /* Maximum bet size(wager) can be placed, after it game will reset to variable you set below */
  619.             settings.modifications.resetBetTo = 100  /* Bet size to start count up after resetbetAT was reached */
  620.             settings.modifications.maximum_after_resetBet = 4096  /* After resetting bet use new or keep same betting amount size rules */
  621.             settings.common.safety_bits_decremental_on_seed_every = 0 /* Decrease STW(safety bits) by one after amount of seeds was reset, 0 to disable it */
  622.             settings.common.safety_bits_incremental = false /* Increases after success run STW by one, default is set to false, for users who know what they doing */
  623.             engine.log(`Strategy Normal mode for high balance was selected [>16300 bits]`)
  624.             break;
  625.         case 4:  /* Alternative mode for multiplier 3, just for having more than common run */
  626.             settings.modifications.betAddition = 3
  627.             settings.modifications.increaseBetEvery = 3
  628.             settings.modifications.increaseBetEvery_after_bet = 243
  629.             settings.modifications.increaseBetEvery_after = 2
  630.             settings.modifications.resetBetAt = 2187
  631.             settings.modifications.resetBetTo = 512
  632.             settings.modifications.maximum_after_resetBet = 4608
  633.             engine.log(`Strategy 3x multiplier mode was selected`)
  634.             break;
  635.         case 5: /* Early profit and later normal run for balance [>4500 bits] */
  636.             await do_force_change_seed()
  637.             settings.seed.changeSeed = 20
  638.             settings.modifications.betAddition = 2
  639.             settings.modifications.increaseBetEvery = 2
  640.             settings.modifications.increaseBetEvery_after_bet = 64
  641.             settings.modifications.increaseBetEvery_after = 2
  642.             settings.modifications.resetBetAt = 160
  643.             settings.modifications.resetBetTo = 1
  644.             settings.modifications.maximum_after_resetBet = 160
  645.             settings.common.baseBet = 10
  646.             settings.common.safety_bits = 2
  647.             settings.common.safety_bits_incremental = false
  648.             settings.common.safety_bits_decremental_on_seed_every = 0
  649.             engine.log(`Strategy Early profit and later normal run for balance [>4500 bits] was selected`)
  650.             break;
  651.         case 6: /* High profit for medium numbers, for balance [>5000 bits] medium risk */
  652.             await do_force_change_seed()
  653.             settings.seed.changeSeed = 20
  654.             settings.modifications.betAddition = 2
  655.             settings.modifications.increaseBetEvery = 2
  656.             settings.modifications.increaseBetEvery_after_bet = 64
  657.             settings.modifications.increaseBetEvery_after = 2
  658.             settings.modifications.resetBetAt = 80
  659.             settings.modifications.resetBetTo = 20
  660.             settings.modifications.maximum_after_resetBet = 160
  661.             settings.common.baseBet = 2
  662.             settings.common.baseTarget = 5
  663.             settings.common.safety_bits = 19
  664.             settings.common.safety_bits_incremental = true
  665.             settings.common.safety_bits_decremental_on_seed_every = 3
  666.             engine.log(`Strategy High profit for medium numbers, for balance [>5000 bits] medium risk was selected`)
  667.             break;
  668.         case 7: /* 2x Mode, for low balance run [<2000 bits], low risk */
  669.             await do_force_change_seed()
  670.             settings.seed.changeSeed = 20
  671.             settings.modifications.betAddition = 2
  672.             settings.modifications.increaseBetEvery = 2
  673.             settings.modifications.resetBetAt = 128
  674.             settings.modifications.resetBetTo = 32
  675.             settings.modifications.maximum_after_resetBet = 128
  676.             settings.common.baseBet = 2
  677.             settings.common.baseTarget = 5
  678.             settings.common.safety_bits = 8
  679.             settings.common.safety_bits_incremental = true
  680.             settings.common.safety_bits_decremental_on_seed_every = 3
  681.             engine.log(`Strategy 2x Mode, for low balance run [<2000 bits] low risk`)
  682.             break;
  683.         case 8:  /* 2x Mode, for medium balance run [<4000 bits], average risk */
  684.             await do_force_change_seed()
  685.             settings.seed.changeSeed = 20
  686.             settings.modifications.betAddition = 2
  687.             settings.modifications.resetBetAt = 128
  688.             settings.modifications.resetBetTo = 1
  689.             settings.modifications.maximum_after_resetBet = 128
  690.             settings.common.baseBet = 1
  691.             settings.common.safety_bits = 2
  692.             settings.common.safety_bits_incremental = false
  693.             settings.common.safety_bits_decremental_on_seed_every = 0
  694.             engine.log(`Strategy 2x Mode, for medium balance run [<4000 bits], average risk is selected`)
  695.             break;
  696.         case 9: /* Soft strategy run, not long term, something like medium term. For balance [>2000 bits] low risk */
  697.             await do_force_change_seed()
  698.             settings.seed.changeSeed = 20
  699.             settings.modifications.betAddition = 2
  700.             settings.modifications.resetBetAt = 160
  701.             settings.modifications.resetBetTo = 1
  702.             settings.modifications.maximum_after_resetBet = 128
  703.             settings.common.baseBet = 5
  704.             settings.common.safety_bits = 10
  705.             settings.common.safety_bits_incremental = false
  706.             settings.common.safety_bits_decremental_on_seed_every = 0
  707.             engine.log(`Strategy Soft strategy run, not long term, something like medium term. For balance [>2000 bits] low risk is selected`)
  708.             break;
  709.         default:
  710.             engine.log(`Strategy is not set, using settings from settings object.`)
  711.     }
  712. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top