Advertisement
coinwalk

bot bot go go

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