Pages:
Author

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

newbie
Activity: 9
Merit: 0
hello guys, i need a bit of help adjusting the following script, it starts with chance 81.12, and changes to 33.33 chance after first lost and uses a multiplier until a win before reverting to its basebet and starting chance of 81.12. i would simply like for the script to be modified so that when the chance switches to 33.33 after a loss, after 5 losses in a row,the bet size changes to static 0.00000001 until a win and then the previous bet pattern resumes until another row of 5 losses  in a row where it pauses again and bets 0.00000001 until a win where it resumes from the previous level, i believe u understand what i am trying to do here
Code:
chance = 81.12
bethigh = true
basebet = 0.00000031
nextbet = basebet

function dobet()
if (win) then
chance = 81.12
   nextbet = basebet
else
if chance == 33.33  then
nextbet = previousbet * 1.59738
else
chance = 33.33
   nextbet = basebet/3.3
end
end
end
full member
Activity: 319
Merit: 100
there is possibility to watch/see graph's of/from simulation's?!

Once you've run the simulation, you can open the simulation window (if you ran it from the programmer mode, otherwise it's already open) and click the export sim button and save the simulation as a CSV file that you can open in excel, or whatever, and draw your own charts from it.

ps: I've added an exportsim() function to the next version so you can export the simulation directly from the programmer mode. It will open the save file dialog, so don't go attempting to use it from inside a script

how I can see graph(LIVE CHART) from .csv file what are opened in excel(or whatever) from this numbers?! is it possible?!

graph(comes from poker terminology for me) = graphic diagram like we can see when bot is running and playing.

maybe better terminology for you and dice game are LIVE CHART!?

edited:iv reed google, yes somehow is possible to make graph/chart from csv file, okey.

but by this question i mean, if this possibility is in dicebot Smiley

It's not possible to do a live chart of a simulation since you can only export the csv after the simulation is completed. It also doesn't make sense to do a live chart as it would slow down the simulation even further and the simulation is for analytical purposes. DiceBots simulations are meant to be looked at after the fact, not while the simulation is running.

A live chart is updated in real time, as the bets are made, after every bet.

You cannot make a chart of a simulation in dicebot. You have to export the simulatino to a csv and then create a chart in excel or some other spreadsheet program.
Okey, I will know, thanks!

maybe You can say, why this kind of stuff dsnt works?

   if (losecount > 0) then
      nextbet = previousbet+0.00000010

If first bet was 0.00000100, then he will make second one 0.00000254 and third 0.00000408, 0.00000562, 0.00000716, 0.00000870, with this command lines, why?!

maybe there is another simplies method, to do/make, that bot's add 0.000000xx amount for every 10 losed bets in row?! like first 10bets he add 1, next 10bets he add 1.1, next 10bets he add 1.2?!

btw, here is some people who has very good in simulation's? I wanna learn, what I'v can get out for myself from simulations, because many points I dont get...
full member
Activity: 148
Merit: 100
hi all,

i need to auto withdraw when balance is 0.01
please help me

legendary
Activity: 1717
Merit: 1125
there is possibility to watch/see graph's of/from simulation's?!

Once you've run the simulation, you can open the simulation window (if you ran it from the programmer mode, otherwise it's already open) and click the export sim button and save the simulation as a CSV file that you can open in excel, or whatever, and draw your own charts from it.

ps: I've added an exportsim() function to the next version so you can export the simulation directly from the programmer mode. It will open the save file dialog, so don't go attempting to use it from inside a script

how I can see graph(LIVE CHART) from .csv file what are opened in excel(or whatever) from this numbers?! is it possible?!

graph(comes from poker terminology for me) = graphic diagram like we can see when bot is running and playing.

maybe better terminology for you and dice game are LIVE CHART!?

edited:iv reed google, yes somehow is possible to make graph/chart from csv file, okey.

but by this question i mean, if this possibility is in dicebot Smiley

It's not possible to do a live chart of a simulation since you can only export the csv after the simulation is completed. It also doesn't make sense to do a live chart as it would slow down the simulation even further and the simulation is for analytical purposes. DiceBots simulations are meant to be looked at after the fact, not while the simulation is running.

A live chart is updated in real time, as the bets are made, after every bet.

You cannot make a chart of a simulation in dicebot. You have to export the simulatino to a csv and then create a chart in excel or some other spreadsheet program.
full member
Activity: 319
Merit: 100
there is possibility to watch/see graph's of/from simulation's?!

Once you've run the simulation, you can open the simulation window (if you ran it from the programmer mode, otherwise it's already open) and click the export sim button and save the simulation as a CSV file that you can open in excel, or whatever, and draw your own charts from it.

ps: I've added an exportsim() function to the next version so you can export the simulation directly from the programmer mode. It will open the save file dialog, so don't go attempting to use it from inside a script

how I can see graph(LIVE CHART) from .csv file what are opened in excel(or whatever) from this numbers?! is it possible?!

graph(comes from poker terminology for me) = graphic diagram like we can see when bot is running and playing.

maybe better terminology for you and dice game are LIVE CHART!?

edited:iv reed google, yes somehow is possible to make graph/chart from csv file, okey.

but by this question i mean, if this possibility is in dicebot Smiley
legendary
Activity: 1717
Merit: 1125
there is possibility to watch/see graph's of/from simulation's?!

Once you've run the simulation, you can open the simulation window (if you ran it from the programmer mode, otherwise it's already open) and click the export sim button and save the simulation as a CSV file that you can open in excel, or whatever, and draw your own charts from it.

ps: I've added an exportsim() function to the next version so you can export the simulation directly from the programmer mode. It will open the save file dialog, so don't go attempting to use it from inside a script
full member
Activity: 319
Merit: 100
there is possibility to watch/see graph's of/from simulation's?!
legendary
Activity: 1717
Merit: 1125
I post this every now and then because I see quite a few people with very little programming knowledge asking questions (and I really hate learned helplessness).

I have written a few tutorials about programming with LUA and the programmer mode, the tutorials are linked at the top of the article on https://bot.seuntjie.com/programmermode.aspx

The youtube tutorials are more for existing programmers and highlight some of the features of the programmer mode, where the steemit tutorials are more for beginners, and go over some of the basics of programming, like what are variables and functions, what's the difference between = and ==, how to write an if statement etc. It also lists the built in functions and variables and explains each of them.
legendary
Activity: 1007
Merit: 1000
So, I wanted to make script that bets on 50x payout and changes side every two wins. I also wanted it to double basebet after reaching given balance.

Code:
chance=2.00
nextbet=0.00000073
bethigh= false

function dobet ()

If win then
wincount == wincount + 1
if wincount == 2 then
if bethigh = false then
bethigh = true
else
bethigh = false
end
wincount == 0
end
end

if balance > 0.001 then
nextbase = nextbase*2
end

Unfortunately I get 'LUA ERROR!! assignment statement expected, got 'win'' tho I saw many examples here with 'if win then' line and everything seemed to be ok. I must admit this is a bit frustrating. Would anyone be so kind and check it for me please?


As always...pls use code tags.
You used double equals but needed to use single ones and the other way around.
Additionally you were missing an end at the very end of your script. formatting helps finding those easy mistakes.

Code:
chance=2.00
nextbet=0.00000073
bethigh= false

function dobet ()

  If win then
    wincount = wincount + 1         -- only one '=' if you want to assign and not equate
    if wincount == 2 then
      if bethigh == false then          -- this one actually needs a double '='
bethigh = true
      else
bethigh = false
      end
      wincount = 0                         -- same as above
    end
  end

  if balance > 0.001 then
    nextbase = nextbase*2
  end
end                                             -- missing end

What B4RF said.  Also   

  If win then      is not the same as
  if win then     

Lua does not know what If is.  So it's expecting it to be a variable and looking for an Equal sign to follow.   
hero member
Activity: 813
Merit: 507
So, I wanted to make script that bets on 50x payout and changes side every two wins. I also wanted it to double basebet after reaching given balance.

Code:
chance=2.00
nextbet=0.00000073
bethigh= false

function dobet ()

If win then
wincount == wincount + 1
if wincount == 2 then
if bethigh = false then
bethigh = true
else
bethigh = false
end
wincount == 0
end
end

if balance > 0.001 then
nextbase = nextbase*2
end

Unfortunately I get 'LUA ERROR!! assignment statement expected, got 'win'' tho I saw many examples here with 'if win then' line and everything seemed to be ok. I must admit this is a bit frustrating. Would anyone be so kind and check it for me please?


As always...pls use code tags.
You used double equals but needed to use single ones and the other way around.
Additionally you were missing an end at the very end of your script. formatting helps finding those easy mistakes.

Code:
chance=2.00
nextbet=0.00000073
bethigh= false

function dobet ()

  If win then
    wincount = wincount + 1         -- only one '=' if you want to assign and not equate
    if wincount == 2 then
      if bethigh == false then          -- this one actually needs a double '='
bethigh = true
      else
bethigh = false
      end
      wincount = 0                         -- same as above
    end
  end

  if balance > 0.001 then
    nextbase = nextbase*2
  end
end                                             -- missing end
member
Activity: 75
Merit: 10
So, I wanted to make script that bets on 50x payout and changes side every two wins. I also wanted it to double basebet after reaching given balance.

chance=2.00
nextbet=0.00000073
bethigh= false

function dobet ()

If win then
wincount == wincount + 1
   if wincount == 2 then
      if bethigh = false then
      bethigh = true
      else
      bethigh = false
      end
   wincount == 0
   end
end


if balance > 0.001 then
nextbase = nextbase*2
end

Unfortunately I get 'LUA ERROR!! assignment statement expected, got 'win'' tho I saw many examples here with 'if win then' line and everything seemed to be ok. I must admit this is a bit frustrating. Would anyone be so kind and check it for me please?
full member
Activity: 319
Merit: 100
simple i need frame that makes:

- chance = x
- with losecount calculating
- first basebet is balance/50000
- then was 12 rolls with same basebet
- then in 13th roll it will start increasing from previous bet(NOT FROM BALANCE/50000) by previousbet*1.065(   if (losecount > 11) then
      nextbet = previousbet*1.065)

- and now after win he will calculate again new basebet from balance/50000
- then again 12 rolls with same previousNEW calculated basebet
- after every lose resetseed()
- and repeat


+with stoponwin, if its possible to work with that....




thanks!


found something like this, but idk what is enablesrc and enablezz at all, and for what there is line percentage

chance = 5
base = balance*.00002
enablezz = true
enablesrc = true
percentage = .00002
function dobet()
if win then
nextbet = balance*.00002
else
nextbet = previousbet+(previousbet*.065)
end
end

need to add this prebet/preroll idk what is right terminology
full member
Activity: 319
Merit: 100
hei, here!

I have a two questions!?

 - - there is possibility to make that it update every "basebet" that he make from actually balance? like basebet=balance*0.0002(for example) but to update I need to type stop/start after every big win(not to use only when starting a bot), if i want to use agressive bankroll managment(its not updeiting automatically after every win) how i can do that, if can?!

 - - what command I need to write in console(and maybe in script) to make bot stop on simple next win(to close mathematical circuit and quit)?!

how I can do that & what/where I need to do that!

1) simply add a variable actualBalance and set this to your balance at the start (actualBalance=balance). Then after each bet calculate your profit/loss yourself and update your actualBalance by that amount.

2) An example of that is shown above your post. Add a variable stopOnWin=false and within your if(win) statement simply add the following:
Code:
   if stopOnWin then
      stopOnWin = false
      stop()
    end
Now you can type stopOnWin=true into your console to stop on the next winning bet.
You dont understand my question or I dont understand You.

I need to make that BOT automatically make bigger basebets after EVERY WIN, without stoping it, and do anything from my side, BUT ONLY WHAT HE CALCULATES FROM SCRIPT FORMULAS(from formula like balance/2500 or balance*.0002)

when I put this stoponwin command line in script, my losecount calculations brokens down and dsnt works...

why this simple & MUST HAVE command are not autoadded in bot configuration, like start()/stop() commands?...

thanks!



Code:
chance = xxxx
base = xxxx
prebet = base
enablezz = true
enablesrc = true
losecount = 0
betcount = 0

function dobet()

   if win then
      nextbet = prebet
         losecount = 0
         betcount += 1
   else
resetseed()
         losecount += 1
         betcount += 1
      nextbet = prebet
   end

   if (losecount > 16) then
      nextbet = previousbet*xxxx
   end

anyone can say how, and where i can write this stopwonwin, to dont break continued losecount lines?!

I already told you where to put the stopOnWin and its not that simple to make this a function for any hand caoded script. There are betting strategies which wouldnt profit if you simply stop on a win and so on.

I added some code to your script but I still ddont know if that is what you are looking for. btw post your script in code tags next time and you were missing an end tag

Code:
chance = xxxx
base = xxxx
prebet = base
enablezz = true
enablesrc = true
losecount = 0
betcount = 0

function dobet()

  if win then
    nextbet = prebet         -- maybe use 'nextbet=balance/2500' if you wanne increase bet since on every win?
    losecount = 0
    betcount += 1
    if stopOnWin then
      stopOnWin = false
      stop()
    end
  else
    resetseed()
    losecount += 1
    betcount += 1
    nextbet = prebet
  end

  if (losecount > 16) then
    nextbet = previousbet*xxxx
  end
end

yes if i make this next bet after win all is fine, but then my prebets dont work, and losecount dont increase after x loses in row...
maybe there is some good people to write simple frame with what i will give, and make all "ends" like you said etc, im very new in all this botters/scripters things without expierence...
hero member
Activity: 813
Merit: 507
hei, here!

I have a two questions!?

 - - there is possibility to make that it update every "basebet" that he make from actually balance? like basebet=balance*0.0002(for example) but to update I need to type stop/start after every big win(not to use only when starting a bot), if i want to use agressive bankroll managment(its not updeiting automatically after every win) how i can do that, if can?!

 - - what command I need to write in console(and maybe in script) to make bot stop on simple next win(to close mathematical circuit and quit)?!

how I can do that & what/where I need to do that!

1) simply add a variable actualBalance and set this to your balance at the start (actualBalance=balance). Then after each bet calculate your profit/loss yourself and update your actualBalance by that amount.

2) An example of that is shown above your post. Add a variable stopOnWin=false and within your if(win) statement simply add the following:
Code:
   if stopOnWin then
      stopOnWin = false
      stop()
    end
Now you can type stopOnWin=true into your console to stop on the next winning bet.
You dont understand my question or I dont understand You.

I need to make that BOT automatically make bigger basebets after EVERY WIN, without stoping it, and do anything from my side, BUT ONLY WHAT HE CALCULATES FROM SCRIPT FORMULAS(from formula like balance/2500 or balance*.0002)

when I put this stoponwin command line in script, my losecount calculations brokens down and dsnt works...

why this simple & MUST HAVE command are not autoadded in bot configuration, like start()/stop() commands?...

thanks!



Code:
chance = xxxx
base = xxxx
prebet = base
enablezz = true
enablesrc = true
losecount = 0
betcount = 0

function dobet()

   if win then
      nextbet = prebet
         losecount = 0
         betcount += 1
   else
resetseed()
         losecount += 1
         betcount += 1
      nextbet = prebet
   end

   if (losecount > 16) then
      nextbet = previousbet*xxxx
   end

anyone can say how, and where i can write this stopwonwin, to dont break continued losecount lines?!

I already told you where to put the stopOnWin and its not that simple to make this a function for any hand caoded script. There are betting strategies which wouldnt profit if you simply stop on a win and so on.

I added some code to your script but I still ddont know if that is what you are looking for. btw post your script in code tags next time and you were missing an end tag

Code:
chance = xxxx
base = xxxx
prebet = base
enablezz = true
enablesrc = true
losecount = 0
betcount = 0

function dobet()

  if win then
    nextbet = prebet         -- maybe use 'nextbet=balance/2500' if you wanne increase bet since on every win?
    losecount = 0
    betcount += 1
    if stopOnWin then
      stopOnWin = false
      stop()
    end
  else
    resetseed()
    losecount += 1
    betcount += 1
    nextbet = prebet
  end

  if (losecount > 16) then
    nextbet = previousbet*xxxx
  end
end
full member
Activity: 319
Merit: 100
hei, here!

I have a two questions!?

 - - there is possibility to make that it update every "basebet" that he make from actually balance? like basebet=balance*0.0002(for example) but to update I need to type stop/start after every big win(not to use only when starting a bot), if i want to use agressive bankroll managment(its not updeiting automatically after every win) how i can do that, if can?!

 - - what command I need to write in console(and maybe in script) to make bot stop on simple next win(to close mathematical circuit and quit)?!

how I can do that & what/where I need to do that!

1) simply add a variable actualBalance and set this to your balance at the start (actualBalance=balance). Then after each bet calculate your profit/loss yourself and update your actualBalance by that amount.

2) An example of that is shown above your post. Add a variable stopOnWin=false and within your if(win) statement simply add the following:
Code:
   if stopOnWin then
      stopOnWin = false
      stop()
    end
Now you can type stopOnWin=true into your console to stop on the next winning bet.
You dont understand my question or I dont understand You.

I need to make that BOT automatically make bigger basebets after EVERY WIN, without stoping it, and do anything from my side, BUT ONLY WHAT HE CALCULATES FROM SCRIPT FORMULAS(from formula like balance/2500 or balance*.0002)

when I put this stoponwin command line in script, my losecount calculations brokens down and dsnt works...

why this simple & MUST HAVE command are not autoadded in bot configuration, like start()/stop() commands?...

thanks!




chance = xxxx
base = xxxx
prebet = base
enablezz = true
enablesrc = true
losecount = 0
betcount = 0

function dobet()

   if win then
      nextbet = prebet
         losecount = 0
         betcount += 1
   else
resetseed()
         losecount += 1
         betcount += 1
      nextbet = prebet
   end

   if (losecount > 16) then
      nextbet = previousbet*xxxx
   end


anyone can say how, and where i can write this stopwonwin, to dont break continued losecount lines?!
hero member
Activity: 813
Merit: 507
hei, here!

I have a two questions!?

 - - there is possibility to make that it update every "basebet" that he make from actually balance? like basebet=balance*0.0002(for example) but to update I need to type stop/start after every big win(not to use only when starting a bot), if i want to use agressive bankroll managment(its not updeiting automatically after every win) how i can do that, if can?!

 - - what command I need to write in console(and maybe in script) to make bot stop on simple next win(to close mathematical circuit and quit)?!

how I can do that & what/where I need to do that!

1) simply add a variable actualBalance and set this to your balance at the start (actualBalance=balance). Then after each bet calculate your profit/loss yourself and update your actualBalance by that amount.

2) An example of that is shown above your post. Add a variable stopOnWin=false and within your if(win) statement simply add the following:
Code:
    if stopOnWin then
      stopOnWin = false
      stop()
    end
Now you can type stopOnWin=true into your console to stop on the next winning bet.
full member
Activity: 319
Merit: 100
hei, here!

I have a two questions!?

 - - there is possibility to make that it update every "basebet" that he make from actually balance? like basebet=balance*0.0002(for example) but to update I need to type stop/start after every big win(not to use only when starting a bot), if i want to use agressive bankroll managment(its not updeiting automatically after every win) how i can do that, if can?!

 - - what command I need to write in console(and maybe in script) to make bot stop on simple next win(to close mathematical circuit and quit)?!

how I can do that & what/where I need to do that!
hero member
Activity: 813
Merit: 507


Can anyone help me on HOW TO ADD A Stop on win mechanism to this script.    Thanks in advance for the help.

Use this code and simply type stopOnWin=true into the console if you wanne stop.

Code:
-- UNTESTED!!

-- Set these 3 values to match the site you're using and what you want your baseBet to be

houseEdge = 0.8 -- ie HE = 0.8% = 0.8, HE = 1.1% = 1.1
maxPayout = 9920 -- set this to site max! 9920x = Crypto-Games.net
basebet = 0.00001000

---------------------- Don't Edit below here ;) --------------------------

basePayout = 1.1 -- start at 1.1x payout
firstLossPayout = 2
currPayout = basePayout

nextbet = basebet
chance = (100 - houseEdge) / currPayout
bethigh = true

stopOnWin = false

function dobet()
 
  if win then
    --reset Payout to 1.1x
    currPayout = basePayout

    if stopOnWin then
      stopOnWin = false
      stop()
    end
  else
    if currPayout == basePayout then
      -- first loss
      currPayout = firstLossPayout
    else
      currPayout = currPayout + 1
    end
  end

  if currPayout > maxPayout then
    stop()
    nextbet = 0
  else
    chance = (100 - houseEdge) / currPayout
  end

end
newbie
Activity: 51
Merit: 0
That's a little tricky because you don't specify the "payout" when using scripts... you specify the "chance" and the site calculates the payout... and because sites have different house edge, the payouts and chances are not the same across all sites... Undecided

So, what you do is work out the "House Edge"... hopefully the site tells you what it is... then use that and the multiplier to work out what the chance is... also, figure out what the maxPayout number is for the site you're using and set that as well!

Code:
-- UNTESTED!!

-- Set these 3 values to match the site you're using and what you want your baseBet to be

houseEdge = 0.8 -- ie HE = 0.8% = 0.8, HE = 1.1% = 1.1
maxPayout = 9920 -- set this to site max! 9920x = Crypto-Games.net
basebet = 0.00001000

---------------------- Don't Edit below here ;) --------------------------

basePayout = 1.1 -- start at 1.1x payout
firstLossPayout = 2
currPayout = basePayout

nextbet = basebet
chance = (100 - houseEdge) / currPayout
bethigh = true

function dobet()
 
  if win then
    --reset Payout to 1.1x
    currPayout = basePayout
  else
    if currPayout == basePayout then
      -- first loss
      currPayout = firstLossPayout
    else
      currPayout = currPayout + 1
    end
  end

  if currPayout > maxPayout then
    stop()
    nextbet = 0
  else
    chance = (100 - houseEdge) / currPayout
  end

end



I have tested the script .It works fine.But there is one small problem ,when the chances are less than 1% some bets are placed multiple times with same payout instead of incrementing by +1 .It do change by +1 after some bets but not successively.Also it doesn't happen with all payouts .




Can anyone help me on HOW TO ADD A Stop on win mechanism to this script.    Thanks in advance for the help.
Pages:
Jump to: