Pages:
Author

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

full member
Activity: 319
Merit: 100
ok now i am trying to merge my 2 scripts and i am doin something wrong
i want the script to proceed with the second strategy but looking and counting if there are 99% in the row is no

1st one counting the 99%  and betting 1% after 3

Code:
basebet= 0.00000001
nextbet=basebet
chance=49.5

highCount=0
lowCount=0
previousbetBackup=basebet

function dobet()

    if lastBet.Roll > 99 then
        highCount = highCount+1
    else
        highCount = 0
    end

    if lastBet.Roll < 1 then
        lowCount = lowCount+1
    else
        lowCount = 0
    end

    if highCount >= 3 then
        bethigh = false
        nextbet = balance * 0.01
        chance=90.0
    else if lowCount >= 3 then
        bethigh = true
        nextbet = balance * 0.01
        chance=90.0
    else
        chance=49.5

        if win then     
            nextbet = basebet
        else   
            nextbet = previousbetBackup*2
        end
previousbetBackup = nextbet
    end

end
end
end



second one that is betting and multiplies without stop until it gets to profit o 100 sat than restarts the bet to the beginning and stops when reaches the total profit o 1000


Code:
startbalance=balance
chance=49.50
multiplier=2
base=0.00000001
nextbet=base   
bethigh=true
function dobet()
   
   if win then
      if profit > 0.00000100 then
        resetstats()
        nextbet=basebet
      else
        nextbet=previousbet
      end

   else
      nextbet=previousbet*multiplier
   end

   if balance - startbalance > 0.00001000 then
      nextbet=0
      stop()
      ching()
   end
end

how to merge them?




sorry I dont understand what you want. maybe others do.
newbie
Activity: 31
Merit: 0
ok now i am trying to merge my 2 scripts and i am doin something wrong
i want the script to proceed with the second strategy but looking and counting if there are 99% in the row is no

1st one counting the 99%  and betting 1% after 3

Code:
basebet= 0.00000001
nextbet=basebet
chance=49.5

highCount=0
lowCount=0
previousbetBackup=basebet

function dobet()

    if lastBet.Roll > 99 then
        highCount = highCount+1
    else
        highCount = 0
    end

    if lastBet.Roll < 1 then
        lowCount = lowCount+1
    else
        lowCount = 0
    end

    if highCount >= 3 then
        bethigh = false
        nextbet = balance * 0.01
        chance=90.0
    else if lowCount >= 3 then
        bethigh = true
        nextbet = balance * 0.01
        chance=90.0
    else
        chance=49.5

        if win then     
            nextbet = basebet
        else   
            nextbet = previousbetBackup*2
        end
previousbetBackup = nextbet
    end

end
end
end



second one that is betting and multiplies without stop until it gets to profit o 100 sat than restarts the bet to the beginning and stops when reaches the total profit o 1000


Code:
startbalance=balance
chance=49.50
multiplier=2
base=0.00000001
nextbet=base   
bethigh=true
function dobet()
   
   if win then
      if profit > 0.00000100 then
        resetstats()
        nextbet=basebet
      else
        nextbet=previousbet
      end

   else
      nextbet=previousbet*multiplier
   end

   if balance - startbalance > 0.00001000 then
      nextbet=0
      stop()
      ching()
   end
end

how to merge them?


newbie
Activity: 13
Merit: 0
You could probably set up an "array" and a counter to keep track of the last "x" bets... but the number would need to be kept to a "reasonable" level to prevent the memory usage getting too high and or the bot starting to slow down while it manipulates the array...

I'm not sure I understand what it is that you are wanting to do with these 10 results tho? Huh

Code:
...
betArray = {}
counter = 1 -- NOTE: LUA arrays indexed from 1 ;)
...
function dobet()
...
  betArray[counter] = lastbet.Roll
  counter = counter + 1
  ...
  if counter == 11 then
    -- do something based on the last 10 rolls ???
    -- count them up or something and then set chance according to results?
    counter = 1 -- reset counter
  end
...
end


friend,
can you look at below picture to see what happens.
https://ibb.co/knzB9m

I need your help to track the rolled numbers. for example you can see that in last 20 bets; like 10 times bet rolled number is between 0 to 30 or 70 to 100 so I lost my bet. what I want is to write a code and track these roll number and then define an if condition to do etc. for example to reset from base or whatever.
for example : if anytime in each 20 bets in a row 10 times rolled number was between 0 to 30 or 70 to 100 and we lost those bets then do bla bla bla...
I hope I could explain myself. thank you for your help btw.


legendary
Activity: 1007
Merit: 1000
Thanks
I think that there should be base not basebet?
nextbet=basebet

and how can i make it randomly change  hi lo?

  This is from memory..  Add this to the end, just before the last "end".  And I think your right base vs basebet

if math.random() < .5 then
  bethigh = !bethigh
end

   
..   math.random()  will generate a random number between 0 - 1.  so .5 would be the middle.  1/2 the time it should switch your high low betting. 

It will do this check after every bet.  If you only want to do it for loses move it to the else path of the if win statement. 
newbie
Activity: 31
Merit: 0
Thanks
I think that there should be base not basebet?
nextbet=basebet

and how can i make it randomly change  hi lo?
HCP
legendary
Activity: 2086
Merit: 4361
Oh right... Missed the fact that the resetstats() will prevent it from ever stopping! Hahaha oops! Roll Eyes

Try this one... It records balance at the beginning and then simply compares the current balance and starting balance every roll... That will be your overall profit... Once it is above 1000 says it will stop Smiley

Code:
startbalance=balance
chance=49.50
multiplier=2
base=0.00000001
nextbet=base  
bethigh=true
function dobet()
  
   if win then
      if profit > 0.00000100 then
        resetstats()
        nextbet=basebet
      else
        nextbet=previousbet
      end

   else
      nextbet=previousbet*multiplier
   end

   if balance - startbalance > 0.00001000 then
      nextbet=0
      stop()
      ching()
   end
end
full member
Activity: 319
Merit: 100
Thanks almost correct but
after win it should not change the bet it should stay wat it was before
I need 2 counts or profit
first everytime when profit hits  100 sato it needs to reset bet and next when total profit hits 1000 it should stop


Quote
chance=49.50
multiplier=2
base=0.00000001
nextbet=base  
bethigh=true
function dobet()
   if win then
      nextbet=base
   end
   else
      nextbet=previousbet*multiplier
   end
   if profit > 0.00000100 then
      resetstats()
      nextbet=base
   end
   if profit > 0.00001000 then
      stop()
      ching()
   end
end

all what you asking is in script what i given.

i think you don't understand byself what are you asking and want.
newbie
Activity: 31
Merit: 0
thanks
but how to et another /  second profit counter
the one for total profit to stop?
HCP
legendary
Activity: 2086
Merit: 4361
Thanks almost correct but
after win it should not change the bet it should stay wat it was before
I need 2 counts or profit
first everytime when profit hits  100 sato it needs to reset bet and next when total profit hits 1000 it should stop
Try this version... Slight rearrangement, so that it only resets if the profit > 100 sats, otherwise it will just bet whatever it bet last time... Which seems a bit dangerous (if it martingales up to like 2048 sats, wins once (your profit will be 1 sat) and then goes on another long losing streak, you will lose your bankroll pretty quickly!! Shocked

I hope you have a big bankroll...  Tongue

Code:
chance=49.50
multiplier=2
base=0.00000001
nextbet=base  
bethigh=true
function dobet()
  
   if win then
      if profit > 0.00000100 then
        resetstats()
        nextbet=basebet
      else
        nextbet=previousbet
      end

   else
      nextbet=previousbet*multiplier
   end

   if profit > 0.00001000 then
      stop()
      ching()
   end
end
newbie
Activity: 31
Merit: 0
Thanks almost correct but
after win it should not change the bet it should stay wat it was before
I need 2 counts or profit
first everytime when profit hits  100 sato it needs to reset bet and next when total profit hits 1000 it should stop


Quote
chance=49.50
multiplier=2
base=0.00000001
nextbet=base  
bethigh=true
function dobet()
   if win then
      nextbet=base
   end
   else
      nextbet=previousbet*multiplier
   end
   if profit > 0.00000100 then
      resetstats()
      nextbet=base
   end
   if profit > 0.00001000 then
      stop()
      ching()
   end
end
full member
Activity: 319
Merit: 100
Any help on this?

Hello my helpful friends.
I need a script to
bet 1 sat on 49.50
if win bet the same bet i lose bet x2 until it gets a profit 100 sat once profit 100 sat reset and get back to 1 sat bet
all this until total profit from start  reaches 1000 sat than stop

how to archive that?


chance=49.50
multiplier=2
base=0.00000001
nextbet=base  
bethigh=true
function dobet()
   if win then
      nextbet=base
   end
   else
      nextbet=previousbet*multiplier
   end
   if profit > 0.00000100 then
      resetstats()
      nextbet=base
   end
   if profit > 0.00001000 then
      stop()
      ching()
   end
end


if im understand right, then give a try Smiley

but for me its something stpd and nonsense, what are you asking Cheesy

you asking on win get back to basebet (1satoshi) then where are logic to say that you need get back to 1satoshi bet, after profit 100satoshi? Cheesy basebet will be 1satoshi after every win, or maybe you want increase on win to?! try to think better what you want Wink
newbie
Activity: 31
Merit: 0
Any help on this?

Hello my helpful friends.
I need a script to
bet 1 sat on 49.50
if win bet the same bet i lose bet x2 until it gets a profit 100 sat once profit 100 sat reset and get back to 1 sat bet
all this until total profit from start  reaches 1000 sat than stop

how to archive that?

full member
Activity: 319
Merit: 100
Depending on how you order the if-elseif statements, it *should* be more efficient than multiple individual "if" blocks...

This is because when checking "if-elseif" block, the interpreter will stop checking as soon as it hits the first one that evaluates as true...

However, with individual blocks, the interpreter has to evaluate every single one of them.

Therefore, you should order your if-elseif statements from "most likely" to be true to "least likely" for maximum efficiency.

thanks.
HCP
legendary
Activity: 2086
Merit: 4361
Depending on how you order the if-elseif statements, it *should* be more efficient than multiple individual "if" blocks...

This is because when checking "if-elseif" block, the interpreter will stop checking as soon as it hits the first one that evaluates as true...

However, with individual blocks, the interpreter has to evaluate every single one of them.

Therefore, you should order your if-elseif statements from "most likely" to be true to "least likely" for maximum efficiency.
full member
Activity: 319
Merit: 100
Question!

what is better to use, for better/easiest bot reading and don't looping:

Quote
if bla bla then
 bla bla
end

if bla bla then
 bla bla
end

if bla bla then
 bla bla
end

OR

Quote
if bla bla then
 bla bla
elseif
 bla bla
elseif
 bla bla
elseif
 bla bla
end

?!
newbie
Activity: 31
Merit: 0
Hello my helpful friends.
I need a script to
bet 1 sat on 49.50
if win bet the same bet i lose bet x2 until it gets a profit 100 sat once profit 100 sat reset and get back to 1 sat bet
all this until total profit from start  reaches 1000 sat than stop

how to archive that?
full member
Activity: 319
Merit: 100
looking for people what are good in mathematical formula making, please pm.
newbie
Activity: 4
Merit: 0
https://imgur.com/a/TbGc4

for now works fine, i change this  (if currentstreak == -9 then )
newbie
Activity: 4
Merit: 0
tnx HCP i go to try script with doge Cheesy
HCP
legendary
Activity: 2086
Merit: 4361
It is because you say:

nextbet = 0.00001000

and then IMMEDIATELY give the script two options:

if balance > startbalance then
  nextbet = basetbet
else
  nextbet = previousbet*2
end

So regardless of which option is true... nextbet is going to get changed... EVERY time... it will either bet basebet or it will be previousbet*2

Your "if currentstreak%6==0 then" statement is not working to stop losing streaks... because it is INSIDE the "if wincounter > 3" block... so that condition is ONLY checked if wincounter > 3... so it will only trigger when you have a losing streak of 6 AFTER wincounter > 3... but you immediately set wincounter to 0 as soon as getting in, so you'll NEVER have the situation where your losing streak is 6 and wincounter > 3.

WARNING: This code is mostly untested... I did a quick check and it *seems* to work as desired... use at your own risk! Wink

Code:
-- FourWins Strategy for fwalser
-- coded by HCP

startbalance = balance
target = 0.00010000

chance = 49.50
basebet = 0.00000001
bigbet = 0.00001000
wincounter = 0
fourWins = false

nextbet = basebet

function dobet()
  
  if win then
    wincounter += 1

    if fourWins then
      --win while betting big, reset back to base
      nextbet = basebet
      fourWins = false
      wincounter = 0

    else
      --win while basebetting, check if we have had 4 wins
      if wincounter > 3 then
        wincounter = 0
        fourWins = true
        nextbet = bigbet
      else
        nextbet = basebet
      end

    end

  else
    -- we lost
    if fourWins then
      -- bigbetting, see if our lossstreak is 6 losses
      if currentstreak == -6 then
        -- 6x loss streak, cut our losses and reset
        fourWins = false
        wincounter = 0
        nextbet = basebet
      else
        -- loss while big betting, double up!
        nextbet = previousbet*2
      end
    else
      -- standard loss
      nextbet = basebet
    end

  end

  --Profit Target check
  if ((balance - startbalance) > target) then
    --target profit reached
    print("Target reached! STOPPING!")
    nextbet = 0
    stop()
  end

end
Pages:
Jump to: