Check out the new moneypot app I'm working on!
DICE.SEUNTJIE.COM

The new app is unfortunately not yet supported in DiceBot, but will soon be.

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:Random Chance 1-5
Uploaded by: seuntjie
Discription:
Bets at a random chance between 1 and 5% and increases with 10% on a loss





CommentsLogin or Register
paluy03:10:2016 07:15
Seuntjie

How to making script to close if target reach ( need add target this script)

-------------------------------
chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
   bethigh = !bethigh
else
   nextbet = previousbet * 1.1
end

end
--------------------


Regards on yuor advise
    Login or Register
LeSkyrunner01:01:2018 18:23
Hi Seuntjie. How could I insert a random chance in this script:

chance = 45

winbets = {.00000002,
           .00000004,
           .00000008,
           .00000016,
           .00000032,
           .00000064,
           .00000128,
           .00000256,
           .00000512,
           .00001024,
           .00002048,
           .00004096}
maxbets = #winbets                  
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = 1
go = false
set = false


function dobet()

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end 

if (win) then
   wincount += 1
   totallose = 0 
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = winbets[nextwinbet]
     go = false
      set = false
  else
      nextbet = basebet
  end
   if (wincount == 2 and previousbet != basebet) then 
      if (stopnow) then stop() end
        nextwinbet = 1   
        set = true
       losecount = 0
      if (balance > targetbalance) then 
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then 
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end
    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then 
      nextwinbet += 1
      if (nextwinbet > maxbets) then stop() end
      losecount += 1
      print(losecount)
   else
      
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
  
end
    Login or Register