Pages:
Author

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

HCP
legendary
Activity: 2086
Merit: 4314
how I can simple make something:

if currentstreak "every number" then
do something
end

11111222223333344444

for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001
Do you mean every 5 loss streak? 5 win streak? or something else?

Personally, I would do something like:
Code:
myLossStreakCounter = 0
streakLimit = 5

function dobet()
...
  if (!win) then
    -- If it was a loss, increment the counter
    myLossStreakCounter = myLossStreakCounter + 1
  end
  ...
  if myLossStreakCounter == streakLimit then
    -- reached the streak limit, increase bet and reset counter
    nextbet = previousbet + 0.00000001
    myLossStreakCounter = 0
  end
  ...

If should be relatively obvious how the code can be modified to be used for a Win streak


Quote
I dont understand, last period when bot was updates with this "blue words" in code box, they dont like = simbol.

'then' expected, got '='
This error suggests that you have a syntax error in your code. The bot thinks you're trying to use an "if something then" command, but it can't find the "then" part of the command before it finds an "=".

Usually it shows a line number where the error occurred. Check near there for incorrect code... failing that, you'd need to post the code for others to be able to debug it properly.
legendary
Activity: 1717
Merit: 1125


This thread is for the programmer mode in DiceBot, NOT console scripts that you run in your browser.

I would not recommend using anything that runs in your browser console.
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
I need a Good programmer, that can help me create a script for bitsler Gambling site, I have a personal strategy that I use, and I want to create a script for it, so I can just past the script on my browser console option and start betting automatically!, I will pay you...... So pls reply to this post let me know how good you are, thank you guys
full member
Activity: 319
Merit: 100
how I can simple make something:

if currentstreak "every number" then
do something
end

11111222223333344444

for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001

I dont understand, last period when bot was updates with this "blue words" in code box, they dont like = simbol.

'then' expected, got '='
HCP
legendary
Activity: 2086
Merit: 4314
Is there any way to round numbers off easily?
There are math.floor() and math.ceil() functions in LUA (the scripting language of the dice bot), that will allow you to "round" to whole numbers... However, they don't do typical ".5" rounding... They just go up or down to the next whole number, regardless of the decimal. So, math.floor(4.8 ) will result in 4... and math.ceil(4.1) will result in 5.

One trick to "fix" this and have more "normal" rounding, is to simply add 0.5 and use math.floor():
Code:
x = 4.3
y = 4.8
z = 4.5

print("Normal Rounding")
print("x: ",x," --> ", math.floor(x+0.5))
print("y: ",y," --> ", math.floor(y+0.5))
print("z: ",z," --> ", math.floor(z+0.5))

would yield:
Code:
Normal Rounding
x:  4.3  -->    4
y:  4.8  -->    5
z:  4.5  -->    5

In your example:
Code:
chance=89
print("chance: ",chance)
chance = chance / 2
print("chance BEFORE: ",chance)
chance = math.floor( chance + 0.5)
print("chance AFTER: ",chance)

would result in this output:
Code:
chance:     89
chance BEFORE:  44.5
chance AFTER:   45

Hope that helps.
newbie
Activity: 23
Merit: 1
Is there any way to round numbers off easily? For instance if I have the following code...

Code:
basebet=.00000001
chance=89
function dobet()

if win then
   chance=chance/2
   nextbet=basebet
end

Since the chance on a win will be split in half then the chance would be 44.5. What if I wanted to round the chance to the next higher whole chance being 46? is there a simple way to do this?
legendary
Activity: 1717
Merit: 1125
Not sure if the programming mode support this:

betsides = [L, H, L, L, H, L, H, H, L, L....]
stakes = [1, 1, 1, 2, 3,4, 5, 6...]
betodds = [2, 2, 2, 3, 4, 5, ....]

if win
 nextside = betsides[0]
 nextstake = stakes[0]
 nextodd = betodds[0]

else //lose
 nextside = betsides[currentstreak]
 nextstake = stakes[currentstreak]
 nextodd = betodds[currentstreak]

Questions are:
1) Will above variables taken for use in the bot (nextside, nextstake, nextodd)? If not, how to implement above?
2) Is the first lose will cause currentstreak = 1?
3) If above array list suported, what is the maximum size? Basically I need 3000+

1+3) https://www.lua.org/pil/11.1.html
2) See the tutorials on https://forum.seuntjie.com/index.php?topic=2.0, specifically https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables

Also, see just a quick tutorial/example for if statements regarding if statements in LUA.
jr. member
Activity: 225
Merit: 4
Not sure if the programming mode support this:

betsides = [L, H, L, L, H, L, H, H, L, L....]
stakes = [1, 1, 1, 2, 3,4, 5, 6...]
betodds = [2, 2, 2, 3, 4, 5, ....]

if win
 nextside = betsides[0]
 nextstake = stakes[0]
 nextodd = betodds[0]

else //lose
 nextside = betsides[currentstreak]
 nextstake = stakes[currentstreak]
 nextodd = betodds[currentstreak]

Questions are:
1) Will above variables taken for use in the bot (nextside, nextstake, nextodd)? If not, how to implement above?
2) Is the first lose will cause currentstreak = 1?
3) If above array list suported, what is the maximum size? Basically I need 3000+
newbie
Activity: 23
Merit: 1
Quote
Not sure about the probability, my stats isn't that good.

How to calculate the next bet to ensure you break even: You will need to track your streak profit. to do this, have a variable that you add your losses to when you lose and reset when you win.
Then you can use the formulas payout=(100-edge)/chance and profit=(betamount*payout)-betamount to calculate what your bet amount should be

so if you've had 30 losses in a row and you have, say, -35 profit for the losing streak, you can calculate your next bet to break even using

-(streakprofit) = (x * ((100- site.edge)/chance))-x
refactors to
x= -(streakprofit)/payout
(this assumes streakprofit is negative)


I kind of understand this, but am unsure of how I can fit this into my code so that it works correctly. So does the x variable represent my next bet? Sorry for my programming logic ignorance. I'll try my best at wrapping my head around it for now.
legendary
Activity: 1717
Merit: 1125
How can I calculate the probability of rolls if I start at chance=1 and keep increasing the chance by 1 on each loss? What would be the probability that it would reach chance=90? also, how would I increase each bet on loss so that it would stay in profit or at least break even? In my code below I'm toying with using exponents, but I'm just throwing random numbers at it to see what sticks so far.
Code:
basebet=1
nextbet=basebet
chance=1
function dobet()

if win then
nextbet=basebet
chance=1
end

if !win then
chance=chance+1
nextbet=previousbet*1.165^1.75
end

Not sure about the probability, my stats isn't that good.

How to calculate the next bet to ensure you break even: You will need to track your streak profit. to do this, have a variable that you add your losses to when you lose and reset when you win.
Then you can use the formulas payout=(100-edge)/chance and profit=(betamount*payout)-betamount to calculate what your bet amount should be

so if you've had 30 losses in a row and you have, say, -35 profit for the losing streak, you can calculate your next bet to break even using

-(streakprofit) = (x * ((100- site.edge)/chance))-x
refactors to
x= -(streakprofit)/payout
(this assumes streakprofit is negative)
newbie
Activity: 23
Merit: 1
How can I calculate the probability of rolls if I start at chance=1 and keep increasing the chance by 1 on each loss? What would be the probability that it would reach chance=90? also, how would I increase each bet on loss so that it would stay in profit or at least break even? In my code below I'm toying with using exponents, but I'm just throwing random numbers at it to see what sticks so far.
Code:
basebet=1
nextbet=basebet
chance=1
function dobet()

if win then
nextbet=basebet
chance=1
end

if !win then
chance=chance+1
nextbet=previousbet*1.165^1.75
end
legendary
Activity: 1717
Merit: 1125
you can use site.edge to get the edge for the site you are currently playing on.

The site object contains some basic details for the site and the users stats as they come from the site, and the class definition can be found at https://github.com/Seuntjie900/DiceBot/blob/master/DiceBot/cDiceBot.cs#L5976
newbie
Activity: 46
Merit: 0
@Agent009

This script should do what you've asked... As always, it hasn't been extensively tested (I simply used the simulation and exported the results to check it), so use at your own risk!

You will need to modify the "edge" variable to match the "House Edge" of the site you want to play on... 1% HouseEdge = 1... 0.8% HE = 0.8 etc. Then set the basePayout and baseBet to suit your requirements. They are defaulted to 10x payout and 0.00000010 BTC

Code:
-------------------------------------------------------------------------------
--
-- Payout Martingalge Script for Agent009 by HCP
--
-- BTC Donations to: 33gzi64cvCr4i9ECGPwvZktzS2qknRUFhC
--
-------------------------------------------------------------------------------

edge       = 1 -- set to the house edge of your site
basePayout = 10 -- set to the base payout that you want
payout     = basePayout

chance     = (100 - edge) / payout -- calculate chance based on house edge
baseChance = chance

baseBet = 0.00000010 -- 1 "unit"
nextbet = baseBet -- set our initialBet

bethigh = false

function dobet()

    if win then
        -- reset to base bet/chance/payout
        nextbet = baseBet
        chance  = baseChance
        payout  = basePayout
       
    else
        -- increase payout
        payout  = payout + 1
       
        -- recalculate chance
        chance  = (100 - edge) / payout
       
        -- increase bet by 1 unit
        nextbet = previousbet + baseBet
    end

end

HCP thank you very much! Smiley
I will test it today and then talk about the results...
HCP
legendary
Activity: 2086
Merit: 4314
@Agent009

This script should do what you've asked... As always, it hasn't been extensively tested (I simply used the simulation and exported the results to check it), so use at your own risk!

You will need to modify the "edge" variable to match the "House Edge" of the site you want to play on... 1% HouseEdge = 1... 0.8% HE = 0.8 etc. Then set the basePayout and baseBet to suit your requirements. They are defaulted to 10x payout and 0.00000010 BTC

Code:
-------------------------------------------------------------------------------
--
-- Payout Martingalge Script for Agent009 by HCP
--
-- BTC Donations to: 33gzi64cvCr4i9ECGPwvZktzS2qknRUFhC
--
-------------------------------------------------------------------------------

edge       = 1 -- set to the house edge of your site
basePayout = 10 -- set to the base payout that you want
payout     = basePayout

chance     = (100 - edge) / payout -- calculate chance based on house edge
baseChance = chance

baseBet = 0.00000010 -- 1 "unit"
nextbet = baseBet -- set our initialBet

bethigh = false

function dobet()

    if win then
        -- reset to base bet/chance/payout
        nextbet = baseBet
        chance  = baseChance
        payout  = basePayout
       
    else
        -- increase payout
        payout  = payout + 1
       
        -- recalculate chance
        chance  = (100 - edge) / payout
       
        -- increase bet by 1 unit
        nextbet = previousbet + baseBet
    end

end
newbie
Activity: 6
Merit: 0
basebet=0.00000001
nextbet=basebet
Chance=47
function dobet()

if!win then
nextbet=basebet*1
else
nextbet=basebet
end

bethigh=true
print(curentprofit)

count=count+3
if lastBet.Roll >50.00 and lastBet.Roll <99.99 then
count=0
end

if win then
nextbet=basebet*3
end
if currentstreak==-1 then
nextbet=basebet
end
bethigh=false
print(curentprofit)
if currentstreak==-1 then
nextbet=previousbet*2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end

if currentstreak==-1 then
nextbet=basebet

bethlow=false
print(curentprofit)

count=count+3
if lastBet.Roll >0.01 and lastBet.Roll <49.99 then
count=0
end

if win then
nextbet=basebet*2
end
if currentstreak==-1 then
nextbet=basebet
end
end

bethigh=true
print(curentprofit)
if currentstreak==-1 then
nextbet=previousbet*2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end
if win then
nextbet=previousbet*2/2
end
if currentstreak==-1 then
nextbet=basebet
end
end


Hello! That's what I got according to the logic of statistics. But some functions do not work correctly. Cannot catch 3 consecutive bets <50 or> 50. See what is wrong.
hero member
Activity: 1372
Merit: 512
Hello! The above strategy is written which I use myself. If you turn it into a bot, then there will be a fairy tale. In this form, as described above, I have been testing for more than six months. The results are excellent. Anyone help with writing the code.

Just remember all strategies works in the beginning till you hit it worse red streak ;-) but it can be a fairytale is you stop on time
newbie
Activity: 6
Merit: 0
Hello! The above strategy is written which I use myself. If you turn it into a bot, then there will be a fairy tale. In this form, as described above, I have been testing for more than six months. The results are excellent. Anyone help with writing the code.
legendary
Activity: 1717
Merit: 1125
Seunjti will be only write the code

No I won't. I generally don't help with programmer mode scripts. I might give a hint or a nudge in the correct direction or show you where something went wrong IF you tried it yourself, but I most definitely do not write scripts for people from scratch.

There are other members of the community that does help though, like HCP and chilly2k. You can also post on forum.seuntjie.com, there are some people over there that help as well.
legendary
Activity: 2366
Merit: 1130
Would you like to write code base on the example of bet amounts, chance, win/loss result etc to make it more helpful for us or something else, thanks in advance if you write the code.
I don't get your question. Seunjti will be only write the code for dicebot after you tell him what's your strategy with base bet, winning chance, % after lose or %after win, how many rolls, etc.
How can he write the code if there is no such information?
hero member
Activity: 1134
Merit: 517
Make a set of examples with bet amounts, chance, win/loss result etc.
Would you like to write code base on the example of bet amounts, chance, win/loss result etc to make it more helpful for us or something else, thanks in advance if you write the code.
Pages:
Jump to: