# Seuntjies DiceBot

## DiceBot => Programmer Mode => Topic started by: assword on January 19, 2021, 07:57:41 pm

Title: trying a script that changes multiplier 5 times and chance 5 times depending...
Post by: assword on January 19, 2021, 07:57:41 pm
Hi,
I'm trying to write a script for a strategy I can't do just using Advanced tab.
What I'm trying to accomplish:
I want to gradually increase betting chance and betting multiplier depending on how many losses I've accumulated before hitting a pre-determined winning streak. My bet is that I'll reach a max of 5 wins in a row (depends on chance at the time) before a max of 15 total losses.

First three losses without one win depend on Multiplier(A) and Chance(A)
Next three losses without two wins in row depends on Multiplier(B) and Chance(B)
Next three losses without three wins in row depends on Multiplier(C) and Chance(C)
Next three losses without four wins in row depends on Multiplier(D) and Chance(D)
Next three losses without five wins in row depends on Multiplier(E) and Chance(E)
Reset or stop if 15 losses happen before 5 wins in a row.

Here's my code:
Code: [Select]
`chance=79.2chanceb=82.5chancec=86.08chanced=90chancee=94.28baseBet=0.00000004multipleA=6multipleB=3.3334multipleC=2.5multipleD=2.2multipleE=2bethigh=truefunction dobet() if win then nextbet=baseBet else nextbet=previousbet*multipleA end if currentstreak==1 then nextbet=baseBet else if losses==-1 then nextbet=previousbet*multipleA end if currentstreak==1 then nextbet=baseBet else if losses==-2 then nextbet=previousbet*multipleA end if currentstreak==1 then nextbet=baseBet else if losses==-3 then chance=chanceb nextbet=previousbet*multipleB end if currentstreak==2 then nextbet=baseBet else if losses==-4 then nextbet=previousbet*multipleB end if currentstreak==2 then nextbet=baseBet else if losses==-5 then nextbet=previousbet*multipleB end if currentstreak==2 then nextbet=baseBet else if losses==-6 then chance=chancec nextbet=previousbet*multipleC end if currentstreak==3 then nextbet=baseBet else if losses==-7 then nextbet=previousbet*multipleC end if currentstreak==3 then nextbet=baseBet else if losses==-8 then nextbet=previousbet*multipleC end if currentstreak==3 then nextbet=baseBet else if losses==-9 then chance=chanced nextbet=previousbet*multipleD end if currentstreak==4 then nextbet=baseBet else if losses==-10 then nextbet=previousbet*multipleD end if currentstreak==4 then nextbet=baseBet else if losses==-11 then nextbet=previousbet*multipleD end if currentstreak==4 then nextbet=baseBet else if losses==-12 then chance=chancee nextbet=previousbet*multipleE end if currentstreak==5 then nextbet=baseBet else if losses==-13 then nextbet=previousbet*multipleE end if currentstreak==5 then nextbet=baseBet else if losses==-14 then nextbet=previousbet*multipleE end if currentstreak==5 then nextbet=baseBet else if losses==-15 then nextbet=previousbet*multipleE end if currentstreak==5 then nextbet=baseBet end end`
Here's a spreadsheet version of the strategy if my words are confusing.

This is my first script and I'm pretty basic in my coding skills :)

Are there variables I'm missing?
Is there a way to test this (simulate)?
Am I using the variables right and at the right time?