Pages:
Author

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

full member
Activity: 148
Merit: 100
hi all!

i need to make a script with this parameters:

chance array (20.00,21.00,22.00,23.00)

bet array (1000,2000,3000,4000)

nexbet = previousbet + array (16%,17%,18%,19%)


ex:   
1 bet : chance 20,00, bet 1000, nexbet 16% 
2 bet : chance 21,00, bet 2000, nexbet 17%
3 bet:  chance 22,00, bet 3000, nexbet 18%


anyone help me?

tnx 4 all
newbie
Activity: 13
Merit: 0
your question is a bit ambiguous. Do you want your chance to increment and decrement by 1 (as in 66,67,68,67,68 etc) or increase and decrease by 1% (as is 66,66.66,67.3266,66.66,67.3266 etc)

I'm assuming you want to increment:

in pseduo code

if win then chance = chance +1

else chance = chance -1

if chance > 82 then chance = 82

if chance < 50 then chance 50.


Now just convert that to LUA and you're golden Smiley

Programming is basically english. Just set your rules out in as unambiguous terms as possible as I did above and you've written the program, then it's just a matter of syntax

Thank you seuntjie, Yes I meant increment and will try your codes. Smiley

believed or not your amazing bot is a reason I've become so interested in programming.

you're the best.
legendary
Activity: 1717
Merit: 1125
How is possible to increase chance by 1% after each win and decrease it by 1% after each lose.
Lets say starting chance is %66 and it can go up to %82 and and down to %50.
 Huh Huh frustrated, I tried a lot but seems my programming knowledge isnt good enough to code it myself.

your question is a bit ambiguous. Do you want your chance to increment and decrement by 1 (as in 66,67,68,67,68 etc) or increase and decrease by 1% (as is 66,66.66,67.3266,66.66,67.3266 etc)

I'm assuming you want to increment:

in pseduo code

if win then chance = chance +1

else chance = chance -1

if chance > 82 then chance = 82

if chance < 50 then chance 50.


Now just convert that to LUA and you're golden Smiley

Programming is basically english. Just set your rules out in as unambiguous terms as possible as I did above and you've written the program, then it's just a matter of syntax
newbie
Activity: 13
Merit: 0
How is possible to increase chance by 1% after each win and decrease it by 1% after each lose.
Lets say starting chance is %66 and it can go up to %82 and and down to %50.
 Huh Huh frustrated, I tried a lot but seems my programming knowledge isnt good enough to code it myself.
newbie
Activity: 13
Merit: 0
HCP Works great!

Much appreciated buddy.
HCP
legendary
Activity: 2086
Merit: 4361
just track "profit" during a winning streak...

Code:
... stuff ...
winStreakProfit = 0
... other stuff ...

function dobet ()

  if (win) then
    winStreakProfit = winStreakProfit + lastBet.profit
   
    if winStreakProfit >= 0.0005 then
      nextbet = basebet
    else
      nextbet = #insertBetStuffHere
    end
 
    ... other win stuff ...

  else

    winStreakProfit =0

    ... other loss stuff ...

  end

end

end
newbie
Activity: 13
Merit: 0
Thank you seuntjie for your help and explanation.
I haven't tried your codes yet but I got the idea. Smiley

I was wondering if you (or any other programmer here) have time and can help me how is possible to reset to base bet anytime when x amount of streak BTC is gained.
this amount should not be depending on the started balance, I mean not necessarily is profit.
for example when I started betting with the balance of 0.01 and I lost 0.001 (after few bets) then anytime I had a streak of winning of BTC 0.0005 I want the bot to goes to base bet.

note: it probably has the same function as on advanced mode "reset after x BTC streak win" yet I wanted to do some other stuff after this happened which is not possible on advanced mode.

Grateful if you can share your ideas.
legendary
Activity: 1717
Merit: 1125
Hi seuntjie let me ask if the downloading link in the front page of this thread is updated or not..
I would like to test this script trying to use it in some dice game to test and modify some settings with my own..
Do you have latest version or v3 is the final?


You can always get the latest version of the bot at https://bot.seuntjie.com/botpage.aspx (or just on https://bot.seuntjie.com) as the page updates to the latest version whenever I upload one. It also shows the date that version was uploaded on, at the time of writing, the latest version is 3.3.4 and uploaded on May 15, 2017 (almost 2 weeks ago)
legendary
Activity: 1007
Merit: 1000
Hi seuntjie let me ask if the downloading link in the front page of this thread is updated or not..
I would like to test this script trying to use it in some dice game to test and modify some settings with my own..
Do you have latest version or v3 is the final?


    This thread is for help programming custom scripts, the link on the first page is to the other thread for the bot itself.  Page 1 of that thread should have the download link.  
hero member
Activity: 700
Merit: 500
Massive price drop coming...
Hi seuntjie let me ask if the downloading link in the front page of this thread is updated or not..
I would like to test this script trying to use it in some dice game to test and modify some settings with my own..
Do you have latest version or v3 is the final?
newbie
Activity: 29
Merit: 0
thank you for the help. I managed to figure it out on my own and the script does just what I want. Here it is to anyone who is interested.

Code:
chance=49.5
basebet=0.00000001
nextbet=basebet
resetseed()
lossCounter=0

function dobet()

if win then

 nextbet=previousbet

  if lossCounter >= 10 then
   nextbet=basebet
   lossCounter=0
  end

else


I like your script!! However, how would it be possible to start the same script but doing a prebetting? I mean, only after 5 row red sreak betting at basebet for example?
 lossCounter=lossCounter+1

 nextbet=previousbet*2

end

end

Thanks!

You can make significant profits with this script if you  set the lossCounter <= to a bigger number. But the risk/reward is a big one.
If you set it to 15 you will be seeing about $100/hour but open yourself up to losing it all on a 10+ losing streak. You also have to have a bigger bank roll to do that.  .3 btc minimum but even that can we wiped clean. 10-12 is very safe even with .1 btc, with 12 bringing in around $100-150/24 hours.
legendary
Activity: 1717
Merit: 1125
sorry mates,

Maybe a silly question: but can you help me here instead of stop, to reset the bot again ?
means when I lost that amount, bot reconsider again the same amount of my new balance to bet.

  elseif balance < stopLossTarget then
    -- we lost too much
    stop()

  end

Thank you.

This depends on your script. In the programmer mode, if you want to reset your strategy, YOU need to reset all of the applicable variables for your script. An easy way to do this might be to move all of the variable declarations usually done at the top of the script in a function called reset and just call the reset function outside of the dobet function.

for example:

Instead of:
Code:
base=1
test=2
max=100
min=0
startbal=balance
stoploss=startbal+10
chance=49.5
nextbet=base

function dobet()
--do your stuff here
if balance>stoploss then
base=1
test=2
max=100
min=0
startbal=balance
stoploss=startbal+10
chance=49.5
nextbet=base
end
--do your other stuff here
end


Try something like:
Code:
--declare your reset function
function reset()
base=1
test=2
max=100
min=0
startbal=balance
stoploss=startbal+10
chance=49.5
nextbet=base
end

--call the reset function before you start the script to initialize and instantiate your variables
reset()

function dobet()
--do your stuff here
if balance>stoploss then
--call the reset function to reset your script.
reset()
end
--do your other stuff here
end
newbie
Activity: 13
Merit: 0
sorry mates,

Maybe a silly question: but can you help me here instead of stop, to reset the bot again ?
means when I lost that amount, bot reconsider again the same amount of my new balance to bet.

  elseif balance < stopLossTarget then
    -- we lost too much
    stop()

  end

Thank you.
HCP
legendary
Activity: 2086
Merit: 4361
The betting speed of the bot is limited by the site itself and how they do their API request processing... Some sites give priority to "larger" bets... I know that with crypto-games.net, bets above 1000 sats get priority... so if you're minbetting, it goes a lot slower.

But then I can bet on a different site (DuckDice) with like 10 sats... and it goes just as fast... so maybe try a different site
newbie
Activity: 10
Merit: 0
who does one make bet go faster
legendary
Activity: 1717
Merit: 1125
Uh it did it again! After a bet of 0.00065536 it loses. On the console screen it shows another bet of x2 which is what it is supposed to do. But the left screen doesn't register. It shows neither a winner or a loser just nothing. A quick check on the website shows that the final bet was a winner which should have reset the script yet nothing. The bot just stops in it's tracks as if the website did not send the data out.

Maybe I need to change sites? I'm using Nitrogen.

Hm, i've not heard of similar issues on nitrogen. I will look into it. In the mean time, I do suggest you play on another site. You can take your pick off of any one of the list on https://bot.seuntjie.com
I might caution against using bitsler at this time, as it might be doing the same, but I have not verified that yet. So use them, or not. Your choice.
legendary
Activity: 1717
Merit: 1125
Are we able to use the < and > in the code?

For example say After 10 total losses in a martingale run I want to reset to base on the next win but keep x2 bets going on losses.

Code:
!win > 10 then

does that work?
Yes, you can use < and >, but not like you're using it.

win is a boolean, that means true or false. !win means the opposite of win.

So if win = true

print(win) will print out true
print(!win) will print out false.

You cannot compare boolean values with integers. You can for example use

Code:
if currentsreak>10 then

since currentstreak is an integer. Take a look at this article about variables and the variables available in the bot: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables
legendary
Activity: 1007
Merit: 1000
1. how can I set the loss multiplier to multiple after each two losses in a row not after each 1 loss.  Huh
A simple counter that counts to 2 and then resets...

Code: (UNTESTED PseudoCode)
... setup ...
lossCounter = 0
multiplier = 2

function dobet()

  if (win) then
    ... yay!, do win stuff, like resetting nextbet to your base

  else
    lossCounter = lossCounter +1
    if lossCounter == 2 then
      nextbet = previousbet * multiplier
      lossCounter = 0

    else
      nextbet = previousbet

    end

  end

end



 Add lossCounter = 0 to the win side to.  Otherwise it's just 2 losses and not 2 in a row.  That was exactly the code in my head....  Smiley 
HCP
legendary
Activity: 2086
Merit: 4361
1. how can I set the loss multiplier to multiple after each two losses in a row not after each 1 loss.  Huh
A simple counter that counts to 2 and then resets...

EDIT: I knew there was something I was forgetting... Thanks Chilly! Wink

Code: (UNTESTED PseudoCode)
... setup ...
lossCounter = 0
multiplier = 2

function dobet()

  if (win) then
    ... yay!, do win stuff, like resetting nextbet to your base
    lossCounter = 0

  else
    lossCounter = lossCounter +1
    if lossCounter == 2 then
      nextbet = previousbet * multiplier
      lossCounter = 0

    else
      nextbet = previousbet

    end

  end

end

Quote
2. How I can code to play only with a certain amount of my bankroll. I mean lets say I have a bankroll of 0.02 btc but I want to bet with only 0.001 of my bankroll.
----I want when I reached to a certain level of profit, lets say for example once I reached to 0.0001 profit, bot will reset above data.... basically when I got 0.0001 profit then my balance will be 0.02 +0.0001 so at this point bot consider this as a rest point and again plays only with 0.001 out of my new total bankroll.
----What I mean by playing with certain amount of bankroll, is like if the next bet cause me to go less than that amount bot will stop the play and wont go for next bet. so in case that amount of my bankroll that I playing with went to a losing streak bot will stop.
The bot has built in "profit" and "balance" variables that can be used... but I prefer to create my own variable for tracking "runProfit", as the inbuilt profit does not take into account if you get tips or rain or make money from other manual gambling at the site... Wink

Basically, you just create a start point and then go from there:

Code: (UNTESTED PseudoCode)
... setup stuff ...
runProfit = 0
startBalance = balance

-- NOTE: both of these are actual amounts won and lost, not your balance target!
profitTarget = 0.0001
stopLossAmount = 0.001

stopLossTarget = startBalance - stopLossAmount --stop if we get lower than this

function dobet()

  runProfit = balance - startBalance
  
  if runProfit >= profitTarget then
    --reset point
    startBalance = balance
    stopLossTarget = startBalance - stopLossAmount -- set new stopLossTarget

  elseif balance < stopLossTarget then
    -- we lost too much
    stop()

  end

  ... do win and loss stuff here ...

end

Hope that helps...
legendary
Activity: 1717
Merit: 1125
Hello
Thanks again for all your help
I have one more question
Why when my chances are 49.50 when playing low it is ok but when changed to Hi it changes to 49.49??

That depends on the site you're playing on. it has to do with how some sites handles/parses the chance. You will see on rollin for example. you can set your chance to 49.5, but your actual chance will be 49 or 50, but not 49.5, because the site only allows integer chance.
Shouldn't one begin to see the only integer chance as an advantage to a player given that it sums everything in between? In the same vein, isn't it disadvantageous  to play in a site with 3 decimal places, given that the probability of losing is further increased? Take for instance, playing 1.02x bet on a site with 3 decimal places outcome, would entail exposure to almost 30,000 numbers against a player.

Not at all. It doesn't make a difference in the math, it just limits the player. Whether you need to roll below 50 on a site that only rolls integers or on a site that allows up to 4 decimals, your ODDS remain 50%. With integers, there's only 50 winning rolls out of 100 possible rolls (50%), with a site with 4 decimals, there's 50 000 winning rolls out of 100 000 possible rolls (50%). The amount of outcomes that will make you lose alone is irrelevant, you need to look at it as a percentage of the whole.  

Sites with more decimals are usually better imo, because it gives the player more freedom, more choice, and allows higher/lower payouts. Integer only sites only allow payouts of up to 99x (roll 0 or 99), where are 4 decimal sites allow payouts of up to 990 000x.

On integer based sites, 1.02 payout is 97%. when playing on a 4decimal site, 97% pays out 1.0206. Or when playing on specifically 1.02 payout, you get almost 600 (or 0.0588%) extra rolls to be able to hit (when rolling low, roll below 97 for integers or below 97.0588 for 4 decimal sites), which is beneficial to the user.

Pages:
Jump to: