Post
Topic
Board Gambling discussion
Re: Seuntjie' Dice bot programmers mode discussion.
by
HCP
on 21/03/2017, 00:54:16 UTC
Thanks for your explanation Wink I do understand it. However, is it still possible to program the bot so when a streak of 6 reds happend, and let's stay you win on the 7th, the bot will automatically set the lossstartmult to, let's say, 4?

Maybe seuntjie or some expert programmer might know it? So far i've been playing that way for days and i'm just betting small amounts, so it will need to be a 20'ish red streak at 60% to happen to bust me and it's working pretty well.
Of course it is possible. You just need to create a variable to track your current loss streak, so that when a win happens you can check it to see if it satisfies your requirements, and then sets the lossstartmult to whatever you want...

Code:
...
currLossStreak = 0
...
function dobet()

  if win then
    if currLossStreak >= 6 then
      lossstartmult = 4
    end
    currLossStreak = 0

    -- do other win stuff

  else
    currLossStreak += 1

    -- do other loss stuff
  end

end

Hopefully you follow the logic:

- Initialise currLossStreak to 0
- If the roll was a win, check to see if it was after a lossStreak of 6 (or more)... if it was, set lossstartmult. Reset currLossStreak to 0.
- If the roll was a loss, then increment the currLossStreak counter.


EDIT: Just remembered you'd actually posted your script earlier... you already have the lossCount variable... and the "if (!win)" section in your code... use those...

Code:
if (!win) then
  lossCount += 1
else
  if lossCount >= 5 then
    lossStartMult = 4
    -- you may also want to recalculate the maxLosses value that is set at start of script????
    -- maxLosses = lossStartMult + 5
    -- but I'm not 100% sure what you're trying to achieve with reseting the lossStartMult ;)
  end
  lossCount = 0
end