Advertisement
coinwalk

zelwin snowybot style2

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