raptorx1

Script Freebitco.in

Oct 16th, 2016
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.20 KB | None | 0 0
  1. var _stop = false,
  2. _rolls = 0,
  3. _currentBalance, _maxBet=0, _x = 0,
  4. _maxNumberOfTrails=10000,
  5. _minNumberOfTrials=5000,
  6. _numberOfSuccesses = 0,
  7. _numberOfTrials = 0,
  8. _winPercentage = 52,
  9. _stopOnNumberOfBets = false, //Change this to true if you wish to stop betting after a specific number of bets
  10. _defaultProb=false,
  11. _swap = true,
  12. _betSpeed = 3000, //SI TU TIENES INTERNET SUPER RAPIDO, CAMBIALO A 1500, SI TIENES INTERNET LENTO, PONLO ENTRE 3000, O 5000 QUE ES PARA CONEXIONES LENTAS.
  13. /** INFO ON _betSpeed
  14. * If you want bets to go faster decrease the value 3000, recomended minimum is 1500 (at 1500 you'll need really fast internet and hope the freebitco.in server responds as fast)
  15. * If you want to go slower increase the value 3000, recomended max is 5000 (only option if you have tortoise internet)
  16. **/
  17. _verbose = false, //Change this to true if you want to know the stats(profit) after each bet
  18. _numberOfBets = 46, //You can change this but keep the number of bets low (<135 but >75) to increse AI accuracy.
  19. _maxNumberOfBets = 50, //max=150
  20. _minNumberOfBets = 50, // min=50
  21. /** Custom Bet Configuration **/
  22. _useCustomConfiguration=true,//Change to true to use your own configuration
  23. _amountToKelly=5, // Change this to set percentage of your full amount to be used in the Kelly Principle (Can not be more than 100)
  24. _useKellyPrinciple=false,//change to false to use martingale
  25. _customMaximumBet=0.00050000,//esta es la apuesta maxima, si manejas mรกs balance cambialo a lo q tengas.
  26. _customMinimumBet=0.00000001,//This is the minimum bet you want placed
  27. _customMultiplier=2;// This is the multiplier. the default is 2. INFO: The bet amount will be multiplied by this number incese you loose a bet
  28. var trevel = {
  29. bets: [],
  30. highBetProbability: 0,
  31. lowBetProbability: 0,
  32. highBetCount: 0,
  33. lowBetCount: 0,
  34. lowBetBinomial: 0,
  35. highBetBinomial: 0,
  36. userBalance: 0,
  37. betAmount: 0,
  38. totalWins: 0,
  39. wins: 0,
  40. originalUserBalance: 0,
  41. profit: 0,
  42. totalLoses: 0,
  43. looses: 0,
  44. _nextBet: "",
  45. lowBetWins:0,
  46. lowBetWinsProb:0,
  47. highBetWins:0,
  48. highBetWinsProb:0,
  49. addBet: function(bet, outcome)
  50. {
  51. if(bet === "LB" && outcome === "Win")
  52. {
  53. trevel.bets.push("LO");
  54. trevel.wins++;
  55. trevel.totalWins++;
  56. trevel.lowBetCount++;
  57. trevel.lowBetWins++;
  58. }
  59. if(bet === "LB" && outcome === "Loose")
  60. {
  61. trevel.bets.push("HI");
  62. trevel.looses++;
  63. trevel.totalLoses++;
  64. trevel.highBetCount++;
  65. }
  66. if(bet === "HB" && outcome === "Win")
  67. {
  68. trevel.bets.push("HI");
  69. trevel.wins++;
  70. trevel.totalWins++;
  71. trevel.highBetCount++;
  72. trevel.highBetWins++;
  73. }
  74. if(bet === "HB" && outcome === "Loose")
  75. {
  76. trevel.bets.push("LO");
  77. trevel.looses++;
  78. trevel.totalLoses++;
  79. trevel.lowBetCount++;
  80. }
  81. },
  82. isNumeric: function(n)
  83. {
  84. return !isNaN(parseFloat(n)) && isFinite(n);
  85. },
  86. /* Do NOT touch, EVER! */
  87. BinomialByMultiplication: function(numberOfSuccesses, numberOfTrials, probabilityOnSingleTrial)
  88. {
  89. if(this.isNumeric(probabilityOnSingleTrial) == true)
  90. {
  91. var j1, j2;
  92. if(2 * numberOfSuccesses > numberOfTrials)
  93. {
  94. return(this.BinomialByMultiplication(numberOfTrials - numberOfSuccesses, numberOfTrials, 1 - probabilityOnSingleTrial));
  95. }
  96. var j0 = j1 = j2 = 0;
  97. var binomialProbability = 1.0;
  98. while((j0 < numberOfSuccesses) | (j1 < numberOfSuccesses) | (j2 < numberOfTrials - numberOfSuccesses))
  99. {
  100. if((j0 < numberOfSuccesses) && (binomialProbability < 1))
  101. {
  102. j0++;
  103. binomialProbability *= (numberOfTrials - numberOfSuccesses + j0) / j0;
  104. }
  105. else
  106. {
  107. if(j1 < numberOfSuccesses)
  108. {
  109. j1++;
  110. binomialProbability *= probabilityOnSingleTrial;
  111. }
  112. else
  113. {
  114. j2++;
  115. binomialProbability *= 1 - probabilityOnSingleTrial;
  116. }
  117. }
  118. }
  119. return binomialProbability;
  120. }
  121. else
  122. {
  123. return 1;
  124. }
  125. },
  126. /* End of Do NOT touch, EVER! */
  127. HighBetProbability: function()
  128. {
  129. trevel.highBetProbability = (trevel.highBetCount / (trevel.highBetCount+trevel.lowBetCount)).toFixed(2);
  130. },
  131. LowBetProbability: function()
  132. {
  133. trevel.lowBetProbability = (1- trevel.highBetProbability).toFixed(2);
  134. },
  135.  
  136. HighBetWinProbability: function()
  137. {
  138. trevel.highBetWinsProb = (trevel.highBetWins/((trevel.highBetCount+trevel.lowBetCount)).toFixed(2));
  139. },
  140.  
  141. LowBetWinProbability: function()
  142. {
  143. trevel.lowBetWinsProb = (trevel.lowBetWins/((trevel.highBetCount+trevel.lowBetCount)).toFixed(2));
  144. },
  145. resetProbabilities: function()
  146. {
  147. trevel.highBetProbability = 0;
  148. trevel.lowBetProbability = 0;
  149. trevel.lowBetWinsProb = 0;
  150. trevel.highBetWinsProb = 0;
  151. },
  152. getNumberOfSuccesses: function()
  153. {
  154. _numberOfSuccesses = Math.round(((_numberOfBets - _rolls) / 2) + ((_numberOfBets - _rolls) / 10));
  155. //_numberOfSuccesses = Math.round((_winPercentage * _numberOfTrials) / 100) //Win 70% of bets
  156. //_numberOfSuccesses = 100;/*Math.round(((_maxNumberOfTrails - _numberOfTrials) / 2) + ((_maxNumberOfTrails - _numberOfTrials) / 10));*/
  157. },
  158. getNumberOfTrials: function()
  159. {
  160. _numberOfTrials = _numberOfBets - _rolls;
  161. //_numberOfTrials =Math.floor(Math.random() * _numberOfBets) + _numberOfTrials;
  162. //_numberOfTrials =Math.floor(Math.random() * _maxNumberOfTrails) + _minNumberOfTrials;
  163. },
  164. nextBet: function()
  165. {
  166. this.resetProbabilities();
  167. this.HighBetProbability();
  168. this.LowBetProbability();
  169. this.HighBetWinProbability();
  170. this.LowBetWinProbability();
  171. this.getNumberOfTrials();
  172. this.getNumberOfSuccesses();
  173. if(_defaultProb == false)
  174. {
  175. trevel.lowBetBinomial = (this.BinomialByMultiplication(_numberOfSuccesses, _numberOfTrials, trevel.lowBetProbability)).toFixed(18);
  176. trevel.highBetBinomial = (this.BinomialByMultiplication(_numberOfSuccesses, _numberOfTrials, trevel.highBetProbability)).toFixed(18);
  177. }
  178. else
  179. {
  180. trevel.lowBetBinomial = (this.BinomialByMultiplication(_numberOfSuccesses, _numberOfTrials, 0.475)).toFixed(18);
  181. trevel.highBetBinomial = (this.BinomialByMultiplication(_numberOfSuccesses, _numberOfTrials, 0.475)).toFixed(18);
  182. }
  183.  
  184. if(trevel.lowBetBinomial > trevel.highBetBinomial)
  185. {
  186. trevel._nextBet = "LB"; //place low bet when probability of winning on low is high
  187. }
  188. else if(trevel.lowBetBinomial < trevel.highBetBinomial)
  189. {
  190. trevel._nextBet = "HB"; //place high bet when probability of winning on high is high
  191. }
  192. else
  193. {
  194. if(_swap == true)
  195. {
  196. if(trevel.highBetProbability>trevel.lowBetProbability)
  197. {
  198. trevel._nextBet = "HB";
  199. }
  200. else if(trevel.highBetProbability<trevel.lowBetProbability)
  201. {
  202. trevel._nextBet = "LB";
  203. }
  204. else
  205. {
  206. if(trevel._nextBet === "HB")
  207. {
  208. trevel._nextBet = "LB"; //if the probabilities are equal and the previous bet was high, place low bet
  209. }
  210. else
  211. {
  212. trevel._nextBet = "HB"; //if the probabilities are equal and the previous bet was low, place high bet
  213. }
  214. }
  215. }
  216. }
  217. }
  218. };
  219. resetArray = function() //keeps the data relevant.
  220. {
  221. trevel.bets = [];
  222. trevel.lowBetCount = 0;
  223. trevel.highBetCount = 0;
  224. trevel.wins = 0;
  225. trevel.looses = 0;
  226. _rolls = 0;
  227. randomNumberOfBets(_maxNumberOfBets, _minNumberOfBets);
  228. trevel.lowBetWins=0;
  229. trevel.highBetWins=0;
  230. };
  231. setOriginalUserBalance = function()
  232. {
  233. trevel.originalUserBalance = parseFloat($('#balance').html());
  234. stop = false;
  235. };
  236. setCurrentUserBalance = function()
  237. {
  238. trevel.userBalance = parseFloat($('#balance').html());
  239. };
  240. getProfit = function()
  241. {
  242. setCurrentUserBalance();
  243. trevel.profit = (trevel.userBalance - trevel.originalUserBalance).toFixed(8);
  244. };
  245. placeHighBet = function()
  246. {
  247. $('#double_your_btc_bet_hi_button').click();
  248. };
  249. placeLowBet = function()
  250. {
  251. $('#double_your_btc_bet_lo_button').click();
  252. };
  253. setOutcomes = function(bet)
  254. {
  255. if($('#double_your_btc_bet_lose').html() !== '')
  256. {
  257. trevel.addBet(bet, "Loose");
  258. }
  259. else
  260. {
  261. trevel.addBet(bet, "Win");
  262. }
  263. };
  264. stopBetting = function()
  265. {
  266. _stop = true;
  267. }
  268. randomNumberOfBets = function(max, min)
  269. {
  270. _numberOfBets = Math.floor(Math.random() * max) + min;
  271. }
  272. calculateMaxBet = function()
  273. {
  274. setCurrentUserBalance();
  275. _maxBet = ((trevel.userBalance * _amountToKelly) / 100).toFixed(8);
  276. }
  277. doubleOrNothing = function()
  278. {
  279. calculateMaxBet();
  280. if($('#double_your_btc_bet_lose').html() !== '' && parseFloat($('#double_your_btc_stake').val()) * 2 < _maxBet)
  281. {
  282. $('#double_your_btc_2x').click();
  283. }
  284. else
  285. {
  286. $('#double_your_btc_min').click();
  287. }
  288. }
  289.  
  290. doubleOrNothingCustomConfiguration = function()
  291. {
  292. if(_useKellyPrinciple == false)
  293. {
  294. if($('#double_your_btc_bet_lose').html() !== '' && parseFloat($('#double_your_btc_stake').val()) * _customMultiplier < _customMaximumBet)
  295. {
  296. var elem = document.getElementById("double_your_btc_stake");
  297. elem.value = (parseFloat($('#double_your_btc_stake').val()) * _customMultiplier).toFixed(8);
  298. }
  299. else
  300. {
  301. var elem = document.getElementById("double_your_btc_stake");
  302. elem.value = _customMinimumBet;
  303. }
  304. }
  305. else
  306. {
  307. setCurrentUserBalance();
  308. var betAmount = 0;
  309. var elem2 = document.getElementById("double_your_btc_payout_multiplier");
  310. var currMulty = elem2.value;
  311. if(trevel._nextBet === "HB")
  312. {
  313. betAmount = (((trevel.userBalance * _amountToKelly)/100) * ((trevel.highBetWinsProb * currMulty - 1))/(currMulty - 1)).toFixed(8);
  314. console.log(betAmount);
  315. if(betAmount > 0 && betAmount < trevel.userBalance && trevel.bets.length > 15)
  316. {
  317. //console.log(betAmount);
  318. var elem3 = document.getElementById("double_your_btc_stake");
  319. elem3.value = betAmount;
  320. }
  321. else
  322. {
  323. /*var elem4 = document.getElementById("double_your_btc_stake");
  324. elem4.value = _customMinimumBet;*/
  325. doubleOrNothing();
  326. }
  327. }
  328. else
  329. {
  330. betAmount = (((trevel.userBalance * _amountToKelly)/100) * ((trevel.lowBetWinsProb * currMulty - 1))/(currMulty - 1)).toFixed(8);
  331. console.log(betAmount);
  332. if(betAmount > 0 && betAmount < trevel.userBalance && trevel.bets.length > 15)
  333. {
  334. //console.log(betAmount);
  335. var elem3 = document.getElementById("double_your_btc_stake");
  336. elem3.value = betAmount;
  337. }
  338. else
  339. {
  340. /*var elem4 = document.getElementById("double_your_btc_stake");
  341. elem4.value = _customMinimumBet;*/
  342. doubleOrNothing();
  343. }
  344. }
  345. }
  346. }
  347. logInfomation = function(isStopped)
  348. {
  349. if(isStopped == true)
  350. {
  351. console.log("Betting Stopped. Your profit is: " + trevel.profit);
  352. console.log("en esta ronda tu has ganado " + trevel.wins + " apuestas y perdido " + trevel.looses + " apuestas,. Total bets placed are: " + (trevel.wins + trevel.looses));
  353. console.log("In total You have won " + trevel.totalWins + " bets and lost " + trevel.totalLoses + " bets. Total bets placed are: " + (trevel.totalWins + trevel.totalLoses));
  354. console.log("You have a " + (trevel.totalWins / (trevel.totalWins + trevel.totalLoses)).toFixed(2) + " probability of winning with Trevel.");
  355. }
  356. else
  357. {
  358. console.log("Current bets profit is: " + trevel.profit);
  359. console.log("In this round You have won " + trevel.wins + " bets and lost " + trevel.looses + " bets. Total bets placed are: " + (trevel.wins + trevel.looses));
  360. console.log("In total You have won " + trevel.totalWins + " bets and lost " + trevel.totalLoses + " bets. Total bets placed are: " + (trevel.totalWins + trevel.totalLoses));
  361. console.log("You have a " + (trevel.wins / (trevel.wins + trevel.looses)).toFixed(2) + " probability of winning.");
  362. }
  363. }
  364. placeRoll = function()
  365. {
  366. setTimeout(rollDice, (_betSpeed) + Math.round(Math.random() * 1000));
  367. }
  368. rollDice = function()
  369. {
  370. if(_x === 0)
  371. {
  372. console.log("Betting Begun...");
  373. _x++;
  374. }
  375. trevel.nextBet();
  376. if(_useCustomConfiguration==true)
  377. {
  378. doubleOrNothingCustomConfiguration();
  379. }
  380. else
  381. {
  382. doubleOrNothing();
  383. }
  384. getProfit();
  385. if(_verbose == true)
  386. {
  387. console.log("Profit: " + trevel.profit);
  388. /*console.log("Number of Trails: "+ _numberOfTrials);
  389. console.log("High Bet Probability was: "+trevel.highBetProbability+ " While low bet Probability was: "+trevel.lowBetProbability);
  390. console.log("High Bet Binomial was: "+trevel.highBetBinomial+ " While low bet Binomial was: "+trevel.lowBetBinomial);*/
  391. if(_defaultProb==true)
  392. {
  393. console.log("Using _defaultProb i.e 0.475")
  394. }
  395. else
  396. {
  397. console.log("Using computed probabilities above.")
  398. }
  399. }
  400. if(trevel._nextBet === "HB")
  401. {
  402. placeHighBet();
  403. setOutcomes("HB");
  404. }
  405. else
  406. {
  407. placeLowBet();
  408. setOutcomes("LB");
  409. }
  410. _rolls++;
  411. if(_stop == false)
  412. {
  413. if(trevel.bets.length >= _numberOfBets)
  414. {
  415. if(_stopOnNumberOfBets === true)
  416. {
  417. logInfomation(true);
  418. }
  419. else
  420. {
  421. logInfomation();
  422. placeRoll();
  423. }
  424. resetArray();
  425. }
  426. else
  427. {
  428. placeRoll();
  429. }
  430. }
  431. else
  432. {
  433. logInfomation(true);
  434. }
  435. };
  436. setOriginalUserBalance();
  437. rollDice();
Add Comment
Please, Sign In to add comment