Advertisement
Ypleitez

Untitled

Oct 28th, 2023
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.11 KB | None | 0 0
  1. -- Blak's Bouncing Fibber (Fibonacci)
  2. -- constants
  3.  
  4. isTokens = false
  5. autotune = false -- Set to false to use static settings below
  6. smoothRecover = false -- set this to false to just stop betting when nextbet is greater than your balance
  7. resetOnBust = true -- Set this to false to just let it stop betting on bust
  8.  
  9. -- ***************** IMPORTANT TO CHANGE THESE SETTINGS OR YOU WILL TIP ME ***********************
  10. autotip = true -- If the isTokens is true, tipping is automatically turned off
  11. -- With auto tip enabled, It will auto tip to your named
  12. -- alt account when your balance is above bankroll + tipamount
  13. -- On BitVest, minimum 10k BTC, 50k ETH, and 100k LTC
  14. bankroll = 0 -- Minimum you want to keep rolling with. Set to 0 to use your current balance
  15. tipamount = 0.0001 -- How much to tip
  16. bankappend = 0.10 -- How much of your tip amount to add to your bankroll over time in %. 0.10 = 10% Set to 0 for no addition to the bankroll
  17. receiver = "BlaksBank" -- Who gets the tip? **** CHANGE THIS ****
  18.  
  19. restTime = 0.0 -- How long to wait in seconds before the next bet. Some sites need this
  20. -- Bitvest setting 0.75 for low bet values
  21.  
  22. maxbet = 0 -- raise for higher betting. 10x basebet seems good so far. Set to 0 to disable
  23. minbet = 1 -- Use whole integers
  24. basebet = 1 -- Use whole integers
  25. basechance = 1 -- The chance that you would like use. 7 seems to be a good starting point
  26. housePercent = 1 -- Set this according to the site you are on.
  27. -- Known site percentages
  28. -- Freebitco.in = 5%
  29. -- Bitsler = 1.5%
  30. -- Bitvest = 1.0%
  31.  
  32. runPercent = 0.15 -- How much of the pre-roll run to actually do before kicking in fibstep
  33. -- 1.0 = 100%. 0.95 = 95% etc..
  34.  
  35. fibstep = 0.350 -- Fibonacci stepping amount
  36. chanceStep = 0.45 -- Chance stepping amount
  37.  
  38. enableLogging = true -- Set to false for no logging
  39. appendlog = true -- This must be set to false for the very first run!
  40. filename = "bouncer.csv" -- Default to the directory where dicebot is run from.
  41. tempfile = "tempfile.log" -- You can add an absolute directory if wanted with: C:\directory etc
  42. rollLog = 25 -- Use 0 for dynamic long streak logging, otherwise put in a value to log after X losing streak
  43.  
  44. -- Should not need to change anything below this line
  45.  
  46. if(bankroll == 0) then
  47. bankroll = balance
  48. end
  49.  
  50. if(isTokens == false) then
  51. minbet = minbet * 0.00000001
  52. basebet = basebet * 0.00000001
  53. maxbet = maxbet * 0.00000001
  54. end
  55.  
  56. local clock = os.clock
  57. function sleep(n) -- seconds
  58. local t0 = clock()
  59. while clock() - t0 <= n do end
  60. end
  61.  
  62. currentStep = 0
  63. lossCount = 0
  64. stepCount = 0
  65. spent = 0
  66.  
  67. highLowAverage = {}
  68. averageCount = 0
  69. averageIndex = 0
  70. averageMax = 4 -- High / Low average switching.
  71.  
  72. rollCount = 0
  73. rollSeedCount = 0
  74. profit = 0
  75.  
  76. if(appendlog != true) then
  77. fin = assert(io.open(filename, "w"))
  78. fin:write("Timestamp, Bet ID, Streak, Bet, Chance, fibstep, Spent, Win Amount, Win Profit\n")
  79. fin:close()
  80. end
  81.  
  82. -- Initialize the array
  83. for i=0, averageMax do
  84. highLowAverage[i] = 0
  85. end
  86.  
  87. function autocalc()
  88. if(autotune == true) then
  89. if(lossCount == 0) then
  90. basebet = balance / 100000
  91. basebet = basebet / (10 - basechance)
  92. if basebet < minbet then
  93. basebet = minbet
  94. end
  95. end
  96. end
  97. end
  98.  
  99. -- The myfib routine was written by CttCJim
  100. function myfib(level)
  101. fibno=basebet
  102. temp=0
  103. prevfibno=0
  104. if level == 0 then
  105. fibno= basebet
  106. else
  107. for j=0,level-1,1 do
  108.  
  109. temp=fibno
  110. fibno=fibno + (prevfibno * fibstep)
  111. prevfibno=temp
  112. end
  113. end
  114. return fibno
  115. end
  116. -- End The myfib routine was written by CttCJim
  117.  
  118. autocalc()
  119. chance = basechance
  120. nextbet=basebet
  121.  
  122. function dobet()
  123.  
  124. autocalc()
  125.  
  126. if(autotip == true and isTokens == false) then
  127. if(balance > bankroll + tipamount + (tipamount * bankappend)) then
  128. tip(receiver, balance - bankroll - (tipamount * bankappend))
  129. bankroll += (tipamount * bankappend)
  130. tempstr = "New Bankroll: banker"
  131. tempstr = string.gsub(tempstr, "banker", bankroll)
  132. print(tempstr)
  133. end
  134. end
  135. if(enableLogging == true) then
  136. if(lastBet.Roll >= 99.9 or lastBet.Roll <= 0.10) then
  137. tempstr = "year-0month-0day 0hour:0minute:0second, betid, roll, highlo\n"
  138. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  139. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  140. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  141. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  142. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  143. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  144. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  145. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  146. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  147. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  148. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  149. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  150. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  151. if(bethigh == true) then
  152. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  153. else
  154. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  155. end
  156. fin = assert(io.open(filename, "r"))
  157. content = fin:read("*a")
  158. fin:close()
  159.  
  160. fout = assert(io.open(tempfile, "w"))
  161. fout:write(content)
  162. fout:write(tempstr)
  163. -- fout:write(oppositeOut)
  164.  
  165. fout:close()
  166. os.remove(filename)
  167. os.rename(tempfile, filename)
  168. end
  169. end
  170.  
  171. if win then
  172. logTest = rollLog
  173. if(rollLog == 0) then
  174. logTest = (100 - (100 * (housePercent / 100))) / chance
  175. end
  176. -- print(logTest)
  177. if(enableLogging == true and lossCount >= logTest) then
  178. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo\n"
  179. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  180. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  181. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  182. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  183. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  184. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  185. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  186. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  187. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  188. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  189. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  190. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  191. tempstr = string.gsub(tempstr, "streak", lossCount)
  192. tempcalc = string.format("%.8f", nextbet)
  193. tempstr = string.gsub(tempstr, "bet", tempcalc)
  194. tempcalc = string.format("%.2f", chance)
  195. tempstr = string.gsub(tempstr, "chance", tempcalc)
  196. tempstr = string.gsub(tempstr, "fibstep", fibstep)
  197. tempcalc = string.format("%.8f", spent)
  198. tempstr = string.gsub(tempstr, "spent", tempcalc)
  199. tempcalc = string.format("%.8f", lastBet.Profit)
  200. tempstr = string.gsub(tempstr, "winamount", tempcalc)
  201. profit = lastBet.Profit - spent
  202. tempcalc = string.format("%.8f", profit)
  203. tempstr = string.gsub(tempstr, "profit", tempcalc)
  204. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  205. if(bethigh == true) then
  206. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  207. else
  208. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  209. end
  210. -- print(tempstr)
  211.  
  212. fin = assert(io.open(filename, "r"))
  213. content = fin:read("*a")
  214. fin:close()
  215.  
  216. fout = assert(io.open(tempfile, "w"))
  217. fout:write(content)
  218. fout:write(tempstr)
  219. -- fout:write(oppositeOut)
  220.  
  221. fout:close()
  222. os.remove(filename)
  223. os.rename(tempfile, filename)
  224.  
  225. end
  226. chance = basechance
  227. lossCount = 0 -- reset
  228. nextbet = basebet -- reset
  229. stepCount = 0 -- reset
  230. spent = 0
  231. else -- if lose
  232. lossCount += 1
  233. spent += nextbet
  234. winAmount = (100 - (100 * (housePercent / 100))) / chance
  235. if lossCount > (winAmount * runPercent) then
  236. stepCount += 1
  237. chance += chanceStep
  238. nextbet = myfib(stepCount)
  239. end
  240. if nextbet > maxbet and maxbet != 0 then
  241. nextbet = maxbet
  242. end
  243. if nextbet >= balance then -- Keep rolling, without completely busting. May add flag to disable
  244. if(smoothRecover == true) then
  245. nextbet = balance / 2 -- Don't completely bust, but try and recover something
  246. else
  247. if(enableLogging == true) then
  248. if(resetOnBust == true) then
  249. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo *******LOSING RESET*******\n"
  250. else
  251. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo *******LOSING STOP*******\n"
  252. end
  253. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  254. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  255. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  256. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  257. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  258. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  259. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  260. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  261. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  262. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  263. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  264. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  265. tempstr = string.gsub(tempstr, "streak", lossCount)
  266. tempcalc = string.format("%.8f", nextbet)
  267. tempstr = string.gsub(tempstr, "bet", tempcalc)
  268. tempcalc = string.format("%.2f", chance)
  269. tempstr = string.gsub(tempstr, "chance", tempcalc)
  270. tempstr = string.gsub(tempstr, "fibstep", fibstep)
  271. tempcalc = string.format("%.8f", spent)
  272. tempstr = string.gsub(tempstr, "spent", tempcalc)
  273. tempcalc = string.format("%.8f", lastBet.Profit)
  274. tempstr = string.gsub(tempstr, "winamount", tempcalc)
  275. profit = lastBet.Profit - spent
  276. tempcalc = string.format("%.8f", profit)
  277. tempstr = string.gsub(tempstr, "profit", tempcalc)
  278. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  279. if(bethigh == true) then
  280. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  281. else
  282. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  283. end
  284. -- print(tempstr)
  285.  
  286. fin = assert(io.open(filename, "r"))
  287. content = fin:read("*a")
  288. fin:close()
  289.  
  290. fout = assert(io.open(tempfile, "w"))
  291. fout:write(content)
  292. fout:write(tempstr)
  293. -- fout:write(oppositeOut)
  294.  
  295. fout:close()
  296. os.remove(filename)
  297. os.rename(tempfile, filename)
  298. end
  299. if(resetOnBust == false or balance <= 0) then
  300. print("Balance too low for the bet. Stopping.")
  301. stop()
  302. else
  303. print("Balance too low for the bet. Resetting.")
  304. chance = basechance
  305. lossCount = 0 -- reset
  306. nextbet = basebet -- reset
  307. stepCount = 0 -- reset
  308. spent = 0
  309. bankroll = balance
  310. end
  311.  
  312. end
  313. end
  314. end
  315.  
  316.  
  317.  
  318. -- Calculate the average, and then change high / low accordingly
  319. if(lastBet.Roll >= 50) then
  320. highLowAverage[averageIndex] = 1
  321. else
  322. highLowAverage[averageIndex] = 0
  323. end
  324. averageIndex += 1
  325. if(averageIndex >= averageMax) then
  326. averageIndex = 0
  327. end
  328. if(averageCount < averageMax) then
  329. averageCount += 1
  330. end
  331. average = 0.00
  332. for i=0, averageCount do
  333. average += highLowAverage[i]
  334. end
  335. average = average / averageCount
  336. -- print (average)
  337. if average >= 0.5 then
  338. bethigh = true
  339. else
  340. bethigh = false
  341. end
  342. sleep(restTime)
  343.  
  344. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement