Script
Script
var config = {
//divider: { label: "Divider", value: 230000, type: "number" },
baseBet: { label: "Base-Bet", value: 0.00000100, type: "number" },
minChance: { label: "Min-Chance", value: 49, type: "number" },
maxChance: { label: "Max-Chance", value: 49, type: "number" },
stopprof: { label: "Stop-Profit", value: 100000, type: "number" },
stoploss: { label: "Stop-Loss-%", value: 100, type: "number" }
/*
stop: { label: "stop if bet >", value: 1e8, type: "number" },
balanceRisk: { label: "balance risk %", value: 100, type: "number" },
targetProfit: {label:'Target-Profit-Stop', value: 1000, type:'number'},
targetBalance: {label:'Target-Balance-Stop', value: 1000, type:'number'},
onLoseTitle: { label: "On Lose", type: "title" }
*/
};
var
//bb = balance / config.divider.value,
bb = config.baseBet.value;
filthy = false,
old = balance,
oldy = balance,
oldbaly = balance,
oldbal = balance,
startbalance = balance,
wage = 0,
r = 0,
basebet = bb,
nextbet = bb,
rst = 0,
profreset = 0,
stavka = 0,
b = balance,
prof = (balance - b) * 100 / b;
function main() {
run = true;
//nextbet = balance / config.divider.value;
nextbet = config.baseBet.value;
game.onBet = function () {
//balance = currency.amount;
//if(balance >= lastbalance) lastbalance = balance;
chance = Math.random() * (config.maxChance.value - config.minChance.value) +
config.minChance.value;
//game.bet(currentBet, config.payout.value).then(function (payout) {
game.bet(nextbet, (99/chance).toFixed(4)).then(function (payout) {
/*
currentProfitt += curProf;
if (currentProfitt >= currentProfittt) {
currentProfittt = currentProfitt;
currentBet = config.baseBet.value;
roundWins = 0;
roundLosses = 0;
}
*/
currentBet = nextbet;
if (payout > 1) {
balance += currentBet*99/chance-currentBet;
profitTotal += currentBet*99/chance-currentBet;
profreset += currentBet*99/chance-currentBet;
}else{
balance -= currentBet;
profitTotal -= currentBet;
profreset -= currentBet;
}
if(balance >= lastbalance) lastbalance = balance;
prof = (balance - b) * 100 / b;
stavka += 1;
if (profreset >= 0) {
profreset = 0;
rst += 1;
r += 1;
/*
if r == 2 then
bethigh = !bethigh
r = 0
end
*/
//bb = balance / config.divider.value;
bb = config.baseBet.value;
if (rst == 500) {
//seed_reset();
rst = 0;
}
}
if (payout > 1) {
wage = wage-1;
}else{
wage = wage+1;
}
if (wage>=(Math.floor(Math.random() * (5 - 2 + 1) + 2))) {
nextbet = nextbet*2;
basebet = nextbet;
wage = 0;
filthy = true;
}
if (balance>=(oldy+(basebet*(Math.floor(Math.random() * (7 - 2 + 1) + 2)))))
{
nextbet = nextbet*2;
basebet = nextbet;
oldy = balance;
}
if (balance<oldy) {
oldy = balance;
}
if (balance>=oldbal && filthy==false) {
oldbal = balance;
}
if (balance>=oldbal && filthy==true) {
nextbet = bb;
basebet = bb;
oldy = balance;
oldbal = balance;
oldbaly = balance;
filthy = false;
}
if (balance>=(oldbaly+(bb*10))) {
nextbet = bb;
basebet = bb;
oldy = balance;
oldbal = balance;
filthy = false;
oldbaly = balance;
}
if (payout > 1) {
log.success(
"We won, so next bet will be " +
nextbet +
" " +
currency.currencyName
);
}else{
log.error(
"We lost, so next bet will be " +
nextbet +
" " +
currency.currencyName
);
}
if (prof >= config.stopprof.value) {
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
log.info('Сделано ставок = ' +stavka);
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
log.info('Профит составил >= ' +prof+ '%');
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
game.stop();
}
if ((startbalance - balance - nextbet) > startbalance *
(config.stoploss.value/100)) {
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
log.info('STOP LOSS ');
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
log.info('Сделано ставок = ' +stavka);
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
log.info("Финальный баланс : " +balance);
log.info(':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::');
game.stop();
}
/*
currentProfitt += curProf;
if (currentProfitt >= currentProfittt) {
currentProfittt = currentProfitt;
currentBet = config.baseBet.value;
roundWins = 0;
roundLosses = 0;
}
if (currentBet < config.baseBet.value) {
currentBet = config.baseBet.value
}
setInterval(function(){
var cur = new Date();
var t = Math.floor((cur - startTime) / 1000);
var hour = Math.floor(t / 3600);
if (hour < 10) hour = '0' + Math.floor(t / 3600);
t = t % 3600;
var minutes = Math.floor(t / 60);
if (minutes < 10) minutes = '0' + Math.floor(t / 60);
var seconds = t % 60;
if (seconds < 10) seconds = '0' + t % 60;
if(run) timestring = 'PlayTime ' + hour + ':' + minutes + ':' + seconds + '
';
else timestring = '';
},'1000');