SHOW:
|
|
- or go back to the newest paste.
1 | /* | |
2 | Follower Bot for Litecoin.win and Ethcrash.io | |
3 | Developed by Darksoul | |
4 | Donations are appreciated on account: darksoul or -DarkSoul- on ethcrash | |
5 | */ | |
6 | var userBalance = engine.getBalance(); | |
7 | var tofollow = "wikiwikiwoot"; //User to follow | |
8 | var betperc = "10"; //Percentage to bet from following users bet | |
9 | - | var autocashout = "1.62" //Target multiplier to cashout automatically if following user doesn't cash out. |
9 | + | var autocashout = "2.26" //Target multiplier to cashout automatically if following user doesn't cash out. |
10 | var constant = true; //If set to true, it bets constant amount. | |
11 | - | var constant_bet = 1535; //Amount to bet if constant bet is on |
11 | + | var constant_bet = 2758; //Amount to bet if constant bet is on |
12 | var lowbet = 1; //Amount to bet if bet is less than 1 bits. | |
13 | var profit = 0; | |
14 | var currentbalance = userBalance; | |
15 | var username = engine.getUsername(); | |
16 | ||
17 | engine.on('player_bet', function(data) { | |
18 | if (data.username == tofollow) { | |
19 | if (constant) { | |
20 | engine.placeBet(Math.round(constant_bet * 100), Math.round(autocashout * 100)); | |
21 | } else { | |
22 | var xhttp = new XMLHttpRequest(); | |
23 | xhttp.onreadystatechange = function() { | |
24 | if (this.readyState == 4 && this.status == 200) { | |
25 | result = xhttp.responseText; | |
26 | result = result.split("<h5>"); | |
27 | result = result[4].split("ethos"); | |
28 | result = result[0].replace(/,/g, ""); | |
29 | var bet = balance - result; | |
30 | putbet = bet * (betperc / 100); | |
31 | document.title = `Placing bet of ${putbet} ethos`; | |
32 | console.log(tofollow, "is betting", bet, "ethos"); | |
33 | console.log("Your current bet:", putbet, "ethos"); | |
34 | if (bet * (betperc / 100) < 1) { | |
35 | engine.placeBet(Math.round(lowbet * 100), Math.round(autocashout * 100)); | |
36 | } else { | |
37 | engine.placeBet(Math.round(putbet * 100), Math.round(autocashout * 100)); | |
38 | } | |
39 | } | |
40 | } | |
41 | xhttp.open("GET", "user/" + tofollow, true); | |
42 | xhttp.send(); | |
43 | } | |
44 | }; | |
45 | }); | |
46 | ||
47 | engine.on('game_crash', function(data) { | |
48 | currentbalance = engine.getBalance(); | |
49 | profit = currentbalance - userBalance; | |
50 | var xhttp = new XMLHttpRequest(); | |
51 | xhttp.onreadystatechange = function() { | |
52 | if (this.readyState == 4 && this.status == 200) { | |
53 | balance = xhttp.responseText; | |
54 | balance = balance.split("<h5>"); | |
55 | balance = balance[4].split("ethos"); | |
56 | balance = balance[0].replace(/,/g, ""); | |
57 | document.title = `Crash: ${data.game_crash/100}x`; | |
58 | console.log("Game crashed at", data.game_crash / 100 + "x"); | |
59 | console.log("Profit this session:", profit / 100, "ethos"); | |
60 | } | |
61 | }; | |
62 | xhttp.open("GET", "user/" + tofollow, true); | |
63 | xhttp.send(); | |
64 | }); | |
65 | ||
66 | engine.on('cashed_out', function(data) { | |
67 | var user = data.username; | |
68 | if (user == tofollow) { | |
69 | engine.cashOut(); | |
70 | console.log("User", tofollow, "cashed out at", data.stopped_at / 100 + "x"); | |
71 | } | |
72 | if (user == username) { | |
73 | document.title = `Cashed out at ${data.stopped_at/100}x`; | |
74 | console.log("You cashed out at", data.stopped_at / 100 + "x"); | |
75 | } | |
76 | }); | |
77 | ||
78 | engine.on('msg', function(data) { | |
79 | var msg = data.message; | |
80 | var sender = data.username; | |
81 | if (msg == ".profit") { | |
82 | if (username == sender) { | |
83 | engine.chat("Your profit this session: " + profit / 100 + " ethos"); | |
84 | } | |
85 | } | |
86 | }); |