Bitcoin Forum
December 12, 2024, 03:36:11 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 [60] 61 62 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 125464 times)
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
December 20, 2019, 01:38:43 PM
 #1181

I appreciate the prompt response.
Here is my issue: I have a script that runs for 10k bets and then it stops. I like it to stop. Is there a way if last run was successful to delay x seconds and restart the script without a manual intervention?
Thank you!

sorry for the late response, idk if you'll still see this. lua has a sleep(milliseconds:int) function that you can use to do nothing for <milliseconds>. You can reset your script yourself by resetting your variables in your script and using resetstats if necessary. Once you've called the stop method, the bot is stopped and can only be restarted manually.

sree6020
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
April 30, 2020, 02:15:03 PM
 #1182

Hello can someone please help me with a code that works like this:

First a bet is placed such that basebet=0.00000001 ,bethigh=true, chance=49.5.If this bet wins then nextbet is placed with same conditions as before.But if the bet losses then nextbet is 2X the previous bet( i.e., 0.00000002 in this case) and remaining conditions are similar. And if the second bet wins ,then nextbet resets to 0.00000001 and continues the cycle and if loss then nextbet again becomes  2X of previous bet.This standard martingale only continues until there are 3 consecutive losses.That is, when a bet of 0.00000004 is placed and lost ,then nextbet becomes 0sats (since primedice supports zero amount bets).This zero bet is placed consecutively until 1 win comes.When one win comes then nextbet becomes 2X of the bet that was placed at 3rd consecutive loss( that is 0.00000008 in this case).Again if this bet wins then whole cycle resets and continues from first,And if this bet losses the again martingale is applied upto 2 more stages like this:8sat,16sat,32sat.....here if bet with 32 sat losses then it becomes the new value to be doubled after placing consecutive zero amount bets.

For better understanding I am attaching a simulated bet list here:

1.  0.00000001----------------win
2.  0.00000001----------------win
3.  0.00000001----------------win
4.  0.00000001-----------------loss
5.  0.00000002-----------------win
6.  0.00000001-----------------win
7.  0.00000001-----------------loss-----:
8.  0.00000002----------------loss -----: 3 consecutive losses.so nextbet becomes 0 and continues until 1 win is obtained
9.  0.00000004----------------loss------:
10.0.00000000----------------loss
11.0.00000000----------------win--------1 win is obtained with zero bet so nextbet is 2X of previously lost highest bet (  2*0.00000004)
12.0.00000008----------------win-------here, since this bet is win so cycle again starts from first .but if this was loss,then again martingale continues until
                                                         8,16,32. If bet with 32 sat losses it becomes the new number to be doubled again after zero bet streak.
                                                         
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
April 30, 2020, 11:02:40 PM
 #1183

That looks relatively simple... so I think this code should work.

NOTE: As always, I have not thoroughly tested this... so I accept no responsibility if you lose your entire balance! Tongue

Code:
chance  = 49.5
basebet = 0.00000001
nextbet = basebet
bethigh = true

lossStreak = 0

hibernate      = false
lastMartingale = 0
hibernatebet   = 0.00000000 -- primedice zero bets!

function dobet()

    if win then
        if hibernate then
            -- first win after losing streak
            -- restart Martingale
            nextbet    = lastMartingale * 2
            lossStreak = 0
            hibernate  = false
        else
            nextbet    = basebet
            lossStreak = 0
        end
    else
        lossStreak = lossStreak + 1
        if (lossStreak == 3) then
            --losing streak detected, hibernate
            hibernate      = true
            lastMartingale = previousbet
        end
        if hibernate then
            nextbet = hibernatebet
        else
            nextbet = previousbet * 2
        end
    end
   
end

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
sree6020
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
May 01, 2020, 07:20:32 AM
 #1184

That looks relatively simple... so I think this code should work.

NOTE: As always, I have not thoroughly tested this... so I accept no responsibility if you lose your entire balance! Tongue



Thanks for the code @HCP .....and your disclaimer is duly noted Cheesy Cheesy Cheesy


leborg
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
May 22, 2020, 03:06:01 AM
 #1185

Hi guys,
I'm new here, and obviously a beginner in programming.  I use a script already available on Seuntjie forum. It,s working great, but the enablesrc doesn't seem to work sith the win or loss stop/reset. So I was looking to add it in the script. The way i wrote it, when i got a loosing streak of 1, it's stop. But, off course, i want a to play with a longer series than 1 loss.  Unfortunately,  when I want a loosing streak of 2, or more, it doesn't stop. So I gues my code is faulty. Here is the code, if anybody wish to help me.

Code:
chance    = 95
basebet   = .000001131
nextbet   = .000001131
bethigh   = true
losecount = 0
enablesrc = true --set to true to use stop/reset conditions
--settings from advanced mode


function dobet()


   
if (win) then
   chance = 95
   nextbet = basebet
   losecount = 0
end
if (!win) then
   losecount += 1
   if (losecount > 1) then
       nextbet = previousbet*1.75
   chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
   if chance < 49.5 then
   chance = 49.5
end
   bethigh = !bethigh
      print ("LOSE")
   print(nextbet)
   print(chance)
   print(profit)
   print(bets)
   else
   nextbet = previousbet*1.75
   chance  = (1/(((basebet+nextbet))/nextbet))*100
      if chance<49.5 then
   chance=49.5 end
   bethigh = !bethigh
   print ("LOSE")
   print(nextbet)
   print(chance)
   print(profit)
   print(bets)

if (losecount == 2) then
       stop()
   end

 end
 end

 
end/

http://
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
May 22, 2020, 03:49:08 AM
 #1186

this is a situation where using [ code ] tags and properly indenting your code makes things a lot easier!

Code:
chance    = 95
basebet   = .000001131
nextbet   = .000001131
bethigh   = true
losecount = 0
enablesrc = true --set to true to use stop/reset conditions
--settings from advanced mode

function dobet()
  
  if (win) then
    chance = 95
    nextbet = basebet
    losecount = 0
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      nextbet = previousbet*1.75
      chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
      if chance < 49.5 then
        chance = 49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)
    else
      nextbet = previousbet*1.75
      chance  = (1/(((basebet+nextbet))/nextbet))*100
      if chance<49.5 then
        chance=49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)

      if (losecount == 2) then
        stop()
      end

    end
  end
end

Looking at that indented correctly, you can quickly see that your "if (losecount == 2) then" statement is actually contained in the else section of an "if (losecount > 1)" statement:
Code: (EDITED FOR CLARITY)
...
function dobet()
  
  if (win) then
    ...
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      ...
    else -- losecount must be <= 1
      ...
      if (losecount == 2) then -- THIS CAN NEVER BE TRUE HERE!
        stop()
      end

    end

  end

end
So, basically, your highlighted code will never get executed... because losecount cannot be <= 1 and == 2!!?! Roll Eyes

You might want to make sure your code is properly formatted in future so that you are actually adding your code into the correct section and not accidentally adding it into another section by mistake.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
leborg
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
May 22, 2020, 12:57:52 PM
Last edit: May 22, 2020, 01:18:41 PM by leborg
 #1187

this is a situation where using [ code ] tags and properly indenting your code makes things a lot easier!

Code:
chance    = 95
basebet   = .000001131
nextbet   = .000001131
bethigh   = true
losecount = 0
enablesrc = true --set to true to use stop/reset conditions
--settings from advanced mode

function dobet()
  
  if (win) then
    chance = 95
    nextbet = basebet
    losecount = 0
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      nextbet = previousbet*1.75
      chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
      if chance < 49.5 then
        chance = 49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)
    else
      nextbet = previousbet*1.75
      chance  = (1/(((basebet+nextbet))/nextbet))*100
      if chance<49.5 then
        chance=49.5
      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)

      if (losecount == 2) then
        stop()
      end

    end
  end
end

Looking at that indented correctly, you can quickly see that your "if (losecount == 2) then" statement is actually contained in the else section of an "if (losecount > 1)" statement:
Code: (EDITED FOR CLARITY)
...
function dobet()
  
  if (win) then
    ...
  end
  if (!win) then
    losecount += 1
    if (losecount > 1) then
      ...
    else -- losecount must be <= 1
      ...
      if (losecount == 2) then -- THIS CAN NEVER BE TRUE HERE!
        stop()
      end

    end

  end

end
So, basically, your highlighted code will never get executed... because losecount cannot be <= 1 and == 2!!?! Roll Eyes

You might want to make sure your code is properly formatted in future so that you are actually adding your code into the correct section and not accidentally adding it into another section by mistake.


Thanks for your help.

so, I should enter my code line here to make it work?:

  if (!win) then
    losecount += 1
    if (losecount > 1) then
      nextbet = previousbet*1.75
      chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
      if chance < 49.5 then
        chance = 49.5
     if (losecount == 2) then
        stop()

      end
      bethigh = !bethigh
      print ("LOSE")
      print(nextbet)
      print(chance)
      print(profit)
      print(bets)



again thanks for your time.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
May 24, 2020, 07:37:56 AM
 #1188

No. You're putting that into the "if chance < 49.5" block... so it'll only be evaluated if the chance ends up being set to less than 49.5

I'd suggest putting it right underneath the losecount +=1 line...
Code:
...
  if (!win) then
    losecount += 1
    if (losecount == 2) then
      stop()
    end
    ...
[code]
[/code]

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
leborg
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
May 29, 2020, 02:15:13 AM
 #1189

No. You're putting that into the "if chance < 49.5" block... so it'll only be evaluated if the chance ends up being set to less than 49.5

I'd suggest putting it right underneath the losecount +=1 line...
Code:
...
  if (!win) then
    losecount += 1
    if (losecount == 2) then
      stop()
    end
    ...
[code]
[/code]

Again, thanks a lot sir!
sree6020
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
June 01, 2020, 01:40:20 PM
 #1190

Is there any way I can change to a custom client seed from inside of dice bot(instead of resetting seed to a random one)
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
June 02, 2020, 01:27:21 AM
 #1191

Not that I'm aware of... it would probably require the site's API to be updated/modified to allow specific custom client seeds to be used.  Additionally, not all sites even support the resetseed() function.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
June 02, 2020, 05:40:14 PM
Merited by DarkStar_ (7)
 #1192

Is there any way I can change to a custom client seed from inside of dice bot(instead of resetting seed to a random one)

No. Re-using client seeds (like many people do because of superstitions) compromises provably fair methods, especially when using a bot with predictable betting patterns (It would still be very difficult from the server side to do anything with it, but it becomes possible). It's not as much of a problem with nonce based sites, but with per-bet sites, it completely invalidates the fairness of the bet. As such, to ensure the fairness of bets placed with the bot, it will select a random client seed when it can.

leborg
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 12, 2020, 04:53:34 PM
 #1193

Hi

Il there a way to code something like that?

If average 20 last bet > 60
Then bet chance 50 bethigh= false

What I like to do is bet when I detect an unusual pattern and bet the opposite.

I'm not sure if the bot can track previous results and calculate average.

Thanks to all.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
June 13, 2020, 09:59:14 PM
 #1194

Yes, you can do that... you'd just need to create a data structure that would store the results for you... I've done something similar before that stores values... simply use LUA "Tables" to store/lookup the results... https://www.tutorialspoint.com/lua/lua_tables.htm

Note that the downside is that depending on the size of the tables you're creating/updating, it can require significant "time" and "storage" penalties to do this and there is the potential to slow down your bot. Usually it's not a huge performance hit, but some people want/need 100's of bets/second type performance from the bot.

If that isn't that important to you... then what you want to do shouldn't be too difficult.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
leborg
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 16, 2020, 03:04:45 AM
 #1195

Yes, you can do that... you'd just need to create a data structure that would store the results for you... I've done something similar before that stores values... simply use LUA "Tables" to store/lookup the results... https://www.tutorialspoint.com/lua/lua_tables.htm

Note that the downside is that depending on the size of the tables you're creating/updating, it can require significant "time" and "storage" penalties to do this and there is the potential to slow down your bot. Usually it's not a huge performance hit, but some people want/need 100's of bets/second type performance from the bot.

If that isn't that important to you... then what you want to do shouldn't be too difficult.

Thanks sir!
AceFairy
Newbie
*
Offline Offline

Activity: 102
Merit: 0


View Profile
September 13, 2020, 03:00:28 PM
 #1196

i used this code in javascript:
if ((maxBet >= (balance / 100) * 3) && (data.gameResult === 'win') && (balance >= sbalance)) {
            //stop();
            $('#notification').html('Relax & Reload');
            alert('Relax & Reload')
            log('Relax & Reload')
            return;
          }
which stopped the bot, if it wagered more than 3% of balance in a bet and was winning after that, so it stopped!

but how can i make bot stop after it had currentstreak = -10
or 10 losses and it has to win back to original balance then stop?

any ideas?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
September 13, 2020, 09:53:32 PM
 #1197

but how can i make bot stop after it had currentstreak = -10
or 10 losses and it has to win back to original balance then stop?
Saw your other post on the other bot thread...
how do we stop bot if it struck a losing streak of 10, ie, currentstreak = -10 and we need to stop it only when it wins [more losing steps may follow after hitting -10] above the original balance when it was positive?

my sample didn't work:
if currentstreak <= -10 and win then
stop()
alarm()
print("stopping after bad streak")
end

You will never have currentstreak < 0 and win == true at the same time... as soon as a win is recorded, if currentstreak was < 0, then currentstreak is set to 1... likewise, currentstreak will never be > 0 and win == false, because as soon as a loss is recorded, if currentstreak was > 0, then currentstreak is set to -1.

You will need to create your own "flag" variable... set that to true when currentstreak >= -10... then when you get a "win", check the flag and stop as required.

Something like this:
Code:
...
badstreak = false
...
function dobet()
...
  if win then
    if badstreak then
      stop()
      alarm()
      print("stopping after bad streak")
    end
    badstreak = false
    ...
  end
  ...
  if currentstreak <= -10 then
    badstreak = true
  end if
end

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
September 17, 2020, 09:34:09 AM
 #1198

but how can i make bot stop after it had currentstreak = -10
or 10 losses and it has to win back to original balance then stop?
Saw your other post on the other bot thread...
how do we stop bot if it struck a losing streak of 10, ie, currentstreak = -10 and we need to stop it only when it wins [more losing steps may follow after hitting -10] above the original balance when it was positive?

my sample didn't work:
if currentstreak <= -10 and win then
stop()
alarm()
print("stopping after bad streak")
end

You will never have currentstreak < 0 and win == true at the same time... as soon as a win is recorded, if currentstreak was < 0, then currentstreak is set to 1... likewise, currentstreak will never be > 0 and win == false, because as soon as a loss is recorded, if currentstreak was > 0, then currentstreak is set to -1.

You will need to create your own "flag" variable... set that to true when currentstreak >= -10... then when you get a "win", check the flag and stop as required.

Something like this:
Code:
...
badstreak = false
...
function dobet()
...
  if win then
    if badstreak then
      stop()
      alarm()
      print("stopping after bad streak")
    end
    badstreak = false
    ...
  end
  ...
  if currentstreak <= -10 then
    badstreak = true
  end if
end

Another way you can do this (that is a bit simpler imo) is to manually tack your previous streak, for example:


Code:
...
previousstreak= 0
...
function dobet()
...
  if win then
    if previousstreak <= -10  then
      stop()
      alarm()
      print("stopping after bad streak")
    end    
    ...
  end
  ...
  previousstreak=currentstreak --make sure this is always at the end of dobet
end

zororaka
Copper Member
Member
**
Offline Offline

Activity: 90
Merit: 57

Blockchain Enthusiast & AI Enthusiast


View Profile WWW
December 13, 2020, 06:20:21 AM
 #1199

(For 999dice) Run Bot, You Sleep. Stable program and low balance (minimum 1000 Doge)

Code:
resetseed()
resetstats()

chance        = math.random(15, 49)
basebet       = 0.00001 -- this recomendeed for low balance. If dogecoin more than 10k Doge, set basebet up to 0.0001 Doge
nextbet       = basebet
varmaxbet     = 2 -- set max bet 10 Doge for low balance. If dogecoin more than 10k, set maxbet up to 100 Doge
vartarget     = 10000 -- edit your target total profit
varstoploss   = 5000 -- edit your stop loss
varmaxrollwin = 2
varrollwin    = 1
multwin       = 1
multlose      = 1.4
varbetlose    = math.random(0, 1)

function dobet()
    chance  = math.random(15, 49)
    varbetlose    = math.random(0, 1)
    if (varbetlose == 0) then
        bethigh = true
    else
        bethigh = false
    end
    if (balance >= vartarget) then
        stop();
        print("target success")
    end
    if (balance <= varstoploss) then
        stop();
        print("stoploss")
    end
    if (win) then
        if (varrollwin >= varmaxrollwin) then
            nextbet = basebet
            varrollwin = 1
        else
            varrollwin = varrollwin + 1
            nextbet = nextbet * multwin
        end
    else
        if (nextbet >= varmaxbet) then
            nextbet = basebet
            varrollwin = 1
        else
            nextbet = nextbet * multlose
        end
    end
end
Rambo19889
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
February 16, 2021, 03:34:31 PM
 #1200

Moin moin dear people,

I thought I would try to present my problem here.

I would like to build a script in the Dicebot and would like to tell the bot that if it e.g. He lost 2 times with the next move to calculate which bet he would have to make if there was a chance that random would be generated.

so example:

Basebet: 1

If you win: continue with the basebet
in case of loss: (should he calculate how much he would have to bet on the next move (random chance) to get the loss back in)

after he has recovered the loss he should start over

It would be nice if you could help me with this I thank you in advance

sorry for my bad english
Pages: « 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 [60] 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!