Advertisement
pcservis

for keiichi 2

Aug 31st, 2018
614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.95 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 = "pcservis" -- 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 = 10000 -- 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 = 7 -- 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 = false -- Set to false for no logging
  39. appendlog = false -- This must be set to false for the very first run!
  40.  
  41. rollLog = 25 -- Use 0 for dynamic long streak logging, otherwise put in a value to log after X losing streak
  42.  
  43. -- Should not need to change anything below this line
  44.  
  45. if(bankroll == 0) then
  46. bankroll = balance
  47. end
  48.  
  49. if(isTokens == false) then
  50. minbet = minbet * 0.00000001
  51. basebet = basebet * 0.00000001
  52. maxbet = maxbet * 0.00000001
  53. end
  54.  
  55. local clock = os.clock
  56. function sleep(n) -- seconds
  57. local t0 = clock()
  58. while clock() - t0 <= n do end
  59. end
  60.  
  61. currentStep = 0
  62. lossCount = 0
  63. stepCount = 0
  64. spent = 0
  65.  
  66. highLowAverage = {}
  67. averageCount = 0
  68. averageIndex = 0
  69. averageMax = 4 -- High / Low average switching.
  70.  
  71. rollCount = 0
  72. rollSeedCount = 0
  73. profit = 0
  74.  
  75. if(appendlog != true) then
  76. fin = assert(io.open(filename, "w"))
  77. fin:write("Timestamp, Bet ID, Streak, Bet, Chance, fibstep, Spent, Win Amount, Win Profit\n")
  78. fin:close()
  79. end
  80.  
  81. -- Initialize the array
  82. for i=0, averageMax do
  83. highLowAverage[i] = 0
  84. end
  85.  
  86. function autocalc()
  87. if(autotune == true) then
  88. if(lossCount == 0) then
  89. basebet = balance / 100000
  90. basebet = basebet / (10 - basechance)
  91. if basebet < minbet then
  92. basebet = minbet
  93. end
  94. end
  95. end
  96. end
  97.  
  98. -- The myfib routine was written by CttCJim
  99. function myfib(level)
  100. fibno=basebet
  101. temp=0
  102. prevfibno=0
  103. if level == 0 then
  104. fibno= basebet
  105. else
  106. for j=0,level-1,1 do
  107.  
  108. temp=fibno
  109. fibno=fibno + (prevfibno * fibstep)
  110. prevfibno=temp
  111. end
  112. end
  113. return fibno
  114. end
  115. -- End The myfib routine was written by CttCJim
  116.  
  117. autocalc()
  118. chance = basechance
  119. nextbet=basebet
  120.  
  121. function dobet()
  122.  
  123. autocalc()
  124.  
  125. if(autotip == true and isTokens == false) then
  126. if(balance > bankroll + tipamount + (tipamount * bankappend)) then
  127. tip(receiver, balance - bankroll - (tipamount * bankappend))
  128. bankroll += (tipamount * bankappend)
  129. tempstr = "New Bankroll: banker"
  130. tempstr = string.gsub(tempstr, "banker", bankroll)
  131. print(tempstr)
  132. end
  133. end
  134. if(enableLogging == true) then
  135. if(lastBet.Roll >= 99.9 or lastBet.Roll <= 0.10) then
  136. tempstr = "year-0month-0day 0hour:0minute:0second, betid, roll, highlo\n"
  137. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  138. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  139. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  140. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  141. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  142. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  143. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  144. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  145. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  146. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  147. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  148. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  149. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  150. if(bethigh == true) then
  151. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  152. else
  153. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  154. end
  155. fin = assert(io.open(filename, "r"))
  156. content = fin:read("*a")
  157. fin:close()
  158.  
  159. fout = assert(io.open(tempfile, "w"))
  160. fout:write(content)
  161. fout:write(tempstr)
  162. -- fout:write(oppositeOut)
  163.  
  164. fout:close()
  165. os.remove(filename)
  166. os.rename(tempfile, filename)
  167. end
  168. end
  169.  
  170. if win then
  171. logTest = rollLog
  172. if(rollLog == 0) then
  173. logTest = (100 - (100 * (housePercent / 100))) / chance
  174. end
  175. -- print(logTest)
  176. if(enableLogging == true and lossCount >= logTest) then
  177. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo\n"
  178. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  179. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  180. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  181. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  182. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  183. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  184. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  185. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  186. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  187. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  188. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  189. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  190. tempstr = string.gsub(tempstr, "streak", lossCount)
  191. tempcalc = string.format("%.8f", nextbet)
  192. tempstr = string.gsub(tempstr, "bet", tempcalc)
  193. tempcalc = string.format("%.2f", chance)
  194. tempstr = string.gsub(tempstr, "chance", tempcalc)
  195. tempstr = string.gsub(tempstr, "fibstep", fibstep)
  196. tempcalc = string.format("%.8f", spent)
  197. tempstr = string.gsub(tempstr, "spent", tempcalc)
  198. tempcalc = string.format("%.8f", lastBet.Profit)
  199. tempstr = string.gsub(tempstr, "winamount", tempcalc)
  200. profit = lastBet.Profit - spent
  201. tempcalc = string.format("%.8f", profit)
  202. tempstr = string.gsub(tempstr, "profit", tempcalc)
  203. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  204. if(bethigh == true) then
  205. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  206. else
  207. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  208. end
  209. -- print(tempstr)
  210.  
  211. fin = assert(io.open(filename, "r"))
  212. content = fin:read("*a")
  213. fin:close()
  214.  
  215. fout = assert(io.open(tempfile, "w"))
  216. fout:write(content)
  217. fout:write(tempstr)
  218. -- fout:write(oppositeOut)
  219.  
  220. fout:close()
  221. os.remove(filename)
  222. os.rename(tempfile, filename)
  223.  
  224. end
  225. chance = basechance
  226. lossCount = 0 -- reset
  227. nextbet = basebet -- reset
  228. stepCount = 0 -- reset
  229. spent = 0
  230. else -- if lose
  231. lossCount += 1
  232. spent += nextbet
  233. winAmount = (100 - (100 * (housePercent / 100))) / chance
  234. if lossCount > (winAmount * runPercent) then
  235. stepCount += 1
  236. chance += chanceStep
  237. nextbet = myfib(stepCount)
  238. end
  239. if nextbet > maxbet and maxbet != 0 then
  240. nextbet = maxbet
  241. end
  242. if nextbet >= balance then -- Keep rolling, without completely busting. May add flag to disable
  243. if(smoothRecover == true) then
  244. nextbet = balance / 2 -- Don't completely bust, but try and recover something
  245. else
  246. if(enableLogging == true) then
  247. if(resetOnBust == true) then
  248. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo *******LOSING RESET*******\n"
  249. else
  250. tempstr = "year-0month-0day 0hour:0minute:0second, betid, streak, bet, chance, fibstep, spent, winamount, profit, roll, highlo *******LOSING STOP*******\n"
  251. end
  252. tempstr = string.gsub(tempstr, "year", lastBet.date.year)
  253. if (lastBet.date.month >= 10) then tempstr = string.gsub(tempstr, "0month", "month") end
  254. if (lastBet.date.day >= 10) then tempstr = string.gsub(tempstr, "0day", "day") end
  255. if (lastBet.date.hour >= 10) then tempstr = string.gsub(tempstr, "0hour", "hour") end
  256. if (lastBet.date.minute >= 10) then tempstr = string.gsub(tempstr, "0minute", "minute") end
  257. if (lastBet.date.second >= 10) then tempstr = string.gsub(tempstr, "0second", "second") end
  258. tempstr = string.gsub(tempstr, "month", lastBet.date.month)
  259. tempstr = string.gsub(tempstr, "day", lastBet.date.day)
  260. tempstr = string.gsub(tempstr, "hour", lastBet.date.hour)
  261. tempstr = string.gsub(tempstr, "minute", lastBet.date.minute)
  262. tempstr = string.gsub(tempstr, "second", lastBet.date.second)
  263. tempstr = string.gsub(tempstr, "betid", lastBet.Id)
  264. tempstr = string.gsub(tempstr, "streak", lossCount)
  265. tempcalc = string.format("%.8f", nextbet)
  266. tempstr = string.gsub(tempstr, "bet", tempcalc)
  267. tempcalc = string.format("%.2f", chance)
  268. tempstr = string.gsub(tempstr, "chance", tempcalc)
  269. tempstr = string.gsub(tempstr, "fibstep", fibstep)
  270. tempcalc = string.format("%.8f", spent)
  271. tempstr = string.gsub(tempstr, "spent", tempcalc)
  272. tempcalc = string.format("%.8f", lastBet.Profit)
  273. tempstr = string.gsub(tempstr, "winamount", tempcalc)
  274. profit = lastBet.Profit - spent
  275. tempcalc = string.format("%.8f", profit)
  276. tempstr = string.gsub(tempstr, "profit", tempcalc)
  277. tempstr = string.gsub(tempstr, "roll", lastBet.Roll)
  278. if(bethigh == true) then
  279. tempstr = string.gsub(tempstr, "highlo", "Betting High")
  280. else
  281. tempstr = string.gsub(tempstr, "highlo", "Betting Low")
  282. end
  283. -- print(tempstr)
  284.  
  285. fin = assert(io.open(filename, "r"))
  286. content = fin:read("*a")
  287. fin:close()
  288.  
  289. fout = assert(io.open(tempfile, "w"))
  290. fout:write(content)
  291. fout:write(tempstr)
  292. -- fout:write(oppositeOut)
  293.  
  294. fout:close()
  295. os.remove(filename)
  296. os.rename(tempfile, filename)
  297. end
  298. if(resetOnBust == false or balance <= 0) then
  299. print("Balance too low for the bet. Stopping.")
  300. stop()
  301. else
  302. print("Balance too low for the bet. Resetting.")
  303. chance = basechance
  304. lossCount = 0 -- reset
  305. nextbet = basebet -- reset
  306. stepCount = 0 -- reset
  307. spent = 0
  308. bankroll = balance
  309. end
  310.  
  311. end
  312. end
  313. end
  314.  
  315.  
  316.  
  317. -- Calculate the average, and then change high / low accordingly
  318. if(lastBet.Roll >= 50) then
  319. highLowAverage[averageIndex] = 1
  320. else
  321. highLowAverage[averageIndex] = 0
  322. end
  323. averageIndex += 1
  324. if(averageIndex >= averageMax) then
  325. averageIndex = 0
  326. end
  327. if(averageCount < averageMax) then
  328. averageCount += 1
  329. end
  330. average = 0.00
  331. for i=0, averageCount do
  332. average += highLowAverage[i]
  333. end
  334. average = average / averageCount
  335. -- print (average)
  336. if average >= 0.5 then
  337. bethigh = true
  338. else
  339. bethigh = false
  340. end
  341. sleep(restTime)
  342.  
  343. end
  344. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement