Hello Guest

It is possible to add stop before ?

  • 11 Replies
  • 378 Views
*

lilou69

  • **
  • 18
  • +0/-0
    • View Profile
It is possible to add stop before ?
« on: January 20, 2019, 08:44:41 pm »
Hi Seuntjie
I want to add stop before in my script but dont know if it's possible ?
I want the bot stop before he roll if the amount I spend will go more than 0.004 for exemple :
Code: [Select]
bethigh=true
chance=80
base=0.00000100
nextbet=0.00000100
multiplierlose=1.65
multiplierwin=0.88
gain=0
encours=0

function dobet()
encours = encours + currentprofit
gain = gain + currentprofit

if (win) then
      nextbet=previousbet*multiplierwin
   else
nextbet=previousbet*multiplierlose

end

if encours > 0.00000050 then
encours = 0
nextbet=base

end

if gain > 0.00005000 then
dofile('script815.txt')

end

[color=red][b]I want the bot stop and dont go more than 400 000 (total for all the bet before ...)
I try with
if encours < -0.00400000
stop()

but the bot roll and stop after the amount of - 0.00400000 I want he stop one roll before and dont roll for go more how to do please ?[/b][/color]
end

end
end
« Last Edit: January 21, 2019, 11:24:19 am by Seuntjie »

*

MrOnsTr

  • **
  • 24
  • +1/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #1 on: January 21, 2019, 04:28:58 am »
--  :D
Code: [Select]
bethigh=true
chance=80
base=0.00000100
nextbet=0.00000100
multiplierlose=1.65
multiplierwin=0.88
gain=0
encours=0

function dobet()

encours = encours + currentprofit
gain = gain + currentprofit

-- The bot will stop immediately before rolling next BET!
if encours < -0.00400000
print(" ")
print("  encours < -0.00400000  ")   
print(" ")
stop()
end

if (win) then
      nextbet=previousbet*multiplierwin
   else
nextbet=previousbet*multiplierlose
end

if encours > 0.00000050 then
    encours = 0
    nextbet=base
    end

if gain > 0.00005000 then
dofile('script815.txt')
end

end
« Last Edit: January 21, 2019, 11:23:47 am by Seuntjie »

*

lilou69

  • **
  • 18
  • +0/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #2 on: January 21, 2019, 08:41:01 am »
Thanks but still the same probleme ....
The total lost before the bot is stop is more than 0.004
I try the script with stop 0.00000400 and with chance 10
Betting 0.000001 at 10% chance to win, high
Betting 0.00000165 at 10% chance to win, high
Betting 0.0000027225 at 10% chance to win, high
So I lose
0.000001+0.00000165 +0.0000027225 = 0.00000537 and I dont want the total for the lose are more than 0.000004 in this exemple ...
I would like the bot stop after the bet for 165 and dont roll after because the total lose will be more than 400

*

MrOnsTr

  • **
  • 24
  • +1/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #3 on: January 21, 2019, 09:11:27 am »
Code: [Select]
maxbet = 0.00000165
function dobet()
if nextbet > maxbet then
print("Betting more than maxbet")
stop()
end

just add this in your script, it will not bet more than maxbet   ;)
« Last Edit: January 21, 2019, 11:23:28 am by Seuntjie »

*

lilou69

  • **
  • 18
  • +0/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #4 on: January 21, 2019, 09:18:12 am »
Thanks I know it but it's not what I want because it's methode increase - decrease so the bet can to be anything before I lose the 400 000 satochis I can bet 165 if I win I will bet 150 if I lose I will bet 190 ... and the amount I lose will not be more than 400 000 satochis ... I really want the bot stop the bet before he know I will spend more than 400 000 satochis .... but maybe it's not possible ....

*

lilou69

  • **
  • 18
  • +0/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #5 on: January 21, 2019, 10:23:13 am »
I finally find how to do maybe this can help someone
Code: [Select]
bethigh=true
chance=80
base=0.00000100
nextbet=0.00000100
multiplierlose=1.65
multiplierwin=0.88
gain=0
encours=0
lowerlimit=-0.00000400



function dobet()

encours = encours + currentprofit
gain = gain + currentprofit



if (win) then
      nextbet=previousbet*multiplierwin
   else
nextbet=previousbet*multiplierlose
[color=green][b]if encours*multiplierlose < -0.00000500 then[/b][/color]
stop()
end
end


if encours > 0.00000050 then
    encours = 0
    nextbet=base
    actualbet=0.00000100
    end



if gain > 0.00005000 then
dofile('script815.txt')
end

end
« Last Edit: January 21, 2019, 11:23:16 am by Seuntjie »

*

Seuntjie

  • *****
  • 261
  • +2/-2
    • View Profile
Re: It is possible to add stop before ?
« Reply #6 on: January 21, 2019, 11:22:50 am »
an easier waywould probably have been to just compare your encourse value + your next bet to your limit:

Code: [Select]
if encourse-nextbet<-0.0004 then
Also, please use code tags whenever posting code.

*

cryptomonke1

  • *
  • 2
  • +0/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #7 on: January 21, 2019, 10:58:57 pm »
after seeing this code:
Code: [Select]
if gain > 0.00005000 then
dofile('script815.txt')
does that mean we can execute new script after reaching specified profit? like daisy-chain several scripts?

*

Seuntjie

  • *****
  • 261
  • +2/-2
    • View Profile
Re: It is possible to add stop before ?
« Reply #8 on: January 22, 2019, 07:31:11 am »
after seeing this code:
Code: [Select]
if gain > 0.00005000 then
dofile('script815.txt')
does that mean we can execute new script after reaching specified profit? like daisy-chain several scripts?

Theoretically, yes. But I have never tested it, I have no idea if it works (I haven't really had proper feedback, people usually disappear after I suggest using it) and it's not officially supported functionality.

If you do attempt this, please let me know if it works, and if it does work, how well it works. Are there any performance impacts? increased memory usage etc.

*

lilou69

  • **
  • 18
  • +0/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #9 on: January 22, 2019, 08:11:46 am »
Yes you can execute new script after reaching specified profit or lose and this with alot of script ;) I try it alot and work well! I have 999 script for different methode work together after reaching specified profit ;)

In the end the code i used for my script work and it's exactly what I want! because if for exemple I have 1 losses at 10 000 so the nextbet will be 16500 if I win for 16500 I dont want the bot stop because the bot will decrease the nextbet but if I losse I will stop so the exactly code :

Code: [Select]
if (win) then
      gain = gain + currentprofit
      nextbet=previousbet*multiplierwin
   else
   gain = gain + currentprofit
nextbet=previousbet*multiplierlose
if encours-(previousbet*multiplierlose) < -0.00040000 then
stop()
end
end

*

Becky

  • **
  • 12
  • +1/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #10 on: January 22, 2019, 08:47:11 am »
after seeing this code:
Code: [Select]
if gain > 0.00005000 then
dofile('script815.txt')
does that mean we can execute new script after reaching specified profit? like daisy-chain several scripts?

Theoretically, yes. But I have never tested it, I have no idea if it works (I haven't really had proper feedback, people usually disappear after I suggest using it) and it's not officially supported functionality.

If you do attempt this, please let me know if it works, and if it does work, how well it works. Are there any performance impacts? increased memory usage etc.

Yes, it's working fine. There are no performance issues unless we use sleep function in any of scripts and also no increased memory usage. Sometimes freezes or lags if used sleep function! Thanks you ;)

*

Becky

  • **
  • 12
  • +1/-0
    • View Profile
Re: It is possible to add stop before ?
« Reply #11 on: January 22, 2019, 08:51:30 am »
after seeing this code:
Code: [Select]
if gain > 0.00005000 then
dofile('script815.txt')
does that mean we can execute new script after reaching specified profit? like daisy-chain several scripts?

Theoretically, yes. But I have never tested it, I have no idea if it works (I haven't really had proper feedback, people usually disappear after I suggest using it) and it's not officially supported functionality.

If you do attempt this, please let me know if it works, and if it does work, how well it works. Are there any performance impacts? increased memory usage etc.

Yes, it's working fine. There are no performance issues unless we use sleep function in any of scripts and also no increased memory usage. Sometimes DiceBot freezes or lags if used sleep function! Thanks you ;)