Advertisement
coinwalk

added my bit snowybot style

Jul 11th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 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 = 7 -- 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 = 7 -- 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 (good >= 3) then
  84. nextbet = previousbet*multiplier
  85. good = 0
  86. end
  87. if (balance > more) then
  88. nextbet = balance/bdiv
  89. bad = 0
  90. good = 0
  91. bogus = 0
  92. more = balance
  93. end
  94.  
  95. currentRollCount += 1
  96. rollCount += 1
  97.  
  98. -- Store statistics for high / low rolls
  99.  
  100. if(lastBet.roll > 50 and bethigh == true) then -- High roll and was high
  101. rollHighHigh += 1
  102. end
  103.  
  104. if(lastBet.roll <= 50 and bethigh == true) then -- High roll and was low
  105. rollHighLow += 1
  106. end
  107.  
  108. if(lastBet.roll > 50 and bethigh == false) then -- Low roll and was high
  109. rollLowHigh += 1
  110. end
  111.  
  112. if(lastBet.roll <= 50 and bethigh == false) then -- Low roll and was low
  113. rollLowLow += 1
  114. end
  115.  
  116. -- We got a win, let's store some averages
  117.  
  118. if(win) then
  119. winCount += 1
  120. if(rollAverageCount == 0) then -- Initialize so we get a good starting average
  121. for i=0, rollAverageMax do
  122. rollCountAverage[i] = rollCount
  123. end
  124. rollAverageIndex += 1
  125. else
  126. rollCountAverage[rollAverageIndex] = rollCount
  127. rollAverageIndex += 1
  128. end
  129.  
  130. rollAverageCount += 1
  131.  
  132. if(rollAverageCount >= rollAverageMax) then
  133. rollAverageCount = rollAverageMax -- no need to keep this one climbing
  134. end
  135.  
  136. if(rollAverageIndex >= rollAverageMax) then
  137. rollAverageIndex = 0 -- reset
  138. end
  139.  
  140. rollCount = 0 -- reset for next rolling
  141. oppositeRolls = 0
  142. rollSeedCount = 0 -- Keep this seed for now
  143. rollHighHigh = 0 -- reset counters
  144. rollHighLow = 0 -- reset counters
  145. rollLowHigh = 0 -- reset counters
  146. rollLowLow = 0 -- reset counters
  147. roundSpent = 0
  148. end
  149.  
  150. -- Let's use the averages from previous rolls to see if the bet needs to be changed
  151.  
  152. if(!win) then
  153. oppositeTest = lastBet.roll
  154. end
  155.  
  156. if(oppositeTest > (100 - chance) and bethigh == false) then -- Test if we were rolling high
  157. -- print(oppositeTest)
  158. oppositeArray[oppositeRolls] = oppositeTest
  159. oppositeArrayCount[oppositeRolls] = rollCount
  160. oppositeRolls += 1
  161. end
  162.  
  163. if(oppositeTest < chance and bethigh == true) then -- Test if we were rolling low
  164. -- print(oppositeTest)
  165. oppositeArray[oppositeRolls] = oppositeTest
  166. oppositeArrayCount[oppositeRolls] = rollCount
  167. oppositeRolls += 1
  168. end
  169.  
  170. -- Calculate the average, and then change high / low accordingly
  171.  
  172. if(lastBet.roll >= 50) then
  173. highLowAverage[averageIndex] = 1
  174. else
  175. highLowAverage[averageIndex] = 0
  176. end
  177.  
  178. averageIndex += 1
  179. averageCount += 1
  180.  
  181. if(averageIndex >= averageMax) then
  182. averageIndex = 0
  183. end
  184.  
  185. if(averageCount > averageMax) then
  186. averageCount = averageMax
  187. end
  188.  
  189. average = 0.00
  190. for i=0, averageCount do
  191. average += highLowAverage[i]
  192. end
  193.  
  194. average = average / averageCount
  195. -- print (average)
  196.  
  197. if average >= 0.5 then
  198. bethigh = true
  199. else
  200. bethigh = false
  201. end
  202. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement