Pages:
Author

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

full member
Activity: 462
Merit: 101
want to ask for experienced gambler on 999dice using Seuntjie Dicebot
currently have 100k sats , im betting on 0.0000001 (the low balance for bet) with 33 chance to win and 1.75 multiplier on loss.
can i reach 1million sats safely with that settings? i know its verryyy slowly to reach and i think its possible.
newbie
Activity: 9
Merit: 0
thanks HCP and B4RF, already made modifications using HCP's suggestion, good so far, i will definitely let you know if i encounter anymore trouble
hero member
Activity: 813
Merit: 507
hello, i need help adding a command to the following script, its works in a modified martingale style, i would simply like you guys to help me add a command to it to make it stop when the multiplier reaches say x8


Code:
chance = 49.95
base = 0.00000001
count = 0
tot = 1
tot2 = 1
abc = 0
cba = 0
nextbet = base
function dobet()
if profit>0.000000001 then
count = 0
tot = 1
tot2 = 1
abc = 0
cba = 0
base = 0.00000001
resetstats()
end
if base == base then
tot = 1
tot2 = 1
end
if base == base*2 then
tot = 2
tot2 = 1
end
if base == base*4 then
tot = 4
tot2 = 1
end
if base == base*8 then
tot = 8
tot2 = 1
end
if base == base*16 then
tot = 16
tot2 = 1
end
if base == base*32 then
tot = 32
tot2 = 1
end
if base == base*64 then
tot = 64
tot2 = 1
end
if base == base*128 then
tot = 128
tot2 = 1
end
if base<0.00000001 then
base = 0.00000001
count = 0
abc = 0
cba = 0
end
count = count+1
if count>10 and abc>cba then
base = base/2
count = 0
abc = 0
cba = 0
end
if count>10 and abcbase = base*2
count = 0
abc = 0
cba = 0
end
if win then
abc = abc+tot
nextbet = base
else
cba = cba+tot2
nextbet = base
end
end
end
end

Looks like you invested some time into your strategie but there are some mistakes in your code (like tot2 is always 1, the equations with base as mentioned by HCP and the check if base is smaler then minbet is before dividing by 2 which might cause problems) and I think there is an easier way to do the betting you are looking for.

Would you mind explaining what your script is supposed to do? I would rewrite the code for you.
HCP
legendary
Activity: 2086
Merit: 4361
Hi, firstly, you should indent the code to make it easier to read! Wink

Secondly, you should use the "code" tags... so that it doesn't make your post super long! Wink

Code:
chance = 49.95
base = 0.00000001
count = 0
tot = 1
tot2 = 1
abc = 0
cba = 0
nextbet = base

function dobet()
  if profit>0.000000001 then
    count = 0
    tot = 1
    tot2 = 1
    abc = 0
    cba = 0
    base = 0.00000001
    resetstats()
  end

  if base == base then
    tot = 1
    tot2 = 1
  end
  if base == base*2 then
    tot = 2
    tot2 = 1
  end
  if base == base*4 then
    tot = 4
    tot2 = 1
  end
  if base == base*8 then
    tot = 8
    tot2 = 1
  end
  if base == base*16 then
    tot = 16
    tot2 = 1
  end
  if base == base*32 then
    tot = 32
    tot2 = 1
  end
  if base == base*64 then
    tot = 64
    tot2 = 1
  end
  if base == base*128 then
    tot = 128
    tot2 = 1
  end
  if base<0.00000001 then
    base = 0.00000001
    count = 0
    abc = 0
    cba = 0
  end
 
  count = count+1
 
  if count>10 and abc>cba then
    base = base/2
    count = 0
    abc = 0
    cba = 0
  end
  if count>10 and abc    base = base*2
    count = 0
    abc = 0
    cba = 0
  end
 
  if win then
    abc = abc+tot
    nextbet = base
  else
    cba = cba+tot2
    nextbet = base
  end

end

Thirdly, the whole script is logically broken. None of those "if base == base * x" will ever evaluate to true... that's like saying: if 2 == 2 * 2... or if 2 == 2 * 16... obviously, that can NEVER happen. You will need to use a different variable... something like "betAmount" so you can say "if betAmount == base * 2 then"... otherwise you script looks like it isn't really going to do anything.

As for making the script stop if the multiplier is 8... I would think that putting stop() command in the "if betAmount == base * 8 then" section would stop it.

Code:
  if betAmount == base * 8 then
    stop()
  end
newbie
Activity: 9
Merit: 0
hello, i need help adding a command to the following script, its works in a modified martingale style, i would simply like you guys to help me add a command to it to make it stop when the multiplier reaches say x8



chance = 49.95
base = 0.00000001
count = 0
tot = 1
tot2 = 1
abc = 0
cba = 0
nextbet = base
function dobet()
if profit>0.000000001 then
count = 0
tot = 1
tot2 = 1
abc = 0
cba = 0
base = 0.00000001
resetstats()
end
if base == base then
tot = 1
tot2 = 1
end
if base == base*2 then
tot = 2
tot2 = 1
end
if base == base*4 then
tot = 4
tot2 = 1
end
if base == base*8 then
tot = 8
tot2 = 1
end
if base == base*16 then
tot = 16
tot2 = 1
end
if base == base*32 then
tot = 32
tot2 = 1
end
if base == base*64 then
tot = 64
tot2 = 1
end
if base == base*128 then
tot = 128
tot2 = 1
end
if base<0.00000001 then
base = 0.00000001
count = 0
abc = 0
cba = 0
end
count = count+1
if count>10 and abc>cba then
base = base/2
count = 0
abc = 0
cba = 0
end
if count>10 and abcbase = base*2
count = 0
abc = 0
cba = 0
end
if win then
abc = abc+tot
nextbet = base
else
cba = cba+tot2
nextbet = base
end
end
end
end
HCP
legendary
Activity: 2086
Merit: 4361
Sounds like you have a Stop condition set in the "Advanced" settings section. These settings are still "active" when in "Programmer" mode... so switch back to Advanced and make sure you dont have any stop conditions set that are causing it to stop (most likely a "stop if balance > xxx" etc)
newbie
Activity: 14
Merit: 0
Quick and most likely an easy question for you...

The scripts I have been testing by copy and pasting in and running start() only executes one time.... can I in some way make it execute repeatingly?

/T
full member
Activity: 148
Merit: 100
chilly2k, wanted to thank you very much for this topic.
While I programmed in several languages long time ago, Im slowly reading all your topic now to learn about LUA, and the interaction with dicebot.
What I want to do is a script for my personal variation of martingale, but the most important thing other than the amount of the bets is that on certain conditions to switch bets from HIGH to LOW and viceversa, and also maybe change multiplier settings on the fly.
I am going to use it only on PrimeDice.
Thanks again.



legendary
Activity: 1007
Merit: 1000
When I select reset seed after 1 win check box ,it just delays the seed change if the win happens earlier.I want the betting to stop if the win happens earlier and only continue betting after a seed change.In short I just want to take only one win from a seed .
Is there any program or code that can do this job.

    There is a resetseed() function.  But you do not know if it worked or not.  At least I don't.  That being the case, you have to know if the site your using allows the reset seed after an amount of time, or number of bets.  If it's number of bets you could use a counter to keep track of the number of bets, and if you win before the counter reaches your goal, you can stop().  Else do the resetseed() and continue. 

  If anyone know if the resetseed() provides a return code you can check, it would make this a little more fool proof.... 
newbie
Activity: 51
Merit: 0
When I select reset seed after 1 win check box ,it just delays the seed change if the win happens earlier.I want the betting to stop if the win happens earlier and only continue betting after a seed change.In short I just want to take only one win from a seed .
Is there any program or code that can do this job.
HCP
legendary
Activity: 2086
Merit: 4361
Yeah... it's a kludge... but it works... Tongue

If it is just the betting speed you're trying to slow down, you can always set the bet speed in advanced settings to slow the bot down... that will effectively put a delay in to every call to dobet() function.

That solution doesn't let you specify the exact "location" in your script of the delay... but if you're wanting a 1 minute delay to give you time to react and/or stop the bot, it should probably achieve that goal.
hero member
Activity: 813
Merit: 507

hello, i would like to simply know how to add a time delay to my script, for example, to delay for say 1minute after an action , before commencing another one

you should be able to put in a simple blocking delay using something like:

Code:
delay = 60 -- measured in seconds

local start = os.clock()
while os.clock() - start < delay do end

The only problem with sleep functions like this is that they consume processor time.

But without external libraries I dont really know any better solution.

Is it possible to import lua libraries in the seuntje bot?
HCP
legendary
Activity: 2086
Merit: 4361
I want to add a function when x is lost, add a bet.
I assume you mean that when x < 100, and the "random" bet is made and loses... that you want to be able to do something specific?

In that case, add a boolean flag that indicates whether or not the last bet was an "x" bet...

Code:
basebet=0.1
bchance=93
chance=bchance
nextbet=basebet
maxbet=100
minbet=100
maxchance=93
minchance=93
randomc=100

bettingX = false

function dobet()
  if not bettingX then
    bethigh= math.random(0,1000)%2==0
    x=math.random(0,10000)
    if x < randomc then
      nextbet = math.random(minbet,maxbet)
      chance=math.random(minchance*100,maxchance*100)/100
      bettingX = true
    else
      nextbet = basebet
      chance=bchance
      bettingX = false
    end
  else
    if not win then
      --Your X bet just lost, so "add your bet" here
      .. add a bet ..
      bettingX = true ?? I don't know if you want to continue adding bets or not, you didn't say
    else
      -- guessing you want it to reset on a win?
      nextbet = basebet
      chance=bchance
      bettingX = false
    end
  end
end

hello, i would like to simply know how to add a time delay to my script, for example, to delay for say 1minute after an action , before commencing another one

you should be able to put in a simple blocking delay using something like:

Code:
delay = 60 -- measured in seconds

local start = os.clock()
while os.clock() - start < delay do end
newbie
Activity: 9
Merit: 0
hello, i would like to simply know how to add a time delay to my script, for example, to delay for say 1minute after an action , before commencing another one
newbie
Activity: 2
Merit: 0
I want to add a function when x is lost, add a bet.

Code:
basebet=0.1
bchance=93
chance=bchance
nextbet=basebet
maxbet=100
minbet=100
maxchance=93
minchance=93
randomc=100

function dobet()
bethigh= math.random(0,1000)%2==0
x=math.random(0,10000)
if x < randomc then
nextbet = math.random(minbet,maxbet)
chance=math.random(minchance*100,maxchance*100)/100
else
nextbet = basebet
chance=bchance
end
end
hero member
Activity: 1372
Merit: 512
Hi guys,

Seems there's a difference between simulation and the real sites.

I've got a script that is consistently profitable in simulation, but it's not within the actual site (Primedice in this case).

Is the simulation actually a perfect game? i.e. it doesn't take in the 1% house edge?

If so, is there a way to set it to take into account the house edge?



I think the HE is also calculated in the simulation. Think you just got bad luck on PD.
newbie
Activity: 6
Merit: 0
Hi guys,

Seems there's a difference between simulation and the real sites.

I've got a script that is consistently profitable in simulation, but it's not within the actual site (Primedice in this case).

Is the simulation actually a perfect game? i.e. it doesn't take in the 1% house edge?

If so, is there a way to set it to take into account the house edge?

HCP
legendary
Activity: 2086
Merit: 4361
Firstly, you can't run scripts in Advanced mode, only programmer mode.

And, No you can't get it to load extra scripts. You can only run what is inside the script window.

As a solution to your problem, you could just create two functions outside of the dobet() function... call one scriptOneStuff() and scriptTwoStuff() and then just call whichever one you want based on the outcome of your rolls or whatever other conditions you are wanting to base the script changing conditions on... something like

Code:
...
function dobet()

  if (win) then
    scriptOneStuff()
  else
    scriptTwoStuff()
  end

  ...

end

function scriptOneStuff()
  ... put your stuff here...
end

function scriptTwoStuff()
  nextbet = something else
  bethigh = low
  other stuff that you want to do...

end

Using global vars declared before the dobet() should enable you to manipulate common values in both functions...
hero member
Activity: 1134
Merit: 502
Hello guys, i just want to ask if it is possible to implement 2 scripts in advanced mode? for example if script 1 lose a bet it will call and run script 2 until the function dobet of script 2 is completed then it will call script 1 again. I am thinking of a case switch but i can't implement it in lua language. thanks in advanced.
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
Not cool bro, Huh but i really dont blame you  Roll Eyes
really not cool but thankx anyways it worked now

still here guys
Cool story bro... Roll Eyes

Maybe you should be using the time you wait for someone to reply to you to go and read https://www.tutorialspoint.com/lua/ or one of the other thousands of "learn to program" tutorials that you can find using google

While you're at it, you might like to learn how to edit your messages when you press the "quote" button... re-quoting massive messages and adding 3 words (of impatient whining that no-one is helping you) is both annoying and poor etiquette.

The folks here have been INSANELY patient with you... perhaps you should return the favour by asking your question and then waiting patiently for someone to help you out... Remember, we don't get paid to sit on bitcointalk 24/7, we're not employees... and I'm sure most people here have jobs, families and lives outside of bitcointalk...

I can't speak for the others, but I personally do this because I genuinely enjoy helping people... until they act like entitled, spoiled brats...  Angry

#sorryNotSorry

thankx for repling bro, lols if i tell u , u wouldnt belive me but still i hv to tell u (i dont understand a thing of what u hv just told me....
pls could u break it down? mnore cus my head is like  Cry spinning
Once again... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "else" (ie. .. do some stuff ..) will only execute if the condition evaluates to "True". If the condition is "False", then the code between the "else" and "end" (ie. .. do something else ..) will be executed instead. So each time this "if-then-else" section is executed, only ONE part of it will actually be run.

You put your "stoploss" code inside the "if profit>target then" section. So unless profit was greater than target, your stoploss code would not be executed.

Additionally, you put your "stoploss" code inside the "goal()" function. According to your script, "goal()" is ONLY called if a bet wins as it is inside the "if win then" section... This means that your stoploss code will not run if your bet is a loss. It would only be run if your bet was a "win" AND Profit > target. Obviously, this means that it will never detect that you've lost too much money... so it will never make your program stop!

Quote
if win then
    -- THIS CODE GETS EXECUTED ON WIN
    goal()
    loadgun()
    basebet=balance*betfactor
    ....
else
    -- THIS CODE GETS EXECUTED ON LOSS
    losecount+=1
    nexbet=prebet
    ....
end

To fix this, you can either put the call to goal() BEFORE the "if win then-else" section, so it is called for every single roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code right before losecount+=1 so that it is also called when your roll is a loss.
Pages:
Jump to: