Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Follower Bot for Litecoin.win and Ethcrash.io
- Developed by Darksoul
- Donations are appreciated on account: darksoul or -DarkSoul- on ethcrash
- */
- var userBalance = engine.getBalance();
- var tofollow = "Blapfiz"; //User to follow
- var betperc = "10"; //Percentage to bet from following users bet
- var autocashout = "2.28" //Target multiplier to cashout automatically if following user doesn't cash out.
- var constant = true; //If set to true, it bets constant amount.
- var constant_bet = 119; //Amount to bet if constant bet is on
- var lowbet = 1; //Amount to bet if bet is less than 1 bits.
- var profit = 0;
- var currentbalance = userBalance;
- var username = engine.getUsername();
- engine.on('player_bet', function(data) {
- if (data.username == tofollow) {
- if (constant) {
- engine.placeBet(Math.round(constant_bet * 100), Math.round(autocashout * 100));
- } else {
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- result = xhttp.responseText;
- result = result.split("<h5>");
- result = result[4].split("ethos");
- result = result[0].replace(/,/g, "");
- var bet = balance - result;
- putbet = bet * (betperc / 100);
- document.title = `Placing bet of ${putbet} ethos`;
- console.log(tofollow, "is betting", bet, "ethos");
- console.log("Your current bet:", putbet, "ethos");
- if (bet * (betperc / 100) < 1) {
- engine.placeBet(Math.round(lowbet * 100), Math.round(autocashout * 100));
- } else {
- engine.placeBet(Math.round(putbet * 100), Math.round(autocashout * 100));
- }
- }
- }
- xhttp.open("GET", "user/" + tofollow, true);
- xhttp.send();
- }
- };
- });
- engine.on('game_crash', function(data) {
- currentbalance = engine.getBalance();
- profit = currentbalance - userBalance;
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- balance = xhttp.responseText;
- balance = balance.split("<h5>");
- balance = balance[4].split("ethos");
- balance = balance[0].replace(/,/g, "");
- document.title = `Crash: ${data.game_crash/100}x`;
- console.log("Game crashed at", data.game_crash / 100 + "x");
- console.log("Profit this session:", profit / 100, "ethos");
- }
- };
- xhttp.open("GET", "user/" + tofollow, true);
- xhttp.send();
- });
- engine.on('cashed_out', function(data) {
- var user = data.username;
- if (user == tofollow) {
- engine.cashOut();
- console.log("User", tofollow, "cashed out at", data.stopped_at / 100 + "x");
- }
- if (user == username) {
- document.title = `Cashed out at ${data.stopped_at/100}x`;
- console.log("You cashed out at", data.stopped_at / 100 + "x");
- }
- });
- engine.on('msg', function(data) {
- var msg = data.message;
- var sender = data.username;
- if (msg == ".profit") {
- if (username == sender) {
- engine.chat("Your profit this session: " + profit / 100 + " ethos");
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement