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

HelloWorld Lua

This document contains a script written in JavaScript for a dice betting bot. It defines variables to track the balance, target amount, limit, base bet, and next bet. Functions are included to simulate bets, calculate chances, update bets and payouts after wins and losses, and print simulation information.

Uploaded by

cpuamd fx6100
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)
97 views3 pages

HelloWorld Lua

This document contains a script written in JavaScript for a dice betting bot. It defines variables to track the balance, target amount, limit, base bet, and next bet. Functions are included to simulate bets, calculate chances, update bets and payouts after wins and losses, and print simulation information.

Uploaded by

cpuamd fx6100
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

--[[Nigerian Princess

wagering script by Ghostnipple


This script was written in javascript for Mydicebot which is a fork of Dicebot
--]]

balance = 1500
target = balance*1.25
limite = balance*0.25
basebet = 0.5;
bethigh = false;
nextbet = basebet;

pr = 0 --memorizes profit/progression
prinitiale = pr
frequence_affichage = 1000 --displays simulation info every 100 bets for example

initBet = basebet;
initPay = 10; --this is starting payout target.
betIncrease = 0.08; --this is what is added to the base bet on each loss, it is
not a percentage value.
payDecrease = 1; --this is the decreasing payout amount, it is not a percentage
value.

currentBet = initBet;
currentPayout = initPay;

function getChance(multiplier)
return 100 / multiplier;
end

chance = getChance(10);
bb = nextbet;
bbDB = bb;
startbank = balance;

function simuInfo()
print("#=========================================#")
print(" #---===--- BlindHoodFibo! ---===---# ")
print("#=========================================#")
print("# [Startbalance = " ..string.format("%9.8f", startbank) .. " ]-")
print("# [Basebet = " ..string.format("%9.8f", bbDB) .. " ]-")
print("#=========================================#")
print("# [Chance: " ..string.format("%9.8f", chance) .. " ]-")
print("# [nextbet: " ..string.format("%9.8f", nextbet) .." ROLL n°
" ..bets .." ]-")

print("#---------------------------------------------------------------------------
-------#")
print("# [profit: " ..string.format("%9.8f", profit) .." (balance
x" ..string.format("%2.2f",((balance)/(startbank))) ..") ]-")
print("# [Max bet wager used: " ..string.format("%9.8f", maxUse) .. " ]-")
print("# [wagered: " ..string.format("%9.8f", wagered) .."
(" ..string.format("%2.2f",wagered/(startbank)) .." x start balance) ]-")
print("# [Avg profit/bet: " ..string.format("%9.8f", profit/bets/bbDB) .." x
base bet ]-")
print("# [Avg wag/bet: " ..string.format("%9.8f", wagered/bets) .." ]-")
--print("# [PROFIT MAX= " ..bestID .." ]-")
--print("# [PERTE MAX= " ..badID .." ]-")
print("#=========================================#\n\n\n")
end

perteP = 0
p = false
maxUse = 0
bestID,badID,pirePERTE,bestPROFIT=0,0,0,0
function calculPrint()
if p == true then
--print(balance)
print(chance)
print(nextbet)
print(coef)
end

perteP +=currentprofit
if perteP >= 0 then perteP = 0 end

if -perteP + nextbet > maxUse then maxUse = -perteP + nextbet end

if bets%frequence_affichage==0 then
simuInfo()
end

if currentprofit >= bestPROFIT then


bestID = lastBet.id
bestPROFIT = currentprofit
end

if currentprofit <= pirePERTE then


badID = lastBet.id
pirePERTE = currentprofit
end
end

function limiteSTOP(target,limite)
if balance > target then
simuInfo()
print("TARGET REACHED !!!!!!!!!!!!!!")
stop()
elseif balance-nextbet < limite then
simuInfo()
print(".............................")
stop()
end
end

function dobet()
pr +=currentprofit
if (win) then
currentBet = basebet;
currentPayout = initPay;
else
currentBet = currentBet + betIncrease;
currentPayout = currentPayout - payDecrease;
end
nextbet = currentBet;
chance = getChance(currentPayout);
--print("Target: "..currentPayout.."x".. " | ".."Outcome: "..round(100 /
lastBet.Roll, 2).."x");

limiteSTOP();
calculPrint();
end

function round(number, decimals)


dec = decimals - 1;
dec2 = 10 / (10 * dec);
output = number - ((number * 100) % dec2) / 100;
return output;
end

You might also like