Post
Topic
Board Gambling
Re: DiceBot (Martingale, Labouchere) for Just-Dice, PRC, 999dice and safedice
by
seuntjie
on 17/03/2015, 07:39:05 UTC
Hi. In v3 b8, how do I set a percentage of balance bets in a martingale?

Thanks!

There isn't a specific setting to set your starting bet for martingale based on a percentage of your balance. Here's a little lua script that should be able to do it in programmer mode:

Code:
function dobet()
if (win) then
nextbet=balance*(percentage/100.0)
else
nextbet = previousbet *2
end
end

To use this script, set the bot to use programmer mode,
Copy and paste this script into the code box.
either replace percentage in the script by the percentage you want, or, in the console execute: percentage = 0.0005
   or whatever percentage you want to set it to
then, in the console, execute start() to start the bot, and stop() to stop the bot.

I tried the script and it creates the initial bet based on the percentage setting.
When it loses, it follows the "nextbet = previousbet *2"
however after it wins, the initial bet starts off at "0" instead of the percentage of the bet.

How do I fix this?

Thanks again.

I found a bug yesterday that causes the balance to be sent through as 0 to the lua environment, It's been fixed but you'll need to wait a few days before i can release the build, I've got some other fixes and features to finish before i can release.