Hello everyone... I'm trying to write a script that does the following: It waits for a pattern such as HHLLHH or LLHHLL If it gets a pattern like HHLLHH betting at minimum the next base bet would be on High. The base bet is determined by multiplying a small number like 0.01 or 0.002 by the balance by a number in pi. Pi as you may know is 3.14159..... so for the first base bet the calculation would be 3 x balance x a small number like 0.02. The first problem is it doesn't let me incorporate a small number like 0.02 because it says I'm "multiplying by nil" So I used the method of dividing the balance by a large number like 10000 but and only later multiplying by a number in pi but it always just bets minimum bet! This is the script :
chance = 49.95
bethigh = false
highstreakcounter = 0
lowstreakcounter = 0
--counter = 0
--counter1 = 0
nextbet = 0.00000001
minbet = 0.00000001
--wincount=0
--losecount=0
basebet = (balance/10000)
i = 0
--j = 1
--k = 0
--sn = 0.02
pi1 = 3
pi2 = 1
pi3 = 4
pi4 = 1
pi5 = 5
pi6 = 9
pi7 = 2
pi8 = 6
pi9 = 5
pi10 = 3
pi11 = 5
pi12 = 8
pi13 = 9
pi14 = 7
pi15 = 9
pi16 = 3
pi17 = 2
pi18 = 3
pi19 = 8
pi20 = 4
pi21 = 6
pi22 = 2
pi23 = 6
pi24 = 4
pi25 = 3
pi26 = 3
pi27 = 8
pi28 = 3
pi29 = 2
pi30 = 7
--95288419716939937515829749445923781646286289986283482534211767982148865132
function dobet()
while (minbet) do
bethigh
if currentstreak ==2 then
--nextbet = minbet
lowstreakcounter +=1
--counter+=1
end
if currentstreak == -2 then
--nextbet = minbet
highstreakcounter +=1
--counter1+=1
end
if lowstreakcounter==highstreakcounter and currentprofit==1
then nextbet = basebet
--i = pi1
bethigh = false
basebet += basebet*pi1
end
if win then nextbet=minbet
else
nextbet = basebet
bethigh = false
basebet += basebet*pi2
--i = pi2
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi3
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi4
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi5
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi6
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi7
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi8
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi9
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi10
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi11
bethigh = true
basebet += basebet*pi11
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi12
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi13
bethigh = false
basebet += basebet*pi13
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi14
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi15
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi16
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi17
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi18
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi19
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi20
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi21
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi22
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi23
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi24
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi25
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi26
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi27
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = true
basebet += basebet*pi28
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi29
end
if win then nextbet=minbet
else
nextbet = basebet
--i = pi3
bethigh = false
basebet += basebet*pi30
end
end
end
So for a pattern like HHLLHH the first base bet would be placed on High. If that lost the next number in pi would be used to calculate base bet. If that lost the third number in pi would be used. If that won, then the next time around when it gets a pattern since the bot wasn't in profit, it would take up where it left of off at the fourth value of pi and so on until iot would be in profit upon which time it would return to the first value in pi to calculate the base bet. I'm battling on many fronts here because I don't even know what i'm doing wrong when I'm trying to get the pattern like 3 doubles of wins and losses in a row like for instance if it would get HHLLHH or LLHHLL. I understaqnd that c urrentstreak is the last streak of wins or losses if betting all low or all high but I don't know how to put them together with currentprofit to make the pattern that I want the bot to exploit . Can someone please help me here?? I've been working on it for hours and hours and I still haven't been able to figure it out. I'm new to this programming business so if someone can help a newbie out, it would be really appreciated. If you have any questions , I would be glad to answer them. Thanks in advance for your help.