Advertisement
Guest User

Ruzli Golden Assist Publicy Available

a guest
Jan 28th, 2020
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {
  2.     RiskHeader: { label: "Risk Modificators", type: "noop" },
  3.     //**************************************************************** */
  4.     RISK_FACTOR: { label: "Risk Factor", type: "multiplier", value: 1.2 },
  5.     RISK_MULTIPLIER: { label: "Risk Multiplier", type: "multiplier", value: 0.005 },
  6.     RISK_BASE: { label: "Risk Base", type: "multiplier", value: 1.0 },
  7.  
  8.     featuresHeader: { label: " Common Features", type: "noop" },
  9.     //**************************************************************** */
  10.     change_seed_next: { label: "Seed change", type: "number", value: 50000 },
  11.     game_sound: { label: "Game sound", type: "checkbox", value: true },
  12.    
  13.     conditionHeader: { label: "Conditions", type: "noop" },
  14.     //**************************************************************** */
  15.     minProfit: { label: "minProfit", type: "balance", value: -500000 },
  16.     maxProfit: { label: "maxProfit", type: "balance", value: 500000 },
  17.  
  18.     targetsHeader: { label: "Targets", type: "noop" },
  19.     //**************************************************************** */
  20.     target_1: { label: "Target play", type: "text", value: "2.36" },
  21.     bet_1: { label: "Bet", type: "balance", value: 400 },
  22.     target236: { label: "Target 2.36x", type: "checkbox", value: true },
  23.  
  24.     target_2: { label: "Target play", type: "text", value: "4.72" },
  25.     bet_2: { label: "Bet", type: "balance", value: 300 },
  26.     target472: { label: "Target 4.72x", type: "checkbox", value: true },
  27.  
  28.     target_3: { label: "Target play", type: "text", value: "9.44" },
  29.     bet_3: { label: "Bet", type: "balance", value: 100 },
  30.     target944: { label: "Target 9.44x", type: "checkbox", value: true },
  31.  
  32.     target_4: { label: "Target play", type: "text", value: "15" },
  33.     bet_4: { label: "Bet", type: "balance", value: 100 },
  34.     target15: { label: "Target 15x", type: "checkbox", value: true },
  35.  
  36.     target_5: { label: "Target play", type: "text", value: "30" },
  37.     bet_5: { label: "Bet", type: "balance", value: 200 },
  38.     target30: { label: "Target 30x", type: "checkbox", value: false },
  39.  
  40.     target_6: { label: "Target play", type: "text", value: "60" },
  41.     bet_6: { label: "Bet", type: "balance", value: 200 },
  42.     target60: { label: "Target 60x", type: "checkbox", value: false },
  43.  
  44.     target_7: { label: "Target play", type: "text", value: "100" },
  45.     bet_7: { label: "Bet", type: "balance", value: 100 },
  46.     target100: { label: "Target 100x", type: "checkbox", value: false },
  47.  
  48.     CustomHeader: { label: "Custom Target", type: "noop" },
  49.     //**************************************************************** */
  50.     target_8: { label: "Target play", type: "number", value: 3 },
  51.     bet_8: { label: "Bet", type: "balance", value: 300 },
  52.     target_custom: { label: "Target", type: "checkbox", value: false },
  53.    
  54. }
  55.  
  56. var RISK_FACTOR = config.RISK_FACTOR.value           /* Overall change for all situations to happen.            */
  57. var RISK_MULTIPLIER = config.RISK_MULTIPLIER.value   /* Overall change for all bets size after lose bet         */
  58. var RISK_BASE = config.RISK_BASE.value               /* Overall change for all targets base bet by multiple it, for now all targets starting with basebet = 1  */
  59.  
  60. var minProfit = config.minProfit.value / 100
  61. var maxProfit = config.maxProfit.value / 100
  62.  
  63. var change_seed_next = config.change_seed_next.value
  64.  
  65. const LONGEST_DIFFCULTY = 16  /* STW calculated based on this formula */
  66. const PLAY_IN_RANGE = 4       /* Seed numbers has 4 distances, early, mid, late, extra late  */
  67.  
  68. function get_multiplier(target){
  69.     return  (1 / ((target * ex.mul_target) - 1) + 1) + (RISK_MULTIPLIER * (1 / ((target * ex.mul_target) - 1) + 1))
  70. }
  71. function get_stw(target){
  72.     return Math.round((target * ex.mul_target) * LONGEST_DIFFCULTY / PLAY_IN_RANGE * RISK_FACTOR)
  73. }
  74. var ex = {
  75.    mul_target: 1.0,
  76.    no_waiting_time: false,
  77.    TARGET_2_36: config.target_1.value,
  78.    TARGET_4_72: config.target_2.value,
  79.    TARGET_9_44: config.target_3.value,
  80.    TARGET_15: config.target_4.value,
  81.    TARGET_30: config.target_5.value,
  82.    TARGET_60: config.target_6.value,
  83.    TARGET_100: config.target_7.value,
  84.    TARGET_CUSTOM: config.target_8.value,
  85. }
  86. var game_on_2_36 = {
  87.    game_2_36_enabled: config.target236.value,
  88.    basebet: Math.round(config.bet_1.value * RISK_BASE) / 100,   bet: Math.round(config.bet_1.value * RISK_BASE) / 100,
  89.    target: ex.TARGET_2_36 * ex.mul_target,
  90.    multiplier: get_multiplier(ex.TARGET_2_36),   STW: get_stw(ex.TARGET_2_36),
  91.    LS: 0,   PROFIT: 0,   RUNS: 0,
  92. }
  93. var game_on_4_72 = {
  94.    game_4_72_enabled: config.target472.value,
  95.    basebet: Math.round(config.bet_2.value * RISK_BASE) / 100,   bet: Math.round(config.bet_2.value * RISK_BASE) / 100,
  96.    target: ex.TARGET_4_72 * ex.mul_target,
  97.    multiplier: get_multiplier(ex.TARGET_4_72),   STW: get_stw(ex.TARGET_4_72),
  98.    LS: 0,   PROFIT: 0,   RUNS: 0,
  99. }
  100. var game_on_9_44 = {
  101.    game_9_44_enabled: config.target944.value,
  102.    basebet: Math.round(config.bet_3.value * RISK_BASE) / 100,   bet: Math.round(config.bet_3.value * RISK_BASE) / 100,
  103.    target: ex.TARGET_9_44 * ex.mul_target,
  104.    multiplier: get_multiplier(ex.TARGET_9_44),   STW: get_stw(ex.TARGET_9_44),
  105.    LS: 0,   PROFIT: 0,   RUNS: 0,
  106. }
  107. var game_on_15 = {
  108.    game_15_enabled: config.target15.value,
  109.    basebet: Math.round(config.bet_4.value * RISK_BASE) / 100,   bet: Math.round(config.bet_4.value * RISK_BASE) / 100,
  110.    target: ex.TARGET_15 * ex.mul_target,
  111.    multiplier: get_multiplier(ex.TARGET_15),   STW: get_stw(ex.TARGET_15),
  112.    LS: 0,   PROFIT: 0,   RUNS: 0,
  113. }
  114. var game_on_30 = {
  115.    game_30_enabled: config.target30.value,
  116.    basebet: Math.round(config.bet_5.value * RISK_BASE) / 100,   bet: Math.round(config.bet_5.value * RISK_BASE) / 100,
  117.    target: ex.TARGET_30 * ex.mul_target,
  118.    multiplier: get_multiplier(ex.TARGET_30),   STW: get_stw(ex.TARGET_30),
  119.    LS: 0,   PROFIT: 0,   RUNS: 0,
  120. }
  121. var game_on_60 = {
  122.    game_60_enabled: config.target60.value,
  123.    basebet: Math.round(config.bet_6.value * RISK_BASE) / 100,   bet: Math.round(config.bet_6.value * RISK_BASE) / 100,
  124.    target: ex.TARGET_60 * ex.mul_target,
  125.    multiplier: get_multiplier(ex.TARGET_60),   STW: get_stw(ex.TARGET_60),
  126.    LS: 0,   PROFIT: 0,   RUNS: 0,
  127. }
  128. var game_on_100 = {
  129.    game_100_enabled: config.target100.value,
  130.    basebet: Math.round(config.bet_7.value * RISK_BASE) / 100,   bet: Math.round(config.bet_7.value * RISK_BASE) / 100,
  131.    target: ex.TARGET_100 * ex.mul_target,
  132.    multiplier: get_multiplier(ex.TARGET_100),   STW: get_stw(ex.TARGET_100),
  133.    LS: 0,   PROFIT: 0,   RUNS: 0,
  134. }
  135. var game_on_custom = {
  136.    game_custom_enabled: config.target_custom.value,
  137.    basebet: Math.round(config.bet_8.value * RISK_BASE) / 100,   bet: Math.round(config.bet_8.value * RISK_BASE) / 100,  
  138.    target: ex.TARGET_CUSTOM * ex.mul_target,
  139.    multiplier: get_multiplier(ex.TARGET_CUSTOM),   STW: get_stw(ex.TARGET_CUSTOM),
  140.    LS: 0, PROFIT: 0,  RUNS: 0,
  141. }
  142.  
  143. const engine = this
  144.  
  145. var game_sounds = config.game_sound.value
  146. var skip_enabled = true
  147. var bust_text = ``
  148. var bust_array = []
  149. var last_strategy = "none"
  150.  
  151. async function sleep(ms = ex.interval_rolls) {
  152.     if (ms != 0) return new Promise(resolve => setTimeout(resolve, ms))
  153. }
  154.  
  155. let skipStep = 1  // 0 = skip | 1 = bet
  156. let nonce = 0, PROFIT = 0, TOTAL_BETS = 0, STREAK_ROLL = 0
  157.  
  158. engine.log(`Starting to gather information script made by by Ruzli(Baecoin) 1.07.1v, version with GUI`)
  159. await sleep(2000)
  160.  
  161.  
  162. /* Main loop is starting from here */
  163. while (true) {
  164.    
  165.    await gather_information()
  166.  
  167.    if (game_on_2_36.game_2_36_enabled) {
  168.        await STR_2_36()
  169.    }
  170.    if (game_on_4_72.game_4_72_enabled) {
  171.        await STR_4_72()
  172.    }
  173.    if (game_on_9_44.game_9_44_enabled) {
  174.        await STR_9_44()
  175.    }
  176.    if (game_on_15.game_15_enabled) {
  177.        await STR_15()
  178.    }
  179.    if (game_on_30.game_30_enabled) {
  180.        await STR_30()
  181.    }
  182.    if (game_on_60.game_60_enabled) {
  183.        await STR_60()
  184.    }
  185.    if (game_on_100.game_100_enabled) {
  186.        await STR_100()
  187.    }
  188.    if (game_on_custom.game_custom_enabled) {
  189.        await STR_Custom()
  190.    }
  191. }
  192. async function gather_information() {
  193.    if (skip_enabled == true) {
  194.        const { multiplier } = await analyzeBet()
  195.        TOTAL_BETS++
  196.        await seed_checking()
  197.        await updateStreaks(multiplier)
  198.  
  199.        if (skipStep == 0) {
  200.            if (multiplier > 1.00) {
  201.                PROFIT += 0.01
  202.            } else {
  203.                PROFIT -= 1
  204.            }
  205.        }
  206.    }
  207.    await updateLog()
  208.    if (game_on_2_36.LS >= game_on_2_36.STW || game_on_4_72.LS >= game_on_4_72.STW || game_on_9_44.LS >= game_on_9_44.STW || game_on_15.LS >= game_on_15.STW || game_on_30.LS >= game_on_30.STW || game_on_60.LS >= game_on_60.STW || game_on_100.LS >= game_on_100.STW || game_on_custom.LS >= game_on_custom.STW) {
  209.        return
  210.    }
  211. }
  212.  
  213. async function seed_checking() {
  214.    nonce++
  215.    if (nonce >= change_seed_next) {
  216.        await generateSeed()
  217.        nonce = 0
  218.    }
  219. }
  220. async function analyzeBet() {
  221.    if (skipStep == 0) {
  222.        skipStep = 1
  223.        return await engine.skip(betSize(1), 1.01)
  224.    } else {
  225.        skipStep = 0
  226.        return await engine.bet(betSize(1), 1.01)
  227.    }
  228. }
  229. function increase_profit(game_target) {
  230.    return (betSize(game_target.bet) / 100) * (game_target.target - 1)
  231.  
  232. }
  233. function decrease_profit(game_target) {
  234.    return betSize(game_target.bet) / 100
  235. }
  236.  
  237. async function STR_Custom() {
  238.    let RETRY = true
  239.  
  240.    if (game_on_custom.LS < game_on_custom.STW) {
  241.        if (ex.no_waiting_time == false) {
  242.            return
  243.        }
  244.    }
  245.    game_on_custom.LS = 0
  246.    gong()
  247.    while (RETRY) {
  248.        const { multiplier } = await engine.bet(betSize(game_on_custom.bet), game_on_custom.target)
  249.        TOTAL_BETS++
  250.        if (multiplier < game_on_custom.target) { // Loose
  251.            STREAK_ROLL++
  252.            PROFIT -= decrease_profit(game_on_custom)
  253.            game_on_custom.PROFIT -= decrease_profit(game_on_custom)
  254.            game_on_custom.bet *= game_on_custom.multiplier
  255.        } else {                      // Win
  256.            PROFIT += increase_profit(game_on_custom)
  257.            game_on_custom.PROFIT += increase_profit(game_on_custom)
  258.            game_on_custom.bet = game_on_custom.basebet
  259.            RETRY = false
  260.        }
  261.        last_strategy = `Strategy ${game_on_custom.target} with streak ${STREAK_ROLL}`
  262.  
  263.        await updateStreaks(multiplier)
  264.        await updateLog()
  265.  
  266.        if (PROFIT > maxProfit || PROFIT - game_on_custom.bet < minProfit) {
  267.            engine.stop()
  268.        }
  269.    }
  270. }
  271. async function STR_2_36() {
  272.  
  273.    let RETRY = true
  274.  
  275.    if (game_on_2_36.LS < game_on_2_36.STW) {
  276.        if (ex.no_waiting_time == false) {
  277.            return
  278.        }
  279.    }
  280.    game_on_2_36.LS = 0
  281.    game_on_2_36.RUNS++
  282.    gong()
  283.    while (RETRY) {
  284.        const { multiplier } = await engine.bet(betSize(game_on_2_36.bet), game_on_2_36.target)
  285.        TOTAL_BETS++
  286.        if (multiplier < game_on_2_36.target) { // Loose
  287.            STREAK_ROLL++
  288.            PROFIT -= betSize(game_on_2_36.bet) / 100
  289.            game_on_2_36.PROFIT -= betSize(game_on_2_36.bet) / 100
  290.            game_on_2_36.bet *= game_on_2_36.multiplier
  291.  
  292.        } else {                      // Win
  293.            PROFIT += (betSize(game_on_2_36.bet) / 100) * (game_on_2_36.target - 1)
  294.            game_on_2_36.PROFIT += (betSize(game_on_2_36.bet) / 100) * (game_on_2_36.target - 1)
  295.            game_on_2_36.bet = game_on_2_36.basebet
  296.            RETRY = false
  297.        }
  298.        last_strategy = `Strategy ${game_on_2_36.target} with streak ${STREAK_ROLL}`
  299.  
  300.        await updateStreaks(multiplier)
  301.        Summary(STREAK_ROLL)
  302.        await updateLog()
  303.  
  304.        if (PROFIT > maxProfit || PROFIT - game_on_2_36.bet < minProfit) {
  305.            engine.stop()
  306.        }
  307.    }
  308. }
  309. async function STR_4_72() {
  310.  
  311.    let RETRY = true
  312.  
  313.    if (game_on_4_72.LS < game_on_4_72.STW) {
  314.        if (ex.no_waiting_time == false) {
  315.            return
  316.        }
  317.    }
  318.    game_on_4_72.LS = 0
  319.    game_on_4_72.RUNS++
  320.    gong()
  321.    last_strategy = `Strategy ${game_on_4_72.target}`
  322.  
  323.    while (RETRY) {
  324.        const { multiplier } = await engine.bet(betSize(game_on_4_72.bet), game_on_4_72.target)
  325.        TOTAL_BETS++
  326.        if (multiplier < game_on_4_72.target) { // Loose
  327.            STREAK_ROLL++
  328.            PROFIT -= betSize(game_on_4_72.bet) / 100
  329.            game_on_4_72.PROFIT -= betSize(game_on_4_72.bet) / 100
  330.            game_on_4_72.bet *= game_on_4_72.multiplier
  331.  
  332.        } else {                      // Win
  333.            PROFIT += (betSize(game_on_4_72.bet) / 100) * (game_on_4_72.target - 1)
  334.            game_on_4_72.PROFIT += (betSize(game_on_4_72.bet) / 100) * (game_on_4_72.target - 1)
  335.            game_on_4_72.bet = game_on_4_72.basebet
  336.            RETRY = false
  337.        }
  338.        await updateStreaks(multiplier)
  339.        Summary(STREAK_ROLL)
  340.        await updateLog()
  341.  
  342.        if (PROFIT > maxProfit || PROFIT - game_on_4_72.basebet < minProfit) {
  343.            engine.stop()
  344.        }
  345.    }
  346. }
  347. async function STR_9_44() {
  348.  
  349.    let RETRY = true
  350.  
  351.    if (game_on_9_44.LS < game_on_9_44.STW) {
  352.        if (ex.no_waiting_time == false) {
  353.            return
  354.        }
  355.    }
  356.    game_on_9_44.LS = 0
  357.    game_on_9_44.RUNS++
  358.    gong()
  359.    last_strategy = `Strategy ${game_on_9_44.target}`
  360.  
  361.    while (RETRY) {
  362.        const { multiplier } = await engine.bet(betSize(game_on_9_44.bet), game_on_9_44.target)
  363.        TOTAL_BETS++
  364.        if (multiplier < game_on_9_44.target) { // Loose
  365.            STREAK_ROLL++
  366.            PROFIT -= betSize(game_on_9_44.bet) / 100
  367.            game_on_9_44.PROFIT -= betSize(game_on_9_44.bet) / 100
  368.            game_on_9_44.bet *= game_on_9_44.multiplier
  369.        } else {                      // Win
  370.            PROFIT += (betSize(game_on_9_44.bet) / 100) * (game_on_9_44.target - 1)
  371.            game_on_9_44.PROFIT += (betSize(game_on_9_44.bet) / 100) * (game_on_9_44.target - 1)
  372.            game_on_9_44.bet = game_on_9_44.basebet
  373.            RETRY = false
  374.        }
  375.        await updateStreaks(multiplier)
  376.        Summary(STREAK_ROLL)
  377.        await updateLog()
  378.  
  379.        if (PROFIT > maxProfit || PROFIT - game_on_9_44.bet < minProfit) {
  380.            engine.stop()
  381.        }
  382.    }
  383. }
  384. async function STR_15() {
  385.  
  386.    let RETRY = true
  387.  
  388.    if (game_on_15.LS < game_on_15.STW) {
  389.        if (ex.no_waiting_time == false) {
  390.            return
  391.        }
  392.    }
  393.    game_on_15.LS = 0
  394.    game_on_15.RUNS++
  395.    gong()
  396.    last_strategy = `Strategy ${game_on_15.target}`
  397.  
  398.    while (RETRY) {
  399.        const { multiplier } = await engine.bet(betSize(game_on_15.bet), game_on_15.target)
  400.        TOTAL_BETS++
  401.        if (multiplier < game_on_15.target) { // Loose
  402.  
  403.            PROFIT -= betSize(game_on_15.bet) / 100
  404.            game_on_15.PROFIT -= betSize(game_on_15.bet) / 100
  405.            game_on_15.bet *= game_on_15.multiplier
  406.        } else {                      // Win
  407.            PROFIT += (betSize(game_on_15.bet) / 100) * (game_on_15.target - 1)
  408.            game_on_15.PROFIT += (betSize(game_on_15.bet) / 100) * (game_on_15.target - 1)
  409.            game_on_15.bet = game_on_15.basebet
  410.            RETRY = false
  411.        }
  412.        await updateStreaks(multiplier)
  413.        Summary(STREAK_ROLL)
  414.        await updateLog()
  415.  
  416.        if (PROFIT > maxProfit || PROFIT - game_on_15.bet < minProfit) {
  417.            engine.stop()
  418.        }
  419.    }
  420. }
  421. async function STR_30() {
  422.  
  423.    let RETRY = true
  424.  
  425.    if (game_on_30.LS < game_on_30.STW) {
  426.        if (ex.no_waiting_time == false) {
  427.            return
  428.        }
  429.    }
  430.    game_on_30.LS = 0
  431.    game_on_30.RUNS++
  432.    gong()
  433.    last_strategy = `Strategy ${game_on_30.target}`
  434.  
  435.    while (RETRY) {
  436.        const { multiplier } = await engine.bet(betSize(game_on_30.bet), game_on_30.target)
  437.        TOTAL_BETS++
  438.        if (multiplier < game_on_30.target) { // Loose
  439.            STREAK_ROLL++
  440.            PROFIT -= betSize(game_on_30.bet) / 100
  441.            game_on_30.PROFIT -= betSize(game_on_30.bet) / 100
  442.            game_on_30.bet *= game_on_30.multiplier
  443.        } else {                      // Win
  444.            PROFIT += (betSize(game_on_30.bet) / 100) * (game_on_30.target - 1)
  445.            game_on_30.PROFIT += (betSize(game_on_30.bet) / 100) * (game_on_30.target - 1)
  446.            game_on_30.bet = game_on_30.basebet
  447.            RETRY = false
  448.        }
  449.        await updateStreaks(multiplier)
  450.        Summary(STREAK_ROLL)
  451.        await updateLog()
  452.  
  453.        if (PROFIT > maxProfit || PROFIT - game_on_30.bet < minProfit) {
  454.            engine.stop()
  455.        }
  456.    }
  457. }
  458. async function STR_60() {
  459.    let RETRY = true
  460.  
  461.    if (game_on_60.LS < game_on_60.STW) {
  462.        if (ex.no_waiting_time == false) {
  463.            return
  464.        }
  465.    }
  466.    game_on_60.LS = 0
  467.    game_on_60.RUNS++
  468.    gong()
  469.    last_strategy = `Strategy ${game_on_60.target}`
  470.  
  471.    while (RETRY) {
  472.        const { multiplier } = await engine.bet(betSize(game_on_60.bet), game_on_60.target)
  473.        TOTAL_BETS++
  474.        if (multiplier < game_on_60.target) { // Loose
  475.            STREAK_ROLL++
  476.            PROFIT -= betSize(game_on_60.bet) / 100
  477.            game_on_60.PROFIT -= betSize(game_on_60.bet) / 100
  478.            game_on_60.bet *= game_on_60.multiplier
  479.        } else {                      // Win
  480.            PROFIT += (betSize(game_on_60.bet) / 100) * (game_on_60.target - 1)
  481.            game_on_60.PROFIT += (betSize(game_on_60.bet) / 100) * (game_on_60.target - 1)
  482.            game_on_60.bet = game_on_60.basebet
  483.            RETRY = false
  484.        }
  485.        await updateStreaks(multiplier)
  486.        Summary(STREAK_ROLL)
  487.  
  488.        await updateLog()
  489.  
  490.        if (PROFIT > maxProfit || PROFIT - game_on_60.bet < minProfit) {
  491.            engine.stop()
  492.        }
  493.    }
  494. }
  495. async function STR_100() {
  496.    let RETRY = true
  497.  
  498.    if (game_on_100.LS < game_on_100.STW) {
  499.        if (ex.no_waiting_time == false) {
  500.            return
  501.        }
  502.    }
  503.    game_on_100.LS = 0
  504.    game_on_100.RUNS++
  505.    gong()
  506.    last_strategy = `Strategy ${game_on_100.target}`
  507.    while (RETRY) {
  508.        const { multiplier } = await engine.bet(betSize(game_on_100.bet), game_on_100.target)
  509.        TOTAL_BETS++
  510.        if (multiplier < game_on_100.target) { // Loose
  511.            STREAK_ROLL++
  512.            PROFIT -= betSize(game_on_100.bet) / 100
  513.            game_on_100.PROFIT -= betSize(game_on_100.bet) / 100
  514.            game_on_100.bet *= game_on_100.multiplier
  515.        } else {                      // Win
  516.            PROFIT += (betSize(game_on_100.bet) / 100) * (game_on_100.target - 1)
  517.            game_on_100.PROFIT += (betSize(game_on_100.bet) / 100) * (game_on_100.target - 1)
  518.            game_on_100.bet = game_on_100.basebet
  519.            RETRY = false
  520.        }
  521.        await updateStreaks(multiplier)
  522.        Summary(STREAK_ROLL)
  523.  
  524.        await updateLog()
  525.  
  526.        if (PROFIT > maxProfit || PROFIT - game_on_100.bet < minProfit) {
  527.            engine.stop()
  528.        }
  529.    }
  530. }
  531.  
  532. async function updateStreaks(multiplier) {
  533.    if (multiplier < game_on_2_36.target) {      // Loose/Increase for all
  534.        game_on_2_36.LS++
  535.        game_on_4_72.LS++
  536.        game_on_9_44.LS++
  537.        game_on_15.LS++
  538.        game_on_30.LS++
  539.        game_on_60.LS++
  540.        game_on_100.LS++
  541.        game_on_custom.LS++
  542.    } else if (multiplier < game_on_4_72.target) {
  543.        game_on_2_36.LS = 0
  544.        game_on_4_72.LS++
  545.        game_on_9_44.LS++
  546.        game_on_15.LS++
  547.        game_on_30.LS++
  548.        game_on_60.LS++
  549.        game_on_100.LS++
  550.        game_on_custom.LS++
  551.    } else if (multiplier < game_on_9_44.target) {
  552.        game_on_2_36.LS = 0
  553.        game_on_4_72.LS = 0
  554.        game_on_9_44.LS++
  555.        game_on_15.LS++
  556.        game_on_30.LS++
  557.        game_on_60.LS++
  558.        game_on_100.LS++
  559.        game_on_custom.LS++
  560.    } else if (multiplier < game_on_15.target) {
  561.        game_on_2_36.LS = 0
  562.        game_on_4_72.LS = 0
  563.        game_on_9_44.LS = 0
  564.        game_on_15.LS++
  565.        game_on_30.LS++
  566.        game_on_60.LS++
  567.        game_on_100.LS++
  568.        game_on_custom.LS++
  569.    } else if (multiplier < game_on_30.target) {
  570.        game_on_2_36.LS = 0
  571.        game_on_4_72.LS = 0
  572.        game_on_9_44.LS = 0
  573.        game_on_15.LS = 0
  574.        game_on_30.LS++
  575.        game_on_60.LS++
  576.        game_on_100.LS++
  577.        game_on_custom.LS++
  578.    } else if (multiplier < game_on_60.target) {
  579.        game_on_2_36.LS = 0
  580.        game_on_4_72.LS = 0
  581.        game_on_9_44.LS = 0
  582.        game_on_15.LS = 0
  583.        game_on_30.LS = 0
  584.        game_on_60.LS++
  585.        game_on_100.LS++
  586.        game_on_custom.LS++
  587.    } else if (multiplier < game_on_100.target) {
  588.        game_on_2_36.LS = 0
  589.        game_on_4_72.LS = 0
  590.        game_on_9_44.LS = 0
  591.        game_on_15.LS = 0
  592.        game_on_30.LS = 0
  593.        game_on_60.LS = 0
  594.        game_on_100.LS++
  595.        game_on_custom.LS++
  596.    } else if (multiplier < game_on_custom.target) {
  597.        game_on_2_36.LS = 0
  598.        game_on_4_72.LS = 0
  599.        game_on_9_44.LS = 0
  600.        game_on_15.LS = 0
  601.        game_on_30.LS = 0
  602.        game_on_60.LS = 0
  603.        game_on_100.LS = 0
  604.        game_on_custom.LS++
  605.    } else {    // Win/Reset for all
  606.        game_on_2_36.LS = 0
  607.        game_on_4_72.LS = 0
  608.        game_on_9_44.LS = 0
  609.        game_on_15.LS = 0
  610.        game_on_30.LS = 0
  611.        game_on_60.LS = 0
  612.        game_on_100.LS = 0
  613.        game_on_custom.LS = 0
  614.    }
  615. }
  616. function Summary(streak_count) {
  617.    engine.log(`Game ended in size of ${streak_count} streak`)
  618.    STREAK_ROLL = 0
  619. }
  620. function betSize(bet) {
  621.    return Math.round((bet * 100) / 100) * 100
  622. }
  623. async function updateLog() {
  624.    engine.clearLog()
  625.    engine.log(`Rolls: ${TOTAL_BETS} Seed: ${nonce}/${change_seed_next} last run ${last_strategy}`)
  626.    engine.log(stats_show() + `Profit: ${PROFIT.toFixed(2)}`)
  627. }
  628.  
  629. function stats_show() {
  630.    let output = ""
  631.    if (game_on_2_36.game_2_36_enabled == true) {
  632.        engine.log(`${game_on_2_36.target.toFixed(2)}x: multiplier ${game_on_2_36.multiplier.toFixed(5)}, PROFIT: ${game_on_2_36.PROFIT.toFixed()}, run ${game_on_2_36.RUNS} times.`)
  633.        output = output + `${game_on_2_36.target.toFixed(2)}: ${game_on_2_36.LS}/${game_on_2_36.STW} | `
  634.    }
  635.    if (game_on_4_72.game_4_72_enabled == true) {
  636.        engine.log(`${game_on_4_72.target.toFixed(2)}x: multiplier ${game_on_4_72.multiplier.toFixed(5)}, PROFIT: ${game_on_4_72.PROFIT.toFixed()}, run ${game_on_4_72.RUNS} times.`)
  637.        output = output + `${game_on_4_72.target.toFixed(2)}: ${game_on_4_72.LS}/${game_on_4_72.STW} | `
  638.    }
  639.    if (game_on_9_44.game_9_44_enabled == true) {
  640.        engine.log(`${game_on_9_44.target.toFixed(2)}x: multiplier ${game_on_9_44.multiplier.toFixed(5)}, PROFIT: ${game_on_9_44.PROFIT.toFixed()}, run ${game_on_9_44.RUNS} times.`)
  641.        output = output + `${game_on_9_44.target.toFixed(2)}: ${game_on_9_44.LS}/${game_on_9_44.STW} | `
  642.    }
  643.    if (game_on_15.game_15_enabled == true) {
  644.        engine.log(`${game_on_15.target.toFixed(2)}x: multiplier ${game_on_15.multiplier.toFixed(5)}, PROFIT: ${game_on_15.PROFIT.toFixed()}, run ${game_on_15.RUNS} times.`)
  645.        output = output + `${game_on_15.target.toFixed()}: ${game_on_15.LS}/${game_on_15.STW} | `
  646.    }
  647.    if (game_on_30.game_30_enabled == true) {
  648.        engine.log(`${game_on_30.target.toFixed(2)}x: multiplier ${game_on_30.multiplier.toFixed(5)}, PROFIT: ${game_on_30.PROFIT.toFixed()}, run ${game_on_30.RUNS} times.`)
  649.        output = output + `${game_on_30.target.toFixed()}: ${game_on_30.LS}/${game_on_30.STW} | `
  650.    }
  651.    if (game_on_60.game_60_enabled == true) {
  652.        engine.log(`${game_on_60.target.toFixed(2)}x: multiplier ${game_on_60.multiplier.toFixed(5)}, PROFIT: ${game_on_60.PROFIT.toFixed()}, run ${game_on_60.RUNS} times.`)
  653.        output = output + `${game_on_60.target.toFixed()}: ${game_on_60.LS}/${game_on_60.STW} | `
  654.    }
  655.    if (game_on_100.game_100_enabled == true) {
  656.        engine.log(`${game_on_100.target.toFixed(2)}x: multiplier ${game_on_100.multiplier.toFixed(5)}, PROFIT: ${game_on_100.PROFIT.toFixed()}, run ${game_on_100.RUNS} times.`)
  657.        output = output + `${game_on_100.target.toFixed()}: ${game_on_100.LS}/${game_on_100.STW} | `
  658.    }
  659.    if (game_on_custom.game_custom_enabled == true) {
  660.        engine.log(`${game_on_custom.target.toFixed(2)}x: multiplier ${game_on_custom.multiplier.toFixed(5)}, PROFIT: ${game_on_custom.PROFIT.toFixed()}, run ${game_on_custom.RUNS} times.`)
  661.        output = output + `${game_on_custom.target.toFixed()}: ${game_on_custom.LS}/${game_on_custom.STW} | `
  662.    }
  663.    return output
  664. }
  665.  
  666. /**
  667. * Generating new seed pair for client and hash server.
  668. */
  669. async function generateSeed() {
  670.    try {
  671.        const { server_seed_hash } = await engine.newSeedPair()
  672.        engine.log(`Server hash: ${server_seed_hash}`)
  673.    }
  674.    catch (e) {
  675.        engine.log(`Seed is already was reset`)
  676.    }
  677.    try {
  678.        const clientSeed = randomSeed()
  679.        await engine.setClientSeed(clientSeed)
  680.        engine.log(`Seed was set to: ${clientSeed}`)
  681.    }
  682.    catch (e) {
  683.        engine.log(`Client seed already is used`)
  684.    }
  685. }
  686. /**
  687. * Returns a random word for seed generation.
  688. */
  689. function randomSeed() {
  690.    const words = [ 'aAld5hedfra ', 'aBravfhfd5n ', 'aCh5adrfdlik ', 'aDelf5fhadgo ', 'aZefchf5hso ', 'aFordfehxft5romb ', 'aHoth5felshsa ', 'aGndhomfu5s ', 'aAddd5ihfc6ted ', 'aAu5dh6frelia ', 'aZif56dgalo ', 'aWiverm66fdda ',
  691.        'aMarid5dfnher ', 'aOctoberdd5ffhfest ', 'aNd5adfshcar ', 'aPdd5affhpaja ', 'aAlbfehf5dds ', 'aGfohfdm5us ', 'aFihfrra ', 'aGT5hdffdO ', 'aUn5dhicofrn ', 'aVicdnfht5us ', 'aShif5dski ', 'aXda6vf5ier ', 'aPoid66upflddet ', 'aAdntu66tdssfulika ' ]
  692.  
  693.    return words[ Math.floor(words.length * Math.random()) ] + words[ Math.floor(words.length * Math.random()) ] + words[ Math.floor(words.length * Math.random()) ]
  694. }
  695. /**
  696. * Play sound peak.
  697. */
  698. async function gong() {
  699.    const audio = new Audio("https://bustadice.com/5bb187b7ef764e76fb519939f77288c1.mp3")
  700.    if (game_sounds != false) { await audio.play() }
  701.    return new Promise(resolve => audio.onended = resolve)
  702. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement