Skip to content

Instantly share code, notes, and snippets.

View ruzli's full-sized avatar

Ruzli ruzli

  • Russian Federation, Moscow
View GitHub Profile
@ruzli
ruzli / wss2.js
Created February 5, 2024 22:13
wss2.js
const WebSocket = require('ws');
const readline = require('readline');
const wss = new WebSocket.Server({ port: 4041 });
wss.on('connection', (ws) => {
console.log(getCurrentTime() + 'Connected');
ws.on('close', () => {
console.log(getCurrentTime() + 'Disconnected');
@ruzli
ruzli / wss.js
Created February 5, 2024 22:04
wss.js
const wss = new WebSocket('ws://localhost:4041');
wss.addEventListener('open', () => {
console.log(getCurrentTime() + 'Connected');
});
wss.addEventListener('close', () => {
console.log(getCurrentTime() + 'Disconnected');
});
@ruzli
ruzli / Fast rolling script for classic dice.js
Created August 20, 2023 15:47
Fast rolling script for classic dice
stop = (() => {
let running;
function bet() {
return cd.bet(cd.amount)
}
(function() {
running = setInterval(bet, 1);
})()
@ruzli
ruzli / Fast rolling script for ultimate dice.js
Created August 20, 2023 15:11
Fast rolling script for ultimate dice
stop = (() => {
let running;
function bet() {
return prod.bet(prod.amount)
}
(function() {
running = setInterval(bet, 1);
})()
@ruzli
ruzli / Bet Payout List script.js
Created December 1, 2022 19:45
Bet Payout List script
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: {
@ruzli
ruzli / Lightguide for bustabit v2, accurate clean version.js
Created May 27, 2021 07:26
Lightguide for bustabit v2, accurate clean version
var config = {
wager: { value: 100, type: 'balance', label: 'Base Bet' },
payout: { value: 2, type: 'multiplier', label: 'Payout' },
}
var Profit = 0, Total_Profit = 0, Total_Rolls = 0, Playing = true, baseList = [ 1, 2, 3 ], RolledGames = 0;
var PAYOUT = config.payout.value, WAGER = config.wager.value;
/* -------------------------------------------------------------- */
if (engine.gameState === "GAME_STARTING") PerformBet()
@ruzli
ruzli / Simple Martingale with losing streak length stop loss.js
Created March 17, 2021 16:09
Simple Martingale with losing streak length stop loss
const baseBet = 100 // how many satoshis to bet initially
const target = 2.1 // target multiplier
const betMultiplier = 2 // what to multiply the bet size by when we lose a wager
const stopGameAfterLoss = 9 /* Trigger will lead to drop/stop script */
const sleepTimeInMS = 100
const dropInsteadOfStopScript = false /* stop script or drop losses and continue play */
const changeSeed = 0 /* How much losses obtain, and then change seed to decrease chance of big streak, 0 to disable */
const engine = this
@ruzli
ruzli / Hotkeys Implementation for Ether-Dice.js
Created February 10, 2021 16:38
Hotkeys Implementation for Ether-Dice
var map = {};
chat = document.getElementsByClassName("form-control")[ 0 ];
function getBalance() {
var newBalance = document.querySelector("#top-bar > div > div > div.balance-container.nav-item > span:nth-child(2)").innerText;
var conBalance = String(newBalance.replace(",", "."));
return Number(conBalance);
}
@ruzli
ruzli / CompoundScript [~~~Script by Daffie! Added two features [trailing stop & max bet reset] by Ruzli~~~].js
Last active November 17, 2021 22:05
CompoundScript [~~~Script by Daffie! Added two features [trailing stop & max bet reset] by Ruzli~~~]
var config = {
headerCommon: { label: "Common Settings", type: "noop", value: "" },
baseBet: { label: 'Base Bet', type: 'balance', value: 1000 },
minPayout: { label: 'Target Min', type: 'multiplier', value: 1.08 },
maxPayout: { label: 'Target Max', type: 'multiplier', value: 50.00 },
divPayout: { label: 'Target Div', type: 'multiplier', value: 0.80 },
compRate: { label: 'Compound %', type: 'multiplier', value: 0.02 },
compStep: { label: 'Compound At', type: 'multiplier', value: 1.10 },
headerCond: { label: "Conditions Settings", type: "noop", value: "" },
@ruzli
ruzli / Good old times.js
Created November 18, 2020 03:51
Good old times!
var config = {
clientSeed: { label: "Client seed", type: "text", value: "123" },
stopiflost: { value: 0, type: 'text', label: 'Protect Balance' },
}
var protect = config.stopiflost.value;
var now = (this.balance / 100);
const baseBet = 300 /* In satoshi, which means it will place 2 bits */
const target = 1.5