Bitcoin Forum
October 17, 2017, 09:03:01 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
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 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 48232 times)
chilly2k
Legendary
*
Online Online

Activity: 920


View Profile
August 08, 2016, 11:08:13 PM
 #241

im a newb, how can i start script?

i just past the code, and now? how i start the bets?

just type start() in the console and hit enter.  stop() stops the script.     

1508274181
Hero Member
*
Offline Offline

Posts: 1508274181

View Profile Personal Message (Offline)

Ignore
1508274181
Reply with quote  #2

1508274181
Report to moderator
1508274181
Hero Member
*
Offline Offline

Posts: 1508274181

View Profile Personal Message (Offline)

Ignore
1508274181
Reply with quote  #2

1508274181
Report to moderator
1508274181
Hero Member
*
Offline Offline

Posts: 1508274181

View Profile Personal Message (Offline)

Ignore
1508274181
Reply with quote  #2

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

Posts: 1508274181

View Profile Personal Message (Offline)

Ignore
1508274181
Reply with quote  #2

1508274181
Report to moderator
ShooterXD
Hero Member
*****
Offline Offline

Activity: 574



View Profile
August 09, 2016, 12:26:59 AM
 #242

im a newb, how can i start script?

i just past the code, and now? how i start the bets?

just type start() in the console and hit enter.  stop() stops the script.     
I found it .

Thx, and thx for ur script too, working good!
Cya

           ▄▄███████▄▄
        ▄███▀▀
▄▄▄▄    ▀▄
     ▄▄█████████████▄▄  ▀▄
  ▄▀▀██▀           ▀▀██▄▄▀▄
▄▀  ██                 ▀██
  ██       ▀▀█▀▀         █
█▀        █ █ █        ▄█▀▄
▀▄         █ █ █       ▄█  █
 ██         █▄▄▄█      ▄█  ▄▀
  ██▄                ▄█▀  ▄▀
  ▀▄▀██▄▄          ▄█▀  ▄▀
   ▀▄ ▀▀███▄▄▄▄▄▄█████▀▀
     ▀▀▄▄▄▄▄▄▀▀▀▀▀▀▀
.UTRUST.▀████████▄
  ▀███████▄
    ▀██████▄
      ▀██████
       ▀█████
        ▀████▄
         █████
          ▀███
           ███
           ▀██
            ██
             █
             █
●  Download WHITEPAPER  ●
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ▼ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
facebook      twitter      slack
▀████████▄
  ▀███████▄
    ▀██████▄
      ▀██████
       ▀█████
        ▀████▄
         █████
          ▀███
           ███
           ▀██
            ██
             █
             █
zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 16, 2016, 01:59:49 PM
 #243

Hi guys, I've been trying the entire day to get this script going I can't make it work, maybe someone here who is good at coding can help me out, I'd really appreciate it.

 What I want to do is when my balance is 3% percent lower that what it was at the beginning, the bot has to stop and then start again, and I want that balance to be updated everytime I loose, so if I have 5 balance, I want to stop when I loose 3% of 5, after I lose 3% of five, I want it to stop after I loose 3% of 4.85 and so on... Can you please help me?

I tried with

Code:
balancepercent = balance*(97/100)

if balance < balancepercent then
stop()
resetstats()
start()

It stops betting, but it doesn't start again.

Also, I tried with sleep(5000) but the balance doesn't update and after I loose 3% of my balance, it sleeps for 5 seconds, makes another bet, sleeps again for 5 seconds, makes another bet and so on...

Please help me out if you know how, thank you very much!
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 16, 2016, 02:35:03 PM
 #244

Hi guys, I've been trying the entire day to get this script going I can't make it work, maybe someone here who is good at coding can help me out, I'd really appreciate it.

 What I want to do is when my balance is 3% percent lower that what it was at the beginning, the bot has to stop and then start again, and I want that balance to be updated everytime I loose, so if I have 5 balance, I want to stop when I loose 3% of 5, after I lose 3% of five, I want it to stop after I loose 3% of 4.85 and so on... Can you please help me?

I tried with

Code:
balancepercent = balance*(97/100)

if balance < balancepercent then
stop()
resetstats()
start()

It stops betting, but it doesn't start again.

Also, I tried with sleep(5000) but the balance doesn't update and after I loose 3% of my balance, it sleeps for 5 seconds, makes another bet, sleeps again for 5 seconds, makes another bet and so on...

Please help me out if you know how, thank you very much!

You never need to stop and restart the bot. Functions like resetstats are executed in series, meaning the script will wait at that point for the function to finish before continuing.
The start function isn't available from within the script for a few reasons.

Take a look at these articles:
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process  <- especially this one
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-04-martingale-and-mini-if-tutorial  <- this one handles local and global variables, will also help with your problem

zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 16, 2016, 04:38:16 PM
 #245

Thanks a lot seuntjie, I figured it out finally.

I'm now just using resetstats() and nextbet=.
zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 16, 2016, 08:25:49 PM
 #246

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!

seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 16, 2016, 08:38:21 PM
 #247

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 16, 2016, 10:54:50 PM
 #248

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

Thanks for replying!

This is the whole script - Pluscoup by chilly2k and grendel25 (I got it from your website).

Code:
basebet = 0.00001000
nextbet = basebet
roundprofit = 0
chance = 49.5
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
        end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
if roundprofit > 0 then roundprofit = 0 end
end
     if (!win) then
        nextbet = previousbet
print ("LOSE")
print(nextbet)
        end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end
end

What I am trying to do is this: when the profit (not whole account profit, just the session before resetstats) goes lower than 0.0005 for example, at fist I wanted the bot to stop and then restart but you told me it's not possible, so now I want it to reset the bet to basebet and also resetstats.

I tried with this:

Code:
if profit <= -0.0005 then
nextbet=basebet
resetstats();
end

... and it's not workin, it resets the stats but the bet doesn't go to basebet, it stays where it was.

Thanks for your time and I hope we figure it out!
chilly2k
Legendary
*
Online Online

Activity: 920


View Profile
August 17, 2016, 02:18:30 AM
 #249

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

Thanks for replying!

This is the whole script - Pluscoup by chilly2k and grendel25 (I got it from your website).

Code:
basebet = 0.00001000
nextbet = basebet
roundprofit = 0
chance = 49.5
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
   if (!win) then
      nextbet = previousbet
      print ("LOSE")
      print(nextbet)
   end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end
end

What I am trying to do is this: when the profit (not whole account profit, just the session before resetstats) goes lower than 0.0005 for example, at fist I wanted the bot to stop and then restart but you told me it's not possible, so now I want it to reset the bet to basebet and also resetstats.

I tried with this:

Code:
if profit <= -0.0005 then
nextbet=basebet
resetstats();
end

... and it's not workin, it resets the stats but the bet doesn't go to basebet, it stays where it was.

Thanks for your time and I hope we figure it out!

Your not saying/showing where you put that code.  If you put it just before the last end statement, I think it should work. 
  If you were trying it at the top, nextbet would get reset further in the code. 


Just for educational purposes, the last end statement close the dobet() function. 

zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 17, 2016, 02:43:58 AM
 #250

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

Thanks for replying!

This is the whole script - Pluscoup by chilly2k and grendel25 (I got it from your website).

Code:
basebet = 0.00001000
nextbet = basebet
roundprofit = 0
chance = 49.5
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
   if (!win) then
      nextbet = previousbet
      print ("LOSE")
      print(nextbet)
   end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end
end

What I am trying to do is this: when the profit (not whole account profit, just the session before resetstats) goes lower than 0.0005 for example, at fist I wanted the bot to stop and then restart but you told me it's not possible, so now I want it to reset the bet to basebet and also resetstats.

I tried with this:

Code:
if profit <= -0.0005 then
nextbet=basebet
resetstats();
end

... and it's not workin, it resets the stats but the bet doesn't go to basebet, it stays where it was.

Thanks for your time and I hope we figure it out!

Your not saying/showing where you put that code.  If you put it just before the last end statement, I think it should work.  
  If you were trying it at the top, nextbet would get reset further in the code.  


Just for educational purposes, the last end statement close the dobet() function.  
Hi, thanks for jumping in.

I tried placing the code at the end of the script, right before the last end that closes the dobet function and now it doesn't even resets the stats like it used to... it just keeps going like the code it's not even there.

This is my whole script exactly as I use it in the bot (the only things I added to it are the two IFs at the very end):

Code:
basebet = 0.000001000
nextbet = basebet
roundprofit = 0
chance = 50
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
        end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
if roundprofit > 0 then roundprofit = 0 end
end
     if (!win) then
        nextbet = previousbet
print ("LOSE")
print(nextbet)
        end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end

if profit <= -0.0001000 then
nextbet=basebet
resetstats()
end

if profit >= 0.001 then
withdraw(profit,'BTC ADDRESS')
nextbet=basebet
resetstats()
end

end
chilly2k
Legendary
*
Online Online

Activity: 920


View Profile
August 17, 2016, 04:21:47 AM
 #251

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

Thanks for replying!

This is the whole script - Pluscoup by chilly2k and grendel25 (I got it from your website).

Code:
basebet = 0.00001000
nextbet = basebet
roundprofit = 0
chance = 49.5
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
   if (!win) then
      nextbet = previousbet
      print ("LOSE")
      print(nextbet)
   end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end
end

What I am trying to do is this: when the profit (not whole account profit, just the session before resetstats) goes lower than 0.0005 for example, at fist I wanted the bot to stop and then restart but you told me it's not possible, so now I want it to reset the bet to basebet and also resetstats.

I tried with this:

Code:
if profit <= -0.0005 then
nextbet=basebet
resetstats();
end

... and it's not workin, it resets the stats but the bet doesn't go to basebet, it stays where it was.

Thanks for your time and I hope we figure it out!

Your not saying/showing where you put that code.  If you put it just before the last end statement, I think it should work.  
  If you were trying it at the top, nextbet would get reset further in the code.  


Just for educational purposes, the last end statement close the dobet() function.  
Hi, thanks for jumping in.

I tried placing the code at the end of the script, right before the last end that closes the dobet function and now it doesn't even resets the stats like it used to... it just keeps going like the code it's not even there.

This is my whole script exactly as I use it in the bot (the only things I added to it are the two IFs at the very end):

Code:
basebet = 0.000001000
nextbet = basebet
roundprofit = 0
chance = 50
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
        end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
if roundprofit > 0 then roundprofit = 0 end
end
     if (!win) then
        nextbet = previousbet
print ("LOSE")
print(nextbet)
        end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end

if profit <= -0.0001000 then
nextbet=basebet
resetstats()
end

if profit >= 0.001 then
withdraw(profit,'BTC ADDRESS')
nextbet=basebet
resetstats()
end

end

Try this.  I think there were to many end statements.  I formatted it a little better to match up if's and ends.  I don't have the bot available on my new computer, otherwise I would have tested it out. 

Code:
basebet = 0.000001000
nextbet = basebet
roundprofit = 0
chance = 50
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
        print ("WIN")
print(nextbet)
      end
      if balance<minbal then
          stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
      if (!win) then
         nextbet = previousbet
print ("LOSE")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end

if profit <= -0.0001000 then
nextbet=basebet
resetstats()
end

if profit >= 0.001 then
withdraw(profit,'BTC ADDRESS')
nextbet=basebet
resetstats()
end

end

zaclex
Newbie
*
Offline Offline

Activity: 8


View Profile
August 17, 2016, 08:55:58 AM
 #252

Update, still not working.

I tried this

Code:
if profit <= -0.000500 then
nextbet=basebet
resetstats();
resetseed();
end

It resets the stats but it keeps going with the same bet, the nextbet doesn't return to basebet. (I have basebet variable determined)

Please help me out, thanks!



can you post your whole script and explain what your'e trying to do?

Thanks for replying!

This is the whole script - Pluscoup by chilly2k and grendel25 (I got it from your website).

Code:
basebet = 0.00001000
nextbet = basebet
roundprofit = 0
chance = 49.5
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
   if (!win) then
      nextbet = previousbet
      print ("LOSE")
      print(nextbet)
   end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end
end

What I am trying to do is this: when the profit (not whole account profit, just the session before resetstats) goes lower than 0.0005 for example, at fist I wanted the bot to stop and then restart but you told me it's not possible, so now I want it to reset the bet to basebet and also resetstats.

I tried with this:

Code:
if profit <= -0.0005 then
nextbet=basebet
resetstats();
end

... and it's not workin, it resets the stats but the bet doesn't go to basebet, it stays where it was.

Thanks for your time and I hope we figure it out!

Your not saying/showing where you put that code.  If you put it just before the last end statement, I think it should work.  
  If you were trying it at the top, nextbet would get reset further in the code.  


Just for educational purposes, the last end statement close the dobet() function.  
Hi, thanks for jumping in.

I tried placing the code at the end of the script, right before the last end that closes the dobet function and now it doesn't even resets the stats like it used to... it just keeps going like the code it's not even there.

This is my whole script exactly as I use it in the bot (the only things I added to it are the two IFs at the very end):

Code:
basebet = 0.000001000
nextbet = basebet
roundprofit = 0
chance = 50
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
         print ("WIN")
print(nextbet)
        end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
if roundprofit > 0 then roundprofit = 0 end
end
     if (!win) then
        nextbet = previousbet
print ("LOSE")
print(nextbet)
        end
     end
if balance<minbal then
   stop()
end
if balance>maxbal then
   stop()
end
end

if profit <= -0.0001000 then
nextbet=basebet
resetstats()
end

if profit >= 0.001 then
withdraw(profit,'BTC ADDRESS')
nextbet=basebet
resetstats()
end

end

Try this.  I think there were to many end statements.  I formatted it a little better to match up if's and ends.  I don't have the bot available on my new computer, otherwise I would have tested it out. 

Code:
basebet = 0.000001000
nextbet = basebet
roundprofit = 0
chance = 50
minbal=balance-0.0300000
maxbal=balance+0.01500000

function dobet()

roundprofit += currentprofit

   if (win) then
      if (roundprofit < 0) then
        nextbet = previousbet + basebet
                print ("WIN")
print(nextbet)
      else
          nextbet = basebet
        print ("WIN")
print(nextbet)
      end
      if balance<minbal then
          stop()
      end
      if balance>maxbal then
         stop()
      end
      if roundprofit > 0 then roundprofit = 0 end
   end
      if (!win) then
         nextbet = previousbet
print ("LOSE")
print(nextbet)
      end
      if balance<minbal then
         stop()
      end
      if balance>maxbal then
         stop()
      end

if profit <= -0.0001000 then
nextbet=basebet
resetstats()
end

if profit >= 0.001 then
withdraw(profit,'BTC ADDRESS')
nextbet=basebet
resetstats()
end

end

Thank you very much mate!! That seems to be working just fine right now, thanks a lot again for your time!
BigMat
Newbie
*
Offline Offline

Activity: 4


View Profile
August 18, 2016, 05:06:02 PM
 #253

I want to set automatic my strategy, but i have one problem, the base bet is 0.00000001 and chance 42%. When hit 6 lose streak the base bet change to 0.00000100, and if i lose again, and hit 7 lose streak, the base bet reset to 0.00000001 and the next 6 lose streak the base bet will change to 0.00000200 (double). The problem is, everything is automatic, less the double part, so how i double the "increased" bet if i lose the 7 time?

Strategy Example:

win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000100
win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000200
lose - 0.00000001
win -  0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
win - 0.00000400

Configured in "Advanced Mode":
http://image.prntscr.com/image/d205c40823b649f59696eac09bb49a8e.png
http://image.prntscr.com/image/7185b151672948a2a1797f8f63a95836.png

I tried these codes:
Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

setvalueint(streakBet1,double)

end

end

end

end

and

Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

streakBet1=streakBet1*2

end

end

end

end
strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 23, 2016, 06:07:48 AM
 #254

How do I set the script  so that it commits an action when win and lose streaks happen?

How do I set the script so that after a 2 lose bet streak I return to base bet after a single win?

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 23, 2016, 01:07:23 PM
 #255

How do I set the script  so that it commits an action when win and lose streaks happen?

How do I set the script so that after a 2 lose bet streak I return to base bet after a single win?

Take a look at these articles and pay extra close attention to the marked ones

1: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
1.1: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables  <-
1.2: https://steemit.com/seuntjie/@seuntjie/dicebot-programmer-mode-tutorial-01-2-functions
2: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
3: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
4: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-04-martingale-and-mini-if-tutorial  <-

strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 23, 2016, 05:06:43 PM
 #256

LUA ERROR!!
assignment statement expected, got 'losses'

chance=49.5
multiplier=2.0
base=0.00000001
function dobet()

if win then

   nextbet=baseBet

else

   nextbet=previousbet*multiplier

end

   nextbet = previousbet

   if currentstreak==2 then

   nextbet=baseBet

else

   If losses=0.000005 then
   
   if win then

   nextbet=baseBet

end
end

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 23, 2016, 05:12:49 PM
 #257

LUA ERROR!!
assignment statement expected, got 'losses'

chance=49.5
multiplier=2.0
base=0.00000001
function dobet()

if win then

   nextbet=baseBet

else

   nextbet=previousbet*multiplier

end

   nextbet = previousbet

   if currentstreak==2 then

   nextbet=baseBet

else

   If losses=0.000005 then
   
   if win then

   nextbet=baseBet

end
end

What's the difference between this line that works:
if currentstreak==2 then


and this line that doesn't:
If losses=0.000005 then

Also, take another look at the variables appendix (01.2 linked in my previous post)
losses is the NUMBER of losing bets, not the profit.

strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 23, 2016, 06:30:55 PM
 #258

LUA ERROR!!
assignment statement expected, got 'losses'

chance=49.5
multiplier=2.0
base=0.00000001
function dobet()

if win then

   nextbet=baseBet

else

   nextbet=previousbet*multiplier

end

   nextbet = previousbet

   if currentstreak==2 then

   nextbet=baseBet

else

   If losses=0.000005 then
   
   if win then

   nextbet=baseBet

end
end

What's the difference between this line that works:
if currentstreak==2 then


and this line that doesn't:
If losses=0.000005 then

Also, take another look at the variables appendix (01.2 linked in my previous post)
losses is the NUMBER of losing bets, not the profit.


I don't know the difference.

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 23, 2016, 06:51:29 PM
 #259

LUA ERROR!!
'end' expected, got ''




chance=49.5
multiplier=2.0
base=0.00000001
function dobet()

if win then

   nextbet=baseBet

else

   nextbet=previousbet*multiplier

end

   nextbet = previousbet

   if currentstreak==2 then

   nextbet=baseBet

else

   if currentstreak==-9 then
   
   if win then

   nextbet=baseBet

end
end



|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 23, 2016, 07:59:47 PM
 #260

LUA ERROR!!
'end' expected, got ''




chance=49.5
multiplier=2.0
base=0.00000001
function dobet()

if win then

   nextbet=baseBet

else

   nextbet=previousbet*multiplier

end

   nextbet = previousbet

   if currentstreak==2 then

   nextbet=baseBet

else

   if currentstreak==-9 then
   
   if win then

   nextbet=baseBet

end
end




Every function, if or if-else needs an end:

Code:
chance=49.5
multiplier=2.0
base=0.00000001
(1)function dobet()

(2)if win then

nextbet=baseBet

(2)else

nextbet=previousbet*multiplier

(2)end

nextbet = previousbet

(3) if currentstreak==2 then

nextbet=baseBet

(3)else

(4) if currentstreak==-9 then

(5) if win then

nextbet=baseBet

(5)end
(4)end

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