nextbet=baseBet
else
nextbet=baseBet
end
Programming works from TOP DOWN. That's the last thing in your script. So you do everything, then at the end you say
If you I win set my bet to base bet, but if I lose, set my bet to base bet.
So if you win, what is your bet going to be?
If you lose, what is your bet going to be?
When is your bet going to be something else?
okay i get but have set it already ....
or do i need to put the amount again?
e.g
if win then
nextbet=0.00000001
else
nextbet=0.00000001
end
what am trying to do is to let the bet reset to basebet there back at the end of my last 95%chance bet (incase if i win or not)
hope am right sir
That's where your getting confused. The Bot doesn't bet and jump around in the dobet function. EVERY bet goes through the whole dobet function.
So, with those statements at the end of the function, EVERY time a roll is made the last thing your going to do, before the next roll, is set nextbet to .00000001. Here is an incomplete example.
nextbet = basebet
function dobet()
if win then
nextbet= basebet
else
nextbet = prevoiusbet * 2
if currentstreak == -10 then
chance = 92
nextbet = 57
bethigh = true
end
end
this creates and set the variable basebet to .00000001
and then sets the built in variable (nextbet) to the value of basebet
it just defines the dobet function at this time. It doesn't run just yet.
The bot gets control back and communicates with the dice site and does it's first roll.
when it gets the results back it calls the dobet function.
for this script, if the bet won, it sets nextbet to basebet and ends (returns to the bot for the next roll)
if the roll lost it takes the else path, it always sets the nextbet to the last bet * 2. it then checks the currentstreak built in
and if it's -10 (10 loses) it sets the chance, nextbet and bethigh. and goes back to the bot, if the currentstreak was not equal to
-10 it just ended and returned for the next roll. Note it doesn't change chance or bethigh.
You could add additional if statements at the end to check for other loss streaks and set things as you want, and as the last one make it
if currentstreak > -X then
and always reset stuff.
Don't code ==-15 because you could end up in the code with the currentstreak = -16.... or -17 if you have really bad luck.