Bitcoin Forum
November 14, 2024, 04:43:09 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 125405 times)
ShooterXD
Hero Member
*****
Offline Offline

Activity: 924
Merit: 501

CryptoTalk.Org - Get Paid for every Post!


View Profile
August 08, 2016, 09:07:19 PM
 #221

im a newb, how can i start script?

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

chilly2k (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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.     

ShooterXD
Hero Member
*****
Offline Offline

Activity: 924
Merit: 501

CryptoTalk.Org - Get Paid for every Post!


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

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

zaclex
Newbie
*
Offline Offline

Activity: 8
Merit: 0


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

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: 1717
Merit: 1125



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

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
Merit: 0


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

Thanks a lot seuntjie, I figured it out finally.

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

Activity: 8
Merit: 0


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

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: 1717
Merit: 1125



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

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
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Merit: 0


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

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
Merit: 0


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

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
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



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

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

seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



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

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.

seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



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

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

strunberg
Sr. Member
****
Offline Offline

Activity: 1383
Merit: 341


The Change Ltd - 250+ coins


View Profile WWW
August 24, 2016, 07:41:21 PM
 #238

I have my script set up so that I have to bet & win same amount two times in a row in order to return to base bet.

Yet how would I set up the script so that after I were to lose so much coins, instead of requiring the dice bot win two times in a row to return to base bet, the dice bot would return to base bet after winning once?

▄▄████████▄▄
▄▄████████████████░░
█████▀▀░░░░░░░░▀▀▀░░░░
▄████▀░░░░░░░▄▄▄▄▄▄▄▄░░░░░
████░░░░░░░▄█████████▀░░░░
████░░░░░░▄████▀░░░░░░░░▄▄▄▄
████░░░░▄████▀░░░░░░░░░░████
▀▀▀▀░░▄█████▄▄▄▄▄▄░░░░░░████
░░░░░░▀█████████▀░░░░░████
░░░░░░░░▀▀▀▀▀▀░░░░░░▄████▀
░░░░▄▄▄░░░░░░░░▄▄█████
░░████████████████▀▀
▀▀████████▀▀

TheChange
▄▄█████████████████▄▄
▄███████████████████████▄
▄█████████▀▀██▀▀██████████▄
██████████░░██░░███████████
████████░░░░░░░░░░▀████████
█████████░░░████░░░████████
█████████░░░░░░░░░░████████
█████████░░░████▄░░░███████
████████▀░░░▀▀▀▀▀░░░███████
████████▄▄░░▄▄░░▄▄▄████████
▀█████████░░██░░██████████▀
▀███████████████████████▀
▀▀█████████████████▀▀


░░░░░░░░░░██▄
▄▄▄▄▄▄▄▄▄▄▄███▄
▀▀▀▀▀▀▀▀▀▀▀███▀
░░░░░░░░░░██▀
░░░▄▄
 ▄██▀
███████████████
 ▀██▄
░░░▀▀
▄▄████████████████▄▄
▄██████████████████████▄
▄████████████▀███████████▄
████████████░░░███████████
██████████▀░░░░░▀█████████
█████████▀░░░░░░░▀████████
████████░░░░░░░░░░░███████
████████▀▄▄░░░░░▄▄▀███████
█████████▄░▀▀▄▀▀░▄████████
██████████▄░░░░░▄█████████
▀███████████▄░▄██████████▀
▀██████████████████████▀
▀▀████████████████▀▀

+250
COINS
.Crypto Exchange.
▄▄▄▄
▄▄▄███▀▀███▄▄▄
▄█████▀▀░▄▄▄▄░▀▀█████▄
██▀░▄▄▄████████▄▄▄░▀██
██░████████████████░██
██░████████████████░██
██░▀██████████████▀░██
██░▀████████████▀░██
▀██░▀██████████▀░██▀
▀██▄░▀██████▀░▄██▀
▀██▄▄░▀▀░▄▄██▀
▀▀██▄▄██▀▀
▀▀▀▀
▄▄████████████████▄▄
▄██████████████████████▄
▄████████████████████████▄
██████████████░░░░░░░█████
██████▀▀▀▀░░░░░░░░░░░█████
████▄░░░░░░░▄▄█▀░░░░██████
████████████▀░░░░░░███████
██████████░░░░░░░░████████
███████████▄░░░░░█████████
█████████████▄░░██████████
▀████████████████████████▀
▀██████████████████████▀
▀▀████████████████▀▀
chilly2k (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
August 25, 2016, 02:56:19 AM
 #239

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



chance=49.5
multiplier=2
base=0.00000010
nextbet = base   
bethigh = false
stoponwin

function dobet()
   if win then
      if (stoponwin) then stop() end -- check new variable.   
      nextbet=base
   else
      nextbet=previousbet*multiplier
   end
end
end

   The function mentioned in the error, is the dobet() function.  So look at the statement just before it.  stoponwin is not valid for an assignment statement.  You need to tell LUA what stoponwin is equal to.  I think you want stoponwin = true


chilly2k (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
August 25, 2016, 06:33:31 PM
 #240

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   

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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!