Advertisement
coinwalk

snowybot zilwin

Jul 12th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.20 KB | None | 0 0
  1. bdiv = 300000
  2. basebet = balance/bdiv
  3. nextbet = basebet
  4. multiplier = 1.5
  5. lodiv = 50000
  6. more = balance
  7. losebet = balance/lodiv
  8. target = balance*10
  9. chance = 50
  10. bethigh = false
  11. good = 0
  12. bad = 0
  13. bogus = 0
  14. betcount = 100 -- Number of Bets before Seed Reset
  15. counter = 0
  16.  
  17. resetstats()
  18.  
  19. lastWinRollCount = 0
  20. currentRollCount = 0
  21. oppositeRolls = 0
  22. oppositeArray = {}
  23. oppositeArrayCount = {}
  24. winCount = 0
  25. rollHighHigh = 0
  26. rollHighLow = 0
  27. rollLowHigh = 0
  28. rollLowLow = 0
  29. roundSpent = 0
  30.  
  31. -- Initialize system settings
  32. rollCountAverage = {}
  33. rollAverageCount = 0
  34. rollAverageIndex = 0
  35. rollAverageMax = 8-- Average roll count before a win. How many wins do you want to average?
  36.  
  37. -- Initialize the array
  38. for i=0, rollAverageMax do
  39. rollCountAverage[i] = 0
  40. end
  41.  
  42. highLowAverage = {}
  43. averageCount = 0
  44. averageIndex = 0
  45. averageMax = 8-- High / Low average switching. How many rolls do you want to average?
  46.  
  47. rollCount = 0
  48. rollSeedCount = 0
  49.  
  50. -- Initialize the array
  51. for i=0, averageMax do
  52. highLowAverage[i] = 0
  53. end
  54.  
  55. -- Start the actual betting
  56. function dobet()
  57. snow = balance/lodiv
  58. print("Current Balance : "..string.format("%.8f",balance))
  59. print("Current Profit : "..string.format("%.8f",profit))
  60. if balance-nextbet>=target then
  61. stop()
  62. ching()
  63. end
  64. if betcount == counter then
  65. resetseed();
  66. counter=0
  67. else
  68. counter+=1
  69. end
  70. if win then
  71. good += 1
  72. bogus += 1
  73. else
  74. bad+=1
  75. end
  76.  
  77. if (bad == 1) then
  78. nextbet = balance/lodiv
  79. end
  80.  
  81. if (bogus > 2) then
  82. nextbet = previousbet*multiplier
  83. bogus = 0
  84. end
  85. if (math.fmod(bad,4)==0) and (bad>3) then
  86. nextbet = previousbet*multiplier
  87. end
  88. if (good > 3) then
  89. nextbet = previousbet*multiplier
  90. good = 0
  91. end
  92. if (nextbet==nil) then
  93. nextbet = previousbet
  94. end
  95. if (balance > more+(snow*2)) then
  96. nextbet = balance/bdiv
  97. bad = 0
  98. good = 0
  99. bogus = 0
  100. more = balance
  101. end
  102.  
  103. currentRollCount += 1
  104. rollCount += 1
  105.  
  106. -- Store statistics for high / low rolls
  107.  
  108. if(lastBet.roll > 50 and bethigh == true) then -- High roll and was high
  109. rollHighHigh += 1
  110. end
  111.  
  112. if(lastBet.roll <= 50 and bethigh == true) then -- High roll and was low
  113. rollHighLow += 1
  114. end
  115.  
  116. if(lastBet.roll > 50 and bethigh == false) then -- Low roll and was high
  117. rollLowHigh += 1
  118. end
  119.  
  120. if(lastBet.roll <= 50 and bethigh == false) then -- Low roll and was low
  121. rollLowLow += 1
  122. end
  123.  
  124. -- We got a win, let's store some averages
  125.  
  126. if(win) then
  127. winCount += 1
  128. if(rollAverageCount == 0) then -- Initialize so we get a good starting average
  129. for i=0, rollAverageMax do
  130. rollCountAverage[i] = rollCount
  131. end
  132. rollAverageIndex += 1
  133. else
  134. rollCountAverage[rollAverageIndex] = rollCount
  135. rollAverageIndex += 1
  136. end
  137.  
  138. rollAverageCount += 1
  139.  
  140. if(rollAverageCount >= rollAverageMax) then
  141. rollAverageCount = rollAverageMax -- no need to keep this one climbing
  142. end
  143.  
  144. if(rollAverageIndex >= rollAverageMax) then
  145. rollAverageIndex = 0 -- reset
  146. end
  147.  
  148. rollCount = 0 -- reset for next rolling
  149. oppositeRolls = 0
  150. rollSeedCount = 0 -- Keep this seed for now
  151. rollHighHigh = 0 -- reset counters
  152. rollHighLow = 0 -- reset counters
  153. rollLowHigh = 0 -- reset counters
  154. rollLowLow = 0 -- reset counters
  155. roundSpent = 0
  156. end
  157.  
  158. -- Let's use the averages from previous rolls to see if the bet needs to be changed
  159.  
  160. if(!win) then
  161. oppositeTest = lastBet.roll
  162. end
  163.  
  164. if(oppositeTest > (100 - chance) and bethigh == false) then -- Test if we were rolling high
  165. -- print(oppositeTest)
  166. oppositeArray[oppositeRolls] = oppositeTest
  167. oppositeArrayCount[oppositeRolls] = rollCount
  168. oppositeRolls += 1
  169. end
  170.  
  171. if(oppositeTest < chance and bethigh == true) then -- Test if we were rolling low
  172. -- print(oppositeTest)
  173. oppositeArray[oppositeRolls] = oppositeTest
  174. oppositeArrayCount[oppositeRolls] = rollCount
  175. oppositeRolls += 1
  176. end
  177.  
  178. -- Calculate the average, and then change high / low accordingly
  179.  
  180. if(lastBet.roll >= 50) then
  181. highLowAverage[averageIndex] = 1
  182. else
  183. highLowAverage[averageIndex] = 0
  184. end
  185. averageIndex += 1
  186. averageCount += 1
  187.  
  188. if(averageIndex >= averageMax) then
  189. averageIndex = 0
  190. end
  191.  
  192. if(averageCount > averageMax) then
  193. averageCount = averageMax
  194. end
  195.  
  196. average = 0.00
  197. for i=0, averageCount do
  198. average += highLowAverage[i]
  199. end
  200.  
  201. average = average / averageCount
  202. -- print (average)
  203.  
  204. if (average >= 0.5) then
  205. bethigh = true
  206. else
  207. bethigh = false
  208. end
  209. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement