Advertisement
alfarishi

dice3

Apr 11th, 2020 (edited)
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.46 KB | None | 0 0
  1. stop_if_balance = 5000 --set limit to stop script, script will stop if balance > value
  2.  
  3. base = 0.03  --base for martingale  at 25% chance
  4. base1 = 0.03  --base for martingale  at 50% chance
  5.  
  6. nextbet = 0.03 -- set first bet
  7.  
  8.  
  9. --this settings WORKS ON 999DICE
  10. chance = 89.8
  11. chance90 = 89.8       --set initial chance for "90%" bets
  12. chance50 = 49.95    --set initial chance for "50%" bets
  13. ----------------
  14. --Set start level for 25% chance and for 50% chance
  15.  
  16. Martin_25_level = 7 --set condition to start martingale at 25% chance
  17. Martin_50_level = 3 --set condition to start martingale at 50% chance
  18.  
  19. level90start = 0.00000010 --can be 0.00000001 or 0.00000010 or 0.00000100 or  0.00001000 ..etc.
  20.  
  21. safe = false
  22.  
  23. option = 1
  24.  
  25. --Count Variable
  26. count90 = 0
  27. count90max = 0
  28. count50 = 0
  29. count50max = 0
  30. count25 = 0
  31. count25max = 0
  32. count50r = 0
  33. count50rmax = 0
  34.  
  35.  
  36.  
  37. ----------------------------------------------------------------------------------------------------------------
  38. --Variables for Martingale at 90% chance
  39.  
  40. level = {1,10,100,1000,10000,100000,1000000, 10000000, 100000000}
  41. Bets={}
  42. for i = 1,50 do
  43.     Bets[i] = -1
  44. end
  45.  
  46.  
  47. --------------------------------------------------------------------------------------------------------------
  48. function dobet()
  49.  
  50.  
  51. print("----------------------------------------------------------")
  52.  
  53. --stop condition--
  54.  
  55. if balance >= stop_if_balance then
  56.    stop()
  57. end
  58.  
  59.  
  60. --------------------------------------------------------------
  61. -- Find maximum number of consecutive lossing rolls can be done with current balance at 90% chance and level multiplicator--
  62.  
  63. for i = 1,9 do
  64.    if balance/level[i] > level90start then
  65.       xlevel = i
  66.    end
  67. end
  68.  
  69. ---------------------------------------------------------------------------------------------------------------
  70. --Set Array for Rolls Value--
  71.  
  72. for i = 50,2,-1 do
  73.     Bets[i] = Bets[i-1]
  74. end
  75. Bets[1] = lastBet.Roll
  76.  
  77. ----------------------------------------------------------------------------------------------------------------
  78. --counting for Martingale 50% chance--
  79.  
  80. MartinDoPlus = 0
  81. MartinDoMinus = 0
  82. for i = 1,Martin_50_level do
  83.      if  Bets[i] < 50 and Bets[i] >= 0 then
  84.          MartinDoMinus = MartinDoMinus + 1
  85.      end
  86.      if  Bets[i] > 50 then    
  87.     MartinDoPlus = MartinDoPlus + 1
  88.      end
  89. end
  90.  
  91. --print("MartinDoMinus: ".. MartinDoMinus)
  92. --print("MartinDoPlus: ".. MartinDoPlus)
  93.  
  94. ----------------------------------------------------------------------------------------------------------------
  95. --counting for Martingale at 25% chance--
  96.  
  97. onefour1 = 0
  98. onefour2 = 0
  99. for i=1,Martin_25_level do
  100.     if  Bets[i] > 25 then
  101.         onefour1 = onefour1 + 1
  102.     end
  103.     if  Bets[i] < 75 and Bets[i] >= 0 then
  104.         onefour2 = onefour2 + 1
  105.     end
  106. end
  107.  
  108. --print("onefour1: "..onefour1)
  109. --print("onefour2: "..onefour2)
  110.  
  111. ----------------------------------------------------------------
  112. ----------------------------------------------------------------
  113. --find adapted multiplicator for Martingale at 50% chance--
  114.  
  115.  
  116. if win then
  117.  
  118. multiplicator1 = 2.25
  119. total = 0
  120. MaxRollNumber50 = 0
  121. --------------------------------------------------------------
  122. --find Max Roll Value
  123. R = {}
  124. R[1] = base1
  125. for i = 1, 35 do
  126.     R[i+1] = base1 *(multiplicator1^i)
  127. --  print("Ri: "..R[i])
  128. end
  129. for i = 1,35 do
  130.     total = total + R[i]
  131. --  print("total: "..total)
  132.     if total <= balance then
  133.         MaxRollNumber50 = MaxRollNumber50 + 1
  134.     end
  135. end
  136.  
  137. --print("Martin Max Rolls: "..MaxRollNumber50)
  138.  
  139. MaxRollNumber50r = MaxRollNumber50
  140.  
  141. --find adapted multiplicator 50%
  142. ----------------------------
  143. M={}
  144. M[1] = base1
  145. total1 = base1
  146. i=2.25
  147.  
  148. while( i <= 3) do
  149.     M[1] = base1
  150.     total1 = base1
  151.     j = 2
  152.     while( j <= MaxRollNumber50) do
  153.         M[j] = base1 *( i^(j-1))
  154.         total1 = total1 + M[j]
  155.         if(total1 > balance) then
  156.             multiplicator2 = i - 0.01
  157.             i = 4
  158.             j = MaxRollNumber50
  159.         end
  160.         j = j + 1
  161.     end
  162.  
  163.     i = i + 0.01
  164. end
  165.  
  166.  
  167. ----------------------------------------------------------------
  168. --find adapted multiplicator for Martingale at 25% chance--
  169.  
  170.  
  171. multiplicator1 = 1.45
  172. total = 0
  173. MaxRollNumber25 = 0
  174. --------------------------------------------------------------
  175. --find Max Roll Value
  176. R = {}
  177. R[1] = base
  178. for i = 1, 50 do
  179.     R[i+1] = base *(multiplicator1^i)
  180. --  print("Ri: "..R[i])
  181. end
  182. for i = 1,50 do
  183.     total = total + R[i]
  184. --  print("total: "..total)
  185.     if total <= balance*0.99 then
  186.         MaxRollNumber25 = MaxRollNumber25 + 1
  187.     end
  188. end
  189. --print("25% Max Rolls: " .. MaxRollNumber25)
  190.  
  191. --find adapted multiplicator--
  192. ----------------------------
  193. M={}
  194. M[1] = base
  195. total1 = base
  196. i=1.45
  197.  
  198. while( i <= 3) do
  199.     M[1] = base
  200.     total1 = base
  201.     j = 2
  202.     while( j <= MaxRollNumber25) do
  203.         M[j] = base *( i^(j-1))
  204.         total1 = total1 + M[j]
  205.         if(total1 > balance) then
  206.             multiplicator4 = i - 0.01
  207.             i = 4
  208.             j = MaxRollNumber25
  209.         end
  210.         j = j + 1
  211.     end
  212.  
  213.     i = i + 0.01
  214. end
  215.  
  216. --print("Multiplicator 25%: ".. multiplicator4)
  217.  
  218. end
  219.  
  220.  
  221.  
  222. if safe == true then
  223. if win then
  224. if count50max + 2 >= MaxRollNumber50 then
  225.     print("MaxLoss is too close at MaxRolls! Stay safe!")
  226.     stop()
  227. end
  228.  
  229. if count25max + 3 >= MaxRollNumber25 then
  230.     print("MaxLoss is too close at MaxRolls! Stay safe!")
  231.     stop()
  232. end
  233. end
  234. end
  235.  
  236. if win then --find best option for nextbet
  237.  
  238.  
  239. -------------------------------------------------------
  240. --Activate option for for Martingale at 90% chance (by default)
  241. option = 1
  242. chance = chance90
  243. nextbet = balance/level[xlevel]
  244. count = xlevel
  245.  
  246. if lastBet.Roll > 50 then
  247.     bethigh = true
  248. else
  249.     bethigh = false
  250. end
  251. -------------------------------------------------------
  252. --Activate option for for Martingale (plus) at 50% chance if condition are true
  253.  
  254. if MartinDoPlus == Martin_50_level then
  255.     option = 2
  256.     nextbet = base1
  257.     bethigh = false
  258.     chance = chance50
  259. end
  260. -------------------------------------------------------
  261. --Activate option for for Martingale (minus) at 50% chance if condition are true
  262.  
  263. if MartinDoMinus == Martin_50_level then
  264.     option = 3
  265.     nextbet = base1
  266.     bethigh = true
  267.     chance = chance50
  268. end
  269.  
  270. --------------------------------------------------------
  271. --Activate option for for Martingale (minus) at 25% chance if condition are true
  272.  
  273. if onefour1 == Martin_25_level then
  274.     option = 4
  275.     nextbet = base
  276.     bethigh = false
  277.     chance = 25
  278. end
  279.  
  280. --------------------------------------------------------
  281. --Activate option for for Martingale (plus) at 25% chance if condition are true
  282.  
  283. if onefour2 == Martin_25_level  then
  284.     option = 5
  285.     nextbet = base
  286.     bethigh = true
  287.     chance = 25
  288. end
  289.  
  290. --------------------------------------------------------
  291. --Activate option for Martingale Reverse (plus) at 50% chance if condition are true
  292.  
  293. if count50 > 0 then
  294.     if lastBet.Roll >= 50 then
  295.     option = 6
  296.     a = 0
  297.     chance = chance50
  298.     bethigh = true
  299.  
  300.     --set start value for reverse plus
  301.     nextbet = base1
  302. end
  303. end
  304.  
  305. --------------------------------------------------------
  306. --Activate option for Martingale Reverse (minus) at 50% chance if condition are true
  307.  
  308. if count50 > 0 then
  309.     if lastBet.Roll < 50 then
  310.     option = 7
  311.     b = 0
  312.     chance = chance50
  313.     bethigh = false
  314.  
  315.     --set start value for reverse minus
  316.    
  317. nextbet = base1
  318. end
  319. end
  320.  
  321.  
  322. -------------------------------------------------------
  323. --reset counter
  324.  
  325.     count90 = 0
  326.     count50 = 0
  327.     count25 = 0
  328.     count50r = 0
  329.  
  330. else
  331. --------------------------------------------------------------
  332. --set nextbet for Martingale at 90% chance in case of lose
  333.  
  334. if option == 1 then
  335.      chance = chance90
  336.     count = count -1
  337.     nextbet = balance/level[count]
  338.       if count < 1 then
  339.         print("We lost!")
  340.         stop()
  341.         stop()
  342.       end
  343.  
  344.       if level[count] == 1 then
  345.            nextbet = balance * 0.99
  346.            --chance = 85
  347.       end
  348.     count90 = count90 + 1
  349.     if count90 > count90max then
  350.         count90max = count90
  351.     end
  352. end
  353.  
  354.  
  355. -------------------------------------------------------
  356. --set nextbet for Martingale (plus) at 50% chance in case of lose
  357. if option == 2 then
  358.     nextbet = previousbet * multiplicator2
  359.     bethigh = false
  360.     chance = chance50
  361.     count50 = count50 + 1
  362.    
  363.     if count50 > count50max then
  364.         count50max = count50
  365.     end
  366. end
  367. -------------------------------------------------------
  368. --set nextbet for Martingale (minus) at 50% chance in case of lose
  369.  
  370. if option == 3 then
  371.     nextbet = previousbet * multiplicator2
  372.     bethigh = true
  373.     chance = chance50
  374.     count50 = count50 + 1
  375.    
  376.     if count50 > count50max then
  377.         count50max = count50
  378.     end
  379. end
  380.  
  381.  
  382. -------------------------------------------------------
  383. --set nextbet for Martingale (minus) at 25% chance in case of lose
  384.  
  385. if option == 4 then
  386.     nextbet = previousbet * multiplicator4
  387.     bethigh = false
  388.     chance = 25
  389.     count25 = count25 + 1
  390.    
  391.     if count25 > count25max then
  392.         count25max = count25
  393.     end
  394. end
  395.  
  396. -------------------------------------------------------
  397. --set nextbet for Martingale (plus) at 25% chance in case of lose
  398.  
  399. if option == 5 then
  400.     nextbet = previousbet * multiplicator4
  401.     bethigh = true
  402.     chance = 25
  403.     count25 = count25 + 1
  404.    
  405.     if count25 > count25max then
  406.         count25max = count25
  407.     end
  408. end
  409.  
  410. -------------------------------------------------------
  411. --set nextbet for Martingale Reverse (plus) at 50% chance in case of lose
  412.  
  413.  
  414. if option == 6 then
  415.     nextbet = previousbet * multiplicator2
  416.     bethigh = true
  417.     chance = chance50
  418.     count50r = count50r + 1
  419.    
  420.     if count50r > count50rmax then
  421.         count50rmax = count50r
  422.     end
  423. end
  424.  
  425. -------------------------------------------------------
  426. --set nextbet for Martingale Reverse (minus) at 50% chance in case of lose
  427.  
  428.  
  429. if option == 7 then
  430.     nextbet = previousbet * multiplicator2
  431.     bethigh = false
  432.     chance = chance50
  433.     count50r = count50r + 1
  434.    
  435.     if count50r > count50rmax then
  436.         count50rmax = count50r
  437.     end
  438. end
  439.  
  440. end --end set option for win or lose--
  441.  
  442.  
  443.  
  444. ----------------------------------------------------------------------------------------------------------------
  445.  
  446. print("90%")
  447. print("MaxLoss: "..count90max.."   MaxRolls: ".. xlevel.." ( "..count90.."  )")
  448.  
  449.  
  450. print("")
  451.  
  452. --print("50% Minus: "..MartinDoMinus)
  453. --print("50% Plus: "..MartinDoPlus)
  454. --print("")
  455.  
  456. print("50% Multiplier: "..multiplicator2)
  457. print("MaxLoss: "..count50max.."   MaxRolls: "..MaxRollNumber50.." ( "..count50.."  )")
  458. print("MaxLRev: "..count50rmax.."   MaxRolls: "..MaxRollNumber50r.." ( "..count50r.."  )")
  459.  
  460.  
  461. print("")
  462.  
  463. --print("25% Minus: "..onefour2)
  464. --print("25% Plus: "..onefour1)
  465. --print("")
  466.  
  467. print("25% Multiplier: "..multiplicator4)
  468. print("MaxLoss: "..count25max.."   MaxRolls: "..MaxRollNumber25.." ( "..count25.." )")
  469.  
  470. print("")
  471. end --end dobet()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement