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 spinning

well... as has been explained several times... 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 "end" (or "else" if there is an "else") will only execute if the condition evaluates to "True".

In your instance... you had put the runprofit calculation inside the "if profit>target then" section. So unless profit was greater than target, the runprofit calculation would not happen.

Anyway, the main reason for your stoploss not working, is that the goal() function where you are doing the runprofit calculation, is ONLY called if a bet wins... so it will never do the runprofit calculation on a loss, so it will never detect that you've lost any amount and stop

To fix this, you can either put the call to goal() in the dobet() function, but outside of the "if win then-else" section, so it is called for every roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code.

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots

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...

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 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!

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.

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...

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 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!

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.

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots

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.

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

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.

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.

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....

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.