Hello Guest

# how can I do this?

• 1 Replies
• 151 Views

#### Gustafff

• 10
• +1/-0
##### how can I do this?
« on: July 05, 2019, 05:03:58 pm »
prevbet = 0.00000001
lostcount = 0
wincount = 0
nextbet = 0
chance = 29
bethigh = false
cnt = 0

function dobet()
cnt += 1

if win then
wincount += 1

if lastBet.Amount > 0 then
prevbet = balance/10000
end
if wincount == 1 then last_lc = lostcount end
nextbet = 0
lostcount = 0
else
lostcount += 1
if lostcount >= last_lc-1 and lostcount <= last_lc+1  then

nextbet = prevbet * 1.55
My bet by 1.55 bet I need every 3 roll my double bet (x2 every 3 losses) but I also need to bet by this same script when the current previous streak repeats

if profit> 1 back to base bet
no matter if I win, I just want it back when the profit is greater than 1
1 1 1 2 2 2 4 4 4 8 8 8 16 16 16 .... until you reach peofit> 1, but bet only when the currentstreak equals
prevbet = nextbet
else
nextbet = 0
end
wincount = 0
end

if cnt%100 == 0 then
print( "cnt = " .. cnt .. " bal = " .. balance)
end
end

#### Anakyl

• 12
• +1/-0
##### Re: how can I do this?
« Reply #1 on: July 07, 2019, 06:08:18 pm »
I do not understand your case clearly what's define "profit" here? is it total profit? or what? Take a look at simple code below, maybe you can change to fit your requirement.

Code: [Select]
`base = 0.0000001nextbet = basechance = 29counter = 0totalProfit = 0currentprofit = 0bethight = falsefunction dobet() totalProfit += currentprofit if (win) then -- Do something else counter += 1 if counter%3 == 0 then nextbet = previousbet * 2 else nextbet = previousbet end end if totalProfit > 1 then nextbet = base end end`