Bitcoin Forum
April 30, 2024, 02:53:39 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: June 16, 2020, 03:04:45 AM
Yes, you can do that... you'd just need to create a data structure that would store the results for you... I've done something similar before that stores values... simply use LUA "Tables" to store/lookup the results... https://www.tutorialspoint.com/lua/lua_tables.htm

Note that the downside is that depending on the size of the tables you're creating/updating, it can require significant "time" and "storage" penalties to do this and there is the potential to slow down your bot. Usually it's not a huge performance hit, but some people want/need 100's of bets/second type performance from the bot.

If that isn't that important to you... then what you want to do shouldn't be too difficult.

Thanks sir!
2  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: June 12, 2020, 04:53:34 PM
Hi

Il there a way to code something like that?

If average 20 last bet > 60
Then bet chance 50 bethigh= false

What I like to do is bet when I detect an unusual pattern and bet the opposite.

I'm not sure if the bot can track previous results and calculate average.

Thanks to all.
3  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: May 29, 2020, 02:15:13 AM
No. You're putting that into the "if chance < 49.5" block... so it'll only be evaluated if the chance ends up being set to less than 49.5

I'd suggest putting it right underneath the losecount +=1 line...
Code:
...
  if (!win) then
    losecount += 1
    if (losecount == 2) then
      stop()
    end
    ...
[code]
[/code]

Again, thanks a lot sir!
4  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: May 22, 2020, 12:57:52 PM
this is a situation where using [ code ] tags and properly indenting your code makes things a lot easier!

Code:
chance    = 95
basebet   = .000001131
nextbet   = .000001131
bethigh   = true
losecount = 0
enablesrc = true --set to true to use stop/reset conditions
--settings from advanced mode

function dobet()
  
  if (win) then
    chance = 95
    nextbet = basebet
    losecount = 0
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      nextbet = previousbet*1.75
      chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
      if chance < 49.5 then
        chance = 49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)
    else
      nextbet = previousbet*1.75
      chance  = (1/(((basebet+nextbet))/nextbet))*100
      if chance<49.5 then
        chance=49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)

      if (losecount == 2) then
        stop()
      end

    end
  end
end

Looking at that indented correctly, you can quickly see that your "if (losecount == 2) then" statement is actually contained in the else section of an "if (losecount > 1)" statement:
Code: (EDITED FOR CLARITY)
...
function dobet()
  
  if (win) then
    ...
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      ...
    else -- losecount must be <= 1
      ...
      if (losecount == 2) then -- THIS CAN NEVER BE TRUE HERE!
        stop()
      end

    end

  end

end
So, basically, your highlighted code will never get executed... because losecount cannot be <= 1 and == 2!!?! Roll Eyes

You might want to make sure your code is properly formatted in future so that you are actually adding your code into the correct section and not accidentally adding it into another section by mistake.


Thanks for your help.

so, I should enter my code line here to make it work?:

  if (!win) then
    losecount += 1
    if (losecount > 1) then
      nextbet = previousbet*1.75
      chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
      if chance < 49.5 then
        chance = 49.5
     if (losecount == 2) then
        stop()

      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)



again thanks for your time.
5  Economy / Gambling discussion / Re: Seuntjie' Dice bot programmers mode discussion. on: May 22, 2020, 03:06:01 AM
Hi guys,
I'm new here, and obviously a beginner in programming.  I use a script already available on Seuntjie forum. It,s working great, but the enablesrc doesn't seem to work sith the win or loss stop/reset. So I was looking to add it in the script. The way i wrote it, when i got a loosing streak of 1, it's stop. But, off course, i want a to play with a longer series than 1 loss.  Unfortunately,  when I want a loosing streak of 2, or more, it doesn't stop. So I gues my code is faulty. Here is the code, if anybody wish to help me.

Code:
chance    = 95
basebet   = .000001131
nextbet   = .000001131
bethigh   = true
losecount = 0
enablesrc = true --set to true to use stop/reset conditions
--settings from advanced mode


function dobet()


   
if (win) then
   chance = 95
   nextbet = basebet
   losecount = 0
end
if (!win) then
   losecount += 1
   if (losecount > 1) then
       nextbet = previousbet*1.75
   chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
   if chance < 49.5 then
   chance = 49.5
end
   bethigh = !bethigh
      print ("LOSE")
   print(nextbet)
   print(chance)
   print(profit)
   print(bets)
   else
   nextbet = previousbet*1.75
   chance  = (1/(((basebet+nextbet))/nextbet))*100
      if chance<49.5 then
   chance=49.5 end
   bethigh = !bethigh
   print ("LOSE")
   print(nextbet)
   print(chance)
   print(profit)
   print(bets)

if (losecount == 2) then
       stop()
   end

 end
 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!