Skip to content

Instantly share code, notes, and snippets.

@dsetzer
dsetzer / bab-streak-log.js
Last active August 18, 2019 04:11
bustabit streak logger
var config = {
target: { value: 2, type: 'multiplier', label: 'Target Payout' },
streak: { value: 4, type: 'multiplier', label: 'Min Length' }
};
const history = engine.getState().history;
const busts = [], streaks = [];
let currentStart = null, currentStreak = 0;
for (let i = 0; i < history.length; i++) {
let item = [history[i].gameId, null, history[i].bust];
updateStreaks(item);
let betCount = 0, totalOut = 0, totalIn = 0;
let queue = new Array(200);
const doResult = async function (context, result) {
totalIn++;
console.log(`Current Bets ${totalIn} IN / ${totalOut} OUT / ${betCount} TOTAL`);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
@dsetzer
dsetzer / daffie-async-2.2.js
Last active August 18, 2019 04:11
bustadice fastbet chase script
/******** SETTINGS ********/
const BASE_WAGER = 50; // Initial lowest possible bet to start with. (Satoshis)
const BASE_TARGET = 200.00; // Target payout to chase for. (Actual payout format 2.00x = 2.00)
const AUTO_MULTIPLE = false; // Auto calculate and override BET_MULTIPLE for BASE_TARGET.
const BET_MULTIPLE = 1.005; // Multiply bet by this value (1 = no increase) after each loss.
const BET_INCREASE = 0; // Increase bet by this flat amount after each loss. (Satoshis)
const MAX_WAGER = 500 // Prevents script from placing bets larger than this amount.(Bits)
const STOP_ON_MAX = true; // Stop The script when MAX_WAGER is reached.
const RESET_ON_MAX = false; // Returns to base bet when MAX_WAGER is reached,
@dsetzer
dsetzer / daffie-async-v2.1.js
Last active August 18, 2019 04:11
bustadice fastbet chase script
/******** SETTINGS ********/
const BASE_WAGER = 100; // Initial lowest possible bet to start with (Satoshis)
const BASE_TARGET = 500.00; // Target payout to chase for (Actual payout format 2.00x = 2.00)
const AUTO_MULTIPLE = false; // Auto calculate and override BET_MULTIPLE for BASE_TARGET.
const BET_MULTIPLE = 1.002; // Multiply bet by this value (1 = no increase) after each loss.
const BET_INCREASE = 0; // Increase bet by this flat amount after each loss. (Satoshis)
const RESET_ON_HIT = true; // Returns to base bet after hitting target payout.
const STOP_ON_HIT = true; // Stop the script after hitting target payout.
const STOP_ON_PROFIT = false;
const STOP_PROFIT = 30000; // Stop the script when profits reach this amount. (Bits amount)
let values = [2, 56, 3, 41, 0, 4, 100, 23];
values.sort((a, b) => a - b);
let median = (values[(values.length - 1) >> 1] + values[values.length >> 1]) / 2
// median = 13,5
/*for finding average you can combine map and reduce at the same time:
*/
let avg = values.map((c, i, arr) => c / arr.length).reduce((p, c) => c + p);
/*
Also median for even number of elements should be sum of two middle numbers divided by 2. So in this case median should be (4 + 23) / 2 = 13.5 and not 23.
const baseBet = 1
const baseTarget = 1.30
const betMultiplier = 5
const stopGameAfterLoss = 2 /* Trigger will lead to drop/stop script */
const dropInsteadOfStopScript = true /* stop script or drop losses and continue play */
const changeSeed = 3 /* How much losses obtain, and then change seed to decrease chance of big streak, 0 to disable */
const lossTarget = 1.1
const lossRepeatTimes = 3
let lossCount = 0
@dsetzer
dsetzer / honeycomb.js
Last active August 18, 2019 04:11
bustadice honeycomb pattern script (is harmless)
var baseBet = 6 * 100;
var basePayout = 1.1;
var currentPayout = 1.1;
var betLossMult = 20;
var betWinMult = 1;
var payoutLossMult = 0.981;
var payoutWinMult = 1.33;
// note to self: 1.08=x12.51 1.07=x14.29 1.06=x16.67 1.05=x20 1.04=x25 1.03=x33.34
var payoutMin = 1.05;
var payoutMax = 3;
@dsetzer
dsetzer / 300.js
Last active August 18, 2019 04:11
bustadice script for 300 balance
const baseBet = 0.5 * 100 // how many satoshis to bet initially
const target = 5 // target multiplier
const betMultiplier = 1.3 // what to multiply the bet size by when we lose a wager
const MAX_BET = 7000 * 100 // maximum bet amount to stop script at (satoshis)
const MAX_GAMES = 500 // maximum number of games to play before stopping (set to -1 for unlimited)
const BET_SPEED = 800 // time between bets in (ex 500 = 500ms = 0.5s)
let lossCount = 0
this.log(`Starting martingale with a base bet of ${baseBet/100} bits.`)
const maxBankrollToBet = 0.1 // 0.1% Recommended (if you have 50k bits, bets up to 50 at a time)
const baseMultiplier = 138
const winMultInc = 7
const lossMultInc = 77
const betSpeed = 150
//-------------------------
let ourBet = 0
let ourMultiplier = 0
let currentBet = 0
let currentMultiplier = 0
@dsetzer
dsetzer / 5x-1_5x.js
Last active August 18, 2019 04:11
bustadice script
const baseBet = 5 * 100 // how many satoshis to bet initially
const target = 5 // target multiplier
const betMultiplier = 1.5 // what to multiply the bet size by when we lose a wager
const MAX_BET = 7000 * 100 // maximum bet amount to stop script at (satoshis)
const MAX_GAMES = -1 // maximum number of games to play before stopping (set to -1 for unlimited)
const BET_SPEED = 400 // time between bets in (ex 500 = 500ms = 0.5s)
let lossCount = 0
this.log(`Starting martingale with a base bet of ${baseBet/100} bits.`)