Hello Guest

# Script with loss detection and reset

• 4 Replies
• 212 Views

#### virtualdreams

• 15
• +0/-0
##### Script with loss detection and reset
« on: March 29, 2019, 10:27:11 pm »
Hi Guys,

I'm trying to write a script, but I cant seem to make it work at all.

What I'm trying to make is a script where I can edit chance, multiplier and betbase (please correct my script if you can):

the description is this:

after a win and my last loss streak was > 8 then BETBASE

Code: [Select]
`chance=49.5multiplier=2BETBASE =0.00000100 prebet=0.00000001 function dobet() lc=0if win then nextbet=prebet       if lc > 2 then           nextbet=previousbet*multiplier              endelse nextbet=prebet lc=lc+1end end`
« Last Edit: March 29, 2019, 10:38:49 pm by Seuntjie »

#### Seuntjie

• 270
• +2/-2
##### Re: Script with loss detection and reset
« Reply #1 on: March 29, 2019, 10:42:32 pm »
Please use code tags when posting code.

Remember that everything OUTSIDE of the dobet function gets executed ONCE when you use the start command. Everything INSIDE the dobet function gets executed after EVERY bet.

So according to your code, after every bet:

Step 1: set lc to 0
Step 2: Check if it's a win, set prebety
Step 3: Compare lc (which is 0) to 2. If it's larger multiply

Step 4: if it's a loss, prebet and increment lc.

#### virtualdreams

• 15
• +0/-0
##### Re: Script with loss detection and reset
« Reply #2 on: March 30, 2019, 02:07:17 pm »
Please use code tags when posting code.

Remember that everything OUTSIDE of the dobet function gets executed ONCE when you use the start command. Everything INSIDE the dobet function gets executed after EVERY bet.

So according to your code, after every bet:

Step 1: set lc to 0
Step 2: Check if it's a win, set prebety
Step 3: Compare lc (which is 0) to 2. If it's larger multiply

Step 4: if it's a loss, prebet and increment lc.

Thanks for your guiding, but I cant seem to do it
I wanted the bet only to be high, after the 1st win with a loss count + then 5.. Could you help me please?

Quote
chance=49.5
multiplier=2
base=0.00000020
prebet=0.00000001
lc = 0
function dobet()
if (!win) then
if lc <= 5 then
nextbet=prebet
lc = lc + 1
else
nextbet=previousbet*multiplier
lc = lc + 1
end
else
nextbet=prebet
lc=0
end
print(lc)
end

#### Seuntjie

• 270
• +2/-2
##### Re: Script with loss detection and reset
« Reply #3 on: April 02, 2019, 08:45:09 am »
You can set whether the bet is high or low using the bethigh variable.

Think about your criteria and how you can identify it when happening. You can use some of the variables in the bot, you can use your own variables. See the tutorials in https://forum.seuntjie.com/index.php?topic=2.0

Also, I'm not 100% what it is that you need, can you post an example?

#### virtualdreams

• 15
• +0/-0
##### Re: Script with loss detection and reset
« Reply #4 on: April 02, 2019, 02:18:11 pm »
You can set whether the bet is high or low using the bethigh variable.

Think about your criteria and how you can identify it when happening. You can use some of the variables in the bot, you can use your own variables. See the tutorials in https://forum.seuntjie.com/index.php?topic=2.0

Also, I'm not 100% what it is that you need, can you post an example?

Hi, you can close this topic. Already managed to script it