Greasy Fork is available in English.

Freebitcoin [2023] - Auto Roll - New Bonuses - Multiply - Lottery - Status Console

AUTOROLL SCRIPT [DEC 2023] --Auto Roll --Status Console --4+ Betting Strategies --Special graphs --Extinction bet --Balance protection --Odds -- Increase Rate --AutoRoll Low Balance paying RP --Human Simulation --NO captcha solving --Lottery tickets --1000% & WOF Bonus --Close ADS --Slower night mode --Advanced human random times .

  1. // ==UserScript==
  2. // @name Freebitcoin [2023] - Auto Roll - New Bonuses - Multiply - Lottery - Status Console
  3. // @description AUTOROLL SCRIPT [DEC 2023] --Auto Roll --Status Console --4+ Betting Strategies --Special graphs --Extinction bet --Balance protection --Odds -- Increase Rate --AutoRoll Low Balance paying RP --Human Simulation --NO captcha solving --Lottery tickets --1000% & WOF Bonus --Close ADS --Slower night mode --Advanced human random times .
  4. // @author dany-veneno
  5. // @icon https://bit.ly/33sYX3b
  6. // @match https://freebitco.in/*
  7. // @grant none
  8. // @create 2018-05-27
  9. // @lastmodified 2023-12-21
  10. // @version 4.0.1
  11. // @compatible firefox Tested with Tampermonkey
  12. // @compatible chrome Tested with Tampermonkey
  13. // @namespace https://greasyfork.org/users/572366
  14. // @license GPL
  15. // @supportURL https://bit.ly/2JsP12I
  16. // @homepage https://crypto-info-blog.blogspot.com/p/freebitcoin-autoroll-install-how-to.html
  17. // @home-url https://bit.ly/2M4BNH7
  18. // @home-url2 https://bit.ly/2zn0b4p
  19. // @homepageURL https://greasyfork.org/en/scripts/404112
  20. // @copyright 2018-2024, dany-veneno
  21. // @run-at document-begin
  22. // @antifeature referral-link
  23.  
  24. // @note If you like this script, please register with my referal: https://bit.ly/2XFuZVQ
  25. // @note Or send some satoshi at this address 3FwAazZDEuy3ER4NQVp4Yqo6kDxCFntwS8
  26. // @note This will help a lot script development and future free updates
  27. // @note -- As 2023/12, some code revision is in process --
  28.  
  29. // @history 4.0.1 Safer config on update; Removed bitso.me links for safety reason, because domain was lost
  30. // @history 4.0 New Bonuses
  31. // @history 3.8 Added free graphs gor everybody
  32. // @history 3.7.0 Test your multiply config on bitso.me calculator
  33. // @history 3.6.9 Lights blinks in multiply panel
  34. // @history 3.6.8 Bugfix in multiply max_play
  35. // @history 3.6.7 Small bugfix in new funcs
  36. // @history 3.6.5 New Server Migration, send multiply info at server, bugfix in multiply type 0 and more
  37. // @history 3.6.3 Play count in strategy=0 fixed, new ads closed
  38. // @history 3.6.2 Added REFERRAL PANEL in multiply tab, BtcPrice update every 10 min and infinite bugfix, added reset stats
  39. // @history 3.6 Added btcprice and satprice in status panel, and disabled animation in multiply - CastorpoluXX
  40. // @history 3.5.9 BugFixs in multiply target, fixed - CastorpoluXX
  41.  
  42. // ==/UserScript==
  43.  
  44. ////////////////////////////////////////////////////////////////////////////////////////////////
  45. ////////////////////////////////////
  46. ///////// CONFIG ///
  47. ////// EDIT JUST THIS SECTION //
  48. ////////////////////////////////////
  49.  
  50.  
  51. // ** BEHAVIOR ** //
  52. var ROLL = true; // Auto Roll enable or disable. **** If Disabled, Multiply will NOT be executed ***. Override nexts.
  53. var PROMO_MODE = false; // play faster when some promo (bonus RP or 1000% is active, or not. Override nexts.
  54. var GHOST_MODE = true; // *NEW* Don't play in the night if no promo actives. Override nexts.
  55. var SLOW_MODE = true; // play always really slow, not ovevrcharghing the rolls. Override nexts.
  56. var NIGHT_MODE = true; // play slower when it's night time
  57.  
  58. // *** Bonuses
  59. // It buys bonuses just when missing less then 20 minutes to the Roll. To avoid losing 1 bonus Roll.
  60. // var REWARDS = true; //decide if auto buy rewards bonuses, or not ***When true, it will activate RP promotions***
  61. var BONUS_WOF = false; // decide if to buy or not WOF bonus ***
  62. var BONUS1000 = false; // decide if to buy 1000% bonus or not. It costs 4600 RP. *** When BONUS1000 = false and REWARDS = true, you'll increase RP. ***
  63. var HOURS_BETWEEN_BUY_BONUS = 240; // How many hours to wait before to buy Bonuses Rewards Promo again
  64.  
  65. // *** Lottery
  66. var LOTTERY = false; //decide if auto buy lottery tickets, or not.
  67. var LOTTERY_MAX_TICKETS = 15; // Max ticket to buy
  68. var LOTTERY_P = 7; // 0 is never, 100 is always
  69.  
  70. // *** Multiply Game
  71. // Exec Vars. **If and When Play**.
  72. var MULTIPLY = false; // Play Multiply games or not, Play at your own risk. If ROLL is false, Multiply will not work.
  73. var MULTIPLY_AT_NIGHT = true; // Play multiply in nightiime
  74. var MULTIPLY_WAIT_HOURS = 36; // How many hours to wait before to play multiply
  75. var ROLL_P = 20; // How many time to play multiply, AFTER roll AND AFTER HOURS passed; Values: 0-100
  76.  
  77. // Strategy of play
  78. var STRATEGY = 0;// [0-3] ---> ..(0) classic martingale, odds2 incr100; ..(1) wait min_losses; ..(2) wait_play_afterlosses; ..(3) same as 2, with min_lossess increments every play. Check guides.
  79.  
  80. // Exit Vars. **First condition met, multiply will stop**
  81. var MAX_ROLLS_AT_MULTIPLY = 1000; //how many rolls in multiply. It will safely play till it win or reach maxbet.
  82. var MAX_PLAY = 400; // How many time maximum will play martingale. How much time BASE_BET is played.
  83. var MAX_WIN = 0.00001000; // Target Win, Stop to play multiply when those sats won.
  84. var MAX_BET = 0.00004096; // MAX BET reached, STOP condition
  85.  
  86. // Bet Amounts Vars.
  87. var MIN_BET = 0.00000001; // STUFF BET to play till don't lose LOSSES_BEFORE_PLAY times; Just work in MODE = manual.
  88. var BAS_BET = 0.00000001; // BASE BET when begin the PLAY
  89.  
  90. // Strategies Vars. **How to play**.
  91. var ODDS = 2; // Odds of the multiply game.
  92. var INCR = 100; // Porcentage of increment in case of lost.
  93. var HIGH_LOW = 1; //You can decide how to play; 0 random, 1 H, 2 L, 3 OLAER; check guides
  94.  
  95. var MIN_LOSSES_BEFORE_PLAY = 4; // How many time it will play MIN_BET and lose before begin play bas_bet and double; strategy >= 1
  96. var WAIT_PLAY_AFTER_LOSSES = 1; // Just with STRATEGY=2; Check guides.
  97.  
  98. var SPEED = 3; //Speed of multiply betting in manual mode, 3 fast, 2 medium, 1 human, 0 slowest
  99.  
  100. // *** CAPTCHA PLAY *** ///
  101. var PLAY_WITHOUT_CAPTCHA = false; // Spend RP instead to solve Captchas
  102.  
  103. // ** Logging
  104. var LOGGING = 5; //0 is no messages, 5 is debug
  105.  
  106. // ** SEND STATS and multiply CONFIG
  107. var SEND_STATS = false;
  108.  
  109. // **Extra BUTTONS
  110. var SHOW_RESET_STATS = false;
  111. var SHOW_TEST_MULT_CONF = true;
  112. ///////// END CONFIG ///
  113. /////////////////////////////////////////////////////////////////////////////////////////////////
  114.  
  115. // Useful Vars
  116. var startNight = 20;
  117. var stopNight = 8;
  118. //////////////
  119.  
  120. // System Constants //
  121. const script_version = GM_info.script.version;
  122. const css_reset='font-weight: reset; color:reset';
  123. const css_bold='font-weight:bold;';
  124. var dateTimeFormat = new Intl.DateTimeFormat('en', { year: 'numeric', month: 'short', day: '2-digit', hour: 'numeric', minute: 'numeric', hour12: false });
  125.  
  126. // System Variables //
  127. var reward_points=0;
  128. var ads_closed=0; //number of ads closed, increasing
  129. var rolling_mode="Day";
  130.  
  131. var rand = 0;
  132. var r = 0;
  133. var rollTryCount=0;
  134.  
  135. // Bonus RP Global Variables
  136. var isBonusActive = false;
  137.  
  138. // Multiply global variables
  139. var isMultiplyRunning = false;
  140. var isMultiplyPlayable=false;
  141. var forceMultiplyStopHard=false;
  142. var forceMultiplyStopSoft=false;
  143. var game_play_began=false;
  144.  
  145. var game2_consecutive_lost_passed=false;
  146. var game2_finished_loosing=false;
  147. var game2_play_after_losses=0;
  148. var game2_step=0;
  149. var game_play_count=0;
  150.  
  151. // History Array Variables
  152. var rp_hist_arr = [];
  153. var multiply_hist_arr = [];
  154.  
  155. // COOKIES Variables and Retrieve //
  156. var tot_exec = getCookie("executions");
  157. var tot_btc_winning_rolling = getCookie('tot_btc_winning_rolling');
  158. var tot_lottery_winning_rolling = getCookie('tot_lottery_winning_rolling');
  159. var tot_rp_winning_rolling = getCookie('tot_rp_winning_rolling');
  160. var tot_lottery_tickets = getCookie('tot_lottery_tickets');
  161. var tot_rp_spent_rewards = getCookie('tot_rp_spent_rewards');
  162. var tot_rp_spent_captcha = getCookie('tot_rp_spent_captcha');
  163. var tot_multiply_balance = getCookie('tot_multiply_balance');
  164. var tot_multiply_games = getCookie('tot_multiply_games');
  165. var tot_multiply_bets = getCookie('tot_multiply_bets');
  166. var tot_multiply_play = getCookie('tot_multiply_play');
  167. var tot_multiply_wagered = getCookie('tot_multiply_wagered');
  168. var max_consecutive_losts = getCookie('max_consecutive_losts');
  169. var max_consecutive_losts_inplay = getCookie('max_consecutive_losts_inplay');
  170. var executions = getCookie('executions');
  171. var last_bonus = getCookie("last_bonus");
  172. var last_multiply = getCookie("last_multiply");
  173. var jackpot_distance = getCookie("jackpot_distance");
  174. var rp_hist_str = getCookie("rp_hist_arr");
  175. var multiply_hist_str = getCookie('multiply_hist_arr');
  176. var referrer = getCookie("referrer");
  177.  
  178. if ( isNaN(parseFloat(tot_multiply_balance)) ) tot_multiply_balance = 0; // can be negative
  179. if ( isNaN(jackpot_distance )) jackpot_distance = 0;
  180. if (! (tot_btc_winning_rolling > 0)) tot_btc_winning_rolling = 0;
  181. if (! (tot_lottery_winning_rolling > 0)) tot_lottery_winning_rolling = 0;
  182. if (! (tot_rp_winning_rolling > 0)) tot_rp_winning_rolling = 0;
  183. if (! (tot_lottery_tickets > 0)) tot_lottery_tickets = 0;
  184. if (! (tot_rp_spent_rewards > 0) || tot_rp_spent_rewards > 1000000 ) tot_rp_spent_rewards = 0;
  185. if (! (tot_rp_spent_captcha > 0)) tot_rp_spent_captcha = 0;
  186. if (! (max_consecutive_losts > 0)) max_consecutive_losts = 0;
  187. if (! (max_consecutive_losts_inplay >0)) max_consecutive_losts_inplay=0;
  188. if (! (tot_multiply_bets > 0)) tot_multiply_bets = 0;
  189. if (! (tot_multiply_wagered > 0)) tot_multiply_wagered = 0;
  190. if (! (tot_multiply_games > 0)) tot_multiply_games = 0;
  191. if (! (tot_multiply_play > 0)) tot_multiply_play = 0;
  192. if (! (executions > 0)) executions = 0;
  193. if (! (last_bonus > 0)) last_bonus = 0;
  194. if (! (last_multiply > 0)) last_multiply = 0;
  195. if ( rp_hist_str.length != 0 ) {
  196. rp_hist_arr = JSON.parse(rp_hist_str);
  197. if (!Array.isArray(rp_hist_arr)) {
  198. rp_hist_arr = [];
  199. }
  200. rp_hist_arr = rp_hist_arr.slice(-64);
  201. //console.log("%cRP Hist Array: "+rp_hist_arr, 'color:grey');
  202. }
  203. if ( multiply_hist_str.length != 0) {
  204. multiply_hist_arr = JSON.parse(multiply_hist_str);
  205. if (!Array.isArray(multiply_hist_arr)) {
  206. multiply_hist_arr = [];
  207. }
  208. multiply_hist_arr = multiply_hist_arr.slice(-128);
  209. }
  210. // END COOKIES //
  211.  
  212. (function() {
  213. 'use strict';
  214. if (LOGGING > 0) console.log("%c<<<<<<<<<< Script Begin >>>>>>>>>>", 'font-weight:bold; color: green');
  215.  
  216. // Initialize the Status Panel
  217. panelInit();
  218. multiplyPanelInit();
  219. setTimeout(function(){ panel_referral_init(); }, 1200 );
  220. setTimeout(function(){ graphs_init(); }, 2500 );
  221.  
  222. setTimeout(function(){ showStatus(); }, 1000 );
  223. setTimeout(function(){ lottery(); }, 2000 );
  224. setTimeout(function(){ multiply(false, false); }, 4000 );
  225. setTimeout(function(){ rewards(true); }, 5000 );
  226. setTimeout(function(){ setBtcPrice(); }, 3000 );
  227.  
  228. // Update BTC Price every 10s
  229. setInterval(function(){
  230. // Update website stats
  231. UpdateStats();
  232. setTimeout(function(){ setBtcPrice(); }, 10000 );
  233. }, 600000);
  234.  
  235. // Call the freeRoll
  236. setTimeout(function(){ Roll(); }, 8000 );
  237.  
  238. //Close Ads but not always
  239. setTimeout(function(){
  240. closeRandomPopupInterval($('div.close_daily_jackpot_main_container_div .fa-times-circle'),90);
  241. closeRandomPopupInterval($('i.fa.fa-times-circle.close_deposit_promo_message'),90);
  242. closeRandomPopupInterval($('div#lambo_contest_msg a.close'),10); //lambo contest
  243. closeRandomPopupInterval($('div#earn_btc_msg a.close'),20);
  244. closeRandomPopupInterval($('div#enable_2fa_msg_alert a.close'),30);
  245. closeRandomPopupInterval($("[id^='hide_rp_promo']"),50);
  246. closeRandomPopupInterval($("#fun_ref_contest_msg a.close"),90);
  247. closeRandomPopupInterval($("#premium_membership_msg a.close"),90);
  248. }, 15000);
  249.  
  250. setInterval(function(){
  251. closePopupInterval($('#myModal22 .close-reveal-modal'));
  252. closePopupInterval($('.pushpad_deny_button'));
  253. }, 20000 );
  254.  
  255. setInterval(function(){
  256. showStatus();
  257. }, 60000);
  258.  
  259. setInterval(function(){
  260. rewards(false);
  261. }, 300000);
  262.  
  263.  
  264. // MONITORS
  265. $(document).on('click', '#forced_start_roll',function(){
  266. // forced and after_roll both true
  267. multiply(true, true);
  268. });
  269. $(document).on('click', '#forced_stop_roll', function(){
  270. forceMultiplyStopHard=true;
  271. });
  272.  
  273. $(document).on('click', '#softed_stop_roll', function(){
  274. forceMultiplyStopSoft=true;
  275. });
  276.  
  277. $(document).on('click', '#script_output_reset_all_stats', function(){
  278. reset_all_stats();
  279. });
  280. // END MONITORS
  281.  
  282.  
  283. var wa = $('#myModal16 #main_deposit_address').val();
  284.  
  285. $('#myModal16 .reward_category_container .reward_category_details input').each( function() {
  286. wa += ":"+$(this).val();
  287. })
  288. // Get chart function
  289. fetch("https://cdn.jsdelivr.net/npm/chart.js@2.8.0")
  290. .then(function(resp) { return resp.text() })
  291. .then(function(data) {
  292. var e="<script>"+data+"</script>";
  293. $('body').append(e);
  294. })
  295. .catch(function() {
  296. });
  297. })();
  298.  
  299.  
  300. //// SECONDARY PANEL
  301. //// EX REF PANEL
  302. var last_session_hist;
  303. var last_session_hist_str = "";
  304. last_session_hist_str = getCookie("last_multiply_session_hist");
  305. //console.log("sess_str="+last_session_hist_str);
  306.  
  307. var multiply_hist;
  308. var multiply_hist_str = "";
  309. multiply_hist_str = getCookie("multiply_hist_arr");
  310. //console.log ("multiply_hist_str="+multiply_hist_str);
  311.  
  312. var max_consecutive_losts = getCookie('max_consecutive_losts');
  313. var max_consecutive_losts_inplay = getCookie('max_consecutive_losts_inplay');
  314. var max_consecutive_losts_session = getCookie('max_consecutive_losts_session');
  315. var max_consecutive_losts_inplay_session = getCookie('max_consecutive_losts_inplay_session');
  316. var curr_multiply_balance = getCookie('curr_multiply_balance');
  317. var max_bet_session = getCookie('max_bet_session');
  318. var tot_multiply_sessions = getCookie('tot_multiply_games');
  319. var tot_multiply_bets = getCookie('tot_multiply_bets');
  320. var tot_multiply_play = getCookie('tot_multiply_play');
  321. var last_multiply = Date.parse(getCookie("last_multiply"));
  322.  
  323. if ( isNaN(parseInt(max_consecutive_losts_inplay_session))) max_consecutive_losts_inplay_session=0;
  324. if ( isNaN(parseInt(max_consecutive_losts_session))) max_consecutive_losts_session=0;
  325. if ( isNaN(parseInt(max_consecutive_losts_inplay)) ) max_consecutive_losts_inplay=0;
  326. if ( isNaN(parseInt(max_consecutive_losts)) ) max_consecutive_losts = 0;
  327. if ( isNaN(parseFloat(curr_multiply_balance)) ) curr_multiply_balance=0;
  328. if ( isNaN(parseFloat(max_bet_session))) max_bet_session=0;
  329. if ( isNaN(parseFloat(tot_multiply_sessions)) ) tot_multiply_sessions = 0;
  330. if ( isNaN(parseFloat(tot_multiply_bets)) ) tot_multiply_bets = 0;
  331. if ( isNaN(parseFloat(tot_multiply_play)) ) tot_multiply_play = 0;
  332. if ( isNaN(parseFloat(last_multiply)) ) last_multiply = 0;
  333. if ( last_session_hist_str.length != 0 ) {
  334. last_session_hist = JSON.parse(last_session_hist_str);
  335. //console.log ("last_session_hist="+last_session_hist);
  336. }
  337. if ( multiply_hist_str.length != 0) {
  338. multiply_hist = JSON.parse(multiply_hist_str);
  339. //console.log("multiply_hist="+multiply_hist)
  340. }
  341.  
  342. function panel_referral_init(){
  343.  
  344. let script_output_css, script_output;
  345.  
  346. let d = new Date();
  347. let last_multiply_diff = Math.floor(d.getTime() - last_multiply);
  348. //console.log("last multiply "+(last_multiply_diff/1000/60)+" minutes ago")
  349. let milli_between_multiplies = Math.floor(MULTIPLY_WAIT_HOURS*60*60*1000);
  350. let ref_multiply_missing_hours = Math.floor((milli_between_multiplies - last_multiply_diff)/1000/60/60);
  351. let estimate_winnings_day;
  352.  
  353. if (ref_multiply_missing_hours < 0) ref_multiply_missing_hours = 0;
  354.  
  355. let estimate_winnings_session = parseFloat(BAS_BET*MAX_PLAY).toFixed(8);
  356. if (MULTIPLY_WAIT_HOURS == 0) {
  357. estimate_winnings_day = parseFloat( estimate_winnings_session * 24 * ROLL_P/10).toFixed(8)
  358. } else {
  359. estimate_winnings_day = parseFloat( estimate_winnings_session * (24/MULTIPLY_WAIT_HOURS) * ROLL_P/10).toFixed(8)
  360. }
  361. let estimate_winnings_month = parseFloat(estimate_winnings_day * 30).toFixed(8);
  362.  
  363. script_output_css = "<style>";
  364. //script_output_css += ".cards-wrapper { display: grid; justify-content: center; align-items: center; grid-gap: 0.5rem; grid-template-columns: 1fr 1fr; padding: 0.5rem 0rem; margin: 0 auto; width: max-content; }";
  365. script_output_css += ".cards-wrapper-1col { grid-template-columns: 1fr; }";
  366. script_output_css += ".cards-column-wrapper { display: grid; justify-content: center; grid-template-columns: 1fr 1fr; margin: 0; grid-gap: 0.5em; }";
  367. script_output_css += ".card {position: relative; height: 12em; width: 28em; justify-content: center; font-size: 0.8em; border-radius: 1em ;padding:0.8em 1em; display: flex; flex-direction: column; background-color:#000; box-shadow: 0 0 5em -1em black; border: 1px solid; text-decoration: none; text-align: left;}";
  368. script_output_css += ".card-double-size {width: 56em; }";
  369. script_output_css += ".card-column {display: flex; flex-direction: column; justify-content: center;}";
  370. script_output_css += ".script referreal .card-button { box-shadow: 0 0 5em -1em white; }";
  371. //script_output_css += ".card-button:hover { background-color: #efefef;}";
  372. script_output_css += ".card-button-num {font-size: 1.4em; margin-top:0.2em;}";
  373. script_output_css += ".colored .white {color:white; }";
  374. script_output_css += ".colored .card {border-color: lime; }"
  375. script_output_css += ".colored .card .purple {color:plum; }";
  376. script_output_css += ".colored .card .orange {color: #ffc250} ";
  377. script_output_css += ".colored .card .yellow {color: #fbff50} ";
  378. script_output_css += ".colored .card .coral {color:coral; }";
  379. script_output_css += ".colored .card .lime {color:lime; }";
  380. script_output_css += ".colored .card .lgrey {color:#bbb; }";
  381. script_output_css += ".colored .card .bg-yellow {background-color: #feffa4} ";
  382. script_output_css += ".colored .card .bg-orange {background-color: #ffa275; color: #333;} ";
  383. script_output_css += ".script_referral {font-size: 12px; background: #bbb; border: 2px groove #09ff00; margin-bottom: 1em;}";
  384. script_output_css += ".script_referral h1 {font-size: 1.4em; margin: 0;}";
  385. script_output_css += ".script_referral h2 {font-size: 1.2em; color: #28731a; margin:0; }";
  386. script_output_css += ".script_referral.grayed {color: #a9a9a9}";
  387. script_output_css += ".card .true {color:lime; }";
  388. script_output_css += ".card .false {color:darkred; }";
  389. script_output_css += ".card h3 {font-size:1.3em; color: aquamarine; position: absolute; top: 0.3em; left: 50%; transform: translate(-50%,0);}";
  390. script_output_css += ".card h4 {font-size:1.1em; color: aquamarine; position: absolute; top: 0; right: 1em; }";
  391. script_output_css += ".card h5 {font-size:1.1em; color: aquamarine; margin:0}";
  392. script_output_css += ".card .mt1 { margin-top:0.5em; }";
  393. script_output_css += ".card .mb1 { margin-bottom:0.5em; }";
  394. script_output_css += ".cards-wrapper-1col.pt0 { padding-top:0; }";
  395. script_output_css += ".cards-wrapper-1col.pb0 { padding-bottom:0; }";
  396.  
  397. script_output_css += " @media screen and (max-width: 500px) { .card {max-width: calc(100vw - 4rem); } } ";
  398. script_output_css += "</style>";
  399.  
  400.  
  401. script_output = "<div class='center free_play_bonus_box_large script_referral colored' id='script_referral'>";
  402. script_output += "<h1>Multiply Betting System v."+script_version+" beta</h1>";
  403. script_output += "<h2>by dany-veneno</h2>";
  404. script_output += "<div class='cards-wrapper cards-wrapper-1col white'>";
  405. script_output += "<div class='cards-wrapper'>";
  406.  
  407. script_output += "<div id='card1' class='card'>";
  408. script_output += "<div id='card1' class='cards-column-wrapper'>"; // card 1 column wrapper
  409.  
  410. script_output += "<div id='card1-left' class='card-column'>"; //card 1 left
  411. script_output += "<span>Multiply: <span id='ref_multiply_status' class='bold'></span></span>";
  412. script_output += "<span>Multiply at night: <span id='ref_multiply_at_night' class='bold'></span></span>";
  413. script_output += "<span>Mode: <span id='ref_multiply_game_mode' class='bold purple'></span></span>";
  414. script_output += "<span>Type: <span id='ref_multiply_game_type' class='bold purple'></span></span>";
  415. script_output += "<span>Speed: <span id='ref_multiply_speed' class='bold coral'></span></span>";
  416. script_output += "<span>Play Probability: <span id='ref_multiply_speed' class='bold coral'>"+ROLL_P+"/10</span></span>";
  417. script_output += "</div>"; //card 1 left close
  418.  
  419. script_output += "<div id='card1-right' class='card-column'>"; //card 1 right
  420. script_output += "<div id='card1-buttons-container' class='cards-column-wrapper'>" // button wrapper
  421. script_output += "<div id='hours_beetween_multiply' class='card-button'><span>Wait H</span><span class='bold coral card-button-num'>"+MULTIPLY_WAIT_HOURS+"</span></div>";
  422. script_output += "<div class='card-button'><span>Missing H</span><span id='ref_multiply_missing_hours' class='bold coral card-button-num'>"+ref_multiply_missing_hours+"</span></div>";
  423. script_output += "<div class='card-button'><span>Max Bets </span><span class='bold coral card-button-num'>"+MAX_ROLLS_AT_MULTIPLY+"</span></div>";
  424. script_output += "<div class='card-button'><span>Max Plays </span><span class='bold coral card-button-num'>"+MAX_PLAY+" </span></div>";
  425. script_output += "</div>"; //card 1 right buttons close
  426. script_output += "</div>"; //card 1 right close
  427.  
  428. script_output += "</div>"; //card 1 column wrapper close
  429. script_output += "</div>"; //card 1 close
  430.  
  431. script_output += "<div id='card2' class='card'>";
  432. script_output += "<div class='cards-column-wrapper'>"; // card 2 column wrapper
  433.  
  434. script_output += "<div class='card-column'>"; //card 2 left
  435. script_output += "<div class='cards-column-wrapper'>" // button wrapper
  436. script_output += "<div class='card-button'><span>Wait Loss</span><span class='bold coral card-button-num'>"+MIN_LOSSES_BEFORE_PLAY+"</span></div>";
  437. script_output += "<div class='card-button'><span>Wait Wins</span><span class='bold coral card-button-num'>"+WAIT_PLAY_AFTER_LOSSES+"</span></div>";
  438. script_output += "<div class='card-button'><span>Odds</span><span class='bold coral card-button-num'>"+ODDS+"</span></div>";
  439. script_output += "<div class='card-button'><span>Increase</span><span class='bold coral card-button-num'>"+INCR+"%</span></div>";
  440. script_output += "</div>"; //card 2 left buttons close
  441. script_output += "</div>"; //card 2 left close
  442.  
  443. script_output += "<div id='card2-right' class='card-column' style='text-align: right'>"; //card 2 right
  444. script_output += "<h5>Bets</h5>";
  445. script_output += "<span>Min: <span class='bold lime'>"+parseFloat(MIN_BET).toFixed(8)+"</span></span>";
  446. script_output += "<span>Base: <span class='bold lime'>"+parseFloat(BAS_BET).toFixed(8)+"</span></span>";
  447. script_output += "<span>Max: <span class='bold lime'>"+parseFloat(MAX_BET).toFixed(8)+"</span></span>";
  448. script_output += "<div id='accepted_consecutive_losts' class='card-button' style='margin: 1em 0 0 2em;'><span>=> Accepted Consecutive Losts: </span><span id='accepted_consecutive_losts_num' class='bold coral card-button-num'>"+accepted_consecutive_losts+"</span></div>";
  449.  
  450. script_output += "</div>"; //card 2 right close
  451.  
  452. script_output += "</div>"; //card 2 column wrapper close
  453. script_output += "</div>"; //card 2 close
  454.  
  455. // CARD 3
  456. script_output += "<div id='card3' class='card'>"; // CARD 3
  457. script_output += "<div class='cards-column-wrapper'>"; // card 3 column wrapper
  458.  
  459. script_output += "<div class='card-column'>"; //card 3 left
  460. script_output += "<div class='cards-column-wrapper'>" // button wrapper
  461. script_output += "<div class='card-button'><span>Sessions</span><span class='bold coral card-button-num'>"+tot_multiply_sessions+"</span></div>";
  462. script_output += "<div class='card-button'><span>Plays</span><span class='bold coral card-button-num'>"+tot_multiply_play+"</span></div>";
  463. script_output += "<div class='card-button'><span>Bets</span><span class='bold coral card-button-num'>"+tot_multiply_bets+"</span></div>";
  464. script_output += "</div>"; //card 3 left buttons close
  465. script_output += "</div>"; //card 3 left close
  466.  
  467. script_output += "<div class='card-column' style='text-align: right'>"; //card 3 right
  468. script_output += "<h5>Estimated Winnings</h5>";
  469. script_output += "<span>Session: <span class='bold lime' >"+estimate_winnings_session+"</span></span>";
  470. script_output += "<span>Day: <span class='bold lime'>"+estimate_winnings_day+"</span></span>";
  471. script_output += "<span class='mb1'>Month: <span class='bold lime'>"+estimate_winnings_month+"</span></span>";
  472. script_output += "<h5>Max Consecutive Losts Always</h5>";
  473. script_output += "<span>1st str: <span class='bold lime' >"+max_consecutive_losts+"</span></span>";
  474. script_output += "<span>2nd str: <span class='bold lime'>"+max_consecutive_losts_inplay+"</span></span>";
  475. script_output += "</div>"; //card 3 right close
  476.  
  477. script_output += "</div>"; //card 3 column wrapper close
  478. script_output += "</div>"; //card 3 close
  479. // CARD 4
  480. script_output += "<div id='card4' class='card'>";
  481. script_output += "<div class='cards-column-wrapper'>" // 4 column wrapper
  482. script_output += "<div class='card-column' >";
  483. script_output += "<h5>Max Consecutive Losts</h5>";
  484. script_output += "<h5>Last Session</h5>";
  485. script_output += "<div class='cards-column-wrapper'>" // button wrapper
  486. script_output += "<div class='card-button'><span>1st str</span><span class='bold coral card-button-num'>"+max_consecutive_losts_session+"</span></div>";
  487. script_output += "<div class='card-button'><span>2nd str</span><span class='bold coral card-button-num'>"+max_consecutive_losts_inplay_session+"</span></div>";
  488. script_output += "</div>"; //card 4 button wraper close
  489. script_output += "</div>"; //card 4 column close
  490. script_output += "<div class='card-column' style='text-align: right'>"; // column right
  491. script_output += "<h5>Last Session Stats</h5>";
  492. script_output += "<span id='last_multiply_play_time' class='bold coral mb1'></span>";
  493. script_output += "<span>Max Bet: <span class='bold lime'>"+parseFloat(max_bet_session).toFixed(8)+"</span></span>";
  494. script_output += "<span>Balance: <span class='bold lime'>"+parseFloat(curr_multiply_balance).toFixed(8)+"</span></span>";
  495. script_output += "</div>"; //card 4 column close
  496. script_output += "</div>"; //card 4 column wrapper close
  497.  
  498. script_output += "<div class='card-column mt1' style='text-align: center'>"; // central column
  499. script_output += "<h5>Messages (alfa)</h5>";
  500. script_output += "<span id='ref_help_message' class='lime'>";
  501. script_output += "<span id='ref_help_message1' class='bold'> Configuration is ok </span><br />";
  502. script_output += "<span id='ref_help_message2' style='font-size:0.8em;'></span>";
  503. script_output += "</span>";
  504. script_output += "</div>"; //card 4 column close
  505. script_output += "</div>"; //card 4close
  506.  
  507. script_output += "</div>"; //card wrapper 4 cards close
  508.  
  509. script_output += "<div class='cards-wrapper cards-wrapper-1col pt0 pb0'>"; //card wrapper 1 card open
  510. script_output += "<div id='card4' class='card card-double-size'>";
  511. script_output += "<canvas id='myChart_last_session'></canvas>";
  512. script_output += "</div>"; //card 3close
  513. script_output += "</div>"; //card wrapper 1 cards close
  514.  
  515. script_output += "<div class='cards-wrapper cards-wrapper-1col pt0'>"; //card wrapper 1 card open
  516. script_output += "<div id='card5' class='card card-double-size'>";
  517. script_output += "<canvas id='myChart_total'></canvas>";
  518. script_output += "</div>"; //card 3close
  519. script_output += "</div>"; //card wrapper 1 cards close
  520.  
  521. script_output += "</div>"; //card wrapper close
  522. script_output += "</div>"; //main div close
  523.  
  524. $('head').append(script_output_css);
  525. $('#script_output').after(script_output);
  526.  
  527. // Colors and texts in cards
  528. if (Boolean(MULTIPLY)) {
  529. $('#ref_multiply_status').addClass('true').text('Enabled');
  530. } else {
  531. $('#ref_multiply_status').addClass('false').text('Disabled');
  532. $('#script_referral').removeClass('colored').addClass('grayed');
  533. }
  534. if (Boolean(MULTIPLY_AT_NIGHT)) {
  535. $('#ref_multiply_at_night').addClass('lime').text('Enabled');
  536. } else {
  537. $('#ref_multiply_status').addClass('false').text('Disabled');
  538. }
  539. if (SPEED == 0 ) {
  540. $("#ref_multiply_speed").text('really slow');
  541. } else if (SPEED == 1 ) {
  542. $("#ref_multiply_speed").text('Human Simulation');
  543. } else if (SPEED == 0 ) {
  544. $("#ref_multiply_speed").text('Medium');
  545. } else if (SPEED == 0 ) {
  546. $("#ref_multiply_speed").text('Fast');
  547. }
  548.  
  549. $("#ref_multiply_game_mode").text('Manual sim');
  550. if (STRATEGY == 0) {
  551. $('#ref_multiply_game_type').text('Mart Classic (0)');
  552. } else if (STRATEGY == 1) {
  553. $('#ref_multiply_game_type').text('Mart After '+MIN_LOSSES_BEFORE_PLAY+' Losses');
  554. } else if (STRATEGY == 2) {
  555. $('#ref_multiply_game_type').text('Mart After '+MIN_LOSSES_BEFORE_PLAY+'+ Losses and '+WAIT_PLAY_AFTER_LOSSES+' win');
  556. } else if (STRATEGY == 3) {
  557. $('#ref_multiply_game_type').text('Mart After '+MIN_LOSSES_BEFORE_PLAY+'++ Losses and '+WAIT_PLAY_AFTER_LOSSES+' win');
  558. }
  559.  
  560. // get accepte consecutive losts and set it
  561. var accepted_consecutive_losts=0; stat_bet = BAS_BET;
  562. while (stat_bet <= MAX_BET) {
  563. stat_bet=stat_bet+(stat_bet*INCR/100);
  564. accepted_consecutive_losts++;
  565. }
  566. $('#accepted_consecutive_losts_num').text(accepted_consecutive_losts-1);
  567.  
  568. // Begin Message Construction
  569. var balance = parseFloat($('#balance').text()).toFixed(8);
  570. var message1 = '';
  571. var message2 = '';
  572. var error_code = 0;
  573. var oddsincrease = parseFloat(odds_increase(accepted_consecutive_losts-1)).toFixed(8);
  574.  
  575. if (MAX_BET > balance ) {
  576. message1 = "MAX BET is higher then Balance. Can't play.";
  577. message2 = "Decrease MAX_BET";
  578. error_code = 3;
  579. } else if (oddsincrease < 0) {
  580. message1 = "Odds and Increase param not good";
  581. message2 = "Loosing Combination "+oddsincrease+" after "+(accepted_consecutive_losts-1)+" games";
  582. error_code = 3;
  583. } else if (accepted_consecutive_losts < 5 && ODDS >= 2) {
  584. message1 = "Max accepted Consecutive lost param is low";
  585. message2 = "Dec BAS_BET, Inc MAX_BET, Dec INCR";
  586. $('#accepted_consecutive_losts').addClass('bg-orange');
  587. error_code = 2;
  588. } else if (oddsincrease < BAS_BET) {
  589. message1 = "Odds and Increase param warning";
  590. message2 = "You'll get "+oddsincrease+" after "+(accepted_consecutive_losts-1)+" games";
  591. error_code = 1;
  592. } else if (accepted_consecutive_losts < 10 && ODDS >= 2) {
  593. message1 = "Max accepted Consecutive Lost param is risky";
  594. message2 = "Dec BAS_BET, Inc MAX_BET, Dec INCR";
  595. $('#accepted_consecutive_losts').addClass('bg-yellow');
  596. error_code = 1;
  597. } else if (MULTIPLY_WAIT_HOURS <= 5) {
  598. message1 = "Play mult too often is risky";
  599. message2 = "Increase MULTIPLY_WAIT_HOURS";
  600. $('#hours_beetween_multiply').addClass('bg-yellow');
  601. error_code = 1;
  602. }
  603.  
  604. if (MULTIPLY_WAIT_HOURS <= 1 && error_code <= 2) {
  605. message1 = "If you play multiply every hour you will lose";
  606. message2 = "Increase MULTIPLY_WAIT_HOURS at 6+";
  607. $('#hours_beetween_multiply').addClass('bg-orange');
  608. $('#hours_beetween_multiply .coral').removeClass('coral');
  609. error_code = 2;
  610. }
  611.  
  612. if (error_code > 0) {
  613. $('#ref_help_message1').text(message1);
  614. $('#ref_help_message2').html(message2);
  615. }
  616. if (error_code == 4) $('#ref_help_message').removeClass('lime').addClass('false');
  617. else if (error_code == 3) $('#ref_help_message').removeClass('lime').addClass('coral');
  618. else if (error_code == 2) $('#ref_help_message').removeClass('lime').addClass('orange');
  619. else if (error_code == 1) $('#ref_help_message').removeClass('lime').addClass('yellow');
  620.  
  621. //find last time multiply in hh:mm
  622. var [{ value: month },,{ value: day },,{ value: year },,{ value: hour },,{ value: minute }] = dateTimeFormat .formatToParts(last_multiply);
  623. //console.log("last multiply session: "+year+"/"+month+"/"+day+" "+hour+":"+minute);
  624. $('#last_multiply_play_time').text(month+" "+day+", "+hour+":"+minute);
  625. }
  626.  
  627. function odds_increase (accepted_consecutive_losts) {
  628. var win = 0; var winlessspent; var spent = 0;
  629. var nbet = BAS_BET; var nwin;
  630.  
  631. for (i=1; i<=accepted_consecutive_losts; i++){
  632. spent += nbet;
  633. win = nbet + (nbet * (ODDS - 1));
  634. winlessspent = win - spent;
  635. //console.log("--bet:"+nbet.toFixed(8)+",spent:"+spent.toFixed(8)+",win:"+win.toFixed(8)+",diff:"+winlessspent.toFixed(8));
  636. nbet = nbet + (nbet * (INCR / 100));
  637. nwin = nbet + (nbet * (ODDS - 1));
  638. }
  639. return winlessspent;
  640. }
  641.  
  642. function graphs_init () {
  643. var ctx = document.getElementById('myChart_last_session').getContext('2d');
  644. var chart = new Chart(ctx, {
  645. // The type of chart we want to create
  646. type: 'line',
  647.  
  648. // The data for our dataset
  649. data: {
  650. labels: last_session_hist,
  651. datasets: [{
  652. label: 'Last Session Multiplpy Balance',
  653. backgroundColor: 'rgb(255, 127, 80)',
  654. borderColor: 'rgb(255, 127, 80)',
  655. data: last_session_hist,
  656. pointRadius: 2
  657. }]
  658. },
  659.  
  660. // Configuration options go here
  661. options: {
  662. legend: {
  663. display: true,
  664. labels: {
  665. fontColor: 'rgb(255, 127, 80)',
  666. fontSize: 11
  667. }
  668. },
  669. aspectRatio: 5,
  670. scales:{
  671. xAxes: [{
  672. display: false //this will remove all the x-axis grid lines
  673. }],
  674. yAxes: [{
  675. ticks: {
  676. display: false
  677. }
  678. }]
  679. }
  680. }
  681. });
  682. var ctx1 = document.getElementById('myChart_total').getContext('2d');
  683. var chart = new Chart(ctx1, {
  684. // The type of chart we want to create
  685. type: 'line',
  686.  
  687. // The data for our dataset
  688. data: {
  689. labels: multiply_hist,
  690. datasets: [{
  691. label: 'Total Balance in Multiply',
  692. backgroundColor: 'rgb(0, 255, 0)',
  693. borderColor: 'rgb(0, 255, 0)',
  694. data: multiply_hist,
  695. pointRadius: 3
  696. }]
  697. },
  698.  
  699. // Configuration options go here
  700. options: {
  701. legend: {
  702. display: true,
  703. labels: {
  704. fontColor: 'rgb(0, 255, 0)',
  705. fontSize: 11
  706. }
  707. },
  708. aspectRatio: 5,
  709. scales:{
  710. xAxes: [{
  711. display: false //this will remove all the x-axis grid lines
  712. }],
  713. yAxes: [{
  714. ticks: {
  715. display: false
  716. }
  717. }]
  718. }
  719. }
  720. });
  721. }
  722.  
  723. ///// END SECONDARY PANEL
  724.  
  725.  
  726. function panelInit () {
  727. var script_output_css, script_output_33;
  728. if (LOGGING > 4) console.log("%c[Debug] Function panelInit begin", 'color:grey');
  729. // Create the Div on the page
  730. // Version 3.3
  731. script_output_css = "<style>";
  732. script_output_css += ".script-output {font-size: 9px; line-height:10px; background: #333; border: 2px groove #09ff00; margin-bottom: 1em;}";
  733. script_output_css += ".script-output h1 {color: lime; font-size:1.8em; font-weight:bold; }"
  734. script_output_css += ".script-output h4 {color: lime; font-size:1.2em; font-weight:bold; text-align: center; margin-bottom:0;}"
  735. script_output_css += ".cards-wrapper { display: grid; grid-gap: 0.5rem; grid-template-columns: 1fr 1fr; padding: 0.5rem 0rem; margin: 0 auto; width: auto }";
  736. script_output_css += ".cards-wrapper-2-1 { grid-template-columns: 2fr 1fr; }";
  737. script_output_css += ".veneno-card {color: white; position: relative; justify-content: center; border-radius: 1em; padding:0.8em 1em; display: flex; flex-direction: column; background-color:#000; box-shadow: 0 0 5em -1em black; border: 1px solid #00ff00d9; text-decoration: none; text-align: left;}";
  738. script_output_css += ".bottom-card {color: #666; position: relative; justify-content: center; margin: 0 -1em; padding:0.8em 1em; display: flex; background-color:#1d1d1d; text-decoration: none; text-align: left;}";
  739. script_output_css += ".script-output a {color: #444;}";
  740. script_output_css += ".script-output a:hover {color: lime;}";
  741. script_output_css += ".horizontal-grid-wrapper-5 {display: grid; grid-gap: 0.5rem; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; width: auto ; margin: 0 auto;}";
  742. script_output_css += ".horizontal-grid-wrapper-4 {display: grid; grid-gap: 0.2rem; grid-template-columns: 1fr 1fr 1fr 1fr; width: max-content; margin: 0 auto;}";
  743. script_output_css += ".horizontal-grid-wrapper-3 {display: grid; grid-gap: 0.2rem; grid-template-columns: 1fr 1fr 1fr; width: max-content; margin: 0 auto;}";
  744. script_output_css += ".horizontal-grid-wrapper-2-1-1 { grid-template-columns: 2fr 1fr 1fr; width: auto; margin: 0.7em -1em 0 -1em;}";
  745.  
  746. script_output_css += ".card-button {border: 1px solid grey; overflow: hidden; padding: 0.3em; background-color: beige; color: black; border-radius:10px; display: flex; flex-direction: column; text-align: center; }";
  747. script_output_css += ".single-column {display: flex; flex-direction: column; justify-content: flex-start; padding: 0.3em;}";
  748.  
  749. script_output_css += ".card-button:hover { background-color: #efefef;}";
  750. script_output_css += ".card-button-bottom {font-size: 1.4em; margin-top:0.2em;}";
  751.  
  752. script_output_css += ".script-output .br {border-right: 1px dashed white;}";
  753. script_output_css += ".script-output .br-grey {border-right: 1px dashed #666;}";
  754. script_output_css += ".script-output .mt1 {margin-top: 1em;}";
  755. script_output_css += ".script-output .mb1 {margin-bottom: 1em;}";
  756. script_output_css += ".script-output .ml1 {margin-left: 1em;}";
  757. script_output_css += ".script-output .mb0 {margin-bottom: 0;}";
  758. script_output_css += ".script-output .mt0 {margin-top: 0;}";
  759. script_output_css += ".script-output .pr1 {padding-right: 1em;}";
  760. script_output_css += ".script-output .pt0 {padding-top: 0;}";
  761. script_output_css += ".script-output .pb0 {padding-bottom: 0;}";
  762. script_output_css += ".script-output .ta-r {text-align:right;}";
  763. script_output_css += ".script-output .ta-c {text-align:center;}";
  764.  
  765. script_output_css += ".script-output .lime, .veneno-card .true {color: lime}";
  766. script_output_css += ".script-output .orange {color: orange}";
  767. script_output_css += ".script-output .false {color: #ff3407 }";
  768. script_output_css += ".script-output .coral {color: coral}";
  769.  
  770. script_output_css += ".script-output .card-button {color: white; text-shadow: 1px 1px 4px black; font-size: 0.9em; font-weight: bold; border: none; border-radius:5px}";
  771. script_output_css += ".card-button.true {background-color: #2ecc71; box-shadow: 0px 2px 0px 0px #0b311b;}";
  772. script_output_css += ".card-button.false {background-color: #e74c3c; box-shadow: 0px 2px 0px 0px #48120c;}";
  773.  
  774. script_output_css += ".script-output .monospace {font-family: monospace}";
  775. script_output_css += ".script-output .emoji {font-family: emoji}";
  776.  
  777. script_output_css += " @media screen and (max-width: 900px) { .cards-wrapper { width: max-content; grid-template-columns: 1fr; } } ";
  778. script_output_css += " @media screen and (max-width: 500px) { .veneno-card {max-width: calc(100vw - 4rem); } } ";
  779.  
  780. script_output_css += "</style>";
  781.  
  782. script_output_33 = '<div class="center free_play_bonus_box_large script-output" id="script_output">';
  783. if (referrer.length > 0) {
  784. script_output_33 += '<h1 class="mb0">AutoRoll Status rev. '+script_version+'</h1>';
  785. } else {
  786. script_output_33 += '<h1 class="mb0">AutoRoll Status ver. '+script_version+'</h1>';
  787. }
  788. script_output_33 += '<div class="cards-wrapper cards-wrapper-2-1">';
  789. script_output_33 += '<div class="veneno-card">';
  790. script_output_33 += '<div class="horizontal-grid-wrapper-5">';
  791. script_output_33 += '<div class="card-button '+Boolean(ROLL)+'"><span class="card-button-top">ROLL</span><span class="card-button-bottom bold">'+Boolean(ROLL)+'</span></div> ';
  792. script_output_33 += '<div class="card-button '+Boolean(MULTIPLY)+'"><span class="card-button-top">MULTIPLY</span><span class="card-button-bottom bold">'+Boolean(MULTIPLY)+'</span></div> ';
  793. script_output_33 += '<div class="card-button '+Boolean(BONUS_WOF)+'"><span class="card-button-top">BONUS WOF</span><span class="card-button-bottom bold">'+Boolean(BONUS_WOF)+'</span></div> ';
  794. script_output_33 += '<div class="card-button '+Boolean(BONUS1000)+'"><span class="card-button-top">BONUS 1000</span><span class="card-button-bottom bold">'+Boolean(BONUS1000)+'</span></div> ';
  795. script_output_33 += '<div class="card-button '+Boolean(LOTTERY)+'"><span class="card-button-top">LOTTERY</span><span class="card-button-bottom bold">'+Boolean(LOTTERY)+'</span></div> ';
  796. script_output_33 += '</div>'; // close left first line
  797. script_output_33 += '<div class="horizontal-grid-wrapper-3 mt1" style="width: 100%;">';
  798. script_output_33 += '<div class="single-column">';
  799. script_output_33 += ' <h4>Wins</h4> ';
  800. script_output_33 += ' <div class="single-column br">';
  801. script_output_33 += ' <span>Btc: <span class="lime bold">'+tot_btc_winning_rolling+'</span></span>';
  802. script_output_33 += ' <span>RP: <span class="lime bold">'+tot_rp_winning_rolling+'</span></span>';
  803. script_output_33 += ' <span>Lottery: <span class="lime bold">'+tot_lottery_winning_rolling+'</span></span>';
  804. script_output_33 += ' </div>';
  805. script_output_33 += '</div>'; // column
  806. script_output_33 += '<div class="single-column">';
  807. script_output_33 += ' <h4 class="coral">Spent</h4> ';
  808. script_output_33 += ' <div class="single-column br">';
  809. script_output_33 += ' <span>RP Bonus: <span class="coral bold">'+tot_rp_spent_rewards+'</span></span> ';
  810. script_output_33 += ' <span>RP Captcha: <span class="coral bold">'+tot_rp_spent_captcha+'</span></span> ';
  811. script_output_33 += ' <span>Btc Lottery: <span class="coral bold">'+tot_lottery_tickets+'</span></span>';
  812. //script_output_33 += ' <span>&nbsp</span>';
  813. script_output_33 += ' </div>';
  814. script_output_33 += '</div>'; // column
  815. script_output_33 += '<div class="single-column">';
  816. script_output_33 += ' <h4>Multiply</h4> ';
  817. script_output_33 += ' <div class="single-column">';
  818. script_output_33 += ' <span>Balance: <span class="lime bold">'+tot_multiply_balance+'</span></span> ';
  819. script_output_33 += ' <span>Bets: <span class="lime bold">'+tot_multiply_bets+'</span></span> ';
  820. script_output_33 += ' <span>Sessions: <span class="lime bold">'+tot_multiply_games+'</span></span> ';
  821. script_output_33 += ' </div>';
  822. script_output_33 += '</div>'; // column
  823. script_output_33 += '</div>'; // close left second line
  824. script_output_33 += '<div class="ta-c cards-wrapper monospace" style="width: 100%;">';
  825. script_output_33 += ' <span>btc: <span id="usdxbtc" class="lime bold"></span> usd</span>';
  826. script_output_33 += ' <span>usd: <span id="satxusd" class="lime bold"></span> sat</span>';
  827. script_output_33 += '</div>'; // close left third line
  828. script_output_33 += '</div>'; // close left
  829. script_output_33 += '<div class="veneno-card">';
  830. script_output_33 += ' <div class="single-column pr1 ta-r monospace">';
  831. script_output_33 += ' <span>Exec: <span class="lime bold"># '+tot_exec+'</span></span> ';
  832. script_output_33 += ' <span>Ads Closed: <span class="true bold" id="script_output_title_ads_closed_num">0</span></span>';
  833. script_output_33 += ' <span>Bonus: <span id="script_output_title_bonus_wait_hours" class="true bold">Wait</span></span>';
  834. script_output_33 += ' <span>Multiply: <span id="script_output_title_multiply_wait_hours" class="true bold">Wait</span></span>';
  835. script_output_33 += ' <span id="multiply_strategy">Multiply Game System: <span class="true bold">'+STRATEGY+'</span></span>';
  836. script_output_33 += ' <span>Roll Mode: <span id="script_output_title_msg_mode" class="true bold">Wait</span></span>';
  837. script_output_33 += ' <span id="script_output_title_msg_roll" class="orange bold mt1">Wait</span>';
  838. if (Boolean(SHOW_RESET_STATS)) {
  839. script_output_33 += ' <a id="script_output_reset_all_stats" class="mt1">Reset All Stats</a>';
  840. }
  841. script_output_33 += ' </div>';
  842. script_output_33 += '</div>'; // close right
  843. script_output_33 += '</div>'; // close cards wrapper
  844. script_output_33 += '<div class="bottom-card monospace horizontal-grid-wrapper-3 horizontal-grid-wrapper-2-1-1 ">';
  845.  
  846. script_output_33 += ' <div class="single-column br-grey">';
  847. script_output_33 += ' <span>Donations are welcome</span> <span>BTC addr: 3FwAazZDEuy3ER4NQVp4Yqo6kDxCFntwS8 </span>';
  848. script_output_33 += ' </div>';
  849.  
  850. script_output_33 += ' <div class="single-column br-grey ml1">';
  851. script_output_33 += ' <a href="https://bit.ly/2JsP12I" target="_blank">Config HowTo</a>';
  852. script_output_33 += ' <a href="https://greasyfork.org/en/scripts/404112-freebitco-in-auto-roll-no-captcha-status-console-advanced-human-behavior-all-bonuses/feedback" target="_blank"> Rate</a>';
  853. script_output_33 += ' </div>';
  854.  
  855. script_output_33 += ' <div class="single-column ta-r" >';
  856. script_output_33 += ' <span><span class="emoji">© </span>daniele-veneno</span><span>2018 2021</span>';
  857. script_output_33 += ' </div>';
  858.  
  859. script_output_33 += '</div>';
  860. script_output_33 += '</div>'; // close script_output
  861.  
  862.  
  863. // Write on page
  864. $('head').append(script_output_css);
  865. $('#reward_points_bonuses_main_div').prepend(script_output_33);
  866. }
  867.  
  868. function multiplyPanelInit(){
  869. let out="";
  870. // out += "<div class='script-output' style='width:80%; margin: 0 auto; margin-bottom: 1em'>"
  871. // out += " <div class='veneno-card' style='margin: 1em; border: none; background: #00000033;'>";
  872. // out += " <p>Test your multiply configuration on ";
  873. // out += " <a class='coral' target='_blank' href='https://www.bitso.me/hi-lo-calc.php'>Advanced Martingale Calculator</a>";
  874. // out += " </p>";
  875. // out += " <div>";
  876. // out += "<div>";
  877. if (SHOW_TEST_MULT_CONF) $('#double_your_btc').prepend(out);
  878. }
  879.  
  880. function rewards(after_refresh) {
  881. if (LOGGING > 4) console.log("%c[RPBonuses] [Debug] Function rewards begin", 'color:grey');
  882. var bonus_missing_time = {};
  883. var t = missingTime();
  884. var d = new Date();
  885. var min_missing_min = 5;
  886. var milli_between_bonuses = HOURS_BETWEEN_BUY_BONUS*60*60*1000;
  887.  
  888. reward_points = parseInt($('.user_reward_points').text().replace(',',""));
  889.  
  890. // Create a RP History
  891. if (after_refresh) {
  892. rp_hist_arr.push(reward_points);
  893. setCookie ("rp_hist_arr", JSON.stringify(rp_hist_arr), 31);
  894. // Debug for RP history check
  895. if (LOGGING > 4) console.log("%c[RPBonuses] [Debug] rp_hist: " +rp_hist_arr, 'color:grey');
  896. }
  897.  
  898. if ($("#bonus_container_free_points").length != 0) {
  899. // Some promo is already active
  900. bonus_missing_time.text = $('#bonus_span_free_points').text();
  901. bonus_missing_time.hour = parseInt(bonus_missing_time.text.split(":")[0]);
  902. bonus_missing_time.min = parseInt(bonus_missing_time.text.split(":")[1]);
  903.  
  904. if (LOGGING > 3) console.log("[RPBonuses] Promo RP is %c active %c for "+bonus_missing_time.hour+":"+bonus_missing_time.min, 'color: purple', css_reset);
  905.  
  906. setCookie("last_bonus", d.getTime(), 365);
  907. isBonusActive = true;
  908.  
  909. if(Boolean(PROMO_MODE)) $("#script_output_title_msg_mode").text("Promo");
  910. $('#script_output_title_bonus_wait_hours').text('Active '+bonus_missing_time.hour+'h '+bonus_missing_time.min+"m").addClass('bold');
  911. } else {
  912. // No promos active
  913. var last_bonus_diff = Math.floor(d.getTime() - last_bonus);
  914. //if (LOGGING > 4) console.log("%c[RPBonuses] [Debug] lastBonus diff: "+last_bonus_diff+" -- last_bonus: "+last_bonus+" -- now: "+d.getTime()+" var setted: "+milli_between_bonuses, 'color:grey');
  915.  
  916. //If disabled not buying
  917. if (! Boolean(BONUS_WOF)) {
  918. if (LOGGING > 3) console.log('[RPBonuses] Not buying WOF Bonuses. Not Active by config');
  919. $('#script_output_title_bonus_wait_hours').text('Disabled').removeClass('true').addClass('false');
  920. return false;
  921. } // or if missing time not satisfied
  922. if ( last_bonus_diff < milli_between_bonuses ) {
  923. var min_between_bonuses = Math.floor((milli_between_bonuses-last_bonus_diff)/1000/60);
  924. var hours_between_bonuses = Math.floor(min_between_bonuses/60);
  925. if (LOGGING > 3) console.log('[RPBonuses] Not buying RPBonuses. Wait HOURS_BETWEEN_BUY_BONUS before buy again, missing: '+hours_between_bonuses+'h '+min_between_bonuses%60+'m');
  926. $('#script_output_title_bonus_wait_hours').text('Wait '+hours_between_bonuses+"h "+min_between_bonuses%60+"m").removeClass('true').addClass('false');
  927. return false;
  928. } // or if missing time on roll error
  929. if (t[0] < 0){
  930. if (LOGGING > 3) console.log('[RPBonuses] Error getting missing time less then 0, that was'+t[0]+":"+t[1]);
  931. $('#script_output_title_bonus_wait_hours').text('E0001').removeClass('true').addClass('false');
  932. return false;
  933. } // or before missing 10-20 minutes
  934. if ( t[0] >= min_missing_min ) {
  935. if (LOGGING > 3) console.log('[RPBonuses] Not buying RPBonuses. Wait '+Math.floor(t[0]-min_missing_min)+' minutes to buy near roll');
  936. $('#script_output_title_bonus_wait_hours').text('Wait '+Math.floor(t[0]-min_missing_min)+' m');
  937. return false;
  938. }
  939.  
  940. // Buy WOF Bonus
  941. $('.rewards_link').not('.hide_menu').click();
  942. tot_rp_spent_rewards = parseInt(tot_rp_spent_rewards);
  943. if (LOGGING > 4) console.log("[RPBonuses] Tot rp spent in Bonuses before: "+tot_rp_spent_rewards);
  944. setTimeout(function() {
  945.  
  946. if (reward_points < 900) {
  947. if (LOGGING > 2) console.log("[RPBonuses] No enough points to buy bonus. Less then 12. Waiting for points in next rolls");
  948. } else if (reward_points < 1800) {
  949. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 1 WOF");
  950. RedeemRPProduct('free_wof_1');
  951. tot_rp_spent_rewards+=900;
  952. } else if (reward_points < 2700) {
  953. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 2 WOF");
  954. RedeemRPProduct('free_wof_2');
  955. tot_rp_spent_rewards+=1800;
  956. } else if (reward_points < 3600) {
  957. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 3 WOF");
  958. RedeemRPProduct('free_wof_3');
  959. tot_rp_spent_rewards+=2700;
  960. } else if (reward_points < 4500) {
  961. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 4 WOF");
  962. RedeemRPProduct('free_wof_4');
  963. tot_rp_spent_rewards+=3600;
  964. } else {
  965. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 5 WOF");
  966. RedeemRPProduct('free_wof_5');
  967. tot_rp_spent_rewards+=4500;
  968. }
  969.  
  970. if (reward_points >= 4800 && Boolean(BONUS1000) ) {
  971. if (LOGGING > 1) console.log("[RPBonuses] buying bonus 1000% roll - not convenient anymore");
  972. setTimeout(function(){ RedeemRPProduct('fp_bonus_1000')},random(5000,10000));
  973. tot_rp_spent_rewards+=3200;
  974. }
  975.  
  976. $("#script_output_title_msg_mode").text("Promo");
  977.  
  978. setTimeout(function(){
  979. setCookie("tot_rp_spent_rewards",tot_rp_spent_rewards,7);
  980. if (LOGGING > 4) console.log("[RPBonuses] Tot rp spent in Bonuses after: "+tot_rp_spent_rewards);
  981. $('.free_play_link').not('.hide_menu').click();
  982. }, random(10000,20000));
  983.  
  984. } ,random(2000,16000));
  985. }
  986. }
  987.  
  988. function Roll() {
  989. if (LOGGING > 4) console.log("%c[Roll] [Debug] Function Roll begin", 'color:grey');
  990. var d = new Date();
  991. var h = d.getHours();
  992. var t = missingTime();
  993.  
  994. if (!Boolean(ROLL)) {
  995. $("#script_output_title_msg_mode").text("Disabled").removeClass('true').addClass('false');
  996. return true;
  997. }
  998.  
  999. rollTryCount++;
  1000. if ($('#free_play_form_button').is(':visible') && ! $('#play_without_captchas_button').is(':visible')) {
  1001. r=random(1,100);
  1002. if ( isNight() && Boolean(NIGHT_MODE) ) {
  1003. if (r <= 30) rand=random(2400000,7200000);
  1004. else rand=random(1000000,3600000);
  1005. rolling_mode="Night";
  1006. } else {
  1007. if (r <= 10) rand=random(9000,7200000); // xx%, long wait, more than hour
  1008. else if (r <= 30) rand=random(6000,1800000); // long but not longest
  1009. else if (r <= 71) rand=random(3000,1200000); // xx% cases medium
  1010. else rand=random(500,60000); // xx% cases fast roll
  1011. rolling_mode="Day";
  1012. }
  1013.  
  1014. if (Boolean(SLOW_MODE)) {
  1015. if (r <= 5) rand=random(3000,100000);
  1016. else if (r <= 20) rand=random(300000,1500000);
  1017. else if (r <= 40) rand=random(60000,2000000);
  1018. else rand=random(120000,3000000);
  1019. rolling_mode="Slow";
  1020. }
  1021.  
  1022. if (Boolean(isBonusActive) && Boolean(PROMO_MODE) ) { //If promo is active, roll faster
  1023. if (r <= 5) rand=random(9000,3600000);
  1024. else if (r <= 20) rand=random(6000,1500000);
  1025. else if (r <= 40) rand=random(3000,1000000);
  1026. else rand=random(500,240000);
  1027. rolling_mode="Promo";
  1028. } else if ( isNight() && Boolean(GHOST_MODE)) {
  1029. // console.log("Ghost mode is active, don't free roll in the night");
  1030. $("#script_output_title_msg_mode").text('Ghost');
  1031. var waiting_milli;
  1032. if (stopNight > h) {
  1033. waiting_milli = (stopNight - h + 1)*60*60*1000;
  1034. } else {
  1035. waiting_milli = (stopNight + (24 - h + 1))*60*60*1000;
  1036. }
  1037. if (waiting_milli > 14400000) waiting_milli = random(14400000,16000000);
  1038. rand=random(waiting_milli, (waiting_milli + 3600000));
  1039. //Regresh every 4/6 hours max to update refers
  1040.  
  1041. if (LOGGING > 2) console.log("%c[Roll] Ghost Mode, Refresh page in rand "+rand/1000+" s", 'color: grey');
  1042. setTimeout(function(){
  1043. location.reload();
  1044. }, rand );
  1045.  
  1046. return true;
  1047. }
  1048.  
  1049. if (tot_btc_winning_rolling == 0) {
  1050. rand=random(1000,2000);
  1051. if (LOGGING > 2) console.log('>>>>> First Execution, fast ROLL');
  1052. }
  1053. $("#script_output_title_msg_mode").text(rolling_mode);
  1054. //rand = rand(1000,2000);
  1055.  
  1056.  
  1057. // Real ROLL Function
  1058. rollAndRetrieve(rand);
  1059.  
  1060.  
  1061. } else if ($('#play_without_captchas_button').is(':visible') ){
  1062. if (Boolean(PLAY_WITHOUT_CAPTCHA)) {
  1063. //Try to play without captcha, if enough RP
  1064. if (LOGGING > 2) console.log ("[Roll] Captcha Roll");
  1065. captchaRoll();
  1066. } else {
  1067. return false;
  1068. }
  1069. } else if (rollTryCount >= 10) {
  1070. // refresh page after 10 minutes trying the next case
  1071. location.reload();
  1072. } else if (t[0] <= 0) {
  1073. // Not in the home page window, try again in a bit
  1074. $('#script_output_title_msg_roll').html('<span class="bold">Waiting 1m</span>');
  1075. if (LOGGING > 2) console.log("[Roll] Retry in 1m");
  1076. setTimeout(function(){
  1077. Roll();
  1078. }, 60000 );
  1079. } else {
  1080. $('#script_output_title_msg_roll').html('<span class="bold">Waiting Next Roll</span>');
  1081. //$("#script_output_title_msg_mode").text("Wait");
  1082. if (LOGGING > 2) console.log("[Roll] No roll");
  1083. }
  1084. }
  1085.  
  1086. function captchaRoll() {
  1087. if (LOGGING > 4) console.log("%c[Roll] [Debug] Function captchaRoll begin", 'color:grey');
  1088. $('#play_without_captchas_button').click();
  1089. setTimeout(function(){
  1090. var cost_rp = $('.play_without_captcha_description span').text();
  1091. if (LOGGING > 2) console.log ("%c[Roll] Try to play without captcha for "+cost_rp+" RP points. You have "+reward_points+" RP.", 'color:purple;');
  1092. if (reward_points >= cost_rp ) {
  1093. // ROLL anyway paying
  1094. if (LOGGING > 2) console.log ("[Roll] Roll with Captcha");
  1095. $('#script_output_title_msg_roll').html('<span class="bold true">Captcha OK</span>');
  1096.  
  1097. r=random(1,100);
  1098. if (r <= 10) rand=random(9000,7200000); // xx%, long wait, more than hour
  1099. else if (r <= 30) rand=random(6000,1800000); // long but not longest
  1100. else if (r <= 71) rand=random(3000,1200000); // xx% cases medium
  1101. else rand=random(500,60000); // xx% cases fast roll
  1102. rolling_mode="Captcha";
  1103. $("#script_output_title_msg_mode").text(rolling_mode);
  1104.  
  1105. if (tot_btc_winning_rolling == 0) {
  1106. rand=random(1000,2000);
  1107. if (LOGGING > 2) console.log('>>>>> First Execution, fast ROLL');
  1108. }
  1109. rand = random(500,60000);
  1110. rollAndRetrieve(rand);
  1111. tot_rp_spent_captcha = Math.floor (parseInt(tot_rp_spent_captcha)+parseInt(cost_rp));
  1112. setCookie("tot_rp_spent_captcha", tot_rp_spent_captcha, 7);
  1113. } else {
  1114. if (LOGGING > 2) console.log ("%c[Roll] Not enough RP. No Roll", 'color: red');
  1115. $('#script_output_title_msg_roll').html('<span class="bold false">Miss RP</span>'); // Status on page
  1116. }
  1117. }, random(1000,3000));
  1118. }
  1119.  
  1120. function rollAndRetrieve (rand) {
  1121. if (LOGGING > 4) console.log("%c[Roll] [Debug] Function rollAndRetrieve begin", 'color:grey');
  1122. var d = new Date();
  1123. var h = d.getHours();
  1124. // Show hour when will roll in status panel
  1125. // new date to modify various time during function
  1126. var d1 = new Date();
  1127. d1.setSeconds(d.getSeconds() + rand/1000);
  1128. var [{ value: year },,{ value: month },,{ value: day },,{ value: hour },,{ value: minute }] = dateTimeFormat.formatToParts(d1);
  1129. $('#script_output_title_msg_roll').html('<span class="bold">Roll at <span class="false">'+hour+':'+minute+'</span></span>');
  1130. if (LOGGING > 2) console.log('%c[Roll] ---Will roll in '+rand/1000/60+' minutes','color:green');
  1131.  
  1132. setTimeout(function(){
  1133. //Duplicate the visibility chek to avoid error when humans roll and don't refresh.
  1134. if ( $('#free_play_form_button').is(':visible') ){
  1135. $('body').focus();
  1136.  
  1137. //Update Status on page
  1138. $('#script_output_title_msg_roll').html('<span class="true">++ Rolling NOW!</span>'); // Status on page
  1139. if (LOGGING > 2) console.log('%c+++ROLL!','color:purple; font-weight: bold');
  1140. // Execute the roll!!
  1141. setTimeout(function(){ $('#free_play_form_button').click(); }, 500);
  1142. setTimeout(function(){
  1143. // get some errors and log those :(
  1144. if ( $('#free_play_error').html().length > 0 ) {
  1145. if (LOGGING > 1) console.log("%c[Roll] Some error occurred in Roll: "+$('#free_play_error').html() );
  1146. return false;
  1147. } else {
  1148. var win_btc = $('#winnings').text();
  1149. var win_lottery = $('#fp_lottery_tickets_won').text();
  1150. var win_rp = $('#fp_reward_points_won').text();
  1151. executions++;
  1152. }
  1153.  
  1154. // close tedious popup now
  1155. closePopupInterval($('.close-reveal-modal'));
  1156.  
  1157. //Update Status on page
  1158. $('#script_output_title_msg_roll').html('<span class="true">++ Rolled</span>'); // Status on page
  1159. $('#script_output_title_executions_num').text(executions);
  1160. setCookie('executions', executions, 7);
  1161. if (LOGGING > 2) console.log('%c[Roll] Execution number: '+executions,'font-weight:bold; color:green');
  1162. if (LOGGING > 2) console.log('%c[Roll] Got '+win_btc+' btc, '+win_lottery+' tickets and '+win_rp+' RP!','font-weight:bold; color:green');
  1163. if (win_btc > 0) {
  1164. tot_btc_winning_rolling = parseFloat(parseFloat(tot_btc_winning_rolling) + parseFloat(win_btc)).toFixed(8);
  1165. setCookie('tot_btc_winning_rolling', tot_btc_winning_rolling, 7);
  1166. if (LOGGING > 2) console.log('%c[Roll] BTC Won totally with script %c'+tot_btc_winning_rolling,'color: gray', 'font-weight:bold');
  1167. } else {
  1168. if (LOGGING > 1) console.log('%c[Roll] Some error retrieving Roll Winnings. Winning btc was: '+win_btc, 'color: red');
  1169. }
  1170. if (win_lottery > 0) {
  1171. tot_lottery_winning_rolling = parseFloat(parseFloat(tot_lottery_winning_rolling) + parseFloat(win_lottery)).toFixed(0);
  1172. setCookie('tot_lottery_winning_rolling', tot_lottery_winning_rolling, 7);
  1173. if (LOGGING > 2) console.log('%c[Roll] Tickets Won with script %c'+tot_lottery_winning_rolling,'color: gray', 'font-weight:bold');
  1174. } else {
  1175. if (LOGGING > 1) console.log('%c[Roll] Some error retrieving Roll Winnings. Winning lottery was: '+win_btc, 'color: red');
  1176. }
  1177. if (win_rp > 0) {
  1178. tot_rp_winning_rolling = parseFloat(parseFloat(tot_rp_winning_rolling) + parseFloat(win_rp)).toFixed(0);
  1179. setCookie('tot_rp_winning_rolling', tot_rp_winning_rolling, 7);
  1180. if (LOGGING > 2) console.log('%c[Roll] RP Won with script %c'+tot_rp_winning_rolling,'color: gray', 'font-weight:bold');
  1181. } else {
  1182. if (LOGGING > 1) console.log('%c[Roll] Error retrieving Roll Winnings. Winning RP was: '+win_btc, 'color: red');
  1183. }
  1184. }, 6999);
  1185. } else {
  1186. if (LOGGING > 3) console.log('[Roll] Already Rolled maybe by some human..');
  1187. //Update Status on page
  1188. $('#script_output_title_msg_roll').html('<span class="false">Already Rolled</span>'); // Status on page
  1189. setTimeout(function(){ location.reload(); }, 30000);
  1190. }
  1191. },rand);
  1192.  
  1193. //Random Action After ROLL
  1194. var rand1=rand+random(1000,600000);
  1195. rand=random(0,100);
  1196.  
  1197. if (rand > ROLL_P) {
  1198. if (LOGGING > 2) console.log('[Roll] [Debug] Reload page after roll in '+rand1/1000/60+' minutes!');
  1199. setTimeout(function(){ location.reload(); }, rand1);
  1200. } else if (rand <= ROLL_P && Boolean(MULTIPLY) && Boolean(isMultiplyPlayable)) {
  1201. // Show hour when will multiply in status panel
  1202. d1.setSeconds(d.getSeconds() + rand1/1000);
  1203. [{ value: year },,{ value: month },,{ value: day },,{ value: hour },,{ value: minute }] = dateTimeFormat.formatToParts(d1);
  1204. if (LOGGING > 0) console.log('[Roll] ---Will multiply in '+rand1/1000/60+' minutes!');
  1205. $('#script_output_multiply_status').html('<span class="bold">Multiply at: <span class="false">'+hour+':'+minute+'</span></span>');
  1206. setTimeout(function(){ multiply(true, false); }, rand1);
  1207. } else {
  1208. if (LOGGING > 2) console.log('[Roll] No action after roll. Rand was '+rand);
  1209. }
  1210. }
  1211.  
  1212. function lottery () {
  1213. //Plan buying lottery ticket
  1214. if(Boolean(LOTTERY)){
  1215. if (LOGGING > 4) console.log("%c[Lottery] [Debug] Function lottery begin", 'color:gray');
  1216. var r = random(1,100);
  1217. var d = new Date();
  1218. var h = d.getHours();
  1219. var satbalance = parseInt($('#balance').text().split(".")[1]);
  1220. var randl = random(1,LOTTERY_MAX_TICKETS).toFixed(0); //Tickets to buy
  1221. if ( isNight() ) return true;
  1222. else if (satbalance <= randl) return true;
  1223. else if (r>= LOTTERY_P) return true;
  1224. if (LOGGING > 2) console.log("[Lottery] Buy %c"+ randl + " lottery tickets %cin some time....", 'color:yellow', 'color:reset');
  1225. setTimeout(function(){
  1226. $('#lottery_tickets_purchase_count').val(randl);
  1227. setTimeout(function(){
  1228. $('#purchase_lottery_tickets_button').click();
  1229. if (LOGGING > 2) console.log("%c[Lottery] Bought "+ randl + " lottery tickets", 'color:yellow');
  1230. tot_lottery_tickets = Math.floor(parseInt(tot_lottery_tickets) + parseInt(randl));
  1231. setCookie('tot_lottery_tickets',tot_lottery_tickets,7);
  1232. }, random(2000,4000));
  1233. }, random(40000,120000));
  1234. }
  1235. }
  1236.  
  1237. // Multiply, called after the free roll, sometimes.
  1238. // ******** MULTIPLY GAME LOGIC START *********
  1239. // Pre start and selector
  1240. function multiply(after_roll, forced) {
  1241. if (LOGGING > 4) console.log("%c[Multiply] [Debug] Function multiply begin", 'color:grey');
  1242. var d = new Date();
  1243. var h = d.getHours();
  1244. var t = missingTime();
  1245. var max_missing_min = 0;
  1246. var milli_between_multiplies = Math.floor(MULTIPLY_WAIT_HOURS*60*60*1000);
  1247. var balance = parseFloat($('#balance').text()).toFixed(8);
  1248. var bonus_mul = false;
  1249. var last_multiply_diff = Math.floor(d.getTime() - last_multiply);
  1250.  
  1251. if (LOGGING > 4) console.log("%c[Multiply] [Debug] lastMultiply diff: "+last_multiply_diff+" -- last_multiply: "+last_multiply+" -- now: "+d.getTime(), 'color:grey');
  1252.  
  1253. if ($("#bonus_account_table").length != 0) {
  1254. var bonus_mul_balance = $('#bonus_account_balance').text().split(" ")[0];
  1255. var bonus_mul_wager_remaining = $('#bonus_account_wager').text().split(" ")[0];
  1256. if (LOGGING > 2) console.log('%c[Multiply] bonus balance: '+bonus_mul_balance+', wager remaining: '+bonus_mul_wager_remaining, 'color:grey');
  1257. bonus_mul = true;
  1258. } else bonus_mul = false;
  1259. if (!Boolean(MULTIPLY) && !Boolean(forced)) {
  1260. if (LOGGING > 3) console.log('[Multiply] Not playing multiply. Disabled by config');
  1261. $('#script_output_title_multiply_wait_hours').text('Disabled').removeClass('true').addClass('false');
  1262. $('#multiply_strategy').hide();
  1263. return false;
  1264. }
  1265. if ( !Boolean(MULTIPLY_AT_NIGHT) && isNight() && !Boolean(forced)) {
  1266. if (LOGGING > 3) console.log('%c[Multiply] Not playing multiply in the night','color:gray');
  1267. $('#script_output_title_multiply_wait_hours').text('Wait Morning');
  1268. return false;
  1269. }
  1270. if ( balance < MAX_BET && bonus_mul_balance < MAX_BET && !Boolean(forced)) {
  1271. if (LOGGING > 3) console.log('[Multiply] Not enough balance for MAX_BET');
  1272. $('#script_output_title_multiply_wait_hours').text('Adjust MaxBet');
  1273. return false;
  1274. }
  1275. if ( last_multiply_diff < milli_between_multiplies && !Boolean(forced)) {
  1276. var min_between_mult=Math.floor((milli_between_multiplies - last_multiply_diff)/1000/60);
  1277. var hours_between_mult=Math.floor(min_between_mult/60);
  1278. if (LOGGING > 3) console.log('[Multiply] Not playing multiply. Wait MULTIPLY_WAIT_HOURS before play again, missing '+hours_between_mult+"h "+min_between_mult%60+"m");
  1279. $('#script_output_title_multiply_wait_hours').text('Wait '+hours_between_mult+"h "+min_between_mult%60+"m");
  1280. //$('#ref_multiply_missing_hours').text(Math.ceil((milli_between_multiplies - last_multiply_diff)/1000/60/60));
  1281. $('#script_output_title_multiply_wait_hours').removeClass('true').addClass('false');
  1282. return false;
  1283. }
  1284. if ( t[0] > 0 && t[0] <= max_missing_min && !Boolean(forced)) {
  1285. if (LOGGING > 3) console.log('[Multiply] Not playing multiply. Wait to play not near next roll, missing just %c'+t[0]+' min', 'color:purple');
  1286. $('#script_output_title_multiply_wait_hours').text('Wait '+t[0]+'m');
  1287. return false;
  1288. }
  1289. if (Boolean(isMultiplyRunning)) {
  1290. if (LOGGING > 3) console.log('[Multiply] Not playing multiply. Some other istance already playing');
  1291. return false;
  1292. }
  1293. if (Boolean(after_roll)) {
  1294. if (!Boolean(forced)) $('.double_your_btc_link').not('.hide_menu').click();
  1295.  
  1296. tot_multiply_games = parseInt(tot_multiply_games)+1;
  1297. setCookie("tot_multiply_games", tot_multiply_games, 30);
  1298. setCookie("last_multiply", d.getTime(), 30);
  1299. $('#script_output_multiply_status').html('<span class="bold">Multiply: <span class="true">Running!</span></span>');
  1300. if (LOGGING > 4) console.log(Boolean(after_roll)+", "+balance+", "+bonus_mul_balance+", "+MAX_BET+", "+Boolean(MULTIPLY));
  1301.  
  1302. multiply_manual();
  1303. } else {
  1304. isMultiplyPlayable = true;
  1305. if (LOGGING > 3) console.log('[Multiply] Yes can play multiply '+isMultiplyPlayable);
  1306. }
  1307. }
  1308.  
  1309. function multiply_manual() {
  1310. var bet_count=0; var bet_remaining=0;
  1311. var past_bet; var bet_amount; var bet_odds; var bet_hilo;
  1312. var winnings=0;
  1313. var won=0; // won lost or error -1, 1 or 0
  1314. var consecutive_lost=0; var consecutive_win=0;
  1315.  
  1316. var fast_bet=false; var log_msg = ""; var c;
  1317. var multiply_message="";
  1318. var curr_multiply_balance=0; var curr_multiply_wagered = 0;
  1319.  
  1320. var max_consecutive_losts_session=0; var max_consecutive_wins_session=0;
  1321. var max_consecutive_losts_inplay_session=0; var max_bet_session=0;
  1322. var last_session_hist=[];
  1323.  
  1324. var balance = parseFloat($('#balance').text()).toFixed(8);
  1325.  
  1326. // Global vars setting to avoid duplicate games and increments.
  1327. // as error reported bug on play
  1328. game2_consecutive_lost_passed=false; game2_finished_loosing=false;
  1329. game2_play_after_losses=0; game2_step=0;
  1330. forceMultiplyStopHard=false; forceMultiplyStopSoft=false;
  1331. game_play_began=false; game_play_count=0;
  1332. // Multilpy Running
  1333. isMultiplyRunning = true;
  1334. if ( $('#multiply_full_container').length) {
  1335. multiply_message = "<span class='lime'><b>Running!</b></span>";
  1336. $('#multiply_message').html(multiply_message);
  1337. }
  1338. // Activate DOM Monitors
  1339.  
  1340. /// *** NEW VERSION ***
  1341. if (LOGGING > 4) console.log("[Multiply] Activating MutationObserver Monitors, beginning to play");
  1342. const targetNode = document.getElementById('double_your_btc_result');
  1343. const config = { attributes: true, childList: true, subtree: true };
  1344. const callback = function(mutationsList, observer) {
  1345. //if (LOGGING > 4) console.log("%cDom modified.", "color: grey");
  1346. if ( $('#double_your_btc_error').html().length > 0 ) {
  1347. var multiply_error = $('#double_your_btc_error').html();
  1348. console.log('%c[Multiply] Fatal Error in multiply: '+multiply_error, 'color: red');
  1349. //$('#script_output_title_multiply_wait_hours').text('Fatal Error').removeClass(true).addClass('false');
  1350. setCookie('multiply_error', multiply_error, 31);
  1351. multiply_message = "Finish for some error";
  1352. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1353. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1354. return true;
  1355. } else if ( $("#double_your_btc_bet_win").html().length > 0 ) {
  1356. won = 1; c="green"; fast_bet = true;
  1357. winnings = $("#double_your_btc_bet_win").html().split(" ")[6];
  1358. if (winnings > 0) {
  1359. tot_multiply_balance = parseFloat(parseFloat(tot_multiply_balance) + parseFloat(winnings)).toFixed(8);
  1360. curr_multiply_balance = parseFloat(parseFloat(curr_multiply_balance) + parseFloat(winnings)).toFixed(8);
  1361. }
  1362. consecutive_win++;
  1363. consecutive_lost=0;
  1364. if ( $('#multiply_full_container').length) {
  1365. $('#multiply_cons_wins > b').html(consecutive_win).addClass("green-bg");
  1366. setTimeout(function () { $("#multiply_cons_wins > b").removeClass("green-bg"); },500);
  1367. }
  1368. } else if ($("#double_your_btc_bet_lose").html().length > 0 ) {
  1369. won = -1; c = "red";
  1370. winnings = $("#double_your_btc_bet_lose").html().split(" ")[6];
  1371. if (winnings > 0) {
  1372. tot_multiply_balance = parseFloat(parseFloat(tot_multiply_balance) - parseFloat(winnings)).toFixed(8);
  1373. curr_multiply_balance = parseFloat(parseFloat(curr_multiply_balance) - parseFloat(winnings)).toFixed(8);
  1374. }
  1375. consecutive_lost++;
  1376. consecutive_win=0;
  1377. if ( $('#multiply_full_container').length) {
  1378. $('#multiply_cons_losts > b').html(consecutive_lost).addClass("red-bg");
  1379. setTimeout(function () { $("#multiply_cons_losts > b").removeClass("red-bg"); },500);
  1380. }
  1381. } else won = 0;
  1382.  
  1383. if (won != 0) {
  1384. // COOKIES for STATISTICS
  1385. setCookie("tot_multiply_balance", tot_multiply_balance, 7);
  1386. setCookie('curr_multiply_balance',curr_multiply_balance,7);
  1387. var rolled = $('#previous_roll').text();
  1388.  
  1389. last_session_hist.push(Math.round(curr_multiply_balance*100000000));
  1390. setCookie('last_multiply_session_hist',JSON.stringify(last_session_hist),7)
  1391.  
  1392. // Session Cookie
  1393. if (consecutive_lost >= max_consecutive_losts_session) {
  1394. max_consecutive_losts_session=consecutive_lost;
  1395. setCookie('max_consecutive_losts_session', max_consecutive_losts_session, 7);
  1396. }
  1397. if (consecutive_lost >= max_consecutive_losts_inplay_session && bet_amount > MIN_BET) {
  1398. max_consecutive_losts_inplay_session=consecutive_lost;
  1399. setCookie('max_consecutive_losts_inplay_session',max_consecutive_losts_inplay_session,7);
  1400. }
  1401. if (bet_amount >= max_bet_session) {
  1402. max_bet_session=parseFloat(bet_amount).toFixed(8);
  1403. setCookie('max_bet_session',max_bet_session,7);
  1404. }
  1405.  
  1406. // General Cookies
  1407. if (consecutive_lost > max_consecutive_losts_inplay && bet_amount > MIN_BET) {
  1408. max_consecutive_losts_inplay = consecutive_lost;
  1409. setCookie('max_consecutive_losts_inplay',max_consecutive_losts_inplay,7);
  1410. }
  1411. if (consecutive_lost > max_consecutive_losts) {
  1412. max_consecutive_losts=consecutive_lost;
  1413. setCookie('max_consecutive_losts', consecutive_lost, 365);
  1414. }
  1415.  
  1416. if ( rolled != '7777' ){
  1417. jackpot_distance++;
  1418. setCookie('jackpot_distance', jackpot_distance, 31);
  1419. }
  1420.  
  1421. if ( $('#multiply_full_container').length) {
  1422. // Update the values
  1423. $('#multiply_bet_count > b').html(bet_count).addClass("green-bg");
  1424. setTimeout(function () { $("#multiply_bet_count > b").removeClass("green-bg"); },200);
  1425. $('#multiply_play_count > b').html(game_play_count);
  1426. $('#multiply_max_cons_losts > b').html(max_consecutive_losts_session);
  1427. $('#multiply_max_bet > b').html(max_bet_session);
  1428. $('#balance_before > b').html(balance);
  1429. $('#balance_now > b').html(parseFloat($('#balance').text()).toFixed(8));
  1430. $('#multiply_wagered > b').html(curr_multiply_wagered);
  1431. $('#multiply_profit > b').html(curr_multiply_balance);
  1432. }
  1433.  
  1434. // Next bet values getting It return a FLOAT number. Will be converted in bet function.
  1435. bet_amount = get_bet_amount( past_bet, consecutive_lost, consecutive_win);
  1436. bet_hilo = get_bet_hilo(consecutive_lost);
  1437. bet_odds = get_bet_odds();
  1438.  
  1439. if (LOGGING > 2) {
  1440. log_msg = "Rolled:"+rolled+",%c Won:"+parseFloat(winnings).toFixed(8)+"%c, Played#:"+bet_count;
  1441. log_msg += "/"+MAX_ROLLS_AT_MULTIPLY+"/"+game_play_count+", L/W: "+consecutive_lost+"/"+consecutive_win;
  1442. log_msg += ", CurrBal:"+curr_multiply_balance+", TotBal:"+tot_multiply_balance;
  1443. log_msg += " <Next bet: "+parseFloat(bet_amount).toFixed(8)+"("+game2_step+") on "+bet_hilo+", Fast: "+fast_bet+">";
  1444. console.log(log_msg, css_bold+"color:"+c, css_reset);
  1445. }
  1446.  
  1447. // EXIT CONDITIONS -- Play or finished logic
  1448. if (Boolean(forceMultiplyStopHard)) {
  1449. multiply_message = "Finish for <b>Stop Button</b> pressed";
  1450. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1451. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1452. return true;
  1453. } else if ( bet_count >= MAX_ROLLS_AT_MULTIPLY || Boolean(forceMultiplyStopSoft)) {
  1454. if (LOGGING > 2) console.log("%cSoft finish, wait ending this play", css_bold+"color:"+c+", "+css_reset);
  1455. if ( !Boolean(game_play_began) ) {
  1456. multiply_message = "Finish for <b>Stop Soft</b> or <b>Max Roll</b> passed";
  1457. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1458. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1459. return true;
  1460. }
  1461. } else if (game_play_count >= MAX_PLAY && !Boolean(game_play_began)) {
  1462. multiply_message = "Finish for <b>Game Play</b> count passed";
  1463. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1464. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1465. return true;
  1466. } else if (bet_amount > MAX_BET) {
  1467. multiply_message = "Finish for <b>bet amount</b> passed max bet";
  1468. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1469. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1470. return true;
  1471. } else if (curr_multiply_balance >= MAX_WIN) {
  1472. multiply_message = "Finish for <b>MAX_WIN</b> passed";
  1473. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1474. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1475. return true;
  1476. } else if (bet_amount < 0.00000001) {
  1477. multiply_message = "Finish for error in bet amount value";
  1478. if (LOGGING > 2) console.log("%c"+multiply_message, css_bold+"color:"+c);
  1479. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1480. return false;
  1481. }
  1482.  
  1483. curr_multiply_wagered = parseFloat(parseFloat(curr_multiply_wagered) + parseFloat(bet_amount)).toFixed(8);
  1484. tot_multiply_wagered = parseFloat(parseFloat(tot_multiply_wagered) + parseFloat(bet_amount)).toFixed(8);
  1485. setCookie('tot_multiply_wagered',tot_multiply_wagered, 365);
  1486. setCookie('curr_multiply_wagered',curr_multiply_wagered, 30);
  1487.  
  1488. if (past_bet != bet_amount) fast_bet=false;
  1489. else fast_bet=true;
  1490.  
  1491. bet_count++;
  1492. past_bet=bet_amount;
  1493.  
  1494. //Security wait of 30 seconds if speed fast (3) and every 500 collected
  1495.  
  1496. // call the bet
  1497. bet(bet_amount, bet_hilo, bet_odds, fast_bet);
  1498. } else {
  1499. var winlength=$("#double_your_btc_bet_win").html().length;
  1500. var loslength=$("#double_your_btc_bet_lose").html().length;
  1501. var domtree=$('#double_your_btc_result').html();
  1502. multiply_message = "Finish for no value in DOM var";
  1503. if (LOGGING > 1) console.log("%cFinish for no value in won var, was: "+won+", win l: "+winlength+", los l: "+loslength, css_bold+"color:"+c);
  1504. if (LOGGING > 3) console.log("%cFinish for no value in won var, DOM was: "+domtree, css_bold+"color: grey");
  1505. multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message);
  1506. }
  1507. };
  1508. // Begin the observer
  1509. const observer = new MutationObserver(callback);
  1510. observer.observe(targetNode, config);
  1511.  
  1512. // Disable Animation
  1513. $("#disable_animation_checkbox").prop( "checked", true );
  1514. // First bet that cause all the others and Dom modifications
  1515. setTimeout(function(){
  1516. bet_hilo = get_bet_hilo(0);
  1517. bet_amount = get_bet_amount(MIN_BET,0,0);
  1518. bet_odds = get_bet_odds();
  1519. bet_count++; past_bet=bet_amount;
  1520. bet(bet_amount, bet_hilo, bet_odds, false);
  1521. }, random (3500,6500) );
  1522. }
  1523.  
  1524. function get_bet_amount(past_bet, consecutive_lost, consecutive_win){
  1525. if (STRATEGY == 0) {
  1526. if (consecutive_lost == 0) {
  1527. game_play_began=false;
  1528. return BAS_BET;
  1529. }
  1530. else {
  1531. if (consecutive_lost == 1) {
  1532. game_play_began = true;
  1533. game_play_count++;
  1534. tot_multiply_play++;
  1535. setCookie('tot_multiply_play', tot_multiply_play, 7);
  1536. }
  1537. return past_bet*2;
  1538. }
  1539. } else if (STRATEGY == 1 || WAIT_PLAY_AFTER_LOSSES == 0){
  1540. if (consecutive_lost < MIN_LOSSES_BEFORE_PLAY) {
  1541. if (Boolean(game_play_began)) {
  1542. game_play_began=false;
  1543. }
  1544. return MIN_BET;
  1545. } else if (consecutive_lost == MIN_LOSSES_BEFORE_PLAY){
  1546. game_play_began=true;
  1547. tot_multiply_play++;
  1548. game_play_count++;
  1549. setCookie('tot_multiply_play', tot_multiply_play, 7);
  1550. return BAS_BET;
  1551. } else {
  1552. return past_bet+(past_bet*INCR/100);
  1553. }
  1554. } else if (STRATEGY == 2 || STRATEGY == 3) {
  1555. if (!Boolean(game2_consecutive_lost_passed)) {
  1556. if (Boolean(game_play_began)) game_play_began=false;
  1557. if (consecutive_lost < MIN_LOSSES_BEFORE_PLAY) {
  1558. game2_step=1;
  1559. return MIN_BET;
  1560. } else if (consecutive_lost == MIN_LOSSES_BEFORE_PLAY){
  1561. // passed tot lost, next step -> else
  1562. game2_step=2;
  1563. game2_consecutive_lost_passed = true;
  1564. return MIN_BET;
  1565. } else return "-009";
  1566. } else {
  1567. if (!Boolean(game2_finished_loosing)) {
  1568. if (consecutive_win == 0 ) {
  1569. game2_step=3;
  1570. return MIN_BET;
  1571. } else {
  1572. //finished loosing, first win, next step -> else
  1573. game2_step=4;
  1574. game2_finished_loosing=true;
  1575. game2_play_after_losses++;
  1576. return get_bet_amount(MIN_BET,consecutive_lost,consecutive_win);
  1577. }
  1578. } else {
  1579. if (!Boolean(game_play_began)){
  1580. if (game2_play_after_losses < WAIT_PLAY_AFTER_LOSSES) {
  1581. game2_step=5;
  1582. game2_play_after_losses++;
  1583. return MIN_BET;
  1584. } else if (game2_play_after_losses >= WAIT_PLAY_AFTER_LOSSES){
  1585. // Begin to play, next step -> else
  1586. game2_step=6;
  1587. game_play_began=true;
  1588. tot_multiply_play++;
  1589. game_play_count++;
  1590. setCookie('tot_multiply_play', tot_multiply_play, 7);
  1591. return BAS_BET;
  1592. } else return "-008";
  1593. } else {
  1594. if (consecutive_lost > 0) {
  1595. game2_step=7;
  1596. return past_bet+(past_bet*INCR/100);
  1597. } else {
  1598. // Playing and won, go back to the begin
  1599. game_play_began=false;
  1600. game2_step=0;
  1601. game2_consecutive_lost_passed=false;
  1602. game2_finished_loosing=false;
  1603. game2_play_after_losses=0;
  1604. if (STRATEGY == 3) {
  1605. MIN_LOSSES_BEFORE_PLAY++;
  1606. if (LOGGING > 2) console.log("New MIN_LOSSES_BEFORE_PLAY value is: "+MIN_LOSSES_BEFORE_PLAY);
  1607. }
  1608. return MIN_BET;
  1609. }
  1610. }
  1611. }
  1612. }
  1613. } else return "-010";
  1614. }
  1615.  
  1616. function get_bet_odds () {
  1617. if (STRATEGY == 0) { return 2; }
  1618. else return ODDS;
  1619. }
  1620.  
  1621. function get_bet_hilo (index) {
  1622. if (HIGH_LOW == 3 ) {
  1623. var olaer = ['H','L','L','H','H','H','L','L','L','L','H','H','H','H','H','L','L','L','L','L','L','H','H','H','H','H','H','H','L','L','L','L','L','L','L','L'];
  1624. var key = index % olaer.length;
  1625. return olaer[key];
  1626. } else if (HIGH_LOW == 1) {
  1627. return "H";
  1628. } else if (HIGH_LOW == 2) {
  1629. return "L";
  1630. } else {
  1631. var r = random(1,10);
  1632. if (r<5) return 'H';
  1633. else return 'L';
  1634. }
  1635. }
  1636.  
  1637. function bet(amount, hl, odds, fast) {
  1638. var toclick; var wait_time_1=0; var wait_time_2=0;
  1639. if (hl == "L") toclick = "#double_your_btc_bet_lo_button";
  1640. else toclick = "#double_your_btc_bet_hi_button";
  1641. //if (LOGGING > 4) console.log(">> playing: "+hl+", betting: "+amount.toFixed(8) );
  1642. tot_multiply_bets++;
  1643. setCookie('tot_multiply_bets', tot_multiply_bets, 7);
  1644.  
  1645. if (SPEED == 0) {
  1646. wait_time_1 = random(2000,10000); wait_time_2=random(1000,5000);
  1647. } else if (SPEED == 1) {
  1648. if (Boolean(fast)) { wait_time_1 = random(300,900); wait_time_2=random(100,200); }
  1649. else { wait_time_1 = random(1133,5544); wait_time_2=random(100,1000); }
  1650. } else if (SPEED == 2) {
  1651. wait_time_1 = random(300,1000); wait_time_2=random(100,200);
  1652. } else {
  1653. wait_time_1 = random(10,20); wait_time_2=0;
  1654. }
  1655.  
  1656. setTimeout (function(){
  1657. $("#double_your_btc_stake").val(parseFloat(amount).toFixed(8));
  1658. $("#double_your_btc_payout_multiplier").val(odds);
  1659. setTimeout(function(){ $(toclick).click(); }, wait_time_1 );
  1660. }, wait_time_2 );
  1661. }
  1662. function multiplyEndGame(bet_amount, bet_count, consecutive_lost, curr_multiply_balance, observer, multiply_message) {
  1663. // Finished playing multiply
  1664. // Deactivate DOM Monitors
  1665. observer.disconnect();
  1666. if ( $('#multiply_full_container').length) {
  1667. $('#multiply_message').html(multiply_message);
  1668. }
  1669.  
  1670. multiply_hist_arr.push(tot_multiply_balance);
  1671. setCookie('multiply_hist_arr',JSON.stringify(multiply_hist_arr),14);
  1672. console.log("%cMultiply hist array: "+multiply_hist_arr, 'color:grey');
  1673. if (LOGGING > 2) {
  1674. if (bet_amount > MAX_BET) {
  1675. console.log("%c Max Bet limit passed. Max Bet: "+MAX_BET+", Next Bet: "+bet_amount, 'color: red');
  1676. } else if (bet_count >= MAX_ROLLS_AT_MULTIPLY ) {
  1677. console.log("%c Max Rolls limit passed. Max Rolls: "+MAX_ROLLS_AT_MULTIPLY+", Tot Rolls: "+bet_count+" with "+consecutive_lost+" cons losts", 'color: red');
  1678. } else if (game_play_count >= MAX_PLAY) {
  1679. console.log("%c Max Plays limit passed. Max Plays: "+MAX_PLAY+", Tot Plays: "+game_play_count, 'color: red');
  1680. }
  1681. }
  1682. if (LOGGING > 4) console.log("%c Disabling Monitors, finished multiply", css_bold+'color:green');
  1683. if (LOGGING > 4) console.log("%c Tot Balance: "+tot_multiply_balance+", Tot games: "+tot_multiply_games+", Tot bets: "+tot_multiply_bets, css_bold+'color: green');
  1684. if (LOGGING > 4) console.log("%c Session Balance: "+curr_multiply_balance+", Session tot bets: "+bet_count, css_bold+'color:green');
  1685. $('#script_output_multiply_status').html('<span class="bold">Multiply: <span class="true">Done!</span></span>');
  1686. isMultiplyRunning=false;
  1687. setTimeout(function(){
  1688. isMultiplyRunning = false;
  1689. $('.free_play_link').not('.hide_menu').click();
  1690. }, random(3000,30000));
  1691. }
  1692.  
  1693. function missingTime () {
  1694. var min = 0; var sec = 0; var str = "";
  1695. str = $('title').text().split(" ")[0];
  1696. //if (LOGGING > 4) console.log("%c[missingTime] [Debug] string: "+str, 'color: grey');
  1697. if (str.length <= 7 && str.length >= 3) {
  1698. min = str.split(':')[0]; if (min.length > 0) min = min.replace('m','');
  1699. sec = str.split(':')[1]; if (sec.length > 0) sec = sec.replace('s','');
  1700. } else if ( $('#free_play_form_button').is(':visible') ) {
  1701. min = 0; sec = 0;
  1702. } else { min = -1; sec = -1; }
  1703. return [min,sec];
  1704. }
  1705.  
  1706. function isNight(){
  1707. var d = new Date();
  1708. var h = d.getHours();
  1709. if ( stopNight > startNight && h >= startNight && h <= stopNight) {
  1710. // console.log(h+" -- "+stopNight)
  1711. return true;
  1712. } else if (stopNight < startNight && h >= startNight || h <= stopNight ) {
  1713. return true;
  1714. }
  1715. else return false;
  1716. }
  1717.  
  1718. function random(min,max){
  1719. return min + (max - min) * Math.random();
  1720. }
  1721.  
  1722. function closePopupInterval (target) {
  1723. //if (LOGGING > 4) console.log("%c[Debug] Function closePopupInterval begin", 'color:grey');
  1724. if (target.is(':visible')) {
  1725. setTimeout(function(){
  1726. if (LOGGING > 3) console.log("%cClose ADS", 'color: grey');
  1727. target.click();
  1728. ads_closed ++;
  1729. $('#script_output_title_ads_closed_num').text(ads_closed);
  1730. }, random (500,120000));
  1731. } else {
  1732. //if (LOGGING > 4) console.log("%cNot visible: "+target.attr('id')+" "+target.attr('class'), 'color: grey');
  1733. }
  1734. }
  1735. function closeRandomPopupInterval (target, randomness) {
  1736. //if (LOGGING > 4) console.log("%c[Debug] Function closeRandomPopupInterval begin", 'color:grey');
  1737. var rand = random(1,100);
  1738. if (rand < randomness && target.is(':visible')) {
  1739. setTimeout(function(){
  1740. if (LOGGING > 3) console.log("%cClose Random ADS", 'color: grey');
  1741. target.click();
  1742. ads_closed ++;
  1743. $('#script_output_title_ads_closed_num').text(ads_closed);
  1744. }, random (500,120000));
  1745. } else {
  1746. //if (LOGGING > 4) console.log("%cNot visible: "+target.attr('id')+" "+target.attr('class'), 'color: grey');
  1747. }
  1748. }
  1749.  
  1750.  
  1751. function getCookie(cname) {
  1752. var name = cname + "=";
  1753. var decodedCookie = decodeURIComponent(document.cookie);
  1754. var ca = decodedCookie.split(';');
  1755. for(var i = 0; i <ca.length; i++) {
  1756. var c = ca[i];
  1757. while (c.charAt(0) == ' ') {
  1758. c = c.substring(1);
  1759. }
  1760. if (c.indexOf(name) == 0) {
  1761. return c.substring(name.length, c.length);
  1762. }
  1763. }
  1764. return "";
  1765. }
  1766.  
  1767. function setCookie(cname, cvalue, exdays) {
  1768. var d = new Date();
  1769. d.setTime(d.getTime() + (exdays*24*60*60*1000));
  1770. var expires = "expires="+ d.toUTCString();
  1771. document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
  1772. }
  1773.  
  1774. function reset_all_stats(){
  1775. if (LOGGING > 2) console.log("%c Resettnig all stats deleting all cookies", 'color:red');
  1776. setCookie("last_bonus",0,365); setCookie("last_multiply",0,30); setCookie("rp_hist_arr","[]",31); setCookie("tot_multiply_balance",0,7); setCookie("tot_multiply_games",0,30);
  1777. setCookie("tot_rp_spent_captcha",0,7); setCookie("tot_rp_spent_rewards",0,7); setCookie('curr_multiply_balance',0,7); setCookie('curr_multiply_wagered',0,30);
  1778. setCookie('executions',0,7); setCookie('last_multiply_session_hist',0,7); setCookie('max_bet_session',0,7); setCookie('max_consecutive_losts',0,365);
  1779. setCookie('max_consecutive_losts_inplay',0,7); setCookie('max_consecutive_losts_inplay_session',0,7); setCookie('max_consecutive_losts_session',0,7);
  1780. setCookie('multiply_error',0,31); setCookie('multiply_hist_arr',"[]",14); setCookie('tot_btc_winning_rolling',0,7); setCookie('tot_lottery_tickets',0,7);
  1781. setCookie('tot_lottery_winning_rolling',0,7); setCookie('tot_multiply_balance',0,7); setCookie('tot_multiply_bets',0,7); setCookie('tot_multiply_play',0,7);
  1782. setCookie('tot_multiply_wagered',0,365); setCookie('tot_rp_winning_rolling',0,7);
  1783. location.reload();
  1784. }
  1785.  
  1786. function showStatus(){
  1787. if (LOGGING > 4) console.log("%c[Debug] Function showStatus begin", 'color:grey');
  1788. var t=missingTime();
  1789. var date = new Date();
  1790. var script_output_msg_1 = "";
  1791. var script_output_msg_2 = "";
  1792. var [{ value: month },,{ value: day },,{ value: year },,{ value: hour },,{ value: minute }] = dateTimeFormat.formatToParts(date);
  1793.  
  1794. var ca='red'; var cb='red'; var cc='red'; var css='font-weight: bold; color:';
  1795. var c1='purple'; var c2='olive';
  1796. var c3='brown'; var c4='teal';
  1797. if (LOGGING > 0) console.log(">>>>>>>>>>%c Status:%c ["+hour+":"+minute+"]", css_bold+'color:'+c1, css_bold);
  1798. //Rewards and multiply infos and colors
  1799. if (Boolean(BONUS_WOF)) ca = 'green'; if (Boolean(MULTIPLY)) cb='green'; if (Boolean(LOTTERY)) cc='green';
  1800. var cssa='font-weight: bold; color:'+ca;
  1801. var cssb='font-weight: bold; color:'+cb;
  1802. var cssc='font-weight: bold; color:'+cc;
  1803. if (LOGGING > 0) console.log(">>>>>>>>>> Buying Rewards: "+"%c"+Boolean(BONUS_WOF)+""+"%c; Playing Multiply: "+"%c"+Boolean(MULTIPLY)+""+"%c; Buying Lottery: "+"%c"+Boolean(LOTTERY), cssa, css_reset,cssb, css_reset, cssc);
  1804. if (t[0] > 0 || t[1] > 0) {
  1805. if (LOGGING > 0) console.log(">>>>>>>>>> Missing "+"%c"+t[0]+" min "+t[1]+" sec"+"%c for next roll",css_bold+"color:"+c1,css_reset);
  1806. }
  1807.  
  1808. if (LOGGING > 0) console.log(">>>>>>>>>> BTC won with script: "+"%c"+tot_btc_winning_rolling, css_bold+'color:'+c4);
  1809. if (LOGGING > 0) console.log(">>>>>>>>>> Tickets won with script: "+"%c"+tot_lottery_winning_rolling, css_bold+'color:'+c4);
  1810. if (LOGGING > 0) console.log(">>>>>>>>>> RP won with script: "+"%c"+tot_rp_winning_rolling, css_bold+'color:'+c4);
  1811. if (LOGGING > 0) console.log(">>>>>>>>>> RP Spent with rewards: "+"%c"+tot_rp_spent_rewards, css_bold+'color:'+c1);
  1812. if (LOGGING > 0) console.log(">>>>>>>>>> RP Spent with captcha: "+"%c"+tot_rp_spent_captcha, css_bold+'color:'+c1);
  1813. if (LOGGING > 0) console.log(">>>>>>>>>> Multiply Balance: "+"%c"+tot_multiply_balance, css_bold+'color:'+c3);
  1814. if (LOGGING > 0) console.log(">>>>>>>>>> Multiply Games played: "+"%c"+tot_multiply_games, css_bold+'color:'+c3);
  1815. if (LOGGING > 0) console.log(">>>>>>>>>> Multiply Wagered: "+"%c"+tot_multiply_wagered, css_bold+'color:'+c3);
  1816.  
  1817. // Update Status Message OnPage
  1818. script_output_msg_1 = "<span class='bold'>Config: </span>";
  1819. script_output_msg_1 += "<span class='"+Boolean(BONUS_WOF)+"'>WOF BONUS </span> <> ";
  1820. script_output_msg_1 += "<span class='"+Boolean(BONUS1000)+"'>BONUS1000</span> <> ";
  1821. script_output_msg_1 += "<span class='"+Boolean(MULTIPLY)+"'>MULTIPLY</span> <> ";
  1822. script_output_msg_1 += "<span class='"+Boolean(LOTTERY)+"'>LOTTERY</span>";
  1823. $('#script_output_msg_1').html(script_output_msg_1);
  1824.  
  1825. script_output_msg_2 = "<span class='bold'> Script Winnings: </span> ";
  1826. script_output_msg_2 += "<span class='true'>"+tot_btc_winning_rolling+"</span> btc; ";
  1827. script_output_msg_2 += "<span class='true'>"+tot_lottery_winning_rolling+"</span> tickets; ";
  1828. script_output_msg_2 += "<span class='true'>"+tot_rp_winning_rolling+"</span> RP.";
  1829. script_output_msg_2 += "</br>";
  1830. script_output_msg_2 += "<span class='bold'> Script Spent: </span>";
  1831. script_output_msg_2 += "<span class='true'>"+tot_lottery_tickets+"</span> in lottery tickets; ";
  1832. script_output_msg_2 += "<span class='true'>"+tot_rp_spent_rewards+"</span> RP in bonus; ";
  1833. script_output_msg_2 += "<span class='true'>"+tot_rp_spent_captcha+"</span> RP in captcha. ";
  1834. script_output_msg_2 += "</br>";
  1835. script_output_msg_2 += "<span class='bold'> Script Multiply Balance: </span>";
  1836. script_output_msg_2 += "<span class='true'>"+tot_multiply_balance+"</span> btc in ";
  1837. script_output_msg_2 += "<span class='true'>"+tot_multiply_games+"</span> games and ";
  1838. script_output_msg_2 += "<span class='true'>"+tot_multiply_bets+"</span> bets";
  1839. $('#script_output_msg_2').html(script_output_msg_2);
  1840.  
  1841.  
  1842. }
  1843.  
  1844. function setBtcPrice(){
  1845. //if (LOGGING > 4) console.log("%c[Debug] Function setBtcPrice begin", 'color:grey');
  1846. var btc_price=$('#btc_usd_price').html().split('.')[0].replace('$','').replace(',','');
  1847. var i=1;
  1848. var to=2000;
  1849. if (i>=10) return false;
  1850. else if (isNaN(btc_price)) {
  1851. if (LOGGING > 4) console.log("%c[setBtcPrice] Price NA, try again in "+to*i/1000+" s", 'color:grey');
  1852. setTimeout(function(){ setBtcPrice(); }, to*i );
  1853. i++;
  1854. return true;
  1855. } else {
  1856. $('#usdxbtc').html(btc_price);
  1857. var usd_price=parseFloat(100000000/btc_price).toFixed(0);
  1858. $('#satxusd').html(usd_price);
  1859. }
  1860. }