Pages:
Author

Topic: Seuntjie' Dice bot programmers mode discussion. - page 3. (Read 125390 times)

newbie
Activity: 5
Merit: 0
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.
legendary
Activity: 1717
Merit: 1125
Is there any way I can change to a custom client seed from inside of dice bot(instead of resetting seed to a random one)

No. Re-using client seeds (like many people do because of superstitions) compromises provably fair methods, especially when using a bot with predictable betting patterns (It would still be very difficult from the server side to do anything with it, but it becomes possible). It's not as much of a problem with nonce based sites, but with per-bet sites, it completely invalidates the fairness of the bet. As such, to ensure the fairness of bets placed with the bot, it will select a random client seed when it can.
HCP
legendary
Activity: 2086
Merit: 4361
Not that I'm aware of... it would probably require the site's API to be updated/modified to allow specific custom client seeds to be used.  Additionally, not all sites even support the resetseed() function.
newbie
Activity: 51
Merit: 0
Is there any way I can change to a custom client seed from inside of dice bot(instead of resetting seed to a random one)
newbie
Activity: 5
Merit: 0
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!
HCP
legendary
Activity: 2086
Merit: 4361
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]
newbie
Activity: 5
Merit: 0
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.
HCP
legendary
Activity: 2086
Merit: 4361
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.
newbie
Activity: 5
Merit: 0
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/

http://
newbie
Activity: 51
Merit: 0
That looks relatively simple... so I think this code should work.

NOTE: As always, I have not thoroughly tested this... so I accept no responsibility if you lose your entire balance! Tongue



Thanks for the code @HCP .....and your disclaimer is duly noted Cheesy Cheesy Cheesy


HCP
legendary
Activity: 2086
Merit: 4361
That looks relatively simple... so I think this code should work.

NOTE: As always, I have not thoroughly tested this... so I accept no responsibility if you lose your entire balance! Tongue

Code:
chance  = 49.5
basebet = 0.00000001
nextbet = basebet
bethigh = true

lossStreak = 0

hibernate      = false
lastMartingale = 0
hibernatebet   = 0.00000000 -- primedice zero bets!

function dobet()

    if win then
        if hibernate then
            -- first win after losing streak
            -- restart Martingale
            nextbet    = lastMartingale * 2
            lossStreak = 0
            hibernate  = false
        else
            nextbet    = basebet
            lossStreak = 0
        end
    else
        lossStreak = lossStreak + 1
        if (lossStreak == 3) then
            --losing streak detected, hibernate
            hibernate      = true
            lastMartingale = previousbet
        end
        if hibernate then
            nextbet = hibernatebet
        else
            nextbet = previousbet * 2
        end
    end
   
end
newbie
Activity: 51
Merit: 0
Hello can someone please help me with a code that works like this:

First a bet is placed such that basebet=0.00000001 ,bethigh=true, chance=49.5.If this bet wins then nextbet is placed with same conditions as before.But if the bet losses then nextbet is 2X the previous bet( i.e., 0.00000002 in this case) and remaining conditions are similar. And if the second bet wins ,then nextbet resets to 0.00000001 and continues the cycle and if loss then nextbet again becomes  2X of previous bet.This standard martingale only continues until there are 3 consecutive losses.That is, when a bet of 0.00000004 is placed and lost ,then nextbet becomes 0sats (since primedice supports zero amount bets).This zero bet is placed consecutively until 1 win comes.When one win comes then nextbet becomes 2X of the bet that was placed at 3rd consecutive loss( that is 0.00000008 in this case).Again if this bet wins then whole cycle resets and continues from first,And if this bet losses the again martingale is applied upto 2 more stages like this:8sat,16sat,32sat.....here if bet with 32 sat losses then it becomes the new value to be doubled after placing consecutive zero amount bets.

For better understanding I am attaching a simulated bet list here:

1.  0.00000001----------------win
2.  0.00000001----------------win
3.  0.00000001----------------win
4.  0.00000001-----------------loss
5.  0.00000002-----------------win
6.  0.00000001-----------------win
7.  0.00000001-----------------loss-----:
8.  0.00000002----------------loss -----: 3 consecutive losses.so nextbet becomes 0 and continues until 1 win is obtained
9.  0.00000004----------------loss------:
10.0.00000000----------------loss
11.0.00000000----------------win--------1 win is obtained with zero bet so nextbet is 2X of previously lost highest bet (  2*0.00000004)
12.0.00000008----------------win-------here, since this bet is win so cycle again starts from first .but if this was loss,then again martingale continues until
                                                         8,16,32. If bet with 32 sat losses it becomes the new number to be doubled again after zero bet streak.
                                                         
legendary
Activity: 1717
Merit: 1125
I appreciate the prompt response.
Here is my issue: I have a script that runs for 10k bets and then it stops. I like it to stop. Is there a way if last run was successful to delay x seconds and restart the script without a manual intervention?
Thank you!

sorry for the late response, idk if you'll still see this. lua has a sleep(milliseconds:int) function that you can use to do nothing for . You can reset your script yourself by resetting your variables in your script and using resetstats if necessary. Once you've called the stop method, the bot is stopped and can only be restarted manually.
newbie
Activity: 20
Merit: 0
Hello, is there any code I can add to a script that will create a simple popup to say "Target reached" with an OK button? Thank you!

Not a popup, you can only print to the console using the print method. There's a list of functions you can call from the programmer mode when you click on the "Functions/Methods" tab at the top.

I appreciate the prompt response.
Here is my issue: I have a script that runs for 10k bets and then it stops. I like it to stop. Is there a way if last run was successful to delay x seconds and restart the script without a manual intervention?
Thank you!
legendary
Activity: 1717
Merit: 1125
Hello, is there any code I can add to a script that will create a simple popup to say "Target reached" with an OK button? Thank you!

Not a popup, you can only print to the console using the print method. There's a list of functions you can call from the programmer mode when you click on the "Functions/Methods" tab at the top.
newbie
Activity: 20
Merit: 0
Hello, is there any code I can add to a script that will create a simple popup to say "Target reached" with an OK button? Thank you!
HCP
legendary
Activity: 2086
Merit: 4361
Right... so the idea is you're wanting to gamble low for the first 10... and then because you believe the chances of winning are higher after 15, you can increase the bets to make back all your losess + big profit? Huh You might want to read this: https://en.wikipedia.org/wiki/Gambler%27s_fallacy Tongue

Seriously tho... that shouldn't be too difficult to do... although attempting to code it as a dynamic system within the bot could be quite complex, depending on how complicated the system you're playing is.

In the "simple" 2x system... (only adjusting the bet amount and not multipliers/payouts etc)... the formula for total amount lost in 10 bets is simply: (Initial Bet * 2^10) - Initial Bet)

Say you initial bet is 1... that would give:
=> ((1 * 2^10) - 1)
=> ((1 * 1024) - 1)
=> (1024 - 1)
=> 1023

For an initial bet of 2000 that would give:
=> ((2000 * 2^10) - 2000)
=> (2000 * 1024) - 2000)
=> (2048000 - 2000)
=> 2046000

However, trying to work that backwards from a starting balance to derive what the starting bet should be is a bit more difficult... A formula like: (Starting Balance * 2^-10) would give you the initial bet you could make, and still have enough left for the 10th bet...

For instance... Starting balance of 3142547... then: 3142547 * 2^-10 => 3068.893555

Checking against the previous formula: (3068.893555 * 2^10) - 3068.893555 => Total loss of 3139478.107... which is just under 3142547. But to try and work that out across THREE different blocks of 10... with dynamic starting amounts gets messy very quickly. Especially if you want to be able to increase in the 2nd/3rd blocks...

Nevermind, the fact that even just 30 bets of a straight Martingale requires that you have an ENORMOUS starting balance (~11 BTC if you start with just a 0.00000001 initial bet Shocked Shocked Shocked)... If you try and increase in the 2nd/3rd blocks, the starting balance would need to be astronomical to try and make bets that could cover the losses!

You could try just flat betting the first 10... and then start increasing, but you run the risk of a lot of streaks <=9 with only smaller win streaks inbetween slowly eating your balance down until you can get to your "big bet" 15+ losses territory... Undecided
jr. member
Activity: 53
Merit: 2
Okay this is a great bot and help me a lot for the things that i was trying to do manually.As a newb i play around a bit with programmer mode so far i could do something with my capability but i stuck now Smiley I am looking to get an help from you guys with script.Here what i want to do ;

Let's say my dices goes  for  max. 30x red so instead of prerolls i want to have it like ;
for the first 10 red i want to use xx of my balance for martingale.
If dice still gives me a red for the next 10 (starts with 11th red) it should use xx of my balance again. (amount which covers all lost from previous 10 red )
If still no greed goes to last passage and for last 10 red it again uses xx of my balance. (amount which covers all lost from first 20 reds and gives me profit for the next 10)
If still no green it shouldnt go for 31th bet instead starts over.

If I understand correctly you're trying to limit your exposure by only using X amount of your bank roll for each 10 rolls, but for the 2nd and 3rd blocks of 10... the only way cover all the loses from the previous 10 rolls is to continue on the same martingale betting pattern (or higher!).

In other words, it's just a straight 30 rolls with increasing martingale bets and you either hit green or you don't... it's the only way to do it and break even when you hit the green. (Unless you are wanting to actually increase the bets above the minimum required to break even in each block?)  

For instance... say your first 10 reds at 2x payout, are the following bet amounts:
1-2-4-8-16-32-64-128-256-512...

The only way to cover those first 10 losses are to continue the same betting pattern in the second block:
1024-2048-4096-8192...524288

or something higher like:
2000-4000-8000-16000...1024000

You'd then have to do the same in the 3rd block... same betting pattern or higher.

In that case, you just need to figure out what the max loss you want over 30 bets is... then calculate what the starting bet should be so that you don't exceed that value over 30 consecutive losses. This is probably easiest to actually just create a spreadsheet that does the math for you... and you can modify the start bet and/or the payout multiplier and then have it calculate projected losses for X number of bets and you can simply adjust the values to see what you want it to be.

Here is a simple one that is only useful for a 2x payout (should be around a chance of ~49.5 for most dice sites): https://docs.google.com/spreadsheets/d/10cC_ODRYde8nuWRMb4b5uQkI_-8uY37ktN5tjsf-CzM/edit?usp=sharing

As you can see... starting with a bet of just 0.00000001, you'd need a starting balance of 10.73741823 to be able to make 30 bets at 2x multiplier... and would make a profit of just 0.00000001 when you hit green! Shocked Shocked Shocked

NOTE: If you want to do other chance/payout values, you'd probably need to do a bit of editing to make the bet increases relate to the multiplier/payout properly.


So, I guess the real question, is what are you actually wanting to achieve by splitting into three different blocks of betting? Huh

Thanks for spending time and trying to understand what i am asking.

Reason i want to increase bets for each 10 red is , i aim to get actual high profit from reds  starts after 11 because you get reds untill 10-15 constantly but if you keep your start bet high for reds between that you would risk to loose your bankroll for reds coming after 15 and so on.I mean i can increase my bet amount after lets say 15 because i know it wont go for long and i will get some good profit after a few reds that covers everything lost and plus.As i currently use pre-rolls for reds between 1 and 10 and as it comes constantly it effects my overall profit a lot because it works 24h a day.Hope i could have sucess with telling my concern hopefully.Thanks again for your time <3
HCP
legendary
Activity: 2086
Merit: 4361
Okay this is a great bot and help me a lot for the things that i was trying to do manually.As a newb i play around a bit with programmer mode so far i could do something with my capability but i stuck now Smiley I am looking to get an help from you guys with script.Here what i want to do ;

Let's say my dices goes  for  max. 30x red so instead of prerolls i want to have it like ;
for the first 10 red i want to use xx of my balance for martingale.
If dice still gives me a red for the next 10 (starts with 11th red) it should use xx of my balance again. (amount which covers all lost from previous 10 red )
If still no greed goes to last passage and for last 10 red it again uses xx of my balance. (amount which covers all lost from first 20 reds and gives me profit for the next 10)
If still no green it shouldnt go for 31th bet instead starts over.

If I understand correctly you're trying to limit your exposure by only using X amount of your bank roll for each 10 rolls, but for the 2nd and 3rd blocks of 10... the only way cover all the loses from the previous 10 rolls is to continue on the same martingale betting pattern (or higher!).

In other words, it's just a straight 30 rolls with increasing martingale bets and you either hit green or you don't... it's the only way to do it and break even when you hit the green. (Unless you are wanting to actually increase the bets above the minimum required to break even in each block?)  

For instance... say your first 10 reds at 2x payout, are the following bet amounts:
1-2-4-8-16-32-64-128-256-512...

The only way to cover those first 10 losses are to continue the same betting pattern in the second block:
1024-2048-4096-8192...524288

or something higher like:
2000-4000-8000-16000...1024000

You'd then have to do the same in the 3rd block... same betting pattern or higher.

In that case, you just need to figure out what the max loss you want over 30 bets is... then calculate what the starting bet should be so that you don't exceed that value over 30 consecutive losses. This is probably easiest to actually just create a spreadsheet that does the math for you... and you can modify the start bet and/or the payout multiplier and then have it calculate projected losses for X number of bets and you can simply adjust the values to see what you want it to be.

Here is a simple one that is only useful for a 2x payout (should be around a chance of ~49.5 for most dice sites): https://docs.google.com/spreadsheets/d/10cC_ODRYde8nuWRMb4b5uQkI_-8uY37ktN5tjsf-CzM/edit?usp=sharing

As you can see... starting with a bet of just 0.00000001, you'd need a starting balance of 10.73741823 to be able to make 30 bets at 2x multiplier... and would make a profit of just 0.00000001 when you hit green! Shocked Shocked Shocked

NOTE: If you want to do other chance/payout values, you'd probably need to do a bit of editing to make the bet increases relate to the multiplier/payout properly.


So, I guess the real question, is what are you actually wanting to achieve by splitting into three different blocks of betting? Huh
legendary
Activity: 1717
Merit: 1125

Gotcha. If you don't mind me asking, what are you looking to further develop in upcoming releases?
https://github.com/Seuntjie900/Doormat
Pages:
Jump to: