Bitcoin Forum
April 16, 2024, 04:57:33 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: Script for dice betting  (Read 1295 times)
xsfgsdrwe (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
October 01, 2013, 02:32:55 AM
 #1

I am wondering if anyone is capable of writing a script for Just-dice (owner has confirmed this is allowed).

I want it to double my bet every lose and reset the bet every win. Is this doable and how much would you charge?
1713243453
Hero Member
*
Offline Offline

Posts: 1713243453

View Profile Personal Message (Offline)

Ignore
1713243453
Reply with quote  #2

1713243453
Report to moderator
1713243453
Hero Member
*
Offline Offline

Posts: 1713243453

View Profile Personal Message (Offline)

Ignore
1713243453
Reply with quote  #2

1713243453
Report to moderator
1713243453
Hero Member
*
Offline Offline

Posts: 1713243453

View Profile Personal Message (Offline)

Ignore
1713243453
Reply with quote  #2

1713243453
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713243453
Hero Member
*
Offline Offline

Posts: 1713243453

View Profile Personal Message (Offline)

Ignore
1713243453
Reply with quote  #2

1713243453
Report to moderator
1713243453
Hero Member
*
Offline Offline

Posts: 1713243453

View Profile Personal Message (Offline)

Ignore
1713243453
Reply with quote  #2

1713243453
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
October 01, 2013, 02:44:15 AM
 #2

I found this with 30 seconds of searching. No promises that the EXEs won't steal all your bitcoins though...

https://bitcointalk.org/index.php?topic=238613.msg3121784#msg3121784
xsfgsdrwe (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
October 01, 2013, 02:53:31 AM
 #3

I found this with 30 seconds of searching. No promises that the EXEs won't steal all your bitcoins though...

https://bitcointalk.org/index.php?topic=238613.msg3121784#msg3121784

That is the issue. I rather pay someone I believe won't write a script to steal from me.
Ditto
Sr. Member
****
Offline Offline

Activity: 330
Merit: 250


View Profile
October 01, 2013, 02:58:07 AM
 #4

Should be possible, but I'll have to look into it.
Magazine
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
October 01, 2013, 02:59:14 AM
 #5

There is a Greasemoney script but it has a problem of betting way too fast and blocking your IP for a hour so the code needs a tweak.

Quote
// ==UserScript==
// @name                JustDice Martingale Bot
// @namespace   none
// @author      Gray
// @version     1.1
// @include     https://just-dice.com/*
// @grant       none
// ==/UserScript==
 
/* How would you go about using this?
 *
 * Install Greasemonkey plugin for Firefox
 * Install Firebug plugin for Firefox (It's better than the builtin console.)
 *
 * Make a new script with Greasemonkey
 * Type whatever you want into the form
 * Then paste this whole file into the editor
 *
 * Adjust to your needs.
 * Run.
 *
 * Other things you can do:
 *
 * That's it!
 *
 * Made a profit and feel like tipping people without seeing their genitals?
 *
 * Go ahead: 1Gray1ZsWo3kKBaCYdigiyPkD1pUnBqPxo
 *
 * Now go have fun with this... thing!
**/
 
// Heres the script
 
$('<script>').attr({
        src: 'http://d3js.org/d3.v3.min.js',
        charset: 'UTF-8'
}).appendTo(document.body);
 
$(function() {
        var markup = '<div class="bot-controls"><fieldset><div class="row"><p class="llabel">bet start</p><input id="gb_bet" value="0.001"><p class="rlabel">BTC</p></div><div class="row"><p class="llabel">chance</p><input id="gb_chance" value="50"><p class="rlabel">%</p></div></fieldset><fieldset><div class="row"><p class="llabel">bet multiplier</p><input id="gb_multiplier" value="2"><p class="rlabel" title="The bet gets multiplied by [mutiply factor] every [interval] steps.">x</p></div><div class="row"><p class="llabel">interval</p><input id="gb_interval" value="1"><p class="rlabel" title="The bet gets multiplied by [mutiply factor] every [interval] steps.">&nbsp;</p></div></fieldset><fieldset><div class="row"><p class="llabel">bet stop</p><input id="gb_betstop" value="0.01"><p class="rlabel">BTC</p></div><div class="row"><p class="llabel">profit stop</p><input id="gb_stopprofit" value="0.1"><p class="rlabel">BTC</p></div></fieldset><div class="clear"></div><div class="button_group"><button class="button_label action_toggle">start</button><div class="actions button_inner_group"><button id="gba_start">start</button><button id="gba_resume">resume</button><button id="gba_roll">roll</button></div></div><div class="button_group"><button class="button_label action_toggle">halt</button><div class="actions button_inner_group"><button id="gba_stop">stop</button><button id="gba_stoponwin">stop on win</button></div></div><div class="button_group"><button class="button_label action_toggle">roll</button><div class="actions button_inner_group"><button id="gba_rollhi">hi</button><button id="gba_rolllo">lo</button><button id="gba_rollrand" title="Grabs random bytes from random.org">random</button><button id="gba_rollswitch">switch on loss</button></div></div><div class="button_group"><button class="button_label action_toggle">chaos</button><div class="actions button_inner_group"><button id="gba_chaos">go</button></div></div><div class="clear"></div></div><div class="bot-stats"><div class="statspanel"><h2>Bot Stats</h2><div class="slabel">Status:</div><span id="gbs_status">Halted</span><span id="gbs_statusmessage"></span><div class="clear"></div><div class="slabel">Bets placed:</div><span id="gbs_bet">0</span><div class="clear"></div><div class="slabel">Bets won:</div><span id="gbs_betwin">0</span><div class="clear"></div><div class="slabel">Bets lost:</div><span id="gbs_betlost">0</span><div class="clear"></div><div class="slabel">Longest streak:</div><span id="gbs_streak">0</span><div class="clear"></div></div><div class="statspanel"><h2>More Stats</h2><div class="slabel">Rollmode:</div><span id="gbs_rollmode">random</span><span id="gbs_rollmodecurrent">lo</span><div class="clear"></div><div class="slabel">Wagered:</div><span id="gbs_wagered">0</span><div class="clear"></div><div class="slabel">Profit:</div><span id="gbs_myprofit">0</span><div class="clear"></div><div class="slabel">Stop at profit:</div><span id="gbs_stopprofit">none</span><div class="clear"></div></div></div><div class="clear"></div><div class="bot-graph">Visual feedback goes here. Soon?</div><div class="bot-foot">Made a nice profit? Tips are welcome! 1Gray1ZsWo3kKBaCYdigiyPkD1pUnBqPxo';
                $panelWrapper = $('<div>').attr('id','graysbot').css({display: 'none'}).insertAfter('#faq'),
                $panel = $('<div>').addClass('panel').append(markup).appendTo($panelWrapper),
                $bal = $("#pct_balance"),
                $in_bet = $('#gb_bet'),
                $in_chance = $('#gb_chance'),
                $in_multiplier = $('#gb_multiplier'),
                $in_interval = $('#gb_interval'),
                $in_betstop = $('#gb_betstop'),
                $in_stopprofit = $('#gb_stopprofit'),
                $a_start = $('#gba_start'),
                $a_resume = $('#gba_resume'),
                $a_roll = $('#gba_roll'),
                $a_stop = $('#gba_stop'),
                $a_stoponwin = $('#gba_stoponwin'),
                $a_rollhi = $('#gba_rollhi'),
                $a_rolllo = $('#gba_rolllo'),
                $a_rollrand = $('#gba_rollrand'),
                $a_rollswitch = $('#gba_rollswitch'),
                $a_chaos = $('#gba_chaos'),
                $s_status = $('#gbs_status'),
                $s_statusmessage = $('#gbs_statusmessage'),
                $s_bet = $('#gbs_bet'),
                $s_betwin = $('#gbs_betwin'),
                $s_betlost = $('#gbs_betlost'),
                $s_streak = $('#gbs_streak'),
                $s_rollmode = $('#gbs_rollmode'),
                $s_rollmodecurrent = $('#gbs_rollmodecurrent'),
                $s_wagered = $('#gbs_wagered'),
                $s_myprofit = $('#gbs_myprofit'),
                $s_stopprofit = $('#gbs_stopprofit');
 
        // Include d3.js
 
        /* System stuff */
        this.initialized = false;
        this.auto = false;
        this.manual = false;
        this.stoponwin = false;
        this.stoponprofit = false;
        this.bet = 0;
        this.streak = 0;
        this.statusmessage = "";
        this.lastbetOutcome = null;
 
        /* Stats */
        this.stats = {
                won: 0,
                lost: 0,
                maxStreak: 0,
                currentProfit: 0,
                wagered: 0
        }
 
        /* Parameters */
        this.initialBet = parseFloat(localStorage.getItem('gb_initialBet')) || 0.0001;
        this.maxBet = parseFloat(localStorage.getItem('gb_maxBet')) || 0.01;
 
        this.initialBalance = 0;
        this.currentBalance = 0;
        this.profitStop = parseFloat(localStorage.getItem('gb_profitStop')) || 0;
      
        this.multiplyFactor = parseFloat(localStorage.getItem('gb_multiplyFactor')) || 2; // Current bet is multiplied by [multiplyFactor] every [interval] rolls
        this.interval = parseFloat(localStorage.getItem('gb_interval')) || 1;
        this.chance = parseFloat(localStorage.getItem('gb_chance')) || 49.5;
 
        this.hi_lo = "lo";
        this.rollRandom = true;
        this.rollSwitch = false;
 
        this.byteLock = false;
        this.byteCount = 0;
        this.byteOffset = 0;
        this.delay = 2000; // Wanna go slower or faster? Set this. Milliseconds.
 
        this.init = function() {
                if(this.initialized) {
                        return;
                }
 
                this.initialized = true;
                // Bind events
                /*socket.on("wins", this.isWin);
                socket.on("losses", this.isLoss);
                socket.on("jderror", this.isError); //*/
 
                socket.on("result", this.setBalance);
                socket.on("init", this.setBalance);
 
                $in_bet.val(tidy(this.initialBet));
                $in_chance.val(this.chance);
                $in_multiplier.val(this.multiplyFactor);
                $in_interval.val(this.interval);
                $in_betstop.val(tidy(this.maxBet));
                $in_stopprofit.val(tidy(this.profitStop));
 
                this.getNewRand();
 
                this.updateStats();
        }
 
        this.setBalance = function(data) {
                if(data.uid == uid && data.balance) {
                        var bal = parseFloat(data.balance);
                        this.currentBalance = bal;
                        if(this.initialBalance===0) {
                                this.initialBalance = bal;
                        }
                        if(data['win'] === true) {
                                this.isWin(data);
                        } else if(data['win'] === false) {
                                this.isLoss(data);
                        }
                }
        }
        this.setBalance = this.setBalance.bind(this);
 
        this.start = function() {
                this.auto = true;
                this.manual = false;
                this.statusmessage = "";
                this.bet = this.initialBet;
                this.stats.currentProfit = 0;
                this.roll();
        };
        this.stop = function(stoponwin) {
                if(stoponwin) {
                                this.stoponwin = true;
                } else {
                                this.auto = false;
                }
                this.updateStats();
        };
        this.resume = function() {
                this.auto = true;
                this.roll();
        };
 
        this.getNewRand = function() {
                this.byteLock = true;
                $.get("http://www.random.org/integers/?num=256&min=0&max=1024&col=2&base=2&format=plain&rnd=new", function(bytes) {
                        bytes = bytes.replace(/[^01]/g,'');
                        MG.bytes = bytes;
                        MG.byteCount = bytes.length;
                        MG.byteOffset = 0;
                        MG.byteLock = false;
                        MG.setHiLo();
                });
        }
 
        this.setHiLo = function() {
                if(this.rollRandom) {
                        this.hi_lo = (this.bytes[this.byteOffset++] === '1') ? 'hi' : 'lo';
                        if(this.byteOffset === this.byteCount) {
                                this.getNewRand();
                        }
                } else if(this.rollSwitch) {
 
                }
        }
 
        this.roll = function() {
                window.setTimeout(this.placeBet, this.delay);
        };
 
        this.placeBet = function() {
                if(this.auto || this.manual) {
                        socket.emit("bet", csrf, {
                                chance: "" + this.chance,
                                bet: this.bet.toFixed(Cool,
                                which: this.hi_lo
                        });
                        if(this.rollRandom && this.byteLock) {
                                window.setTimeout(this.placeBet, this.delay);
                                return;
                        } else {
                                this.setHiLo();
                        }
 
                }
        };
        this.placeBet = this.placeBet.bind(this);
 
        this.isWin = function(data) {
                this.streak = 0;
                this.stats.won++;
                this.stats.wagered += this.bet;
                this.lastbetOutcome = true;
 
                this.bet = this.initialBet;
                if(this.stoponprofit && (this.currentBalance-this.initialBalance) > this.profitStop) {
                        this.auto = false;
                        this.stoponprofit = false;
                        this.statusmessage = "profit limit";
                } else if(this.stoponwin) {
                        this.auto = false;
                        this.stoponwin = false;
                        this.statusmessage = "stop on win";
                } else if(this.auto) {
                        this.roll();
                }
                this.updateStats();
        };
        this.isWin = this.isWin.bind(this);
 
        this.isLoss = function(data) {
                this.streak++;
                this.stats.lost++;
                this.stats.wagered += this.bet;
                this.lastbetOutcome = false;
 
                if(this.streak % this.interval === 0) {
                        this.bet *= this.multiplyFactor;
                }
                this.stats.maxStreak = Math.max(this.streak, this.stats.maxStreak);
 
                if(this.bet > this.maxBet) {
                        this.statusmessage = "bet limit"
                        this.stoponwin = false;
                        this.auto = false;
                } else if(this.auto) {
                        if(this.rollSwitch) {
                                this.hi_lo = (this.hi_lo === 'hi') ? 'lo' : 'hi';
                        }
 
                        this.roll();
                }
                this.updateStats();
        };
        this.isLoss = this.isLoss.bind(this);
 
        this.isError = function(data) {
                this.auto = false;
                console.log('Error. Halting.');
                console.log(data);
        };
        this.isError = this.isError.bind(this);
 
        this.updateStats = function() {
                var status = this.auto ? "Running" : (this.manual ? "Manual" : "Halted"),
                        rollmode, currentroll;
 
                if(this.stoponwin && this.stoponprofit) {
                        status += '; SW|SP';
                } else if(this.stoponwin) {
                        status += '; SW';
                } else if(this.stoponprofit) {
                        status += '; SP';
                }
 
                if(this.rollRandom) {
                        rollmode = 'random';
                        $s_rollmodecurrent.text(this.hi_lo).css('display', '');
                } else if(this.rollSwitch) {
                        rollmode = 'switch';
                        $s_rollmodecurrent.text(this.hi_lo).css('display', '');
                } else {
                        rollmode = this.hi_lo;
                        $s_rollmodecurrent.text(currentroll).css('display', 'none');
                }
 
                $s_status.text(status);
                $s_bet.text(this.stats.won + this.stats.lost);
                $s_betwin.text(this.stats.won);
                $s_betlost.text(this.stats.lost);
                $s_streak.text(this.stats.maxStreak);
                $s_rollmode.text(rollmode);
                $s_wagered.text(commaify(this.stats.wagered.toFixed(Cool));
                $s_myprofit.text(commaify((this.currentBalance-this.initialBalance).toFixed(Cool));
                $s_stopprofit.text(this.profitStop ? commaify(this.profitStop.toFixed(Cool) : 'none');
 
                if(this.statusmessage) {
                        $s_statusmessage.text(this.statusmessage).css('display', '');
                } else {
                        $s_statusmessage.text('').css('display', 'none');
                }
        }
 
 
        // Some styling // There are other ways for this. Bear with me. Wink
        $('<style>').append('\
        #graysbot .bot-stats,\
        #graysbot .button_group {\
                margin-top: 16px;\
        }\
        #graysbot .bot-stats .slabel {\
                width: 160px;\
        }\
        #graysbot #gba_chaos {\
                background-color: #FFCCCC;\
                border: 5px solid #CC9999;\
        }\
        #graysbot #gba_chaos:hover {\
                background-color: #DDAAAA;\
        }\
        ').appendTo(document.head);
 
        $a_start.on({
                click: function() {
                        MG.initialBet = parseFloat( $in_bet.val() );
                        //MG.initialBalance = parseFloat( $bal.val() )
                        MG.maxBet = parseFloat( $in_betstop.val() );
                        MG.profitStop = parseFloat( $in_stopprofit.val() );
                        MG.chance = parseFloat( $in_chance.val() );
                        MG.interval = parseFloat( $in_interval.val() );
                        MG.multiplyFactor = parseFloat( $in_multiplier.val() );
                        MG.stoponprofit = !isNaN(MG.profitStop) && MG.profitStop > 0
 
                        localStorage.setItem('gb_initialBet', MG.initialBet);
                        localStorage.setItem('gb_maxBet', MG.maxBet);
                        localStorage.setItem('gb_profitStop', MG.profitStop);
                        localStorage.setItem('gb_multiplyFactor', MG.multiplyFactor);
                        localStorage.setItem('gb_interval', MG.interval);
                        localStorage.setItem('gb_chance', MG.chance);
 
                        MG.chaos = false;
                        MG.stoponwin = false;
 
                        MG.updateStats();
 
                        MG.start();
                }
        });
        $a_resume.on({
                click: function() {
                        MG.resume();
                }
        });
        $a_roll.on({
                click: function() {
                        MG.stop();
                        MG.manual = true;
                        MG.roll();
                }
        });
        $a_stop.on({
                click: function() {
                        MG.stop();
                }
        });
        $a_stoponwin.on({
                click: function() {
                        MG.stop(true)
                }
        });
        $a_rollhi.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = false;
                        MG.hi_lo = 'hi';
                        MG.updateStats();
                }
        });
        $a_rolllo.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = false;
                        MG.hi_lo = 'lo';
                        MG.updateStats();
                }
        });
        $a_rollrand.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = true;
                        MG.updateStats();
                }
        });
        $a_rollswitch.on({
                click: function() {
                        MG.rollSwitch = true;
                        MG.rollRandom = false;
                        MG.updateStats();
                }
        });
        $a_chaos.on({
                click: function() {
                        msg("Chaosmode has yet to be implemented!");
                }
        })
 
        this.init();
        window.MG = this;
      
        // Lastly add the tab
        $('<li>').append($('<a>').text('Bot').attr('href','#graysbot')).appendTo('.tabs');
});

You need to download the Greasemonkey addon for Firefox.
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
October 01, 2013, 03:00:59 AM
 #6

You can just pay me half of what you would bet and you'll be better off.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
Magazine
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
October 01, 2013, 03:02:28 AM
 #7

You can just pay me half of what you would bet and you'll be better off.


This,

Over the course of running a script you will run into deep runs of loses and it will screw you over.
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
October 01, 2013, 03:08:09 AM
 #8


Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
xsfgsdrwe (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
October 01, 2013, 03:09:33 AM
 #9

Yes I understand dice is 100% going to take your money in the end. I just am testing a few things out.

It's nothing special really. start with 50,000 units and start betting 1 when you lose bet 2 then 4/8/12 etc till you win. Essentially betting thousands to win 1. I just want to see how long it takes to bust when able to double your bet at least 15x.  
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
October 01, 2013, 03:11:21 AM
 #10

You're going to need 4 million units to survive the above chart.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
Ditto
Sr. Member
****
Offline Offline

Activity: 330
Merit: 250


View Profile
October 01, 2013, 03:13:56 AM
 #11

I'll do it for 2 BTC.
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
October 01, 2013, 03:23:57 AM
 #12

For 1.9 BTC I'll write you a script that simulates the betting.  When you lose everything it'll say:  You saved ___ BTC.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
October 01, 2013, 03:31:40 AM
 #13

I just want to see how long it takes to bust when able to double your bet at least 15x.  

Math lets you keep your money:

http://bitchaos.com/

You will be busted after 15 loses in row.
Probability of lose 15 times in row in 15 executions is 0.0035429961%.
According to The Deep Magic, overall probability of bust within 50000 executions is 58.38%, and to end up with profit - 41.62%
If You'll keep winning for a longer time, amount of possible loses will raise, along with overall chance to make profit - however not a very much.
If You'll not bust, You'll end up with balance around 75250, so 25250 profit.
monbux
Legendary
*
Offline Offline

Activity: 1736
Merit: 1024



View Profile WWW
October 01, 2013, 08:52:55 PM
 #14

There is a Greasemoney script but it has a problem of betting way too fast and blocking your IP for a hour so the code needs a tweak.

Quote
// ==UserScript==
// @name                JustDice Martingale Bot
// @namespace   none
// @author      Gray
// @version     1.1
// @include     https://just-dice.com/*
// @grant       none
// ==/UserScript==
 
/* How would you go about using this?
 *
 * Install Greasemonkey plugin for Firefox
 * Install Firebug plugin for Firefox (It's better than the builtin console.)
 *
 * Make a new script with Greasemonkey
 * Type whatever you want into the form
 * Then paste this whole file into the editor
 *
 * Adjust to your needs.
 * Run.
 *
 * Other things you can do:
 *
 * That's it!
 *
 * Made a profit and feel like tipping people without seeing their genitals?
 *
 * Go ahead: 1Gray1ZsWo3kKBaCYdigiyPkD1pUnBqPxo
 *
 * Now go have fun with this... thing!
**/
 
// Heres the script
 
$('<script>').attr({
        src: 'http://d3js.org/d3.v3.min.js',
        charset: 'UTF-8'
}).appendTo(document.body);
 
$(function() {
        var markup = '<div class="bot-controls"><fieldset><div class="row"><p class="llabel">bet start</p><input id="gb_bet" value="0.001"><p class="rlabel">BTC</p></div><div class="row"><p class="llabel">chance</p><input id="gb_chance" value="50"><p class="rlabel">%</p></div></fieldset><fieldset><div class="row"><p class="llabel">bet multiplier</p><input id="gb_multiplier" value="2"><p class="rlabel" title="The bet gets multiplied by [mutiply factor] every [interval] steps.">x</p></div><div class="row"><p class="llabel">interval</p><input id="gb_interval" value="1"><p class="rlabel" title="The bet gets multiplied by [mutiply factor] every [interval] steps.">&nbsp;</p></div></fieldset><fieldset><div class="row"><p class="llabel">bet stop</p><input id="gb_betstop" value="0.01"><p class="rlabel">BTC</p></div><div class="row"><p class="llabel">profit stop</p><input id="gb_stopprofit" value="0.1"><p class="rlabel">BTC</p></div></fieldset><div class="clear"></div><div class="button_group"><button class="button_label action_toggle">start</button><div class="actions button_inner_group"><button id="gba_start">start</button><button id="gba_resume">resume</button><button id="gba_roll">roll</button></div></div><div class="button_group"><button class="button_label action_toggle">halt</button><div class="actions button_inner_group"><button id="gba_stop">stop</button><button id="gba_stoponwin">stop on win</button></div></div><div class="button_group"><button class="button_label action_toggle">roll</button><div class="actions button_inner_group"><button id="gba_rollhi">hi</button><button id="gba_rolllo">lo</button><button id="gba_rollrand" title="Grabs random bytes from random.org">random</button><button id="gba_rollswitch">switch on loss</button></div></div><div class="button_group"><button class="button_label action_toggle">chaos</button><div class="actions button_inner_group"><button id="gba_chaos">go</button></div></div><div class="clear"></div></div><div class="bot-stats"><div class="statspanel"><h2>Bot Stats</h2><div class="slabel">Status:</div><span id="gbs_status">Halted</span><span id="gbs_statusmessage"></span><div class="clear"></div><div class="slabel">Bets placed:</div><span id="gbs_bet">0</span><div class="clear"></div><div class="slabel">Bets won:</div><span id="gbs_betwin">0</span><div class="clear"></div><div class="slabel">Bets lost:</div><span id="gbs_betlost">0</span><div class="clear"></div><div class="slabel">Longest streak:</div><span id="gbs_streak">0</span><div class="clear"></div></div><div class="statspanel"><h2>More Stats</h2><div class="slabel">Rollmode:</div><span id="gbs_rollmode">random</span><span id="gbs_rollmodecurrent">lo</span><div class="clear"></div><div class="slabel">Wagered:</div><span id="gbs_wagered">0</span><div class="clear"></div><div class="slabel">Profit:</div><span id="gbs_myprofit">0</span><div class="clear"></div><div class="slabel">Stop at profit:</div><span id="gbs_stopprofit">none</span><div class="clear"></div></div></div><div class="clear"></div><div class="bot-graph">Visual feedback goes here. Soon?</div><div class="bot-foot">Made a nice profit? Tips are welcome! 1Gray1ZsWo3kKBaCYdigiyPkD1pUnBqPxo';
                $panelWrapper = $('<div>').attr('id','graysbot').css({display: 'none'}).insertAfter('#faq'),
                $panel = $('<div>').addClass('panel').append(markup).appendTo($panelWrapper),
                $bal = $("#pct_balance"),
                $in_bet = $('#gb_bet'),
                $in_chance = $('#gb_chance'),
                $in_multiplier = $('#gb_multiplier'),
                $in_interval = $('#gb_interval'),
                $in_betstop = $('#gb_betstop'),
                $in_stopprofit = $('#gb_stopprofit'),
                $a_start = $('#gba_start'),
                $a_resume = $('#gba_resume'),
                $a_roll = $('#gba_roll'),
                $a_stop = $('#gba_stop'),
                $a_stoponwin = $('#gba_stoponwin'),
                $a_rollhi = $('#gba_rollhi'),
                $a_rolllo = $('#gba_rolllo'),
                $a_rollrand = $('#gba_rollrand'),
                $a_rollswitch = $('#gba_rollswitch'),
                $a_chaos = $('#gba_chaos'),
                $s_status = $('#gbs_status'),
                $s_statusmessage = $('#gbs_statusmessage'),
                $s_bet = $('#gbs_bet'),
                $s_betwin = $('#gbs_betwin'),
                $s_betlost = $('#gbs_betlost'),
                $s_streak = $('#gbs_streak'),
                $s_rollmode = $('#gbs_rollmode'),
                $s_rollmodecurrent = $('#gbs_rollmodecurrent'),
                $s_wagered = $('#gbs_wagered'),
                $s_myprofit = $('#gbs_myprofit'),
                $s_stopprofit = $('#gbs_stopprofit');
 
        // Include d3.js
 
        /* System stuff */
        this.initialized = false;
        this.auto = false;
        this.manual = false;
        this.stoponwin = false;
        this.stoponprofit = false;
        this.bet = 0;
        this.streak = 0;
        this.statusmessage = "";
        this.lastbetOutcome = null;
 
        /* Stats */
        this.stats = {
                won: 0,
                lost: 0,
                maxStreak: 0,
                currentProfit: 0,
                wagered: 0
        }
 
        /* Parameters */
        this.initialBet = parseFloat(localStorage.getItem('gb_initialBet')) || 0.0001;
        this.maxBet = parseFloat(localStorage.getItem('gb_maxBet')) || 0.01;
 
        this.initialBalance = 0;
        this.currentBalance = 0;
        this.profitStop = parseFloat(localStorage.getItem('gb_profitStop')) || 0;
      
        this.multiplyFactor = parseFloat(localStorage.getItem('gb_multiplyFactor')) || 2; // Current bet is multiplied by [multiplyFactor] every [interval] rolls
        this.interval = parseFloat(localStorage.getItem('gb_interval')) || 1;
        this.chance = parseFloat(localStorage.getItem('gb_chance')) || 49.5;
 
        this.hi_lo = "lo";
        this.rollRandom = true;
        this.rollSwitch = false;
 
        this.byteLock = false;
        this.byteCount = 0;
        this.byteOffset = 0;
        this.delay = 2000; // Wanna go slower or faster? Set this. Milliseconds.
 
        this.init = function() {
                if(this.initialized) {
                        return;
                }
 
                this.initialized = true;
                // Bind events
                /*socket.on("wins", this.isWin);
                socket.on("losses", this.isLoss);
                socket.on("jderror", this.isError); //*/
 
                socket.on("result", this.setBalance);
                socket.on("init", this.setBalance);
 
                $in_bet.val(tidy(this.initialBet));
                $in_chance.val(this.chance);
                $in_multiplier.val(this.multiplyFactor);
                $in_interval.val(this.interval);
                $in_betstop.val(tidy(this.maxBet));
                $in_stopprofit.val(tidy(this.profitStop));
 
                this.getNewRand();
 
                this.updateStats();
        }
 
        this.setBalance = function(data) {
                if(data.uid == uid && data.balance) {
                        var bal = parseFloat(data.balance);
                        this.currentBalance = bal;
                        if(this.initialBalance===0) {
                                this.initialBalance = bal;
                        }
                        if(data['win'] === true) {
                                this.isWin(data);
                        } else if(data['win'] === false) {
                                this.isLoss(data);
                        }
                }
        }
        this.setBalance = this.setBalance.bind(this);
 
        this.start = function() {
                this.auto = true;
                this.manual = false;
                this.statusmessage = "";
                this.bet = this.initialBet;
                this.stats.currentProfit = 0;
                this.roll();
        };
        this.stop = function(stoponwin) {
                if(stoponwin) {
                                this.stoponwin = true;
                } else {
                                this.auto = false;
                }
                this.updateStats();
        };
        this.resume = function() {
                this.auto = true;
                this.roll();
        };
 
        this.getNewRand = function() {
                this.byteLock = true;
                $.get("http://www.random.org/integers/?num=256&min=0&max=1024&col=2&base=2&format=plain&rnd=new", function(bytes) {
                        bytes = bytes.replace(/[^01]/g,'');
                        MG.bytes = bytes;
                        MG.byteCount = bytes.length;
                        MG.byteOffset = 0;
                        MG.byteLock = false;
                        MG.setHiLo();
                });
        }
 
        this.setHiLo = function() {
                if(this.rollRandom) {
                        this.hi_lo = (this.bytes[this.byteOffset++] === '1') ? 'hi' : 'lo';
                        if(this.byteOffset === this.byteCount) {
                                this.getNewRand();
                        }
                } else if(this.rollSwitch) {
 
                }
        }
 
        this.roll = function() {
                window.setTimeout(this.placeBet, this.delay);
        };
 
        this.placeBet = function() {
                if(this.auto || this.manual) {
                        socket.emit("bet", csrf, {
                                chance: "" + this.chance,
                                bet: this.bet.toFixed(Cool,
                                which: this.hi_lo
                        });
                        if(this.rollRandom && this.byteLock) {
                                window.setTimeout(this.placeBet, this.delay);
                                return;
                        } else {
                                this.setHiLo();
                        }
 
                }
        };
        this.placeBet = this.placeBet.bind(this);
 
        this.isWin = function(data) {
                this.streak = 0;
                this.stats.won++;
                this.stats.wagered += this.bet;
                this.lastbetOutcome = true;
 
                this.bet = this.initialBet;
                if(this.stoponprofit && (this.currentBalance-this.initialBalance) > this.profitStop) {
                        this.auto = false;
                        this.stoponprofit = false;
                        this.statusmessage = "profit limit";
                } else if(this.stoponwin) {
                        this.auto = false;
                        this.stoponwin = false;
                        this.statusmessage = "stop on win";
                } else if(this.auto) {
                        this.roll();
                }
                this.updateStats();
        };
        this.isWin = this.isWin.bind(this);
 
        this.isLoss = function(data) {
                this.streak++;
                this.stats.lost++;
                this.stats.wagered += this.bet;
                this.lastbetOutcome = false;
 
                if(this.streak % this.interval === 0) {
                        this.bet *= this.multiplyFactor;
                }
                this.stats.maxStreak = Math.max(this.streak, this.stats.maxStreak);
 
                if(this.bet > this.maxBet) {
                        this.statusmessage = "bet limit"
                        this.stoponwin = false;
                        this.auto = false;
                } else if(this.auto) {
                        if(this.rollSwitch) {
                                this.hi_lo = (this.hi_lo === 'hi') ? 'lo' : 'hi';
                        }
 
                        this.roll();
                }
                this.updateStats();
        };
        this.isLoss = this.isLoss.bind(this);
 
        this.isError = function(data) {
                this.auto = false;
                console.log('Error. Halting.');
                console.log(data);
        };
        this.isError = this.isError.bind(this);
 
        this.updateStats = function() {
                var status = this.auto ? "Running" : (this.manual ? "Manual" : "Halted"),
                        rollmode, currentroll;
 
                if(this.stoponwin && this.stoponprofit) {
                        status += '; SW|SP';
                } else if(this.stoponwin) {
                        status += '; SW';
                } else if(this.stoponprofit) {
                        status += '; SP';
                }
 
                if(this.rollRandom) {
                        rollmode = 'random';
                        $s_rollmodecurrent.text(this.hi_lo).css('display', '');
                } else if(this.rollSwitch) {
                        rollmode = 'switch';
                        $s_rollmodecurrent.text(this.hi_lo).css('display', '');
                } else {
                        rollmode = this.hi_lo;
                        $s_rollmodecurrent.text(currentroll).css('display', 'none');
                }
 
                $s_status.text(status);
                $s_bet.text(this.stats.won + this.stats.lost);
                $s_betwin.text(this.stats.won);
                $s_betlost.text(this.stats.lost);
                $s_streak.text(this.stats.maxStreak);
                $s_rollmode.text(rollmode);
                $s_wagered.text(commaify(this.stats.wagered.toFixed(Cool));
                $s_myprofit.text(commaify((this.currentBalance-this.initialBalance).toFixed(Cool));
                $s_stopprofit.text(this.profitStop ? commaify(this.profitStop.toFixed(Cool) : 'none');
 
                if(this.statusmessage) {
                        $s_statusmessage.text(this.statusmessage).css('display', '');
                } else {
                        $s_statusmessage.text('').css('display', 'none');
                }
        }
 
 
        // Some styling // There are other ways for this. Bear with me. Wink
        $('<style>').append('\
        #graysbot .bot-stats,\
        #graysbot .button_group {\
                margin-top: 16px;\
        }\
        #graysbot .bot-stats .slabel {\
                width: 160px;\
        }\
        #graysbot #gba_chaos {\
                background-color: #FFCCCC;\
                border: 5px solid #CC9999;\
        }\
        #graysbot #gba_chaos:hover {\
                background-color: #DDAAAA;\
        }\
        ').appendTo(document.head);
 
        $a_start.on({
                click: function() {
                        MG.initialBet = parseFloat( $in_bet.val() );
                        //MG.initialBalance = parseFloat( $bal.val() )
                        MG.maxBet = parseFloat( $in_betstop.val() );
                        MG.profitStop = parseFloat( $in_stopprofit.val() );
                        MG.chance = parseFloat( $in_chance.val() );
                        MG.interval = parseFloat( $in_interval.val() );
                        MG.multiplyFactor = parseFloat( $in_multiplier.val() );
                        MG.stoponprofit = !isNaN(MG.profitStop) && MG.profitStop > 0
 
                        localStorage.setItem('gb_initialBet', MG.initialBet);
                        localStorage.setItem('gb_maxBet', MG.maxBet);
                        localStorage.setItem('gb_profitStop', MG.profitStop);
                        localStorage.setItem('gb_multiplyFactor', MG.multiplyFactor);
                        localStorage.setItem('gb_interval', MG.interval);
                        localStorage.setItem('gb_chance', MG.chance);
 
                        MG.chaos = false;
                        MG.stoponwin = false;
 
                        MG.updateStats();
 
                        MG.start();
                }
        });
        $a_resume.on({
                click: function() {
                        MG.resume();
                }
        });
        $a_roll.on({
                click: function() {
                        MG.stop();
                        MG.manual = true;
                        MG.roll();
                }
        });
        $a_stop.on({
                click: function() {
                        MG.stop();
                }
        });
        $a_stoponwin.on({
                click: function() {
                        MG.stop(true)
                }
        });
        $a_rollhi.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = false;
                        MG.hi_lo = 'hi';
                        MG.updateStats();
                }
        });
        $a_rolllo.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = false;
                        MG.hi_lo = 'lo';
                        MG.updateStats();
                }
        });
        $a_rollrand.on({
                click: function() {
                        MG.rollSwitch = false;
                        MG.rollRandom = true;
                        MG.updateStats();
                }
        });
        $a_rollswitch.on({
                click: function() {
                        MG.rollSwitch = true;
                        MG.rollRandom = false;
                        MG.updateStats();
                }
        });
        $a_chaos.on({
                click: function() {
                        msg("Chaosmode has yet to be implemented!");
                }
        })
 
        this.init();
        window.MG = this;
      
        // Lastly add the tab
        $('<li>').append($('<a>').text('Bot').attr('href','#graysbot')).appendTo('.tabs');
});

You need to download the Greasemonkey addon for Firefox.

Gray's bot is broken, at least for me :/
uoyeparannog
Member
**
Offline Offline

Activity: 72
Merit: 10


Drunk Lunatic


View Profile WWW
October 01, 2013, 09:48:30 PM
 #15

I sent You message if You're still interested.

Below two examples from bot I made for myself (works on PD) to play from console and bet faster.





It can run martingale, labouchere, d'alembert, oscar's grind and can even make cashout when needed. Of course not everyone likes playing on console so I can make some GUI.

By the way, I wanted to make bot like one above, but web-based, available for anyone who wants to use it (maybe for some micro fee) and release it on Chaos Prediction, with simple GUI and intergated calculations. Not sure if it's good idea, I can receive a lot of PMs after, like "wtf dude I lost on martingale, just after 99999 rolls! WHY?!".

BTW, deepceleron, thanks for using calculator!

Chaos Prediction Center
1ChaosQ9uFudq5Xy8i9tiiECiDhKbtjiJd
Nixsy
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
October 01, 2013, 10:04:01 PM
Last edit: October 01, 2013, 10:16:07 PM by Nixsy
 #16

Chrome extension

https://github.com/darby999/just-dice.com

original stops on win/lose

https://github.com/CriticalNix/just-dice.com

One I changed slightly and added divest all and invest all buttons (found on pastebin)



If you use either of these and win feel free to donate to the original dev darby999.
1BZiXP6EoLgm3LjnExVQSSB4c7UbUqRVPf

A link to his BTC address can also be found on his github page.

Nixsy
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
October 01, 2013, 10:12:45 PM
 #17

Chrome extension

https://github.com/darby999/just-dice.com

original stops on win/lose

https://github.com/CriticalNix/just-dice.com

One I changed slightly and added divest all and invest all buttons (found on pastebin)



Does that work for auto divest and invest?

No it is not auto. It just adds handy buttons to use.

b!z
Legendary
*
Offline Offline

Activity: 1582
Merit: 1010



View Profile
October 02, 2013, 10:47:47 AM
 #18

I think I saw an opensource script like that somewhere in the gambling section earlier. Search to see if you can find it.
DiamondCardz
Legendary
*
Offline Offline

Activity: 1134
Merit: 1105



View Profile WWW
October 02, 2013, 04:09:33 PM
 #19

Chrome extension

https://github.com/darby999/just-dice.com

original stops on win/lose

https://github.com/CriticalNix/just-dice.com

One I changed slightly and added divest all and invest all buttons (found on pastebin)



If you use either of these and win feel free to donate to the original dev darby999.
1BZiXP6EoLgm3LjnExVQSSB4c7UbUqRVPf

A link to his BTC address can also be found on his github page.

Hm. That seems very interesting, actually.

I think I'll take a look through the code...

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!