Bitcoin Forum
May 25, 2024, 04:00:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: July 10, 2017, 07:08:30 AM
Scripts on win do not return to start chance1 new

Code:
chance1=47
chance2=49.5         
chance3=52.95         
chance4=95           
chance5=66.58
chance6=95

prebet = 0.001

m1=2
m2=2.5
m3=20.5
m4=2.5
m5=20.5
target=11000

nextbet = prebet
losecount = 0
betcount = 0
bethigh=false
wincount=0
highloss=0
totalloss=0
total=0
avehit=0
counter=0



function dobet()
 if win then
        nextbet = prebet
        wincount+=1
        total+=1
        totalloss+=losecount
        avehit=totalloss/total
        losecount = 0
        betcount += 1

        if profit>target then
stop()
print("TARGET REACHED!")
        end

   else

         losecount += 1
         betcount += 1
         nextbet = prebet

   end

if losecount > highloss then
highloss = losecount
end

   if (losecount > 0) then
chance = chance1
      nextbet = previousbet*m1
   end

   
   if (losecount > 1) then
chance = chance2
      nextbet = previousbet*m2

   end

   if (losecount > 2) then
chance = chance3
      nextbet = previousbet*m3
   end

 if (losecount > 3) then
chance = chance4
      nextbet = previousbet*m4

   end

 if (losecount > 4) then
chance = chance5
      nextbet = previousbet*m5

   end

 if (losecount > 5) then
chance = chance6
      nextbet = previousbet*m6

   end
    end
 end
end
2  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: June 21, 2017, 02:15:18 PM
I want to add a function when x is lost, add a bet.

Code:
basebet=0.1
bchance=93
chance=bchance
nextbet=basebet
maxbet=100
minbet=100
maxchance=93
minchance=93
randomc=100

function dobet()
bethigh= math.random(0,1000)%2==0
x=math.random(0,10000)
if x < randomc then
nextbet = math.random(minbet,maxbet)
chance=math.random(minchance*100,maxchance*100)/100
else
nextbet = basebet
chance=bchance
end
end
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!