virtual limits dice script


SUBMITTED BY: phroyd

DATE: Jan. 4, 2018, 5:17 p.m.

FORMAT: Lua

SIZE: 26.1 kB

HITS: 595

  1. -- betting script for SEUNTJIE's dicebot
  2. -- watch the 1st output of the script - run sims to get an imagination of what the var streaksource_start does
  3. -- try 100000 and 1000000 to see the maxstreaks - look at the 49% chance (1st row): use 1000000 to get 20 max loosestreak
  4. -- the rest is setting up itself (startbet, loosecount to start betting ect)
  5. -- there are alot useless vars that can be abandoned
  6. ls = 0 -- loosestreak
  7. ws = 0 -- winstreak
  8. lc = 0
  9. wc = 0
  10. lsmax = ls
  11. f = 100000000
  12. unitfactor = 0.00000001
  13. basebet = unitfactor * 1
  14. capped = false
  15. streaksource_start = 800000 -- # of tries to calculate max streaks ( more tries > higher max streak > more security )
  16. streaksource_end = 400000
  17. waitstake_start = 92 -- 66% of maxstreak wait, 33% of maxstreak stand
  18. waitstake_end = 100
  19. xstreaksource_start = 800000 -- # of tries to calculate max streaks ( more tries > higher max streak > more security )
  20. xstreaksource_end = 400000
  21. xwaitstake_start = 100 -- 66% of maxstreak wait, 33% of maxstreak stand
  22. xwaitstake_end = 100
  23. budget_ratio = 100
  24. keepwait = true
  25. po1 = { payout=2, ch=49.50, multi=2.020, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  26. po2 = { payout=2.5, ch=39.60, multi=1.680, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  27. po3 = { payout=3, ch=33.00, multi=1.510, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  28. po4 = { payout=3.5, ch=28.29, multi=1.420, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  29. po5 = { payout=4, ch=24.75, multi=1.340, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  30. po6 = { payout=4.5, ch=22.00, multi=1.300, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  31. po7 = { payout=5, ch=19.80, multi=1.260, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  32. po8 = { payout=5.5, ch=18.00, multi=1.240, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  33. po9 = { payout=6, ch=16.50, multi=1.220, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  34. po10 = { payout=6.5,ch=15.23, multi=1.200, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  35. po11 = { payout=7, ch=14.14, multi=1.180, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  36. po12 = { payout=7.5,ch=13.20, multi=1.165, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  37. po13 = { payout=8, ch=12.38, multi=1.150, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  38. po14 = { payout=8.5,ch=11.65, multi=1.140, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  39. po15 = { payout=9, ch=11.00, multi=1.130, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  40. po16 = { payout=9.5,ch=10.42, multi=1.125, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  41. po17 = { payout=10, ch=09.90, multi=1.120, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  42. po18= { payout=15, ch=06.60, multi=1.095, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  43. po19 = { payout=20, ch=04.95, multi=1.070, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  44. po20 = { payout=25, ch=03.96, multi=1.055, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  45. po21 = { payout=30, ch=03.30, multi=1.040, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  46. po22 = { payout=35, ch=02.83, multi=1.035, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  47. po23 = { payout=40, ch=02.48, multi=1.030, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  48. po24 = { payout=45, ch=02.20, multi=1.0275, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  49. po25 = { payout=50, ch=01.98, multi=1.025, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  50. po26 = { payout=55, ch=01.80, multi=1.0225, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  51. po27 = { payout=60, ch=01.65, multi=1.020, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  52. po28 = { payout=65, ch=01.52, multi=1.019, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  53. po29 = { payout=70, ch=01.41, multi=1.018, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  54. po30 = { payout=75, ch=01.32, multi=1.0165, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  55. po31 = { payout=80, ch=01.24, multi=1.015, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  56. po32 = { payout=85, ch=01.16, multi=1.014, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  57. po33 = { payout=90, ch=01.10, multi=1.013, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  58. po34 = { payout=95, ch=01.04, multi=1.0125, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  59. po35 = { payout=99, ch=01.00, multi=1.012, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  60. po36 = { payout=990,ch=00.10, multi=1.0012, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  61. po37 = { payout=9900,ch=00.01, multi=1.00012, basebet=nil, xbasebet=nil, strk_max=nil, xstrk_max=nil, strk_stand=nil, xstrk_stand=nil, strk_wait=nil, xstrk_wait=nil, xbudget=0, lshigh=0, lslow=0, lshighmax=0, lslowmax=0 }
  62. polvls = {
  63. po1, po2, po3, po4, po5, po6, po7, po8,
  64. po9, po10, po11, po12, po13, po14, po15,
  65. po16, po17, po18, po19, po20, po21 , po22,
  66. po23, po24, po25, po26, po27, po28, po29,
  67. po30, po31, po32, po33, po34, po35, po36, po37
  68. }
  69. polvlcount = 37
  70. xplaybudget = 0
  71. xplaystate = true
  72. xchance_start = 49
  73. xchance_end = 49
  74. raisecount = 100
  75. raisestep = 1
  76. ticked = false
  77. swingprofit = 0
  78. swingstart = unitfactor * 50
  79. swingtarget = unitfactor * 5
  80. swingfactor = 1.35
  81. stoplossflag = false
  82. tempstand = 0
  83. ltd = 0
  84. ltdis0 = false
  85. ltdSplit = 12
  86. split = ltdSplit
  87. loosestreak = 0
  88. winstreak = 0
  89. ---basebet3p = round( math.log( balance * f )) * 3 --math.log( math.log( balance * f ))) / f ), 8 ) * 2
  90. chance3p = 48.5
  91. targetruns = 0
  92. maxbalance = balance
  93. minbalance = balance
  94. lastbalance = balance
  95. balancedelta = 0
  96. target = balance * 0.02
  97. maxprofit = profit
  98. pdelta = 0
  99. budget = 0
  100. maxbet = 0
  101. lastprofit = 0
  102. chanceDiv = 33
  103. stoploss = unitfactor * 550
  104. stake = 0
  105. WaT = true -- Wait after Trigger
  106. tcnt = 0
  107. dl = false -- last decision
  108. dll = false -- before last decision
  109. dlll = false -- ...
  110. dllll = false
  111. dlllll = false
  112. echo_dl = ""
  113. echo_dll = ""
  114. echo_dlll = ""
  115. echo_dllll = ""
  116. echo_dlllll = ""
  117. clumptrigger = false
  118. ct = " <> "
  119. dbl = false
  120. echo_dbl = ""
  121. basebet_flat = unitfactor * 1
  122. tippingjar = 0
  123. bethigh = true
  124. hiloStrng = "HIGH"
  125. firstrun = true
  126. mychance = chance3p
  127. multi = multi3
  128. nextbet = 0
  129. chance = mychance
  130. mynextbet = nextbet
  131. --calculateBets()
  132. function dobet()
  133. if firstrun then
  134. calculateBets()
  135. firstrun = false
  136. end
  137. registerRolls()
  138. if !win then
  139. ls = ls + 1
  140. ws = 0
  141. else
  142. ws = ws + 1
  143. -- ls = 0
  144. end
  145. --if !capped then
  146. --betselect()
  147. if xplaystate then
  148. divIt()
  149. else
  150. flat()
  151. end
  152. checkups()
  153. end
  154. function flat()
  155. if capped then
  156. if !win then
  157. mynextbet = mynextbet * multi
  158. print( ls.." > nb: "..round( mynextbet, 8 ).." b: "..round( balance, 8 ))
  159. ws = 0
  160. else
  161. balancedelta = balance - lastbalance
  162. swingprofit = swingprofit + balancedelta
  163. lastbalance = balance
  164. print( "\n>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>")
  165. print( "\n >>> WIN after [ " .. ls .. " ] rounds at ".. round( mychance, 2 ) .. "% <<<\n")
  166. print( " p/pd: "..round( profit, 8 ).." ( "..round( balancedelta, 8).." )")
  167. print( " b/minb: "..round( balance, 8 ).." ( "..round( minbalance, 8).." )\n")
  168. print( " lsmax: " .. lsmax.." ( "..bets..")")
  169. print( " swtgt: "..round( swingtarget, 8 ))
  170. print( " jar: "..round( tippingjar, 8 ).."\n")
  171. print( "\n*********************************************************************************")
  172. capped = false
  173. ls = 0
  174. lastprofit = profit
  175. mychance = chance3p
  176. mynextbet = 0
  177. multi = 2
  178. end
  179. else
  180. mynextbet = 0
  181. betselect()
  182. end
  183. end
  184. function divIt()
  185. if capped then
  186. if !win then
  187. xplaybudget = xplaybudget - previousbet
  188. mynextbet = mynextbet * multi
  189. -- raisestep = raisestep + 1
  190. -- if raisestep <= raisecount then
  191. -- v = raisestep / raisecount
  192. -- v = v * v
  193. -- mychance = round(( xchance_end * v ) + ( xchance_start * ( 1 - v )), 2 )
  194. -- end
  195. if xplaybudget <= 0 then
  196. xplaystate = false
  197. mynextbet = 0
  198. capped = false
  199. maxbalance = maxbalance - (( maxbalance - balance ) / 2 )
  200. end
  201. print( ls.." > nb: "..round( mynextbet, 8 ).." xb: "..round( xplaybudget, 8 ).." c: "..round( mychance, 8 ))
  202. ws = 0
  203. else
  204. balancedelta = balance - lastbalance
  205. swingprofit = swingprofit + balancedelta
  206. lastbalance = balance
  207. print( "\n>> >> >> >> >> >> >> X P L A Y >> >> >> >> >> >> >> >> >> >> >>")
  208. print( "\n >>> WIN after [ " .. ls .. " ] rounds at ".. round( mychance, 2 ) .. "% <<<\n")
  209. print( " p/pd: "..round( profit, 8 ).." ( "..round( balancedelta, 8).." )")
  210. print( " b/minb: "..round( balance, 8 ).." ( "..round( minbalance, 8).." )\n")
  211. print( " lsmax: " .. lsmax.." ( "..bets..")")
  212. print( " swtgt: "..round( swingtarget, 8 ))
  213. print( " jar: "..round( tippingjar, 8 ).."\n")
  214. print( "\n*********************************************************************************")
  215. capped = false
  216. ls = 0
  217. lastprofit = profit
  218. mychance = chance3p
  219. multi = 2
  220. mynextbet = 0
  221. end
  222. else
  223. mynextbet = 0
  224. xbetselect()
  225. end
  226. end
  227. function checkups()
  228. if balance < minbalance then minbalance = balance end
  229. if profit > maxprofit then maxprofit = profit end
  230. if mynextbet > maxbet then maxbet = mynextbet end
  231. if lsmax < ls then lsmax = ls end
  232. if tippingjar >= 0.00080001 then
  233. ---tip( "quintessence", 0.00050001 )
  234. tippingjar = 0
  235. --maxbalance = balance
  236. ls = 0
  237. end
  238. if mynextbet > balance or nextbet > balance then
  239. print( "\n*********************************************************************************")
  240. print( " >>> BUST after [ " .. ls .. " ] rounds at ".. round( mychance, 2 ) .. "% <<<\n")
  241. print( " pr/pb: "..round( profit, 8 ).." / "..round( previousbet, 8 ))
  242. print( " pr/delta: "..round( profit, 8 ).." ( "..round( ( profit - lastprofit ), 8).." )")
  243. print( " ls/maxb: " .. lsmax.." ( "..round( maxbet, 8).." )")
  244. print( " b/minb: "..round( balance, 8 ).." ( "..round( minbalance, 8).." )\n")
  245. print( " bets: " .. bets)
  246. print( "\n*********************************************************************************\n\n")
  247. -- stop()
  248. end
  249. if balance > maxbalance then
  250. tippingjar = tippingjar + ( balance - maxbalance ) * 0.5
  251. if balance > maxbalance + target then
  252. target = balance * 0.005
  253. calculateBets()
  254. end
  255. maxbalance = balance
  256. mychance = chance3p
  257. xplaystate = true
  258. mynextbet = 0
  259. end
  260. --if maxbalance >= 0.0008 then stop() end
  261. if balance - mynextbet <= maxbalance - ( unitfactor * 100000 ) then
  262. local test = read("continue?", 2 )
  263. if !test then stop() end
  264. end
  265. --if mynextbet < unitfactor then mynextbet = unitfactor end
  266. chance = round( mychance, 2 )
  267. nextbet = mynextbet
  268. end
  269. function betselect()
  270. local lasthigh = 0
  271. local lastlow = 0
  272. for i = polvlcount, 1, -1 do
  273. if polvls[i].lshigh > polvls[i].strk_wait and !capped then
  274. ls = polvls[i].lshigh
  275. mychance = polvls[i].ch
  276. multi = polvls[i].multi
  277. mynextbet = polvls[i].basebet
  278. tempstand = polvls[i].strk_stand
  279. bethigh = true
  280. --pdelta = budget
  281. print("\n**************************************************************************")
  282. print(" >>> going [ "..polvls[i].payout.." x ] after "..ls.." rounds <<<")
  283. print("")
  284. print(" betting on HIGH")
  285. print(" chance: "..mychance.."%")
  286. print(" basebet: "..round( mynextbet, 8 ))
  287. print("\n")
  288. print( "\n<< << << << << << << << << << << << << << << << << << << << <<\n")
  289. capped = true
  290. end
  291. if polvls[i].lslow > polvls[i].strk_wait and !capped then
  292. ls = polvls[i].lslow
  293. mychance = polvls[i].ch
  294. multi = polvls[i].multi
  295. mynextbet = polvls[i].basebet
  296. tempstand = polvls[i].strk_stand
  297. bethigh = false
  298. print("\n**************************************************************************")
  299. print(" >>> going [ "..polvls[i].payout.." x ] after "..ls.." rounds <<<")
  300. print("")
  301. print(" betting on LOW")
  302. print(" chance: "..mychance.."%")
  303. print(" basebet: "..round( mynextbet, 8 ))
  304. print("\n")
  305. print( "\n<< << << << << << << << << << << << << << << << << << << << <<\n")
  306. capped = true
  307. end
  308. end
  309. end
  310. function xbetselect()
  311. local lasthigh = 0
  312. local lastlow = 0
  313. for i = polvlcount, polvlcount-10, -1 do
  314. if polvls[i].lshigh > polvls[i].xstrk_wait and !capped then
  315. ls = polvls[i].lshigh
  316. --if i >= 37 then
  317. mychance = polvls[i].ch
  318. -- xchance_start = polvls[i].ch - 0.9
  319. -- else
  320. -- mychance = polvls[i+1].ch
  321. -- xchance_start = mychance
  322. -- xchance_end = polvls[i].ch
  323. -- end
  324. multi = polvls[i].multi
  325. mynextbet = polvls[i].xbasebet
  326. if mynextbet < unitfactor then mynextbet = unitfactor end
  327. xplaybudget = polvls[i].xbudget / 2
  328. local bet = mynextbet
  329. local budget = xplaybudget
  330. for k = 1, 100 do
  331. bet = bet * polvls[i].multi
  332. budget = budget - bet
  333. if budget < unitfactor * 1 then
  334. raisecount = k
  335. raisestep = 1
  336. break
  337. end
  338. end
  339. tempstand = polvls[i].xstrk_stand
  340. bethigh = true
  341. print("\n**************************************************************************")
  342. print(" >>> going [ "..polvls[i].payout.." x ] after "..ls.." rounds <<<")
  343. print("")
  344. print(" betting on HIGH")
  345. print(" chance: "..mychance.."%")
  346. print(" basebet: "..round( mynextbet, 8 ))
  347. print("\n")
  348. print( "\n<< << << << << << << X P L A Y << << << << << << << << << << <<\n")
  349. capped = true
  350. end
  351. if polvls[i].lslow > polvls[i].xstrk_wait and !capped then
  352. ls = polvls[i].lslow
  353. --if i >= 35 then
  354. mychance = polvls[i].ch
  355. -- xchance_start = polvls[i].ch - 0.9
  356. -- else
  357. -- mychance = polvls[i+1].ch
  358. -- xchance_start = mychance
  359. -- xchance_end = polvls[i].ch
  360. -- end
  361. multi = polvls[i].multi
  362. mynextbet = polvls[i].xbasebet
  363. if mynextbet < unitfactor then mynextbet = unitfactor end
  364. xplaybudget = polvls[i].xbudget / 2
  365. local bet = mynextbet
  366. local budget = xplaybudget
  367. for k = 1, 100 do
  368. bet = bet * polvls[i].multi
  369. budget = budget - bet
  370. if budget < unitfactor * 1 then
  371. raisecount = k
  372. raisestep = 1
  373. break
  374. end
  375. end
  376. tempstand = polvls[i].xstrk_stand
  377. bethigh = false
  378. print("\n**************************************************************************")
  379. print(" >>> going [ "..polvls[i].payout.." x ] after "..ls.." rounds <<<")
  380. print("")
  381. print(" betting on LOW")
  382. print(" chance: "..mychance.."%")
  383. print(" basebet: "..round( mynextbet, 8 ))
  384. print("\n")
  385. print( "\n<< << << << << << << << << << << << << << << << << << << << <<\n")
  386. capped = true
  387. end
  388. end
  389. end
  390. function calculateBets()
  391. local gainstring = ""
  392. local waitstake = waitstake_start
  393. local xwaitstake = xwaitstake_start
  394. local ws_delta = round((( waitstake_end - waitstake_start ) / polvlcount ), 2 )
  395. local xws_delta = round((( xwaitstake_end - xwaitstake_start ) / polvlcount ), 2 )
  396. local streaksource = streaksource_start
  397. local streaksource_delta = round((( streaksource_end - streaksource_start ) / polvlcount ), 2 )
  398. print("ws_delta: "..ws_delta.." streaksource_delta: "..streaksource_delta )
  399. local xstreaksource = xstreaksource_start
  400. local xstreaksource_delta = round((( xstreaksource_end - xstreaksource_start ) / polvlcount ), 2 )
  401. print("xws_delta: "..xws_delta.." xstreaksource_delta: "..xstreaksource_delta )
  402. for i = 1, polvlcount do
  403. polvls[i].strk_max = round( math.abs( math.log( streaksource ) / math.log(( 100 - polvls[i].ch ) / 100 )), 0 )
  404. polvls[i].xstrk_max = round( math.abs( math.log( xstreaksource ) / math.log(( 100 - polvls[i].ch ) / 100 )), 0 )
  405. budget = balance * ( budget_ratio / 100 )
  406. polvls[i].strk_stand = polvls[i].strk_max
  407. local bet = unitfactor * 1
  408. for j = 1, polvls[i].strk_max do
  409. bet = bet * polvls[i].multi
  410. budget = budget - bet
  411. if budget < unitfactor * 1 then
  412. polvls[i].strk_stand = j - 1
  413. break
  414. end
  415. end
  416. budget = balance * ( budget_ratio / 100 )
  417. local bet = unitfactor * 1
  418. for k = 1, round( polvls[i].strk_stand * (( 100 - waitstake ) / 100 ), 0 ) - 1 do
  419. bet = bet * polvls[i].multi
  420. end
  421. polvls[i].basebet = round( bet, 8 )
  422. polvls[i].strk_stand = round(( polvls[i].strk_stand * ( waitstake / 100 )), 0 )
  423. polvls[i].strk_wait = polvls[i].strk_max - polvls[i].strk_stand
  424. -- x values
  425. budget = balance * ( budget_ratio / 100 )
  426. polvls[i].xstrk_stand = polvls[i].xstrk_max
  427. local bet = unitfactor * 1
  428. for j = 1, polvls[i].xstrk_max do
  429. bet = bet * polvls[i].multi
  430. budget = budget - bet
  431. if budget < unitfactor * 1 then
  432. polvls[i].xstrk_stand = j - 1
  433. break
  434. end
  435. end
  436. budget = balance * ( budget_ratio / 100 )
  437. local bet = unitfactor * 1
  438. for k = 1, round( polvls[i].xstrk_stand * (( 100 - xwaitstake ) / 100 ), 0 ) - 1 do
  439. bet = bet * polvls[i].multi
  440. end
  441. polvls[i].xbasebet = round( bet, 8 ) * 0.5
  442. if polvls[i].xbasebet < unitfactor then polvls[i].xbasebet = unitfactor end
  443. polvls[i].xstrk_stand = round(( polvls[i].xstrk_stand * ( xwaitstake / 100 )), 0 )
  444. polvls[i].xstrk_wait = polvls[i].xstrk_max - polvls[i].xstrk_stand
  445. polvls[i].xbudget = round(( polvls[i].xbasebet * polvls[i].strk_wait ), 8 )
  446. if waitstake_start >= waitstake_end then
  447. waitstake = round(( waitstake - ws_delta ), 2 )
  448. else
  449. waitstake = round(( waitstake + ws_delta ), 2 )
  450. end
  451. streaksource = round(( streaksource + streaksource_delta ), 2 )
  452. if xwaitstake_start >= xwaitstake_end then
  453. xwaitstake = round(( xwaitstake - xws_delta ), 2 )
  454. else
  455. xwaitstake = round(( xwaitstake + xws_delta ), 2 )
  456. end
  457. xstreaksource = round(( xstreaksource + xstreaksource_delta ), 2 )
  458. print("[ "..polvls[i].payout.." x ] "..polvls[i].strk_max.."|"..polvls[i].strk_stand.."|"..polvls[i].strk_wait.." | "..polvls[i].xstrk_max.."|"..polvls[i].xstrk_stand.."|"..polvls[i].xstrk_wait.." > bb: "..polvls[i].basebet.." xb: "..polvls[i].xbudget)
  459. end
  460. print("streaksource_start: "..streaksource_start.." streaksource_end: "..streaksource_end )
  461. streaksource_start = round(( streaksource_start + ( streaksource_start / 100 * 0.5 ) ), 0 )
  462. streaksource_end =round(( streaksource_end + ( streaksource_end / 100 * 0 ) ), 0 )
  463. if streaksource_end > 1000000 then streaksource_end = 1000000 end
  464. if streaksource_start > 1000000 then streaksource_start = 1000000 end
  465. end
  466. function registerRolls()
  467. for i = 1, polvlcount do
  468. --print("lastroll: "..lastBet.roll)
  469. if lastBet.roll <= 100 - polvls[i].ch then
  470. polvls[i].lshigh = polvls[i].lshigh + 1
  471. else
  472. for j = 1, i do
  473. polvls[j].lshigh = 0
  474. --print("del lvl "..j)
  475. end
  476. end
  477. if lastBet.roll >= polvls[i].ch then
  478. polvls[i].lslow = polvls[i].lslow + 1
  479. else
  480. for j = 1, i do
  481. polvls[j].lslow = 0
  482. end
  483. end
  484. if polvls[i].lshigh > polvls[i].lshighmax then polvls[i].lshighmax = polvls[i].lshigh end
  485. if polvls[i].lslow > polvls[i].lslowmax then polvls[i].lslowmax = polvls[i].lslow end
  486. end
  487. end
  488. function selectbet()
  489. if WaT then
  490. tcnt = tcnt + 1
  491. if tcnt == 1 then checkLastRoll() end
  492. if tcnt == 2 then
  493. WaT = false -- after waiting 2 rolls we can start
  494. tcnt = 0
  495. updatePastRolls()
  496. checkLastRoll()
  497. basebet = basebet3p
  498. print( "\n---------------------------------- ----------------------------------------------------------------\n" )
  499. print( " >>> T A R G E T R E A C H E D - R E S E T")
  500. print( " target: " .. round( target, 8 ))
  501. print( " new target: " .. round( target, 8 ))
  502. print( " maxbet: " .. round( maxbet, 8 ))
  503. print( "\n--------------------------------------------------------------------------------------------------\n" )
  504. chance = chanceWork
  505. end
  506. else
  507. updatePastRolls()
  508. checkLastRoll()
  509. end
  510. if clumptrigger and dl == dll and dll == dlll then
  511. clumptrigger = false
  512. ct = "> <"
  513. end
  514. if clumptrigger and dl != dll and dl == dlll then
  515. clumptrigger = false
  516. ct = "> <"
  517. end
  518. -- clump check v1
  519. if dl == dll and dlll == dllll and dllll != dlllll then
  520. clumptrigger = true
  521. ct = " >< "
  522. end
  523. -- clump check v2
  524. -- if dl == dll and dlll != dll and dlll == dllll and dllll != dlllll then
  525. -- clumptrigger = true
  526. -- ct = " >< "
  527. -- end
  528. if !clumptrigger then
  529. if ls == 4 then
  530. bethigh = dll -- (decision before last)
  531. else
  532. bethigh = !dll
  533. end
  534. else
  535. if ls == 4 then
  536. bethigh = dllll -- (decision before last)
  537. else
  538. bethigh = !dllll
  539. end
  540. end
  541. end
  542. function checkLastRoll()
  543. if lastBet.roll <= chance then
  544. dl = false
  545. echo_dl = "0"
  546. else
  547. dl = true
  548. echo_dl = "1"
  549. end
  550. end
  551. function updatePastRolls()
  552. dlllll = dllll
  553. dllll = dlll
  554. dlll = dll
  555. dll = dl
  556. echo_dlllll = echo_dllll
  557. echo_dllll = echo_dlll
  558. echo_dlll = echo_dll
  559. echo_dll = echo_dl
  560. end
  561. function round( val, decimal )
  562. if ( decimal ) then
  563. return math.floor(( val * 10^decimal ) + 0.5 ) / ( 10^decimal )
  564. else
  565. return math.floor( val + 0.5 )
  566. end
  567. end

comments powered by Disqus