Bitcoin Forum
November 19, 2018, 12:05:25 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 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 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 55521 times)
HCP
Hero Member
*****
Offline Offline

Activity: 784
Merit: 952

<insert witty quote here>


View Profile
December 15, 2017, 07:35:31 AM
 #1001

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

1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
1542585925
Hero Member
*
Offline Offline

Posts: 1542585925

View Profile Personal Message (Offline)

Ignore
1542585925
Reply with quote  #2

1542585925
Report to moderator
fwalser
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 15, 2017, 09:15:23 AM
 #1002

ah ok.... alright. thank you very much HCP.
Works like a charm  Wink .
stormbreaker1
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 18, 2017, 05:25:30 AM
 #1003

tnx HCP i go to try script with doge Cheesy
stormbreaker1
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 18, 2017, 05:49:01 AM
 #1004

https://imgur.com/a/TbGc4

for now works fine, i change this  (if currentstreak == -9 then )
houseworx
Full Member
***
Offline Offline

Activity: 306
Merit: 100


View Profile
December 18, 2017, 04:24:16 PM
 #1005

looking for people what are good in mathematical formula making, please pm.

YOLOdice.comFast 1% Edge Dice GameJackpotsRakebackPlay / Earn / Invest
Sign up, level-up, win, join the growing community!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 20, 2017, 11:50:31 AM
 #1006

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?
houseworx
Full Member
***
Offline Offline

Activity: 306
Merit: 100


View Profile
December 20, 2017, 11:57:54 AM
 #1007

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

?!

YOLOdice.comFast 1% Edge Dice GameJackpotsRakebackPlay / Earn / Invest
Sign up, level-up, win, join the growing community!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HCP
Hero Member
*****
Offline Offline

Activity: 784
Merit: 952

<insert witty quote here>


View Profile
December 20, 2017, 05:54:37 PM
 #1008

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.

houseworx
Full Member
***
Offline Offline

Activity: 306
Merit: 100


View Profile
December 20, 2017, 08:53:53 PM
 #1009

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.

YOLOdice.comFast 1% Edge Dice GameJackpotsRakebackPlay / Earn / Invest
Sign up, level-up, win, join the growing community!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 20, 2017, 10:54:34 PM
 #1010

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?

houseworx
Full Member
***
Offline Offline

Activity: 306
Merit: 100


View Profile
December 20, 2017, 11:46:54 PM
 #1011

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

YOLOdice.comFast 1% Edge Dice GameJackpotsRakebackPlay / Earn / Invest
Sign up, level-up, win, join the growing community!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 21, 2017, 12:50:32 AM
 #1012

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
HCP
Hero Member
*****
Offline Offline

Activity: 784
Merit: 952

<insert witty quote here>


View Profile
December 21, 2017, 01:22:20 AM
 #1013

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

Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 21, 2017, 02:47:53 AM
 #1014

thanks
but how to et another /  second profit counter
the one for total profit to stop?
houseworx
Full Member
***
Offline Offline

Activity: 306
Merit: 100


View Profile
December 21, 2017, 02:57:39 AM
 #1015

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.

YOLOdice.comFast 1% Edge Dice GameJackpotsRakebackPlay / Earn / Invest
Sign up, level-up, win, join the growing community!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HCP
Hero Member
*****
Offline Offline

Activity: 784
Merit: 952

<insert witty quote here>


View Profile
December 21, 2017, 03:12:24 AM
 #1016

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

Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 21, 2017, 03:25:46 AM
 #1017

Thanks
I think that there should be base not basebet?
nextbet=basebet

and how can i make it randomly change  hi lo?
chilly2k
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
December 21, 2017, 03:42:18 AM
 #1018

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. 

ferryantoine
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
December 21, 2017, 01:53:07 PM
 #1019

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.


Nicoletta
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
December 21, 2017, 07:20:06 PM
 #1020

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?


Pages: « 1 2 3 4 5 6 7 8 9 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 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!