Skip to content

Instantly share code, notes, and snippets.

@XclusiveDigital
Last active May 7, 2020 00:28
Show Gist options
  • Save XclusiveDigital/965493dc88f092ad996f47a582a0ed94 to your computer and use it in GitHub Desktop.
Save XclusiveDigital/965493dc88f092ad996f47a582a0ed94 to your computer and use it in GitHub Desktop.
DIcebot: CMH with Random Skips
function betSize(num)
return (10 ^ math.floor((math.log(num))/(math.log(10))))
end
function initiate()
balDiv = 100000
houseEdge = 1
baseBet = balance/balDiv -- betSize(balance/balDiv)
currBet = baseBet
minPayout = 2.01
maxPayout = 6.05
incPayout = 1.01
startBR = balance
nextbet = currBet
currPayout = minPayout
currProf = 0
end
initiate()
startingBalance = balance
currBet = baseBet
currPayout = minPayout
startBR = balance
nextbet = currBet
chance = 99/currPayout
currProf = 0
bethigh = true
houseMinBet = 0.00000001
resetstats()
resetseed()
skips = math.random(10,25)
skipping = true
function getPayout()
return tonumber(string.format("%.2f",(100 - houseEdge) / chance))
end
function randomizer()
r=math.random(2)
if r == 1 then
bethigh=true
else
bethigh=false
end
end
function dobet()
if (skipping) then
if (win) then
skips = skips - 1
if (skips == 0) then
skipping = false
end
end
else
if (win) then
currBet = baseBet
currProf = currProf + (previousbet * (getPayout() - 1))
currPayout = minPayout
else
currPayout = currPayout + incPayout
if (currPayout > maxPayout) then
currBet = currBet * (maxPayout / incPayout)
currPayout = minPayout
skipping = true
skips = math.random(10,25)
print("Skipping. Going to wait for " .. skips .. " wins before continuing")
end
currProf = currProf - previousbet
end
if (currProf > 0) then
initiate()
end
if (currBet >= baseBet*5000) then
print("Reset")
resetseed()
initiate()
end
end
if (skipping) then
chance = 97
nextbet = houseMinBet
print("Skipping: " .. skips)
else
chance = tonumber(string.format("%.2f",(100 - houseEdge)/currPayout))
nextbet = currBet
print("Nextbet: " .. string.format("%.8f",nextbet) .. " | Payout: " .. getPayout() .. " | Balance: " .. string.format("%.8f",balance) .. " Profit: " .. string.format("%.8f",balance-startingBalance))
end
randomizer()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment