Created
December 1, 2022 19:45
-
-
Save ruzli/e8b2134e519c3fa31cbbf3ddeb955ba8 to your computer and use it in GitHub Desktop.
Bet Payout List script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
// 261,265,269,273,277,281,285,289,293,297,301,305,309,313,317,321,325,329,333,337,341,345,349,353,357,361,365,369,373,377 | |
list_bet: { | |
value: 'list2', type: 'radio', label: 'Pick Bet List', | |
options: { | |
list1: { value: '10, 5, 20', type: 'text', label: 'Bets 1' }, | |
list2: { value: '1, 1, 2, 3, 5, 9, 16, 31, 59, 117, 233, 477, 1000, 2333', type: 'text', label: 'Bets 2' }, | |
}, | |
}, | |
list_target: { | |
value: 'list2', type: 'radio', label: 'Pick Payout List', | |
options: { | |
list1: { value: '2, 5, 10', type: 'text', label: 'Targets 1' }, | |
list2: { value: '2.43, 2.38, 2.34, 2.29, 2.25, 2.21, 2.17, 2.12, 2.08, 2.04, 2.01, 1.97, 1.94, 1.89', type: 'text', label: 'Targets 2' }, | |
}, | |
}, | |
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: true }, | |
onlistendgofirst: { label: "On end go start", type: "checkbox", value: false }, | |
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: 2.0 }, | |
minProfit: { label: "minProfit", type: "balance", value: -400000 }, | |
maxProfit: { label: "maxProfit", type: "balance", value: 400000 }, | |
skippingTarget: { label: "Skipping Target", type: "multiplier", value: 10 }, | |
skippingAmount: { label: "Skipping Amount[0 = OFF]", type: "number", value: 0 }, | |
}; | |
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; | |
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; | |
} | |
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; | |
} | |
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 ${Math.round(ctarget, 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 ${Math.round(ctarget, 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`) | |
} | |
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`) | |
} | |
if (config.progressive.value) { | |
loss = 0 | |
profit += cbet * (ctarget - 1); | |
} else { | |
loss++ | |
profit -= cbet; | |
} | |
} | |
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