Pages:
Author

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

legendary
Activity: 1007
Merit: 1000
Code:
if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

Programming works from TOP DOWN. That's the last thing in your script. So you do everything, then at the end you say

If you I win set my bet to base bet, but if I lose, set my bet to base bet.

So if you win, what is your bet going to be?
If you lose, what is your bet going to be?
When is your bet going to be something else?

okay i get but have set it already ....
or do i need to put the amount again?
e.g
if win then

 nextbet=0.00000001

else

 nextbet=0.00000001

end

what am trying to do is to let the bet reset to basebet there back at the end of my last 95%chance bet (incase if i win or not)

hope am right sir

That's where your getting confused.  The Bot doesn't bet and jump around in the dobet function.  EVERY bet goes through the whole dobet function.  

So, with those statements at the end of the function, EVERY time a roll is made the last thing your going to do, before the next roll, is set nextbet to .00000001.    Here is an incomplete example.

Code:
basebet = 0.00000001
nextbet = basebet

function dobet()

if win then
   nextbet= basebet
else
   nextbet = prevoiusbet * 2
   if currentstreak == -10 then
      chance = 92
      nextbet = 57
      bethigh = true
   end
end

    this creates and set the variable basebet to .00000001
   and then sets the built in variable (nextbet) to the value of basebet
it just defines the dobet function at this time.  It doesn't run just yet.  

The bot gets control back and communicates with the dice site and does it's first roll.
when it gets the results back it calls the dobet function.

for this script, if the bet won, it sets nextbet to basebet and ends (returns to the bot for the next roll)

if the roll lost it takes the else path, it always sets the nextbet to the last bet * 2.  it then checks the currentstreak built in
  and if it's -10 (10 loses) it sets the chance, nextbet and bethigh. and goes back to the bot, if the currentstreak was not equal to
-10 it just ended and returned for the next roll.  Note it doesn't change chance or bethigh.  

You could add additional if statements at the end to check for other loss streaks and set things as you want, and as the last one make it
if currentstreak > -X then
  and always reset stuff.  
Don't code ==-15 because you could end up in the code with the currentstreak = -16....  or -17 if you have really bad luck.    
  
                        

legendary
Activity: 1717
Merit: 1125
thankx alot for ur help bro,,
here is my complete script below

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 chance1=90.4  --I hope this are the varies and value u asked me to set b4 dobet function
 chance2=94     --I hope this are the varies and value u asked me to set b4 dobet function
 chance3=95     --I hope this are the varies and value u asked me to set b4 dobet function
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 baseBet1=0.00000020   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet2=0.00000030   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet3=0.00000050   --I hope this are the varies and value u asked me to set b4 dobet function
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = chance1
betlow = false

 nextbet=baseBet1

else
 
 if win then

  nextbet=baseBet

else
 
chance = chance2
bethigh = true

 nextbet=baseBet2

else

if win then

 nextbet=baseBet

else

chance = chance3
bethigh = false

 nextbet=baseBet3

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

but it dosnt start when ever i try to start it,,
i still get error(LUA ERROR!!
[string "chunk"]:44: attempt to compare nil with number)

pls what am i still doing wrong

pls help check if am right on the varies i created b4 the dobet function
and if i use it well in the script,,,


and also is the end of my script correct?

Code:
if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

cus am trying to reset it back to basebet

check the spelling of your variables.


run the script as it is (if you can get it to run) and see what happens.
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
thankx alot for ur help bro,,
here is my complete script below

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 chance1=90.4  --I hope this are the varies and value u asked me to set b4 dobet function
 chance2=94     --I hope this are the varies and value u asked me to set b4 dobet function
 chance3=95     --I hope this are the varies and value u asked me to set b4 dobet function
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 baseBet1=0.00000020   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet2=0.00000030   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet3=0.00000050   --I hope this are the varies and value u asked me to set b4 dobet function
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = chance1
betlow = false

 nextbet=baseBet1

else
 
 if win then

  nextbet=baseBet

else
 
chance = chance2
bethigh = true

 nextbet=baseBet2

else

if win then

 nextbet=baseBet

else

chance = chance3
bethigh = false

 nextbet=baseBet3

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

but it dosnt start when ever i try to start it,,
i still get error(LUA ERROR!!
[string "chunk"]:44: attempt to compare nil with number)

pls what am i still doing wrong

pls help check if am right on the varies i created b4 the dobet function
and if i use it well in the script,,,


and also is the end of my script correct?

Code:
if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

cus am trying to reset it back to basebet
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
Code:
if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

Programming works from TOP DOWN. That's the last thing in your script. So you do everything, then at the end you say

If you I win set my bet to base bet, but if I lose, set my bet to base bet.

So if you win, what is your bet going to be?
If you lose, what is your bet going to be?
When is your bet going to be something else?
[/quote

okay i get but have set it already ....
or do i need to put the amount again?
e.g
if win then

 nextbet=0.00000001

else

 nextbet=0.00000001

end

what am trying to do is to let the bet reset to basebet there back at the end of my last 95%chance bet (incase if i win or not)

hope am right sir
legendary
Activity: 1717
Merit: 1125
Code:
if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

Programming works from TOP DOWN. That's the last thing in your script. So you do everything, then at the end you say

If you I win set my bet to base bet, but if I lose, set my bet to base bet.

So if you win, what is your bet going to be?
If you lose, what is your bet going to be?
When is your bet going to be something else?
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest

bro i have recorrect it and i tested it thankx alot for the hint sir,,,
so when i corrected it and started it i got a error (LUA ERROR!!
[string "chunk"]:14: attempt to perform arithmetic on global 'baseBet' (a nil value)
)

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

chance = 28.08

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = 90.4
betlow = false

 nextbet=0.00000020

end
 
 if win then

  nextbet=baseBet

else
 
chance = 94
bethigh = true

 nextbet=0.00000030

end

if win then

 nextbet=baseBet

else

chance = 95
bethigh = false

 nextbet=0.00000050

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

Everything before the "function dobet()"   gets done ONCE when you start the script.  baseBet is your variable (you created it).  You can't use it until you define it and set a value to it.  LUA doesn't know what to do with nextbet = baseBet.  because you didn't tell it what baseBet is.  You have  baseBet=0.00000001 after the dobet funtion line.  You need to move that, or copy it to the init statements before the line that trys to set nextbet.
  If you want to reset baseBet after each roll you can leave it after dobet, but if you want the script to change it at some point, you should just set it in the beginning and not after each bet.  

Also you have ...
Code:
if win then
   nextbet=baseBet
else
   chance = 94
   bethigh = true
   nextbet=0.00000030
end

if win then
   nextbet=baseBet
else
   chance = 95
   bethigh = false
   nextbet=0.00000050
end

if win then
   nextbet=baseBet
else
   nextbet=baseBet
end


  nextbet is ALWAYS going to be baseBet.  After each roll dobet gets run.  win is going to be either true or false the whole time dobet runs.  So if you roll and you win, your going to set nextbet = baseBet 3 times, if you lose, you'll set it to 30 Sat then 50 and then back to baseBet.  Also chance will be 95% and bethigh will be false.  

  If this doesn't make sense now, it will once you correct the baseBet setting....      

thats what u told me to do below ... in this ur post

(but now that i am incorrect) pls could u kindly tell me what am to do ..
Quote
I have no idea what your trying to do here.

 if win then

  nextbet=baseBet then
  nextbet=baseBet then
  nextbet=baseBet

else

  chance = chance2
  bethigh = true
 nextbet=baseBet2 then
 chance = chance3
 nextbet=baseBet3 then
 nextbet=baseBet

end

what am trying to do here is

Code:
if win then

  nextbet=baseBet

else
 
chance = 94
bethigh = true

 nextbet=0.00000030

end

if win then

 nextbet=baseBet

else

chance = 95
bethigh = false

 nextbet=0.00000050

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

but u told me not to use it > i tot u said i shoundnt use it here
Quote
nextbet is ALWAYS going to be baseBet.  After each roll dobet gets run.  win is going to be either true or false the whole time dobet runs.  So if you roll and you win, your going to set nextbet = baseBet 3 times, if you lose, you'll set it to 30 Sat then 50 and then back to baseBet.  Also chance will be 95% and bethigh will be false.
legendary
Activity: 1007
Merit: 1000
thanks alot for replying bro (chilly2k and seunji)
more grase to ur elbow>>>>

but bro i have fixed the issues now but i really dont know where u told me to post the base bet
so i created two script with the same settings so , kindly tell me the one thats correct there.....

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 profitterget=0.00100000
 nextbet=baseBet
 


function dobet()

baseBet=0.00000001 -- do u mean should copy the basebet and past

it below

if win then

baseBet=0.00000001  -- do u mean i should past the basebet here?

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = 90.4
betlow = false

 nextbet=0.00000020

end
 
 if win then

  nextbet=baseBet then
  nextbet=baseBet then
  nextbet=baseBet

else

  chance = 95
  bethigh = true
 nextbet=0.00000030 then
 nextbet=0.00000050 then
 nextbet=baseBet

end
 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

this is the orther one , i use the varies i created and also gave it values @seunji
Quote
Programming works from TOP DOWN. You can't use a variable if it isn't declared yet and assigned.

From my tutorial on steemit that you've read 30 times (https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables)
Quote
A variable needs to be declared and a value set to it before it can be used for other functions.
to declare a variable in LUA, you need to name it and give it an initial value
 
testvar = 10.1
 
This variables name is testvar, it is of type double and has a value of 10.1

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 chance1=90.4  --I hope this are the varies and value u asked me to set b4 dobet function
 chance2=94     --I hope this are the varies and value u asked me to set b4 dobet function
 chance3=95     --I hope this are the varies and value u asked me to set b4 dobet function
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 baseBet1=0.00000020   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet2=0.00000030   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet3=0.00000050   --I hope this are the varies and value u asked me to set b4 dobet function
 profitterget=0.00100000
 nextbet=baseBet
 


function dobet()

baseBet=0.00000001 -- do u mean should copy the basebet and past

it below

if win then

baseBet=0.00000001  -- do u mean i should past the basebet here?

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = chance1
betlow = false

 nextbet=baseBet1

end
 
 if win then

  nextbet=baseBet then
  nextbet=baseBet then
  nextbet=baseBet

else

  chance = chance2
  bethigh = true
 nextbet=baseBet2 then
 chance = chance3
 nextbet=baseBet3 then
 nextbet=baseBet

end
 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end


so i used them here (chilly2k) so the one u told me to set is the one i used
Quote
nextbet is ALWAYS going to be baseBet.  After each roll dobet gets run.  win is going to be either true or false the whole time dobet runs.  So if you roll and you win, your going to set nextbet = baseBet 3 times, if you lose, you'll set it to 30 Sat then 50 and then back to baseBet.  Also chance will be 95% and bethigh will be false. 

  If this doesn't make sense now, it will once you correct the baseBet setting....     


Both scripts are now setting baseBet before the "function dobet()" line.  So both with now work (at least not fail the way they did before). 

I have no idea what your trying to do here.

 if win then

  nextbet=baseBet then
  nextbet=baseBet then
  nextbet=baseBet

else

  chance = chance2
  bethigh = true
 nextbet=baseBet2 then
 chance = chance3
 nextbet=baseBet3 then
 nextbet=baseBet

end

First it's not going to work with those extra "then"'s all over the place. 

And are you thinking if once is good, three times is even better?  Smiley   Actually I'm not sure if your just leaving that in there because you don't understand what it's doing. 

You would normally only have one "if win then" statement.

if win then
  Do everything you want to do if the roll wins.
else
  do everything you would do if the roll loses, including seeing how many times in a row it lost by checking the currentstreak variable. 
  if currentstreak == -12 then
    I lost 12 in a row now I want to.
  end
end   

 
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
thanks alot for replying bro (chilly2k and seunji)
more grase to ur elbow>>>>

but bro i have fixed the issues now but i really dont know where u told me to post the base bet
so i created two script with the same settings so , kindly tell me the one thats correct there.....

Code:
wagered=0    
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 profitterget=0.00100000
 nextbet=baseBet
 


function dobet()

baseBet=0.00000001 --[color=red] do u mean should copy the basebet and past it below [/color]


if win then

baseBet=0.00000001 [color=red] -- do u mean i should past the basebet here?[/color]

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = 90.4
betlow = false

 nextbet=0.00000020

end
 
 if win then

  nextbet=baseBet then
  nextbet=baseBet then                    -- [color=red] thats the setting chilly2k told me to do[/color]
  nextbet=baseBet

else

  chance = 95
  bethigh = true
 nextbet=0.00000030 then                    -- [color=red] thats the setting chilly2k told me to do[/color]
 nextbet=0.00000050 then
 nextbet=baseBet

end
 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

this is the orther one , i use the varies i created and also gave it values @seunji
Quote
Programming works from TOP DOWN. You can't use a variable if it isn't declared yet and assigned.

From my tutorial on steemit that you've read 30 times (https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables)
Quote
A variable needs to be declared and a value set to it before it can be used for other functions.
to declare a variable in LUA, you need to name it and give it an initial value
 
testvar = 10.1
 
This variables name is testvar, it is of type double and has a value of 10.1

Code:
wagered=0    
 wagered=wagered+previousbet
 chance=28.08
 chance1=90.4  --[color=red]I hope this are the varies and value u asked me to set b4 dobet function[/color]
 chance2=94     --[color=red]I hope this are the varies and value u asked me to set b4 dobet function[/color]
 chance3=95     --[color=red]I hope this are the varies and value u asked me to set b4 dobet function
[/color]
 bethigh=false
 baseBet=0.00000001 -- should the baseBet be up here?
 baseBet1=0.00000020   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet2=0.00000030   --I hope this are the varies and value u asked me to set b4 dobet function
 baseBet3=0.00000050   --I hope this are the varies and value u asked me to set b4 dobet function
 profitterget=0.00100000
 nextbet=baseBet
 


function dobet()

baseBet=0.00000001 -- do u mean should copy the basebet and past

it below

if win then

baseBet=0.00000001  -- do u mean i should past the basebet here?

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = chance1
betlow = false

 nextbet=baseBet1

end
 
 if win then

  nextbet=baseBet then
  nextbet=baseBet then
  nextbet=baseBet

else

  chance = chance2
  bethigh = true
 nextbet=baseBet2 then
 chance = chance3
 nextbet=baseBet3 then
 nextbet=baseBet

end
 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end


so i used them here (chilly2k) so the one u told me to set is the one i used
Quote
nextbet is ALWAYS going to be baseBet.  After each roll dobet gets run.  win is going to be either true or false the whole time dobet runs.  So if you roll and you win, your going to set nextbet = baseBet 3 times, if you lose, you'll set it to 30 Sat then 50 and then back to baseBet.  Also chance will be 95% and bethigh will be false.  

  If this doesn't make sense now, it will once you correct the baseBet setting....      
legendary
Activity: 1007
Merit: 1000

bro i have recorrect it and i tested it thankx alot for the hint sir,,,
so when i corrected it and started it i got a error (LUA ERROR!!
[string "chunk"]:14: attempt to perform arithmetic on global 'baseBet' (a nil value)
)

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

chance = 28.08

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = 90.4
betlow = false

 nextbet=0.00000020

end
 
 if win then

  nextbet=baseBet

else
 
chance = 94
bethigh = true

 nextbet=0.00000030

end

if win then

 nextbet=baseBet

else

chance = 95
bethigh = false

 nextbet=0.00000050

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

Everything before the "function dobet()"   gets done ONCE when you start the script.  baseBet is your variable (you created it).  You can't use it until you define it and set a value to it.  LUA doesn't know what to do with nextbet = baseBet.  because you didn't tell it what baseBet is.  You have  baseBet=0.00000001 after the dobet funtion line.  You need to move that, or copy it to the init statements before the line that trys to set nextbet.
  If you want to reset baseBet after each roll you can leave it after dobet, but if you want the script to change it at some point, you should just set it in the beginning and not after each bet.  

Also you have ...
Code:
if win then
   nextbet=baseBet
else
   chance = 94
   bethigh = true
   nextbet=0.00000030
end

if win then
   nextbet=baseBet
else
   chance = 95
   bethigh = false
   nextbet=0.00000050
end

if win then
   nextbet=baseBet
else
   nextbet=baseBet
end


  nextbet is ALWAYS going to be baseBet.  After each roll dobet gets run.  win is going to be either true or false the whole time dobet runs.  So if you roll and you win, your going to set nextbet = baseBet 3 times, if you lose, you'll set it to 30 Sat then 50 and then back to baseBet.  Also chance will be 95% and bethigh will be false.  

  If this doesn't make sense now, it will once you correct the baseBet setting....      
legendary
Activity: 1717
Merit: 1125
bro i have recorrect it and i tested it thankx alot for the hint sir,,,
so when i corrected it and started it i got a error (LUA ERROR!!
[string "chunk"]:14: attempt to perform arithmetic on global 'baseBet' (a nil value)
)

Programming works from TOP DOWN. You can't use a variable if it isn't declared yet and assigned.

From my tutorial on steemit that you've read 30 times (https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables)
Quote
A variable needs to be declared and a value set to it before it can be used for other functions.
to declare a variable in LUA, you need to name it and give it an initial value
 
testvar = 10.1
 
This variables name is testvar, it is of type double and has a value of 10.1

Your code:
Code:
wagered=0    
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet -- Here you're using baseBet. Has baseBet been declared and assigned before now? In the code above this?
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
i dont understand what u mean by
Quote
Next take all of the "if win then" clauses out.   Your just going to do the last one, because every one is going to process for every roll.  

ALL if statements need to be in the format:

if then

do something

end

OR

if then
do something
else
do something else
end

For example

Code:
if currentstreak==-10

  nextbet=0.00000020

will not work because it doesn't fit into the correct formats. but this one is:


Code:
if currentstreak==-10 then

  nextbet=0.00000020
end

now check your code and make sure all of your ifs are in the correct format.

bro i have recorrect it and i tested it thankx alot for the hint sir,,,
so when i corrected it and started it i got a error (LUA ERROR!!
[string "chunk"]:14: attempt to perform arithmetic on global 'baseBet' (a nil value)
)

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=28.08
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

chance = 28.08

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10 then

chance = 90.4
betlow = false

 nextbet=0.00000020

end
 
 if win then

  nextbet=baseBet

else
 
chance = 94
bethigh = true

 nextbet=0.00000030

end

if win then

 nextbet=baseBet

else

chance = 95
bethigh = false

 nextbet=0.00000050

end

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end
legendary
Activity: 1717
Merit: 1125
i dont understand what u mean by
Quote
Next take all of the "if win then" clauses out.   Your just going to do the last one, because every one is going to process for every roll.  

ALL if statements need to be in the format:

if then

do something

end

OR

if then
do something
else
do something else
end

For example

Code:
if currentstreak==-10

  nextbet=0.00000020

will not work because it doesn't fit into the correct formats. but this one is:


Code:
if currentstreak==-10 then

  nextbet=0.00000020
end

now check your code and make sure all of your ifs are in the correct format.
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
i dont understand what u mean by
Quote
Next take all of the "if win then" clauses out.   Your just going to do the last one, because every one is going to process for every roll. 
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
pls i created another script with same functions but am getting some error
like(LUA ERROR!!
'then' expected, got 'nextbet')

here is the code below

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=1.01
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10

  nextbet=0.00000020
 
if win then

 nextbet=baseBet

else
 
 nextbet=0.00000030

if win then

 nextbet=baseBet

else

 nextbet=0.00000050

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

this basically what i want the script to do , but i dont know how to set the chances, and set the bet high or low for each bet

here is the full explaination sir (thank u in advanced)

let say i bet
0.00000002 and i win,  i want it to go back to the basebet and bet 0.00000002
But if i bet 0.00000002 and loss, then i want it to multiply *2 of my loss so my next bet will be 0.00000004
then if i loss again i want it to still double up the nextbet to 0.00000008 till i win then i want it to go back to the basebet thats if i win (i only want 10 loss in a row b4 changing to the 90% chance)

EXAMPLE

it will look like this when the lossing occurs
0.00000002
0.00000004
0.00000008
0.00000016
0.00000032
0.00000064
0.00000128
0.00000256
0.00000512
0.00001024
 till it reach 10losses but now lets assum its has reach 10losses

so when i get 10 losses i want the bet to change to 0.0003 with a 90%chance so if i dont win it i want it to change to 0.0006bet with 94%chance so if i dont win again i want the third bet to change to 0.001btc with a 95%chance
so if i in anycase win or loss THIS 90% 94% 95% CHANCES  i want it to go back to base bet and restart again


pls help me

   Did you fix your error?  LUA is looking for a "then".  The syntax is
if ... then
...
else
...
end 

Do you see where you have an if statement, and a check, and then you try to set nextbet? 

Then....   Your script above is set up to do

 nextbet=previousbet+baseBet

for a losing bet.  do you think that is the same as

"But if i bet 0.00000002 and loss, then i want it to multiply *2 of my loss so my next bet will be 0.00000004"

Hint: it's not the same...   + is addition and * is multiplication... 

Next take all of the "if win then" clauses out.   Your just going to do the last one, because every one is going to process for every roll. 

And your code is already checking for a loss streak at -10 change the nextbet and chance right there. HCP explained about setting the chance. Then if you want to do something if you lose another (-11 streak) add another check..  and so on. 

 And your not paying us enough to complain.  Smiley  You have to make some effort and explain what you've tried and we might be a little quicker to lend a hand.  I tend to just ignore posts that start with I want a script that does this....  Show us what you've tried and we can sometimes make some suggestions. 




thankx alot for replying bro...

here is the script i created my self (at least i did something sir)
but its still not active .. am getting (LUA ERROR 'then' expected, got 'chance'

this the codes below plus i did what u asked me to do.

Code:
wagered=0   
 wagered=wagered+previousbet
 chance1=28.08
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

chance=chance1

 baseBet=0.00000001

end

if win>0.00000001 then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10

chance = 90.4 -- sets chance to 90.4%  Done this that HCP said
bethigh = true -- sets to roll High/Ove Done this too

  nextbet=0.00000020
 
if win then

 nextbet=baseBet

else
 
 nextbet=0.00000030

chance = 94  -- done this too
bethigh = false --done this too

if win then

 nextbet=baseBet

else

chance = 95
betlow = true

 nextbet=0.00000050

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

pls what am i doing wronge
legendary
Activity: 1007
Merit: 1000
pls i created another script with same functions but am getting some error
like(LUA ERROR!!
'then' expected, got 'nextbet')

here is the code below

Code:
wagered=0   
 wagered=wagered+previousbet
 chance=1.01
 bethigh=false
 profitterget=0.00100000
 nextbet=baseBet

function dobet()

 baseBet=0.00000001

end

if win then

 nextbet=baseBet

else

 nextbet=previousbet+baseBet

end

if currentstreak==-10

  nextbet=0.00000020
 
if win then

 nextbet=baseBet

else
 
 nextbet=0.00000030

if win then

 nextbet=baseBet

else

 nextbet=0.00000050

if win then

 nextbet=baseBet

else

 nextbet=baseBet

 end

 
if (balance) >= profittarget then
stop();
print(balance)
print("TARGET ACHIEVED!!!")

 end

end

this basically what i want the script to do , but i dont know how to set the chances, and set the bet high or low for each bet

here is the full explaination sir (thank u in advanced)

let say i bet
0.00000002 and i win,  i want it to go back to the basebet and bet 0.00000002
But if i bet 0.00000002 and loss, then i want it to multiply *2 of my loss so my next bet will be 0.00000004
then if i loss again i want it to still double up the nextbet to 0.00000008 till i win then i want it to go back to the basebet thats if i win (i only want 10 loss in a row b4 changing to the 90% chance)

EXAMPLE

it will look like this when the lossing occurs
0.00000002
0.00000004
0.00000008
0.00000016
0.00000032
0.00000064
0.00000128
0.00000256
0.00000512
0.00001024
 till it reach 10losses but now lets assum its has reach 10losses

so when i get 10 losses i want the bet to change to 0.0003 with a 90%chance so if i dont win it i want it to change to 0.0006bet with 94%chance so if i dont win again i want the third bet to change to 0.001btc with a 95%chance
so if i in anycase win or loss THIS 90% 94% 95% CHANCES  i want it to go back to base bet and restart again


pls help me

   Did you fix your error?  LUA is looking for a "then".  The syntax is
if ... then
...
else
...
end 

Do you see where you have an if statement, and a check, and then you try to set nextbet? 

Then....   Your script above is set up to do

 nextbet=previousbet+baseBet

for a losing bet.  do you think that is the same as

"But if i bet 0.00000002 and loss, then i want it to multiply *2 of my loss so my next bet will be 0.00000004"

Hint: it's not the same...   + is addition and * is multiplication... 

Next take all of the "if win then" clauses out.   Your just going to do the last one, because every one is going to process for every roll. 

And your code is already checking for a loss streak at -10 change the nextbet and chance right there. HCP explained about setting the chance. Then if you want to do something if you lose another (-11 streak) add another check..  and so on. 

 And your not paying us enough to complain.  Smiley  You have to make some effort and explain what you've tried and we might be a little quicker to lend a hand.  I tend to just ignore posts that start with I want a script that does this....  Show us what you've tried and we can sometimes make some suggestions. 

member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
guys help me with the code below pls
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
I have a problem that these two commands: math.randomseed( os.time() )              are not creating random numbers for the code I mentioned above.
                                                             magicNum = math.random(10,15)


I WANT THE magicNum to be a random number between 10 and 15 as in this case or any other range that I set.
It creates precisely 1 random number and assigns it to magicNum until you explicitly change it. If you want magicNum to change, you need to do magicNum = math.random(10,15) when you want the value of magicNum to be a new random number in range 10-15.

For instance, if you want to do it when you reset to basebet...

Quote
basebet = 0.00000001
math.randomseed( os.time() )
magicNum = math.random(10,15)
count = 0
nextbet = basebet

chance = XX -- You need to set this!
bethigh = true -- or false depending if you want high or low

function dobet()

  count = count + 1

  if count == magicNum then
    -- Time for MAX bet
    nextbet = balance
  elseif count > magicNum then
    -- Time to reset
    nextbet = basebet
    magicNum = math.random(10,15)
    count = 0
  end

end




Thanks HCP.....That completed my code.Thanks again for your help.
congratulations bro............ if only i could just complete mine too but am stock i just pray i see someone to help me soon
newbie
Activity: 51
Merit: 0
I have a problem that these two commands: math.randomseed( os.time() )              are not creating random numbers for the code I mentioned above.
                                                             magicNum = math.random(10,15)


I WANT THE magicNum to be a random number between 10 and 15 as in this case or any other range that I set.
It creates precisely 1 random number and assigns it to magicNum until you explicitly change it. If you want magicNum to change, you need to do magicNum = math.random(10,15) when you want the value of magicNum to be a new random number in range 10-15.

For instance, if you want to do it when you reset to basebet...

Quote
basebet = 0.00000001
math.randomseed( os.time() )
magicNum = math.random(10,15)
count = 0
nextbet = basebet

chance = XX -- You need to set this!
bethigh = true -- or false depending if you want high or low

function dobet()

  count = count + 1

  if count == magicNum then
    -- Time for MAX bet
    nextbet = balance
  elseif count > magicNum then
    -- Time to reset
    nextbet = basebet
    magicNum = math.random(10,15)
    count = 0
  end

end




Thanks HCP.....That completed my code.Thanks again for your help.
member
Activity: 90
Merit: 10
Visit www.btcscriptbot.wordpress.com to get latest
Triple posting effectively the same stuff over and over isn't going to get you any help...

https://bot.seuntjie.com/programmermode.aspx
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables
this basically what i want the script to do , but i dont know how to set the chances, and set the bet high or low for each bet

Did you read the programmer mode tutorials that Seuntjie linked to? He clearly put a lot of effort into making them...

Quote
chance, type: double, Permission: Read Write. The chance to win when betting. Defaults to value set in advanced settings if not set. Need to set this value to change the chance to win/payout when betting.

bethigh, type: bool, Permission: Read Write. whether to bet high/over (true) or low/under(false). Defaults to true (bet high/bet over)

chance = 90.4 -- sets chance to 90.4%
bethigh = true -- sets to roll High/Over


chance = 94 -- sets chance to 94%
bethigh = false -- sets to roll Low/Under

Honestly, looking at your script, it is fairly obvious that you have zero (or close to zero) programming knowledge and lack the understanding of the basic fundamentals to be able to make this work. I highly recommend that you at least work through the tutorials that Seuntjie put together to at least build up some knowledge of the very basics and learn how the bot actually processes the script. There is a nifty flow chart that explains the "flow" of the bot and how it processes the script.

I'm happy to provide tips on how to add certain features to a script... little code snippets... but if you want a script generated from scratch... I'm happy to offer my services for a fee... Wink


thanks alot for replying me bro ....
hv been dieing since for someone to reply me.
about the tutorial thta seuntji posted,

bro i read every thing from a_z , but the liltle i understand there was the one i use in creating this script sir

i have created it following the tutorial that seunj posted cus i wouldnt hv been able to create a script like dis if not for the tutorial, pluse i have no NO KNOWLEDGE
of programming thats why i need ur help to let me know where my mistakes are ..........

sir i SWEAR TO GOD

I READ SEUNJ TUTORIAL UP TO 30TIMES but thats the little i could understand.

am so sorry seunj if u are mad at me but bro am a novice so i  think u should hv undertabd beta how we learn..............


still on my script so bro pls where is my error
i have tried retyping it but it still bring the same error (even the chance i dont know hwere to place them on the scrip..

help me bro and i promise to share u some tip after my earnings
HCP
legendary
Activity: 2086
Merit: 4361
Triple posting effectively the same stuff over and over isn't going to get you any help...

https://bot.seuntjie.com/programmermode.aspx
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables
this basically what i want the script to do , but i dont know how to set the chances, and set the bet high or low for each bet

Did you read the programmer mode tutorials that Seuntjie linked to? He clearly put a lot of effort into making them...

Quote
chance, type: double, Permission: Read Write. The chance to win when betting. Defaults to value set in advanced settings if not set. Need to set this value to change the chance to win/payout when betting.

bethigh, type: bool, Permission: Read Write. whether to bet high/over (true) or low/under(false). Defaults to true (bet high/bet over)

chance = 90.4 -- sets chance to 90.4%
bethigh = true -- sets to roll High/Over


chance = 94 -- sets chance to 94%
bethigh = false -- sets to roll Low/Under

Honestly, looking at your script, it is fairly obvious that you have zero (or close to zero) programming knowledge and lack the understanding of the basic fundamentals to be able to make this work. I highly recommend that you at least work through the tutorials that Seuntjie put together to at least build up some knowledge of the very basics and learn how the bot actually processes the script. There is a nifty flow chart that explains the "flow" of the bot and how it processes the script.

I'm happy to provide tips on how to add certain features to a script... little code snippets... but if you want a script generated from scratch... I'm happy to offer my services for a fee... Wink
Pages:
Jump to: