Skip to content

Instantly share code, notes, and snippets.

@BitChop
BitChop / bet-utils.js
Created August 18, 2019 04:10 — forked from dsetzer/bet-utils.js
A few martingale oriented inverse utility functions.
const getBaseBetFromCurrent = (wager, multi, streak) => (wager / (multi ^ streak));
const getBetSizeForStreak = (base, multi, streak) => (base * (multi ^ streak));
const getStreakSizeFromBet = (base, wager, multi) => (Math.log(wager / base) / Math.log(multi));
const getPrevBetFromLastBet = (wager, multi) => (wager / multi);
const getBetMultiFromPrevBet = (wager, prev) => (wager / prev);
@BitChop
BitChop / bustadice-bab-demo.js
Created August 18, 2019 04:10 — forked from dsetzer/bustadice-bab-demo.js
Bustabit script wrapper for use on bustadice. (proof of concept / demo! extremely minimal bustabit script API functionality)
var config = {
baseBet: { type: 'balance', label: 'Base Bet', value: 100 },
payout: { type: 'multiplier', label: 'Payout', value: 2 }
};
const dcheck = () => { try{ engine.getState() }catch(e){ return true } return false }
const emitter = {
on(name, func){this._s[name] = this._s[name] || []; this._s[name].push(func)},_s:{},
emit(name, ...args){if(!this._s[name]){return; } this._s[name].forEach(f=>f(...args))}
}
const dice = dcheck();
@BitChop
BitChop / diceCheck.js
Created August 18, 2019 04:10 — forked from dsetzer/diceCheck.js
Method for detecting which game the script is run on.
const dice = (()=>{try{engine.getState()}catch(e){return!0}return!1})();
if (dice) console.log('This is bustadice');
if (!dice) console.log('This is bustabit');
@BitChop
BitChop / Sandbox_script2_13.js
Created August 18, 2019 04:10 — forked from dsetzer/Sandbox_script2_13.js
Sandbox_script ver2.13 by Ruzli #7111, If you liked my sandbox and want say big thanks, or want support my team, you can make donation to our team here - [1GUU7UZLAWUAA58bx9zuJiTM7eLGUoK6wi ] also join my discord server: https://discord.gg/5R2YvY
var config = {
//******************COMMON****************** */
PASTE_CASE: { label: "Paste", type: "text", value: "Paste raw text [see F12]" },
cb_globals: {
label: "Sandbox", type: "radio", value: "sandbox_mode", options: {
sandbox_mode: { label: "Sandbox Mode (if you set it to true will trigger below configuration to be used)", type: "noop", value: "" },
SETUP: { label: "Configuration Launch Case", type: "number", value: 0 },
merged: { label: "Run both in sandbox and configuration launch", type: "noop", value: "" },
}
@BitChop
BitChop / v2climb-bustabit.js
Created August 18, 2019 04:10 — forked from dsetzer/v2climb-bustabit.js
climb v2 script for bustadice and bustabit
/* Climb V2 (bustabit) */
var config = { c: { label: 'Base Bet', type: 'balance', value: 500 } };
let c = config.c.value, t = 1.1, b = 1.006, m = 1.005, a = c, d = t, h = 100;
engine.on('GAME_ENDED', () => { let r = engine.history.first(); (r.cashedAt) ? (c = a, t = d) : (t += m, c *= b) });
engine.on('GAME_STARTING', () => { engine.bet(Math.round(c / h) * h, t)});
@BitChop
BitChop / flat-v1.2.js
Created August 18, 2019 04:10 — forked from dsetzer/flat-v1.3.js
bustadice script
const baseBet = 50;
const basePayout = 5;
const baseMulti = 1.2;
const postBet = 1;
let currentBet = baseBet;
let startBal = this.balance;
let prevBal = this.balance;
while(true){
prevBal = this.balance;
const { multiplier } = await this.bet(Math.max(100, Math.round(currentBet / 100) * 100), basePayout)
var checkInterval = 10;
Window.prototype.targetLimiter = function (checkInterval) {
setImmediate(() => {
window.setInterval(() => {
if (window.document.getElementsByName('target')[0].value < 1.5) {
window.document.getElementsByName('target')[0].value = 1.5;
}
}, checkInterval);
});
}
var config = {
baseBet: { value: 100, type: 'balance', label: 'base bet' },
payout: { value: 2, type: 'multiplier' },
stop: { value: 1e8, type: 'balance', label: 'stop if bet >' },
loss: {
value: 'increase', type: 'radio', label: 'On Loss',
options: {
base: { type: 'noop', label: 'Return to base bet' },
increase: { value: 2, type: 'multiplier', label: 'Increase bet by' },
}

Node Starter

Get Started

Run from a new project folder:

curl https://gist.githubusercontent.com/eezing/6aa3b59137260916ea7fdd4040faa72a/raw/node-starter.sh | sh
@BitChop
BitChop / FarZad.js
Created August 18, 2019 04:10
bustadice script
var config = {
settings: { label: "Script Settings", type: "noop" },
wager: { label: "Base Wager", type: "balance", value: 100 },
target: { label: "Base Target", type: "multiplier", value: 100 },
targetMod: { label: "Target Loss", type: "multiplier", value: -1.0 },
stoploss: { label: "Trailing-stop Amount", type: "balance", value: 50000 },
liftmint: { label: "Each Min Target Increases", type: "checkbox", value: false },
skipmode: { label: "Sim Mode", type: "checkbox", value: true },
maxtstop: { label: "On Min Target", type: "radio", value: "reset", options: {
stop: { label: "stop script", type: "noop" },