Pages:
Author

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

member
Activity: 270
Merit: 10
what team to write hundred to look how many courses there was the smallest and biggest stone back? For example

1000 rates : min roll = 0.23 max roll = 99.9

I assume you're wanting to know what was the smallest and largest roll in the previous 1000 bets?

If you want to just do a fixed size run, its easy...

Code:
minRoll = 100
maxRoll = 0

numBets = 0

.. other setup ..

function dobet()

  numBets = numBets + 1

  if lastBet.Roll > maxRoll then
    maxRoll = lastBet.Roll
  elseif lastBet.Roll < minRoll then
    minRoll = lastBet.Roll
  end

  if numBets == 1000 then
    print("1000 rolls: min roll = ".. minRoll .. " max roll = " .. maxRoll)
  end

  .. other stuff ..

end

Note that this will only work for the first 1000 rolls... then it won't work. It also wouldn't work "as is" as a "sliding" window of min/max over the last 1000 rolls on a continuous betting basis... ie. you couldn't just reset it back to 0 and 100 and let it count again. You'd need to store the bets in a a FIFO list and recalculate min/max every roll... this would be slow.

Also, if you just want to track all the bets and calculate it at any given stage for any given length of rolls... you would need to store ALL the bet results and calculate it by looping through them... that would take up LOTS of memory... and be VERY slow!

You'd probably be better off running SQL on the database file using external programs... but then you couldn't use an automated script to get the numbers... you might have to consider modifying the source code for the bot itself to include a function that you can call from programmer mode that could find min and max over X number of rolls.

I copy a code, but it isn't started
legendary
Activity: 1717
Merit: 1125
what team to write hundred to look how many courses there was the smallest and biggest stone back? For example

1000 rates : min roll = 0.23 max roll = 99.9

I assume you're wanting to know what was the smallest and largest roll in the previous 1000 bets?

If you want to just do a fixed size run, its easy...

Code:
minRoll = 100
maxRoll = 0

numBets = 0

.. other setup ..

function dobet()

  numBets = numBets + 1

  if lastBet.Roll > maxRoll then
    maxRoll = lastBet.Roll
  elseif lastBet.Roll < minRoll then
    minRoll = lastBet.Roll
  end

  if numBets == 1000 then
    print("1000 rolls: min roll = ".. minRoll .. " max roll = " .. maxRoll)
  end

  .. other stuff ..

end

Note that this will only work for the first 1000 rolls... then it won't work. It also wouldn't work "as is" as a "sliding" window of min/max over the last 1000 rolls on a continuous betting basis... ie. you couldn't just reset it back to 0 and 100 and let it count again. You'd need to store the bets in a a FIFO list and recalculate min/max every roll... this would be slow.

Also, if you just want to track all the bets and calculate it at any given stage for any given length of rolls... you would need to store ALL the bet results and calculate it by looping through them... that would take up LOTS of memory... and be VERY slow!

You'd probably be better off running SQL on the database file using external programs... but then you couldn't use an automated script to get the numbers... you might have to consider modifying the source code for the bot itself to include a function that you can call from programmer mode that could find min and max over X number of rolls.

I might be able to add a function to the programmermode that can allow you to execute a sql query directly, I will just have to investigate how to return different data types etc, so no ETA for now.

Edit: I still wouldn't recommend these kind of queries though. You will need to execute something like ( top(1000) min(roll) as minimum, max(roll) as maximum from bet where site='sitename'  order by betid desc) after every bet. SQLite is not a great DBMS, and queries like these are relatively slow in it. You're going to kill your betting speed and hike your hdd and cpu usage.
HCP
legendary
Activity: 2086
Merit: 4363
what team to write hundred to look how many courses there was the smallest and biggest stone back? For example

1000 rates : min roll = 0.23 max roll = 99.9

I assume you're wanting to know what was the smallest and largest roll in the previous 1000 bets?

If you want to just do a fixed size run, its easy...

Code:
minRoll = 100
maxRoll = 0

numBets = 0

.. other setup ..

function dobet()

  numBets = numBets + 1

  if lastBet.Roll > maxRoll then
    maxRoll = lastBet.Roll
  elseif lastBet.Roll < minRoll then
    minRoll = lastBet.Roll
  end

  if numBets == 1000 then
    print("1000 rolls: min roll = ".. minRoll .. " max roll = " .. maxRoll)
  end

  .. other stuff ..

end

Note that this will only work for the first 1000 rolls... then it won't work. It also wouldn't work "as is" as a "sliding" window of min/max over the last 1000 rolls on a continuous betting basis... ie. you couldn't just reset it back to 0 and 100 and let it count again. You'd need to store the bets in a a FIFO list and recalculate min/max every roll... this would be slow.

Also, if you just want to track all the bets and calculate it at any given stage for any given length of rolls... you would need to store ALL the bet results and calculate it by looping through them... that would take up LOTS of memory... and be VERY slow!

You'd probably be better off running SQL on the database file using external programs... but then you couldn't use an automated script to get the numbers... you might have to consider modifying the source code for the bot itself to include a function that you can call from programmer mode that could find min and max over X number of rolls.
member
Activity: 270
Merit: 10
what team to write hundred to look how many courses there was the smallest and biggest stone back? For example

1000 rates : min roll = 0.23 max roll = 99.9
HCP
legendary
Activity: 2086
Merit: 4363
Anyone can help to program the bot with info below?

Base bet: 0.00001
Multiplier: 5
Chance: 66.6%
Bet: low

Condition
If betting lose more than 2 times, and follow by win (at least 1 win) and if the following lose betting appear then the bot will multiply base bet with multiplier. If it is losing, when the next condition fulfill, the betting amount increased to 2x multiplier. Reset to base bet if win.

~~ Examples snipped ~~
Good examples... I don't think that's toooo difficult... If I understand right... we do ONE big bet... then back to basebet until the next "2+ loss/1+win/loss" cycle... and then 2x multiplier bet...

Also, when you said 2x and 3x multiplier... I took that to mean:

1st bigbet = 0.00001 * 5
2nd bigbet = 0.00001 * 10
3rd bigbet = 0.00001 * 15
etc

As always... Code is NOT thoroughly tested... use at own risk!
Code:
-- Script for hi5burger
-- written by HCP

basebet = 0.00001
multiplier = 5
multiplierstep = 0
chance = 66.6
bethigh = false

nextbet = basebet

betNextLoss = false
foundLosingStreak = false
bettingBig = false

function dobet()

  if (win) then
    if foundLosingStreak then
      print("End of losing streak... bigBetting next loss!")
      -- win after losing streak, bet big after next loss
      betNextLoss = true
      foundLosingStreak = false
      multiplierstep = multiplierstep + 1
    end
   
    if bettingBig then
      print("Hit the bigBet... RESETTING!")
      nextbet = basebet
      multiplierstep = 0
      betNextLoss = false
      foundLosingStreak = false
      bettingBig = false
      bethigh = !bethigh
     
    end
 
  else
 
    nextbet = basebet
 
    if (currentstreak == -1) and betNextLoss then
      print("First loss after win, MULTIPLY!")
      -- first loss after winning streak, multiply!
      nextbet = previousbet * (multiplier * multiplierstep)
      betNextLoss = false
      foundLosingStreak = false
      bettingBig = true
 
    elseif currentstreak <= -2 then
      print("LossStreak > 2 found...")
      foundLosingStreak = true
      betNextLoss = false
      bettingBig = false
   
    end

  end
 
end

If you make millions and are feeling generous, my tip address is: 33gzi64cvCr4i9ECGPwvZktzS2qknRUFhC Wink


ps. Your strategy doesn't seem to perform too well Tongue

newbie
Activity: 28
Merit: 0
Hi, Im newbie to the dicebot. I have been playing with dice quite some time and won some satoshi when Pocketdice still live.

Anyone can help to program the bot with info below?

Base bet: 0.00001
Multiplier: 5
Chance: 66.6%
Bet range: low

Condition
If betting lose more than 2 times, and follow by win (at least 1 win) and if the following lose betting appear then the bot will multiply base bet with multiplier. If it is losing, when the next condition fulfill, the betting amount increased to 2x multiplier. Reset to base bet and change range (low/high) if win.

Example 1
L base bet
L base bet
W base bet
L base bet
L multiplier 1x
W base bet
W base bet
W base bet
L base bet
W multiplier 2x
L base bet

Example 2
L base bet
L base bet
L base bet
W base bet
W base bet
W base bet
L base bet
L multiplier 1x
W base bet
L base bet
L multiplier 2x
L base bet
W base bet
L base bet
W multiplier 3x
W base bet

Thanks.
legendary
Activity: 1932
Merit: 2272
Thanks, everything is working fine as it should.
HCP
legendary
Activity: 2086
Merit: 4363
I want exactly this settings with random picks(bets):


Then we just need to add a simple check of balance after a roll and stop() is called if that value is exceeded:

Note: as always, I have not thoroughly tested this script... so use at your own risk.
Code:
math.randomseed(os.time()) -- sets random seed using system time

-- set basebet and chance according to your requirements
basebet = 0.00000001
chance = 43.130 -- 2.3x payout on Crypto-Games.net
balancetarget = 1.0 -- Script will stop if balance greater than this value

if (math.random(100) >= 50) then
  bethigh = true
else
  bethigh = false
end

nextbet = basebet

function dobet()

  if (win) then
    -- reverse martingale
    nextbet = previousbet * 1.9
  else
    -- revert to base
    nextbet = basebet
  end 

  if (math.random(100) >= 50) then
    bethigh = true
  else
    bethigh = false
  end

  if balance > balancetarget then
    nextbet = 0
    stop()
  end

end


legendary
Activity: 1932
Merit: 2272
For instance... on crypto-games.net, a 2.3x payout -> chance 43.130... and 2.4x payout -> chance 41.333
Ok, lets say it is for cryptogames so chance is 43.130%.
Quote
Also, I assume the reverse martingale just resets to basebet on a loss.
Yes.
Quote
at what point should the bot STOP increasing on a winning streak and reset back to basebet?
When balance is higher than 1btc or something like that  Undecided
I want exactly this settings with random picks(bets):
HCP
legendary
Activity: 2086
Merit: 4363
As I am not programmer I was hopping someone can point me in right direction but I don't really understand this. Embarrassed
I need something for this settings: payout 2.3X or 2.4X, bet increase on win 1.9X(90%) with random bets all the way.

It is reversed martingale with random bets (example L L L L H L H H L H L L H H H L etc)
Yeah... you just need to edit the script slightly from my post in the other thread... Just one thing to note, I'm not sure what site you're using, and the bot works on "chance" not on "payout", so you need to work that bit out manually (goto the site and set payout to 2.3x and see what it lists your "chance" as... then change the value in the script as appropriate Smiley

For instance... on crypto-games.net, a 2.3x payout -> chance 43.130... and 2.4x payout -> chance 41.333

Code:
math.randomseed(os.time()) -- sets random seed using system time

-- set basebet and chance according to your requirements
basebet = 0.00000001
chance = 43.130 -- 2.3x payout on Crypto-Games.net

if (math.random(100) >= 50) then
  bethigh = true
else
  bethigh = false
end

nextbet = basebet

function dobet()

  if (win) then
    -- reverse martingale
    nextbet = previousbet * 1.9
  else
    -- revert to base?
    nextbet = basebet
  end  

  if (math.random(100) >= 50) then
    bethigh = true
  else
    bethigh = false
  end

end

Also, I assume the reverse martingale just resets to basebet on a loss... Addtionally, at what point should the bot STOP increasing on a winning streak and reset back to basebet?
legendary
Activity: 1932
Merit: 2272
Can someone help me with this:

As I am not programmer I was hopping someone can point me in right direction but I don't really understand this. Embarrassed
I need something for this settings: payout 2.3X or 2.4X, bet increase on win 1.9X(90%) with random bets all the way.
It is reversed martingale with random bets (example L L L L H L H H L H L L H H H L etc)
legendary
Activity: 1717
Merit: 1125
Hey!

I want to know, if i have in script very many "if... then... end" lines bot and script are start to work slower and slower, with every added new "if" line.

I can re-edit any "if line" with change it to: (sample)

Code:
if .... then
....
end

if .... then
....
end

to
Code:
if .... then
....

elseif .... then
....
end

and it can dramatically increase back betting speed what my pc/internet/site can give me with simple short script?!

so basic question is, if i can change every if/end line, with very very long, if/elseif/elseif lines(with only one end in the end) and it can dramatically increase betting speed?!



Imagine you have a stack of papers, each with a number on, What would be faster?

1: Looking at each page seperately to see if the number on it is 5 and take out all of the numbers with a 5 on it.
2: Looking at each page until you find a 5 and then discarding the rest of the stack.


When you're doing if...then...end repeatedly, you're looking at every page every time. When you're doing elseif, you look until you find one and skip the rest, so it will be faster.

But now, what are your needs. Do you need ALL of the pages withe the number 5 on it, or do you need one?

How you write it depends on your script. It doesn't help you have a lot of elseifs if some of them are for setting bet amounts and others are for setting chance or high/low, because then you might be skipping important parts of your script. Usually when someone has a whole lot of its, there's usually a better way of doing it as well. For instance, instead of checking for currentstreak==5, or currentstreak==10, or currentstreak==15, or currentstreak==20 etc, you can check whether currentstreak%5==0. This single if statement can replace a whole series of if statements.


tldr; it's impossible to tell you what would be best and fastest for your script without seeing the script, but it sounds like there might be a better way to do whatever you're doing.
full member
Activity: 319
Merit: 100
Hey!

I want to know, if i have in script very many "if... then... end" lines bot and script are start to work slower and slower, with every added new "if" line.

I can re-edit any "if line" with change it to: (sample)

Code:
if .... then
....
end

if .... then
....
end

to
Code:
if .... then
....

elseif .... then
....
end

and it can dramatically increase back betting speed what my pc/internet/site can give me with simple short script?!

so basic question is, if i can change every if/end line, with very very long, if/elseif/elseif lines(with only one end in the end) and it can dramatically increase betting speed?!
HCP
legendary
Activity: 2086
Merit: 4363
No, there is no "betlow"... you simply set: bethigh = false Wink

If it is just based on the total number of wins in each phase, then something like the code below should work... Hopefully it should be obvious which values you need to tweak if you want to adjust the chances/basebets/multipliers etc.

As always... UNTESTED, USE AT YOUR OWN RISK!

Code:
--- SET THESE VALUES AS REQUIRED ---

chances = {4.3,12,1}
multipliers = {1.1,1.22,1.022}
maxwins = {10,10,2}
basebets = {0.000001,0.000001,0.000001}

--- DO NOT EDIT BELOW THIS LINE ---

phase = 1
bethigh = false
nextbet = basebets[phase]
chance = chances[phase]

wincount = 0

function dobet()

  if (win) then
    wincount = wincount + 1

    if wincount == maxwins[phase] then
      --move to next phase
      print("Max wins [".. maxwins[phase] .. "] reached...")
      wincount = 0
      phase = phase + 1
      if phase > 3 then
        -- cycle to first phase
        phase = 1
      end
      print("Moving to next phase: " .. phase)
    end

    nextbet = basebets[phase]
    chance = chances[phase]
    bethigh = !bethigh
   
  else
    nextbet = previousbet * multipliers[phase]
  end

end
newbie
Activity: 2
Merit: 0
Three things that you need to know:

1. There is only ONE dobet() function... so you have to do it all within the one function.
2. There is no built in "pause" or "sleep" function. You can simulate it, but it does use CPU... so you're likely to drive 1 core to 100% usage for 5 minutes while the script "pauses".
3. There is no "betlow"... only "bethigh" Wink

Otherwise, what you're trying to do should be possible. I just want to clarify something... when you say "10 wins"... is that 10 consecutive wins or just 10 wins in total?

So... WLWWLWWLLLLWLLWWLWW = Switch? Huh

I think there is a betlow
and i want to make it after 10 wins in total to switch
Smiley
HCP
legendary
Activity: 2086
Merit: 4363
Three things that you need to know:

1. There is only ONE dobet() function... so you have to do it all within the one function.
2. There is no built in "pause" or "sleep" function. You can simulate it, but it does use CPU... so you're likely to drive 1 core to 100% usage for 5 minutes while the script "pauses".
3. There is no "betlow"... only "bethigh" Wink

Otherwise, what you're trying to do should be possible. I just want to clarify something... when you say "10 wins"... is that 10 consecutive wins or just 10 wins in total?

So... WLWWLWWLLLLWLLWWLWW = Switch? Huh
newbie
Activity: 2
Merit: 0
Hey guys I`m trying to create something but im not sure if it`s even possible if anyone can help me with that will be grateful.
Also I'm not very familiar with coding so im just trying my best.
Thanks Smiley


basically i want to make it  to start with
4.3 chance
multiplayer 10 %
after 5-10 wins to switch to
12 chance
multiplayer 22 %
after 10 wins to switch to
1 chance
multiplayer 2.2 %
and also i would like to add before it switch to next one to make a pause for 5 minutes and start the next one and so on.
just to rotate this 3 options .

do you think is possible >?


chance = 4.3
betlow = true
basebet = 0.000001
nextbet = basebet

function dobet()

chance = 4.3

if (win) then
   nextbet = basebet
   betlow = !betlow
else
   nextbet = previousbet * 1.1
end
   after tenwin=true then set
 chance = 12
betlow = true
basebet=0.000001
nextbet = basebet
function dobet()

if (win) then
   nextbet = basebet
   betlow = !betlow
else
   nextbet = previousbet * 1.22   

end
after tenwin=true then set
chancve = 1
basebet=0.000001
nextbet = basebet
function dobet()

then after twowin=true start over
 
end
newbie
Activity: 3
Merit: 0
Thank you! I have got working both functions. 999 does support tipping to username and not support to account no.
HCP
legendary
Activity: 2086
Merit: 4363
You can see which sites support what features here: https://bot.seuntjie.com/features.aspx

According to that... 999dice does support withdraw, but does not support tipping.
newbie
Activity: 3
Merit: 0
  Yes, Using the withdraw function.  

Thank you! Can I find here the sample?

something like this:
 if balance>=2000 then
withdraw 100 to XXXXXXXXXXXXXXX

And does 999dice supporting withdraw and tip functions?
Pages:
Jump to: