Pages:
Author

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

hero member
Activity: 1372
Merit: 512
Is there also a way to increase the bet amount with a specific amount instead of using a multiplier?
newbie
Activity: 42
Merit: 0
Hi programmers, I recently opened a separate thread about a bitsler dice strategy. If anyone can code it into a lua script, that would be great. I shouldn't be hard. Please look at https://bitcointalksearch.org/topic/need-help-with-dicebot-33-settings-for-bitsler-dice-strategy-1748508. Thanks.

any reward?
newbie
Activity: 12
Merit: 0
Hello everybody

I'm new here , but i'm really interested to try to make some script, so  I hope share and learn Cheesy
I would like to know how to make a martingale like this :


https://s23.postimg.org/3lgeh162z/howto.jpg





 

 
newbie
Activity: 17
Merit: 0
Hi,

When a script is running with a martingale part in it, and the bot is running very fast so it is almost impossible to see if there is a big negative bet running when stopping, is there a way (command) to stop the bot on last win while the bot is running? In the advance mode there is a button for it, hope also in programmer mode, could be very useful.


   You can add it to your code.

I usually have something called stoponwin.  I start by initializing it to false.  stoponwin = false

Then in my win path, where I want to stop I check that.  if (stoponwin == true) then stop() end.

Then while the bot is running, if I want to stop it on a win.  Just type stoponwin = true      on the console and hit enter.  

You can check and set variables on the console while the bot is running.  

I'm not sure how the build in martingale works, so I'm not exactly sure how to fit it in.  
 

Thanks man! I have test it and works great with i litte extra in the code otherwise it will not stop on last win Wink did test this.
if (stoponwin == true and lastBet.Profit > 0) then stop() end

This was excatly what i'm looking for. Now i do not have to time when to stop. just hit stoponwin = true and my runningscript stops on the first next win Smiley

Many many thanks for this and help to put me in the right direction.
legendary
Activity: 1007
Merit: 1000
Hi,

When a script is running with a martingale part in it, and the bot is running very fast so it is almost impossible to see if there is a big negative bet running when stopping, is there a way (command) to stop the bot on last win while the bot is running? In the advance mode there is a button for it, hope also in programmer mode, could be very useful.


   You can add it to your code.

I usually have something called stoponwin.  I start by initializing it to false.  stoponwin = false

Then in my win path, where I want to stop I check that.  if (stoponwin == true) then stop() end.

Then while the bot is running, if I want to stop it on a win.  Just type stoponwin = true      on the console and hit enter. 

You can check and set variables on the console while the bot is running. 

I'm not sure how the build in martingale works, so I'm not exactly sure how to fit it in. 
 
newbie
Activity: 17
Merit: 0
Hi,

When a script is running with a martingale part in it, and the bot is running very fast so it is almost impossible to see if there is a big negative bet running when stopping, is there a way (command) to stop the bot on last win while the bot is running? In the advance mode there is a button for it, hope also in programmer mode, could be very useful.
newbie
Activity: 17
Merit: 0
hi,

is there a switch to set the botspeed setting. if yes, how to use it in programmer mode?


Code:
--Enable betting speed:
setvaluebool('BotSpeedEnabled',true)

--Disable betting speed:
setvaluebool('BotSpeedEnabled',false)

--set betting speed to 10 bets per second
setvaluedecimal('BetSpeedValue',10)

--set betting speed to 1 bet every 3 seconds
setvaluedecimal('BetSpeedValue',1.0/3.0);

This can be done for any setting in the bot, you just need to use the setting name as defined in the settings files in %appdata%\dicebot2\

Thanks Seuntje for your fast reply. This is all i need Wink
legendary
Activity: 1717
Merit: 1125
hi,

is there a switch to set the botspeed setting. if yes, how to use it in programmer mode?


Code:
--Enable betting speed:
setvaluebool('BotSpeedEnabled',true)

--Disable betting speed:
setvaluebool('BotSpeedEnabled',false)

--set betting speed to 10 bets per second
setvaluedecimal('BetSpeedValue',10)

--set betting speed to 1 bet every 3 seconds
setvaluedecimal('BetSpeedValue',1.0/3.0);

This can be done for any setting in the bot, you just need to use the setting name as defined in the settings files in %appdata%\dicebot2\
newbie
Activity: 17
Merit: 0
hi,

is there a switch to set the botspeed setting. if yes, how to use it in programmer mode?
legendary
Activity: 1007
Merit: 1000
Hello seuntjie i was wondering if you could help me here.
here's the code


Code:

chance = 90
basebet = 0.00000100
nextbet = basebet

function dobet()
if (win) then
chance = 90.00
   nextbet = previousbet+(previousbet*0.1)
else
if chance == 49 then
nextbet = previousbet * 2
else
chance = 49
   nextbet = 0.000002
                                                bethigh = !bethigh
end
end


end


I used previousbet+(previousbet*0.1) so that previous bet + profit will be the next bet. It bet with 90% chance and then if bet is lose in 90% chance  it will change chance to 49 then bet again then go back to 90% chance after a winning bet but when it bet again in 90% chance it bets the previous bet, how can i make it bet to basebet after a winning bet in 49% chance?

 how can i make it bet to basebet after a winning bet in 49% chance?

So you know you want to check the chance in the win section.  and then set your basebet based on what the chance is. 

You will need to add a check.

if (chance == 49) then
   nextbet = basebet
else
   nextbet = whatever you want to set the nextbet to if the chance is not 49%
end

Of course you need to do this check before you set the chance to 90.

I'll leave it to you to put the code in the right spot.    Smiley



   OK, A few more hints (actually,  I'll explain exactly what to do).

You have...

if (win) then
      chance = 90.00
         nextbet = previousbet+(previousbet*0.1)

That says the bet won, so your setting chance to 90 and next bet to a higher bet then the previousbet. 

But you wanted to check the chance if you won and set the next bet based on the previous chance.
You need to add the check to set the nextbet before setting chance. 

if (win) then
      if (chance == 49) then
         nextbet = basebet
      else
         nextbet = previousbet+(previousbet*0.1)
      end
      chance = 90.00
...

   Now this is saying if you won, and the chance was 49, set the nextbet to basebet and chance to 90

                            if you won and chance was not 49(else path), set the next bet to the higher previousbet and set chance to 90. 
So now when you win chance will be set to 90, and the nextbet will be based on you previous chance.   

           
hero member
Activity: 756
Merit: 500
Hello seuntjie i was wondering if you could help me here.
here's the code


Code:

chance = 90
basebet = 0.00000100
nextbet = basebet

function dobet()
if (win) then
chance = 90.00
   nextbet = previousbet+(previousbet*0.1)
else
if chance == 49 then
nextbet = previousbet * 2
else
chance = 49
   nextbet = 0.000002
                                                bethigh = !bethigh
end
end


end


I used previousbet+(previousbet*0.1) so that previous bet + profit will be the next bet. It bet with 90% chance and then if bet is lose in 90% chance  it will change chance to 49 then bet again then go back to 90% chance after a winning bet but when it bet again in 90% chance it bets the previous bet, how can i make it bet to basebet after a winning bet in 49% chance?

 how can i make it bet to basebet after a winning bet in 49% chance?

So you know you want to check the chance in the win section.  and then set your basebet based on what the chance is. 

You will need to add a check.

if (chance == 49) then
   nextbet = basebet
else
   nextbet = whatever you want to set the nextbet to if the chance is not 49%
end

Of course you need to do this check before you set the chance to 90.

I'll leave it to you to put the code in the right spot.    Smiley


wow perfect timing as i also wanted to learn how to code and take some advantage using it thanks for sharing this mate i think i will be able to look at it as my reference creating my own strategy, good luck and please just keep sharing thank you.
legendary
Activity: 1007
Merit: 1000
Hello seuntjie i was wondering if you could help me here.
here's the code


Code:

chance = 90
basebet = 0.00000100
nextbet = basebet

function dobet()
if (win) then
chance = 90.00
   nextbet = previousbet+(previousbet*0.1)
else
if chance == 49 then
nextbet = previousbet * 2
else
chance = 49
   nextbet = 0.000002
                                                bethigh = !bethigh
end
end


end


I used previousbet+(previousbet*0.1) so that previous bet + profit will be the next bet. It bet with 90% chance and then if bet is lose in 90% chance  it will change chance to 49 then bet again then go back to 90% chance after a winning bet but when it bet again in 90% chance it bets the previous bet, how can i make it bet to basebet after a winning bet in 49% chance?

 how can i make it bet to basebet after a winning bet in 49% chance?

So you know you want to check the chance in the win section.  and then set your basebet based on what the chance is. 

You will need to add a check.

if (chance == 49) then
   nextbet = basebet
else
   nextbet = whatever you want to set the nextbet to if the chance is not 49%
end

Of course you need to do this check before you set the chance to 90.

I'll leave it to you to put the code in the right spot.    Smiley

hero member
Activity: 1134
Merit: 502
Hello seuntjie i was wondering if you could help me here.
here's the code


Code:

chance = 90
basebet = 0.00000100
nextbet = basebet

function dobet()
if (win) then
chance = 90.00
   nextbet = previousbet+(previousbet*0.1)
else
if chance == 49 then
nextbet = previousbet * 2
else
chance = 49
   nextbet = 0.000002
                                                bethigh = !bethigh
end
end


end


I used previousbet+(previousbet*0.1) so that previous bet + profit will be the next bet. It bet with 90% chance and then if bet is lose in 90% chance  it will change chance to 49 then bet again then go back to 90% chance after a winning bet but when it bet again in 90% chance it bets the previous bet, how can i make it bet to basebet after a winning bet in 49% chance?
legendary
Activity: 1717
Merit: 1125
I was watching your youtube video DiceBot Programmer mode tutorial 4 and you
discussed loadfile('script.lu')
What is the default location diceboot looks for the file? I noticed yours was in a debug folder in the dicebot folder.

Is this able to be used as a variable? And if so does it autostart upon loading?
i.e.
Code:
    
if balance<=minbal then
      loadfile('script.lu')
end

or is that limited to loadstrategy?

I really do apologize for my ignorance. My programming language skill is zilch outside of very basic html,
but I do like learning/experimenting.
I can half ass put things together via copy pasta pretty good though o_O

The default folder is the folder that the executable is in. That debug folder is where visual studio puts the executable when you compile it.

I see no reason why that wouldn't work, but I have no idea what the result would be.
I'm guessing one of 2 things are going to happen. Lua is going to give you an error saying you can't define a function while executing it (or something similar), or it's going redefine the function and just run with. No idea. Let me know when you've tested it Smiley
sr. member
Activity: 434
Merit: 250
I was watching your youtube video DiceBot Programmer mode tutorial 4 and you
discussed loadfile('script.lu')
What is the default location diceboot looks for the file? I noticed yours was in a debug folder in the dicebot folder.

Is this able to be used as a variable? And if so does it autostart upon loading?
i.e.
Code:
    
if balance<=minbal then
      loadfile('script.lu')
end

or is that limited to loadstrategy?

I really do apologize for my ignorance. My programming language skill is zilch outside of very basic html,
but I do like learning/experimenting.
I can half ass put things together via copy pasta pretty good though o_O
legendary
Activity: 1717
Merit: 1125
*snip*
I have the same issue regarding the attempt to call global 'start' (a nil value).
I was unable to find a solution posted. Is there one?

You never need to use start from within the programmer mode. All functions called from within the programmer mode are synchronous, meaning they have to finish before the script can continue.

See this flowchart on how the programmer mode works, it might help explain why start is never needed: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
sr. member
Activity: 434
Merit: 250
Will give it a try and see how it goes.

Thanks again.

Edit:

Code:
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")
withdraw(0.0102,1GgmLevW6nc3j6wsRurvJWu1Y8s3cnAK1j)
start()
end


Sadly it doesn't work, tried swapping them round and putting spaces everywhere. I get this error...

')' expected, got '1GgmLevW6nc3j6wsRurvJWu1Y8s3cnAK1j'

The address is a string value and not a variable, so it needs to be in apostrophes.

withdraw(amount:double,address:string)
ie: withdraw(0.0102,'1GgmLevW6nc3j6wsRurvJWu1Y8s3cnAK1j')


Thanks, that seems to work. Guess we will all know in a few hours.

Code:
if (balance) >= profittarget then
stop();
print("   ")
print(balance)
print("TARGET ACHIEVED!!!")
print("  ")
withdraw(0.0102,'15TCN7KM6eAAaWj29uEGxUXceMXLSxg1fx')
withdraw(0.0012,'1J4ZM3JcUa8rob2Fyum4vWoQvKjaWVnb1T')
withdraw(0.0012,'13DBotnDHGZBUt5ZWLfJe6Q5RN9nGJVFPQ')
start()
end

This code will stay there till I decide to start changing things again. But there is a small bit there for you both to show my appreciation.  Lets hope for the best.


PS. If anyone feels like putting in this code in their scripts I won't mind...but you mustn't change a thing...haha



Edit:

Lame...withdrawels worked. Didn't start. Came up with...

[string "chunk"]:20: attempt to call global 'start' (a nil value)


So I put in: nextbet=0.0000001

Hope that helps, will find out in a while


Edit 2:
Removing the stop and start it carries on going however it only does one withdraw. The first one. Do I need to put something in between to get the 2nd and third one going as well. It shows like it worked but doesn't actually make the transaction.


I have the same issue regarding the attempt to call global 'start' (a nil value).
I was unable to find a solution posted. Is there one?
newbie
Activity: 42
Merit: 0
Is there a way to the script update automatically the basebet? And can someone rewrite the following code in lua?

Edit: it's in portuguese

Code:
var basebet = 10;
var multiply = 1.25;
var baseL4M = 0.1;
var no2lr = 20;
var pm = 4; // é o multicador de diferença, tipo 1.25 é = 4,

var nmexe1 = 0;
var nmexe2 = 0;
var nmexe3 = 0;
var lastbet = 0;
var perdas = 0;
var mor = 0;
var ab = 0;
var jtr = 0;




engine.on('game_starting', function(info) {
cl("");
switch (nmexe1) {
case 0:
cl("On 0");
bet(basebet);
break;
case 1:
cl("On 1");
if (nmexe3 >= 6) {
bet(perdas * pm);
} else {
nmexe3 ++;
}
break;
case 2:
cl("On 2");
if (mor <= no2lr) {
if (mor == 0) ab = basebet; else {
ab = ab * (1 + baseL4M);
}
bet(ab, multiply);
mor ++;
} else {
resettobase();
cl("Não conseguir recuperar mesmo com " + no2lr + " rounds, restou " + perdas + " de perdas.");
}
break;
}
});

//perder
engine.on('game_crash', function(data) {if (jtr == 1) {
cl("Perdeu");
jtr = 0;
switch (nmexe1) {
case 0:
nmexe2 ++;
perdas += lastbet;
if (nmexe2 >= 3) {
nmexe1 = 1;
}
break;
case 1:
nmexe1 = 2;
perdas += lastbet;
break;
case 2:
perdas += lastbet;
break;
}
}});

//ganhar
engine.on('cashed_out', function(resp) {if (jtr == 1){if (resp.username == engine.getUsername()) {
cl("Ganhou");
jtr = 0;
switch (nmexe1) {
case 0:
resettobase();
break;
case 1:
resettobase();
break;
case 2:
perdas -= lastbet / pm;
if (perdas <= 0) {
resettobase();
cl("Recuperou tudo.");
}
break;
}
}}});


function resettobase() {
nmexe1 = 0;
nmexe2 = 0;
nmexe3 = 0;
perdas = 0;
mor = 0;
ab = 0;
cl("Resetando tudo");
}

function bet(b) {
engine.placeBet(Math.round(b) * 100, Math.round(multiply * 100), false);
cl("Betando " + b + "bits com X=" + Math.round(multiply * 100));
lastbet = Math.round(b);
jtr = 1;
}
function cl(m){console.log(m);}
[/s]

EDIT Not needed anymore
legendary
Activity: 2198
Merit: 1014
Bitdice is scam scam scammmmmmmmmmmmmmmmmmmmmmmmmm

how to write (stop after losing% of the balance)?

You can add if function to check balance:
Code:
if balance < x then
stop()
newbie
Activity: 36
Merit: 0

how to write (stop after losing% of the balance)?
Pages:
Jump to: