/** -------------- Settings -------------- **/ var settings = { 'baseBet': 1, //Your base bet, in bits 'maxMultiplier': 100 //If the person you are following does not cash out, what would you like to cash out on }; /** -------------- Settings -------------- **/ /** SAFE EDIT LINE * ------------------------------------------------------------------------------------------------------------------------------------------/ * WARNING: ANY EDITS BEYOND THIS LINE CAN RESULT IN LOSS OF BITS * DO NOT TOUCH. THIS IS YOUR ONLY WARNING * IF YOU EDIT ANYTHING BELOW THIS LINE YOU WILL LOSE BITS. I PROMISE * ------------------------------------------------------------------------------------------------------------------------------------------ **/ var script = { 'follow': null, 'cashedOut': false, 'username': engine.getUsername() }; engine.on('msg', function(data) { if(data.username == script.username) { if(data.message.indexOf('$follow') > -1) { message = data.message; message = message.replace('$follow ', ''); script.follow = message; console.log('Script will now follow ' + message); } } }); engine.on('player_bet', function(data) { if(data['username'] == script.follow) { engine.placeBet(settings.baseBet * 100, Math.round(settings.maxMultiplier * 100), false); } }); engine.on('cashed_out', function(resp) { if(script.follow == resp.username) { engine.cashOut(); script.cashedOut = true; } });