Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ruzli/253cd05e01c314413081da588122e450 to your computer and use it in GitHub Desktop.
Save ruzli/253cd05e01c314413081da588122e450 to your computer and use it in GitHub Desktop.
Community gift! List of payouts/bets and nice control over lists
var config = {
list_bet: {
value: 'list1', type: 'radio', label: 'Pick Bet List',
options: {
list1: { value: '10, 9, 7, 6, 5, 20, 18, 16, 14, 32, 20, 30, 26, 22, 18, 14, 20, 15, 20, 25, 45', type: 'text', label: 'Bets 1' },
list2: { value: '320, 170, 37, 76, 51, 50, 118, 16, 141, 72, 60, 30, 26, 77, 18, 14, 20, 35, 20, 85, 145', type: 'text', label: 'Bets 2' },
list3: { value: '320, 170, 37, 76, 51, 50, 118, 16, 141, 72, 60, 30, 26, 77, 18, 14, 20, 35, 20, 85, 145', type: 'text', label: 'Bets 3' },
},
},
list_target: {
value: 'list1', type: 'radio', label: 'Pick Payout List',
options: {
list1: { value: '5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100', type: 'text', label: 'Targets 1' },
list2: { value: '3.9, 5, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100', type: 'text', label: 'Targets 2' },
list3: { value: '3.9, 5, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100', type: 'text', label: 'Targets 3' },
},
},
progressive: { label: "Progressive[ON = on wins]", type: "checkbox", value: false },
resetskipsonwin: { label: "On win start skip", type: "checkbox", value: true },
onlistendmultiply: { label: "On end multiply", type: "checkbox", value: false },
onlistendgofirst: { label: "On end go start", type: "checkbox", value: true },
simulationBalance: { label: "Simulation Balance", type: "balance", value: 0 },
multipliersBet: { label: "Multiplier Bet[Apply to all list]", type: "multiplier", value: 1.0 },
multipliersTarget: { label: "Multiplier Target[Apply to all list]", type: "multiplier", value: 1.0 },
onlistendmultiplyAmount: { label: "To multiply after list ended", type: "multiplier", value: 1.0 },
minProfit: { label: "minProfit", type: "balance", value: -80000 },
maxProfit: { label: "maxProfit", type: "balance", value: 260000 },
skippingTarget: { label: "Skipping Target", type: "multiplier", value: 10 },
skippingAmount: { label: "Skipping Amount[0 = OFF]", type: "number", value: 0 },
seedDrop: { label: "Seed drop after lose bits[0 = OFF]", type: "balance", value: 40000 },
};
this.log('Script List bets & targets & skips by Ruzli is starting...');
var engine = this;
var loss = 0, lossBetsList = [], lossTargetsList = [], debug = true, rolls = 0, profit = 0;
var simulation = false, simulation_balance = config.simulationBalance.value;
var seeddrop_counter = 0;
if (simulation_balance > 0){
simulation = true;
this.log(`Running in simulation mode with ${Math.round(simulation_balance / 100)} bits`)
}
function roundBit(bet) { return Math.max(100, Math.round((bet) / 100) * 100) }
function importFromJsonList() {
console.clear();
function setupConfigTarget() {
let payout;
switch (config.list_target.value) {
case `list1`:
payout = config.list_target.options.list1.value;
break;
case `list2`:
payout = config.list_target.options.list2.value;
break;
case `list3`:
payout = config.list_target.options.list3.value;
break;
}
console.log(`Selected ${payout} targets list.`)
return payout;
}
function setupConfigBet() {
let bet;
switch (config.list_bet.value) {
case `list1`:
bet = config.list_bet.options.list1.value;
break;
case `list2`:
bet = config.list_bet.options.list2.value;
break;
case `list3`:
bet = config.list_bet.options.list3.value;
break;
}
console.log(`Selected ${bet} bets list.`)
return bet;
}
let bet = setupConfigBet();
let payout = setupConfigTarget();
let tempList = JSON.parse(`[ ${bet} ]`);
let tempList2 = JSON.parse(`[${payout}]`);
for (let i = 0, len = tempList.length; i < len; i++) {
lossBetsList.push(tempList[i]);
lossTargetsList.push(tempList2[i]);
};
}
function pickBetFromList(count) {
if (count == undefined){
count = 0;
}
if (count > lossBetsList.length - 1) {
loss = 0;
return lossBetsList[0] * 100;
} else {
return lossBetsList[count] * 100;
}
}
function pickTargetFromList(count) {
if (count == undefined){ count = 0; }
if (count > lossTargetsList.length - 1) {
if(debug){ console.log("lossTargetList index:", lossTargetsList[0]); }
return lossTargetsList[0];
} else {
if(debug){ console.log("lossTargetList index:", lossTargetsList[count]); }
return lossTargetsList[count];
}
}
async function analyzeBet() {
const result = skip_enabled ? skipStep ? await engine.bet(100, 1.01) : await engine.skip() : await engine.bet(100, 1.01);
skipStep = !skipStep;
return result;
}
// ----------- LISTING PART OF SCRIPT ---------------//
var cbet, ctarget;
importFromJsonList();
// ----------- SKIPS PART OF SCRIPT ---------------//
var skipCount = 0, skipStep = 1, skip_enabled = false, skipping_phase = false;
if (config.skippingAmount.value > 0) {
skipping_phase = true;
} else {
skipping_phase = false;
}
while (true) {
rolls++;
if (skipping_phase == false) {
/* -------------------------- Bet or Target to place ----------------------- */
if (cbet == undefined || ctarget == undefined){
cbet = pickBetFromList();
ctarget = pickTargetFromList();
console.log(`Trying fix cbet and ctarget`)
}
if (loss >= lossBetsList.length - 1 || loss >= lossTargetsList.length - 1){
console.log(`Reached list end(streak ${loss}/${lossBetsList.length}), resetting it`)
if (config.onlistendmultiply.value){
cbet *= config.onlistendmultiplyAmount.value;
ctarget *= config.onlistendmultiplyAmount.value;
console.log(`Additional multiply ${Math.round(cbet / 100)} bits, ctarget ${ctarget.toFixed(2)}x`)
} else {
loss = 0;
if (config.onlistendgofirst.value == false && config.skippingAmount.value > 0){
skipping_phase = true;
skipCount = 0;
}
}
}
if (loss < lossBetsList.length - 1){
cbet = pickBetFromList(loss) * config.multipliersBet.value;
console.log(`Building base cbet ${Math.round(cbet / 100)} bits`)
}
if (loss < lossTargetsList.length - 1){
ctarget = pickTargetFromList(loss) * config.multipliersTarget.value;
console.log(`Building base ctarget ${ctarget.toFixed(2)}x`)
}
if (ctarget <= 1.01) { ctarget = 1.02; }
/* -------------------------------------------------------------------------- */
if (profit > config.maxProfit.value || profit - cbet < config.minProfit.value) {
engine.log(`Current profit amount ${Math.round(profit / 100)} bits, triggered minimal(${config.minProfit.value / 100} bits) profit, or maximal(${config.maxProfit.value / 100} bits) profit.`)
await engine.stop();
}
if (simulation){
var { multiplier } = await this.bet(100, 1.01);
await engine.log(`${ctarget}x @ ${Math.round(cbet / 100)} bits`)
} else {
var { multiplier } = await this.bet(roundBit(cbet), ctarget);
}
if (multiplier >= ctarget) { // We Won
if (simulation){
simulation_balance += cbet * (ctarget - 1);
this.log(`[WON] ${multiplier}x with target ${ctarget}x, @ ${Math.round(cbet / 100)} bits`)
}
seeddrop_counter = 0;
if (config.progressive.value) {
profit -= cbet;
loss++;
} else {
profit += cbet * (ctarget - 1);
loss = 0;
}
if (config.skippingAmount.value > 0 && config.resetskipsonwin.value == true){
skipping_phase = true;
skipCount = 0;
}
} else { // We Lost
if (simulation){
simulation_balance -= cbet;
this.log(`[LOST] ${multiplier}x with target ${ctarget}x, @ ${Math.round(cbet / 100)} bits`)
}
seeddrop_counter = seeddrop_counter + cbet;
if (config.progressive.value) {
loss = 0
profit += cbet * (ctarget - 1);
} else {
loss++
profit -= cbet;
}
}
if (config.seedDrop.value != 0 && seeddrop_counter > config.seedDrop.value){
await engine.newSeedPair()
seeddrop_counter = 0;
}
if (loss > lossBetsList.length - 1 || loss > lossTargetsList.length - 1 ){
if (config.onlistendgofirst.value){
loss = 0;
cbet = pickBetFromList(loss) * config.multipliersBet.value;
ctarget = pickTargetFromList(loss) * config.multipliersTarget.value;
}
}
} else {
var { multiplier } = await analyzeBet();
if (multiplier < config.skippingTarget.value) {
skipCount++;
} else {
skipCount = 0;
}
if (skipCount > config.skippingAmount.value) {
engine.log(`${rolls} rolls pass. Reached streak ${skipCount}/${config.skippingAmount.value} | Starting to play bets from listing`);
skipping_phase = false;
}
}
if (!simulation){
engine.clearLog();
}
if (!simulation){
if (skipping_phase){
await engine.log(`Rolls: ${rolls} | ${config.skippingTarget.value}x | Streak: ${skipCount}/${config.skippingAmount.value} | Profit: ${Math.round(profit / 100, 2)} bits`);
} else {
await engine.log(`Rolls: ${rolls} | ${ctarget}x | Streak: ${loss} | Profit: ${Math.round(profit / 100, 2)} bits`);
}
} else {
await engine.log(`Rolls: ${rolls} | Streak: ${loss} | Profit: ${Math.round(profit / 100, 2)} bits`);
if (simulation_balance > 0){
await engine.log(`Balance: ${Math.round(simulation_balance / 100)} bits`);
}
}
if (simulation){
if (simulation_balance <= 0){
simulation_balance = 0;
simulation = false;
await engine.log(`Balance: ${Math.round(simulation_balance / 100)} bits, stopping script`);
await engine.stop()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment