dicebot script


SUBMITTED BY: phroyd

DATE: Aug. 4, 2019, 10:07 a.m.

UPDATED: Aug. 4, 2019, 10:47 a.m.

FORMAT: Text only

SIZE: 744 Bytes

HITS: 63026

  1. chance = 0.99
  2. maxbalance = balance
  3. loosecount = 0
  4. wincount = 0
  5. function getmulti()
  6. local payout=(100-1)/chance
  7. return (payout/(payout-1))
  8. end
  9. function getBaseDiv()
  10. return (math.sqrt( balance ) * 100000)
  11. end
  12. base = balance/getBaseDiv()
  13. nextbet = base
  14. function dobet()
  15. if win then
  16. loosecount = 0
  17. wincount = wincount + 1
  18. if wincount > 10 then
  19. ...
  20. end
  21. base = balance/getBaseDiv()
  22. nextbet = base
  23. checkMaxBalance()
  24. else
  25. wincount = 0
  26. loosecount = loosecount + 1
  27. nextbet = previousbet*getmulti()
  28. end
  29. end
  30. function checkMaxBalance()
  31. if balance > maxbalance then
  32. print("new max: "..string.format("%9.8f", balance))
  33. maxbalance = balance
  34. end
  35. end

comments powered by Disqus