This site is being migrated to
https://gambler.bot with time.

LUA Scripts

Download a script for your bot, or upload your own to share with other users. Login or Register to upload

How do I use this?


Name:GSF Basebet with Wallet
Uploaded by: sanctoon
Discription:
Basebet calculated with a geometric sequence formula
based on your multiplier, chosen max losses and wallet size.
So basebet will always max out initial wallet after chosen number
of losses on set multiplier.

Basebet is calculated after every win
move the "basecalc = balance/(((1 - math.pow(m,lc))/(1-m))*w)"
line to the "if(wallet >= (walletOriginal * wsave))" part
to calculate basebet only after each wallet increase

Also features a fully fuctional wallet based on balance divided by
"w" (change as see fit) and Auto Withdrawls
Wallet is based wallet in "Proportional Betting with Soft Wallet and AutoWithdrawls" by redundantduck

Chance, multiplier and max losses are arbitrary values but 
have yielded overall good results personally(Change as seee fit)





CommentsLogin or Register
bobwood21:01:2019 05:49
[string "chunk"]:12: bad argument #1 to 'pow' (number expected, got nil)
    Login or Register
Gravityrun28:03:2019 05:47
Looks like he's not declaring the var's 1st leading to the nil returns. Moving the call for the basecalc below the vars like below should resolve the issue. 




------------Wallet Adrresses-------------------------
wBTC  = "set BTC address here"
wLTC  = "set LTC address here"
wETH  = "set ETH address here"
wDOGE = "set DOGE address here"
wBCH  = "set BCH address here"

wCUR = wDOGE   -- >>>Select Betting Currency<<<
-------------------------------------------------------

function sleep(n)
	t0 =  os.clock()
	while  os.clock() - t0 <= n do end
end



--- >>>>>>>>Changeable Values<<<<<<<<<<<<<
--- Change below values as needed, or keep as is ;)
w = 6           -- balance devider for wallet
lc = 501		-- number of losses to max out wallet -- >>>see basecalc<<<
m = 1.011		-- multiplier
ch1 = 0.99
ch2 = 0.99
chance = ch1
wsave = 1.5		-- wallet sise compared to walletOriginal to trigger wallet increase
				-- "wsave = 2" would mean wallet resets to new "balance/w" everytime wallet doubles
-----------------------------------------------------------------

-- >>fully fuctional wallet based on balance divided by "w" value set above<<
walletOriginal = balance/w   -- base wallet value to facilitate wallet increases
wallet = walletOriginal
printWallet = 0
walletIncreases = 0		-- times wallet has been increased to new "balance/w"
walletProgress = (wallet / (walletOriginal*wsave))*100
-------------------------------------------------------------------------------

-- >>>>>>>>>>>>BASECALC<<<<<<<<<<<<<<<<<
-- Basebet calculated with a geometric sequence formula
-- used your multiplier(m), max losecount(lc) and wallet
-- for base of formula.
-- So basebet or basecalc will always max out initial wallet after
-- chosen number of losses("lc" value below) on set multiplier("m" value below)

basecalc = balance/(((1 - math.pow(m,lc))/(1-m))*w)

base = basecalc
nextbet = base
betcount = 0
wincount = 0
losecount = 0
stoponwin=false
enablezz=true			-- set to false to use random high\low
sleep = 0				-- change to 1 to sleep for x seconds and reset script
						-- instead of stopping script when wallet bust

--set withdraw targets
withdrawamount = 4500   -- amount to withdraw
withdrawtarget = 10000	-- balance size to trigger withdrawal

function dobet()

if (printWallet > 7)
then
	printWallet = 0
	print("")
	print("Wallet Progress: "..string.format("%.2f",walletProgress))
	print("")
	print("Wallet = "..string.format("%.8f",wallet))
	print("")
	print("walletOriginal = "..string.format("%.8f",walletOriginal))
	print("")
	print("Wallet Level = "..walletIncreases)
	print("")
	if losecount >= 0 then print("Losecount: "..losecount) end
	print("")
else
	printWallet = printWallet + 1
end

-- Calculates new wallet value "balance/w"
if(wallet >= (walletOriginal * wsave))
then
	if(stoponwin) then stop() end
	walletOriginal = balance/w
	wallet = walletOriginal
	walletIncreases = walletIncreases + 1
	print("")
	print("Savings increased")
	resetstats();
	print("")
end

-- stop or reset script when wallet bust
if (wallet - nextbet) <=  0 then
	if sleep == 1 then
		print("")
		print(wallet)
		print("")
		print("Balance TO LOW!!!")
		print("")
		print("sleeping")
		print("")
		sleep(15)	--seconds to sleep can change to more or less
		walletOriginal = balance/w
		wallet = walletOriginal
		wincount = 0
		losecount = 0
		nextbet = base
		chance = ch1
		stoponwin = false
		walletIncreases = walletIncreases - 1
	else
		stop()
		print("")
		print(wallet)
		print("")
		print("Balance TO LOW!!!")
		print("")
		resetstats();
	end
end

--------------------Randomizer---------------------------------
r=math.random(1,2)
if (!enablezz) then
if r == 1 then
	bethigh = !bethigh
end
end

-- Unquote below for random reset seed, crashes on Primedice and Stake
--
--	s=math.random(111)
--	if s == 1 then
--	resetseed();
--	end

-----------------------------------------------------------------

if (win) then
	basecalc =  balance/(((1 - math.pow(m,lc))/(1-m))*w)  -- calculate new basebet after every win
	base = basecalc  									  -- calculate new basebet after every win
	wallet = wallet + currentprofit
	if(stoponwin) then stop() end
	wincount = wincount + 1
	losecount = 0
	nextbet = base
	chance = ch1
else
	wallet = wallet - previousbet
	losecount = losecount + 1
	wincount = 0
	nextbet = previousbet*m
	ccount = ccount + 1
end

-- Random High\Low after x losses --
if losecount >= 401 then
	bethigh = !bethigh
end

if losecount >= lc then
 	nextbet = 0
end

if nextbet >= wallet then
--	chance = ch2
	nextbet = wallet
end

if balance >= withdrawtarget then
--uncomment this line if you are sure the correct address is set.
	--withdraw(withdrawamount,wCUR)
	print(" ")
	print("CONTINUING TO WIN MORE!!!")
	print(" ")
end

end
    Login or Register
cryptomonkey18:06:2019 00:46
okie, what about this error?: 
[string "chunk"]:132: attempt to perform arithmetic on global 'ccount' (a nil value)
    Login or Register
Tomy4518:09:2020 10:22
Put above function dobet() this:

ccount = 0
    Login or Register
cryptomonkey18:06:2019 03:17
This comment has been removed.
    Login or Register