Post
Topic
Board Gambling discussion
Re: Here's a lua script for 25% chance. Need help to improve.
by
tankiatwee
on 13/01/2017, 23:45:46 UTC
Well, I thought I can't code but I managed to hammer out something that works.

Code:
chance = 25
multiplier = 1.35
base = 0.00000002
nextbet = base  
bethigh = false
rollcount = 10

function dobet()

--Randomly select High/Low
bethigh = math.random(0,100)%2 == 0

--change seed every 10 bet
if rollcount == 10 then
rollcount = 0
resetseed();
else
rollcount = rollcount+1
end

--bet progression
   if win then
      nextbet = base
   else
      nextbet = previousbet * multiplier
   end
end

end

Now, the high/low randomizer is just one line. Is there a more intelligent coding for roll high/low to minimize losing streak? Perhaps increase chance and bet amount until profit before falling back to 25% (optional)?

Are you able to code for stop betting for 5 minutes and change seed after a 20-bet losing streak, then resume? Or any other improvement ideas are welcome.