-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathfreebitcoin.user.js
84 lines (83 loc) · 3.48 KB
/
freebitcoin.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// ==UserScript==
// @name Freebitco Auto Faucet
// @description Auto Faucet Script by RyukSniper
// @author RyukSniper
// @match https://freebitco.in/*
// @grant unsafeWindow
// @version 2.0.3
// @downloadURL https://raw.githubusercontent.com/RyukSniper/FreebitcoinScript/master/freebitcoin.user.js
// @updateURL https://raw.githubusercontent.com/RyukSniper/FreebitcoinScript/master/freebitcoin.user.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @grant GM_xmlhttpRequest
// ==/UserScript==
// this is test for auto-update
(function() {
'use strict';
var body = $('body');
var points = {};
var count_min = 1;
var reward = {};
reward.select = function() {
reward.points = parseInt($('.user_reward_points').text().replace(',', ""));
reward.bonustime = {};
if ($("#bonus_container_free_points").length != 0) {
reward.bonustime.text = $('#bonus_span_free_points').text();
reward.bonustime.hour = parseInt(reward.bonustime.text.split(":")[0]);
reward.bonustime.min = parseInt(reward.bonustime.text.split(":")[1]);
reward.bonustime.sec = parseInt(reward.bonustime.text.split(":")[2]);
reward.bonustime.current = reward.bonustime.hour * 3600 + reward.bonustime.min * 60 + reward.bonustime.sec;
reward.bonustime.currentminutes = reward.bonustime.current * 60 / 3600;
reward.bonustime.currenthour = reward.bonustime.currentminutes * 60 / 3600;
} else {
reward.bonustime.current = 0;
console.log(reward.bonustime.current);
}
if (reward.bonustime.current !== 0) {
console.log(reward.bonustime.currenthour);
} else {
if (reward.points < 12) {
console.log("waiting for points");
} else if (reward.points < 120) {
console.log("waiting for points 60");
RedeemRPProduct('free_points_1');
} else if (reward.points < 600) {
console.log("waiting for points 120");
RedeemRPProduct('free_points_10');
} else if (reward.points < 1200) {
console.log("waiting for points 600");
RedeemRPProduct('free_points_50');
} else {
RedeemRPProduct('free_points_100');
}
}
if ($('#bonus_span_fp_bonus').length === 0) {
if (reward.points > 4400) {
RedeemRPProduct('fp_bonus_1000');
}
}
};
setTimeout(reward.select, 1000);
setInterval(reward.select, 60000);
$(document).ready(function() {
console.log("Status: Page loaded.");
setTimeout(function() {
$('#free_play_form_button').click();
console.log("Status: Button ROLL clicked.");
}, random(2000, 4000));
setInterval(function() {
console.log("Status: Elapsed time " + count_min + " minutes");
count_min = count_min + 1;
}, 60000);
setTimeout(function() {
$('.close-reveal-modal')[0].click();
console.log("Status: Button CLOSE POPUP clicked.");
}, random(12000, 18000));
setInterval(function() {
$('#free_play_form_button').click();
console.log("Status: Button ROLL clicked again.");
}, random(3605000, 3615000));
});
function random(min, max) {
return min + (max - min) * Math.random();
}
})();