Hello Guest

Reset after x amount loses

  • 4 Replies
  • 109 Views
*

Perel

  • *
  • 2
  • +0/-0
    • View Profile
Reset after x amount loses
« on: January 27, 2019, 03:51:35 am »
Hello, I apologize if there's already a thread about this, if so please delete this and redirect to the thread. I've watched your tutorials on youtube and read some guied on your site but couldn't find it, might be my engish that is bad.

If I want to reset the bet after x amount of loses, how do I type that in the code? Is it  currentstreak == -x then resetbet. ?

Thankful for response/ Perel

*

amit888

  • **
  • 24
  • +1/-0
    • View Profile
Re: Reset after x amount loses
« Reply #1 on: January 27, 2019, 09:38:34 am »
if currentstreak == -x then
nextbet = (bet amount)
end
 ;)

*

Seuntjie

  • *****
  • 184
  • +0/-1
    • View Profile
Re: Reset after x amount loses
« Reply #2 on: January 27, 2019, 12:31:14 pm »
Do you want to reset after only the first x losses in a row, or every x losses in a row? Ie should it reset after 3 losses and again after 6 and 9, or only after the first 3 and then not again?

See this post I made about using the modulus operator (You can replace the wins/win with losses/!win):
The currentstreak variable is your current winning (+) or losing (-) streak. For example, when currentstreak is 3, you have won 3 bets in a row, if it is -4, you have lost 4 bets in a row.
Alternatively, there's the wins variable, which is the total number of wins you've had since starting the bot or since you last reset your stats.

You can use the modulus operator to determine when something is a factor of something else, for example

Code: [Select]
if currentstreak%3==0 and win then
--this will execute after EVERY 3 winning bets in a row, so after 3 in a row, 6 in a row, 9 in a row etc
end
if currentstreak==3 then
--this will execute after exactly 3 wins in a row
end
if wins%3==0 and win then
--after every 3 wins, regardless of whether they are in a streak or not
end
if wins == 3 then
--after you've won exactly 3 bets and then never again
end

*

Perel

  • *
  • 2
  • +0/-0
    • View Profile
Re: Reset after x amount loses
« Reply #3 on: January 27, 2019, 07:56:42 pm »
Thanks for the responses!

Is there any command to reset the code in programming mode? For example something like this?

if currentstreak == -4  then
                 reset=  bot ?

Regards/ Perel

*

Seuntjie

  • *****
  • 184
  • +0/-1
    • View Profile
Re: Reset after x amount loses
« Reply #4 on: January 27, 2019, 09:39:32 pm »
Thanks for the responses!

Is there any command to reset the code in programming mode? For example something like this?

if currentstreak == -4  then
                 reset=  bot ?

Regards/ Perel

No, because each script is different and there is no conceivable way for DiceBot to know which variables to reset. You need to reset the applicable variables in your own code.

If you are using a built in function, like martingale, you can use the resetbuiltin function (just check the spelling and capitalization in the methods/functions box in the bot).