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: 697 Bytes

HITS: 55267

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

comments powered by Disqus