0% found this document useful (0 votes)
16 views3 pages

TopsDice Strat Dicebot

Uploaded by

healthwshop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

TopsDice Strat Dicebot

Uploaded by

healthwshop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- Seeks the top 6 chances over 1000 bets, then bets on those chances randomly

-- at a higher rate until threshold is met, then repeats. Threshold grows over
time
-- Seems slow at start, but will ramp up to a decent profit per hour.
resetstats()
resetseed()
-- Initialize variables

insanity = 1 --choolse insanity level for spiked bets :: 1=safest,


2=faster/riskier, 3=blazing/degenerate :)
--balance = 25 -- I define my balance for simulation
sbal = balance
checkbal = balance
div = 2e5
pdiv = 2e3
--minbet = 1e5 --0.00001011 -- This is my minbet, you can put yours or
use div
minbet = balance / div
basebet = minbet
nextbet = basebet
chance = math.random(12, 66)
markovMatrix = {} -- Markov Matrix for tracking bets
matrixSize = 1000
trackCount = 0
popped = 0
winCount = 0
profitMargin = minbet -- Small profit for recovery
highestBalance = balance
checkbal = balance -- Initialize checkbal with starting balance
isTracking = true
profitThreshold = checkbal / pdiv -- Initial profit threshold

-- Function to track stop conditions


stopLimit = 10
stopLoss = balance * (stopLimit / 100)
trailstop = sbal - stopLoss
function StopCheck()
if (balance <= trailstop) or ((balance - nextbet) <= trailstop) then
print("Stop Loss reached ")
print("\n\t gained \t: " .. string.format("%.8f", balance - sbal))
print("\t which is \t: " .. string.format("%.2f", (balance - sbal) /
(sbal / 100)) .. " %")
stop()
start()
end
if (balance - stopLoss) > trailstop then
trailstop = (balance - stopLoss)
end
end

-- Initialize the Markov Matrix with zeros


for i = 1, 100 do
markovMatrix[i] = {win = 0, loss = 0}
end

-- Function to update Markov Matrix


function updateMatrix(index, outcome)
if outcome == "win" then
markovMatrix[index].win = markovMatrix[index].win + 1
else
markovMatrix[index].loss = markovMatrix[index].loss + 1
end
end

-- Function to find top 6 chances with the highest win rates


function getTop12Chances()
local winRates = {}

-- Calculate win rates for each chance


for i = 24, 88.8 do
local wins = markovMatrix[i] and markovMatrix[i].win or 0
local losses = markovMatrix[i] and markovMatrix[i].loss or 0
local total = wins + losses

if total > 0 then


table.insert(winRates, {chance = i, winRate = wins / total})
end
end

-- Sort by win rate in descending order


table.sort(winRates, function(a, b) return a.winRate > b.winRate end)

-- Extract the top 3 chances


local top12 = {}
for i = 1, math.min(12, #winRates) do
table.insert(top12, winRates[i].chance)
end

return top12
end

-- Function to randomly select a chance from the top 3


function selectRandomTopChance()
local top12 = getTop12Chances()
if #top12 > 0 then
return top12[math.random(1, #top12)]
else
return math.random(24, 88.8) -- Fallback if no data
end
end

-- Main betting loop


function dobet()
if isTracking then
-- Tracking phase
trackCount = trackCount + 1
updateMatrix(math.floor(chance), (win and "win" or "loss"))

if trackCount >= matrixSize then


popped+=1
isTracking = false -- Stop tracking and switch to betting
nextbet = basebet --* 99.9 --12 --6 --3 --9 -- Adjust bet size
else
chance = math.random(24, 88.8) -- Continue with random chance
end
else
-- Betting based on top 3 chances
if win then
highestBalance = math.max(highestBalance, balance)
if insanity > 2 then
nextbet = previousbet * 1.2
elseif insanity > 1 then
nextbet = previousbet * (0.72 + (winCount * 0.1))
winCount+=1
else
nextbet = basebet
end
else
-- Recovery bet calculation
local recoveryTarget = highestBalance + profitThreshold --profitMargin
nextbet = (recoveryTarget - balance) / (chance / 100)
winCount = 0
end

-- Check if profit threshold is reached


if balance >= checkbal + profitThreshold then
isTracking = true -- Restart tracking phase
checkbal = balance -- Update checkbal to the new balance
profitThreshold = checkbal / pdiv
if profitThreshold > sbal / 63 then profitThreshold = sbal / 63 end
trackCount = 0 -- Reset tracking counter
nextbet = basebet -- Reset bet to basebet
chance = math.random(24, 88.8) -- Reset chance to random
else
-- Continue betting with top 3 chances
chance = selectRandomTopChance()
end
end

if nextbet < minbet then nextbet = minbet end


StopCheck()
end

You might also like