initialBetSize = balance/2000
initialChance = 98
conditiondiv=balance/1000
bethigh = true;
strategy = {
label="ezroy_awager_98%_2000_1000div",
blocks={
{
id="T3-hCPsb",
type="bets",
on={
type="every",
value=1,
betType="win",
profitType="profit"
},
Do={
type="resetAmount",
value=0
}
},
{
id="FRW9UUYD",
type="bets",
on={
type="every",
value=1,
betType="win",
profitType="profit"
},
Do={
type="resetWinChance",
value=0
}
},
{
id="4BaCWkj5",
type="bets",
on={
type="every",
value=3,
betType="win",
profitType="profit"
},
Do={
type="switchOverUnder",
value=0
}
},
{
id="Hjsjc-y1",
type="bets",
on={
type="every",
value=6,
betType="win",
profitType="profit"
},
Do={
type="switchOverUnder",
value=0
}
},
{
id="gGxBLqdD",
type="bets",
on={
type="firstStreakOf",
value=3,
betType="win",
profitType="profit"
},
Do={
type="switchOverUnder",
value=0
}
},
{
id="gDgIN-qY",
type="bets",
on={
type="every",
value=1,
betType="lose",
profitType="profit"
},
Do={
type="setWinChance",
value=52.5
}
},
{
id="Ztz6Cts6",
type="profit",
on={
type="greaterThan",
value=conditiondiv,
betType="bet",
profitType="loss"
},
Do={
type="increaseByPercentage",
value=55
}
},
{
id="0CFeMqur",
type="bets",
on={
type="firstStreakOf",
value=1,
betType="lose",
profitType="profit"
},
Do={
type="increaseByPercentage",
value=100
}
},
{
id="W_Fc7lTv",
type="bets",
on={
type="firstStreakOf",
value=5,
betType="lose",
profitType="profit"
},
Do={
type="increaseByPercentage",
value=25
}
},
{
id="CjS6apOQ",
type="bets",
on={
type="firstStreakOf",
value=6,
betType="lose",
profitType="profit"
},
Do={
type="increaseByPercentage",
value=15
}
},
{
id="zVTctleW",
type="bets",
on={
type="firstStreakOf",
value=4,
betType="lose",
profitType="profit"
},
Do={
type="increaseByPercentage",
value=5
}
},
{
id="QozVCCfx",
type="bets",
on={
type="every",
value=50,
betType="bet",
profitType="profit"
},
Do={
type="switchOverUnder",
value=0
}
},
{
id="-FT6SP5S",
type="bets",
on={
type="firstStreakOf",
value=3,
betType="lose",
profitType="profit"
},
Do={
type="increaseWinChanceBy",
value=1.51
}
},
{
id="zuzbNMUC",
type="bets",
on={
type="firstStreakOf",
value=2,
betType="lose",
profitType="profit"
},
Do={
type="increaseWinChanceBy",
value=3
}
}
},
isDefault=false
}
-- resetstats(); -- you may want to enable this
-- end of edition area
MIN_CHANCE = 0.01
MAX_CHANCE = 98.00
nextbet = initialBetSize
chance = initialChance
printf = function(s, ...)
return print(string.format(s, ...))
end
printf('Launching strategy "%s"', strategy.label)
function isMatching(conditionType, conditionsOn)
variableToUse = 0
if (conditionType == "bets") then
if (conditionsOn.betType == "bet") then
variableToUse = bets
elseif (conditionsOn.betType == "win") then
if (not win) then
return false
end
if (conditionsOn.type == "every") then
variableToUse = wins
else
variableToUse = currentstreak
end
elseif (conditionsOn.betType == "lose") then
if (win) then
return false
end
if (conditionsOn.type == "every") then
variableToUse = wins
else
variableToUse = -currentstreak
end
else
printf('error in conditions, not recognized condition bet type "%s"', conditionsOn.betType)
stop()
end
if (conditionsOn.type == "every" or conditionsOn.type == "everyStreakOf") then
return (variableToUse % conditionsOn.value == 0)
elseif (conditionsOn.type == "firstStreakOf") then
return (variableToUse == conditionsOn.value)
elseif (conditionsOn.type == "streakGreaterThan") then
return (variableToUse > conditionsOn.value)
elseif (conditionsOn.type == "streakLowerThan") then
return (variableToUse < conditionsOn.value)
else
printf('error in conditions, not recognized condition on type "%s"', conditionsOn.type)
stop()
end
else -- 'profit'
if (conditionsOn.profitType == "balance") then
variableToUse = balance
elseif (conditionsOn.profitType == "loss") then
variableToUse = -profit
elseif (conditionsOn.profitType == "profit") then
variableToUse = profit
else
printf('error in conditions, not recognized condition on profitType "%s"', conditionsOn.profitType)
stop()
end
if (conditionsOn.type == "greaterThan") then
return (variableToUse > conditionsOn.value)
elseif (conditionsOn.type == "greaterThanOrEqualTo") then
return (variableToUse >= conditionsOn.value)
elseif (conditionsOn.type == "lowerThan") then
return (variableToUse < conditionsOn.value)
elseif (conditionsOn.type == "lowerThanOrEqualTo") then
return (variableToUse <= conditionsOn.value)
else
printf('error in conditions, not recognized condition on type "%s"', conditionsOn.type)
stop()
end
end
end
function execute(doAction)
if (doAction.type == "increaseByPercentage") then
nextbet = nextbet * (1 + (doAction.value / 100))
elseif (doAction.type == "decreaseByPercentage") then
nextbet = nextbet * (1 - (doAction.value / 100))
elseif (doAction.type == "increaseWinChanceBy") then
chance = chance * (1 + (doAction.value / 100))
elseif (doAction.type == "decreaseWinChanceBy") then
chance = chance * (1 - (doAction.value / 100))
elseif (doAction.type == "addToAmount") then
nextbet = nextbet + doAction.value
elseif (doAction.type == "subtractFromAmount") then
nextbet = nextbet - doAction.value
elseif (doAction.type == "addToWinChance") then
chance = chance + doAction.value
elseif (doAction.type == "subtractFromWinChance") then
chance = chance - doAction.value
elseif (doAction.type == "setAmount") then
nextbet = doAction.value
elseif (doAction.type == "setWinChance") then
chance = doAction.value
elseif (doAction.type == "switchOverUnder") then
bethigh = not bethigh
elseif (doAction.type == "resetAmount") then
nextbet = initialBetSize
elseif (doAction.type == "resetWinChance") then
chance = initialChance
elseif (doAction.type == "stop") then
stop()
else
print('error in conditions,not recognized action type "%s"', doAction.type)
stop()
end
end
function dobet()
printf('Playing Strategy "%s"', strategy.label)
for i, condition in ipairs(strategy.blocks) do
if (isMatching(condition.type, condition.on)) then
print(string.rep('°',33))
printf('"%s" ', condition.type)
for k,v in next,condition.on do print(k,v)end
print(string.rep('-',33))
for k,v in next,condition.Do do print(k,v)end
printf(string.rep('*',33))
printf('nextbet "%.8f" ', nextbet)
print(string.rep('°',33))
print(string.rep('\r\x0a',5))
execute(condition.Do)
end
end
chance = math.min(math.max(chance, MIN_CHANCE), MAX_CHANCE)
end