Post
Topic
Board Gambling discussion
Re: Seuntjie' Dice bot programmers mode discussion.
by
haybee191
on 03/08/2017, 12:25:05 UTC
hello, thanks for your help, but the code still needs a bit of work, it enters the pause mode after just 3 attempts at 33.33 instead of 5 attempts, can you please help me to rectify this, so i can resume testing. thanks a lot for your help
You'll want to include a paused "flag" and a loss counter...  so, if there is a "win", you reset the lossCount back to 0... if a "loss" AND chance == 33.33 then you increment it by 1. When the counter gets to 5, you set the flag to true and use that condition to specify the betsize = 0.00000001

I assume when you say that "it resumes from the previous level" that you want it to store the old bet amount from where it paused... and then use that once it starts betting again?


NOTE: this code is UNTESTED
Code:
chance = 81.12
bethigh = true
basebet = 0.00000031
nextbet = basebet
losscount = 0
oldbet = 0
paused = false

function dobet()

  if win then
    if paused then
      losscount = 0
      paused = false
      nextbet = oldbet * 1.59738 -- resume betting at previous level
    else
      chance = 81.12
      nextbet = basebet
    end

  else
    if chance == 33.33 then
      losscount = losscount + 1
      if losscount == 5 then
        paused = true
        nextbet = 0.00000001
        oldbet = previousbet -- save the current bet for resuming later
      elseif losscount > 5 then
        paused = true
        nextbet = 0.00000001
      else
        nextbet = previousbet * 1.59738
      end
    
    else
      chance = 33.33
      nextbet = basebet/3.3
    end

  end

end