SHOW:
|
|
- or go back to the newest paste.
| 1 | // [BITSLER BOT V1.2] by thizk | |
| 2 | // | |
| 3 | // changelog v1.2: | |
| 4 | // - seprate stop profit - stake | |
| 5 | // | |
| 6 | // changelog v1.1: | |
| 7 | // - add option "restart bet on stake" | |
| 8 | // - fix stake and profit calculation | |
| 9 | // | |
| 10 | // changelog v1.0: | |
| 11 | // - start or stop button | |
| 12 | // - chance % change | |
| 13 | // - hi or lo betting | |
| 14 | // - zigzag betting | |
| 15 | // - profit or stake limitation | |
| 16 | // - user interface | |
| 17 | // - auto change seeds | |
| 18 | // - increase bet on lose | |
| 19 | ||
| 20 | if($('#aside-container').is(":visible") != false){
| |
| 21 | $('#close-chat').trigger('click');
| |
| 22 | } | |
| 23 | ||
| 24 | ||
| 25 | $("#column-right").append('\
| |
| 26 | <div style="margin-top:5px; padding-bottom:5px; width:327.5px;background-color: #2e323b;color:whitesmoke;font-family:\'Open Sans\',\'Helvetica Neue\',Helvetica,Arial,sans-serif;">\ | |
| 27 | <table width="100%" border="0" cellspacing="0" cellpadding="5">\ | |
| 28 | <div style="text-align: center; padding: 10px 8px 5px 8px; width:327.5px; font-weight: bold; border-bottom: solid #181a1e;"> BITSLER BOT v1.2</div>\ | |
| 29 | <tbody>\ | |
| 30 | <tr>\ | |
| 31 | <td style="padding:6px;color:whitesmoke;text-align: center; font-size:11px;">CHANCE</td>\ | |
| 32 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_chance" value="49.1"></td>\ | |
| 33 | </tr>\ | |
| 34 | <tr>\ | |
| 35 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">INCREASE ON LOST [%]</td>\ | |
| 36 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_onlost" value="0"></td>\ | |
| 37 | </tr>\ | |
| 38 | <tr>\ | |
| 39 | <td style="padding:6px;color:whitesmoke;text-align: center; font-size:11px;">BET MODE</td>\ | |
| 40 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_mode" placeholder="h | l | z"></td>\ | |
| 41 | </tr>\ | |
| 42 | <tr>\ | |
| 43 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">BET AMOUNT</td>\ | |
| 44 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_bet" value="0.00000001"></td>\ | |
| 45 | </tr>\ | |
| 46 | <tr>\ | |
| 47 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">PROFIT</td>\ | |
| 48 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_profit" value="0.00001024"></td>\ | |
| 49 | </tr>\ | |
| 50 | <tr>\ | |
| 51 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">STAKE</td>\ | |
| 52 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="text" id="_stake" value="0.00001024"></td>\ | |
| 53 | </tr>\ | |
| 54 | <tr>\ | |
| 55 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">STOP ON STAKE </td>\ | |
| 56 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="checkbox" id="_stopstake"></td>\ | |
| 57 | </tr>\ | |
| 58 | <tr>\ | |
| 59 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">STOP ON PROFIT </td>\ | |
| 60 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="checkbox" id="_stopprofit"></td>\ | |
| 61 | </tr>\ | |
| 62 | <tr>\ | |
| 63 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">RESTART BET ON STAKE</td>\ | |
| 64 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="checkbox" id="_restart"></td>\ | |
| 65 | </tr>\ | |
| 66 | <tr>\ | |
| 67 | <td style="padding:6px;color:whitesmoke;text-align: center;font-size:11px;">AUTO CHANGE SEED</td>\ | |
| 68 | <td style="width:200px;"><input style="padding:5px; background-color:#101215;width:97%;border:0;color:white; margin:3px 0;" type="checkbox" id="_auto"></td>\ | |
| 69 | </tr>\ | |
| 70 | <tr>\ | |
| 71 | <td></td><td><button onclick="startDice();return false;" id="_start" style="width:97%;background-color: #101215;border: none; color: white; padding: 7px 15px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px;"> START </button></td>\ | |
| 72 | </tr>\ | |
| 73 | </tbody>\ | |
| 74 | </table>\ | |
| 75 | </div>'); | |
| 76 | ||
| 77 | var _bet,_chance,_onlost,_mode, _auto, _stopprofit, _stopstake, _start = false, _stake, _profit,_betting, _task, _seeds,_restart; | |
| 78 | ||
| 79 | ||
| 80 | function startDice(){
| |
| 81 | _mode = document.getElementById('_mode').value;
| |
| 82 | _bet = parseFloat(document.getElementById('_bet').value);
| |
| 83 | _profit = parseFloat(document.getElementById('_profit').value);
| |
| 84 | _stake = parseFloat(document.getElementById('_stake').value);
| |
| 85 | _stake = -_stake; | |
| 86 | _chance = parseFloat(document.getElementById('_chance').value);
| |
| 87 | _onlost = parseFloat(document.getElementById('_onlost').value);
| |
| 88 | _stopprofit = document.getElementById('_stopprofit').checked;
| |
| 89 | _stopstake = document.getElementById('_stopstake').checked;
| |
| 90 | _auto = document.getElementById('_auto').checked;
| |
| 91 | _restart = document.getElementById('_restart').checked;
| |
| 92 | _betting = 0; | |
| 93 | ||
| 94 | if(_mode != 'h' && _mode != 'l' && _mode != 'z'){
| |
| 95 | alert("Bet Mode incorrect!");
| |
| 96 | return; | |
| 97 | } | |
| 98 | ||
| 99 | _start = !_start; | |
| 100 | if(_start != true){
| |
| 101 | $('#_start').text("START");
| |
| 102 | _betting = 0; | |
| 103 | clearInterval(_task); | |
| 104 | clearInterval(_seeds); | |
| 105 | return; | |
| 106 | }else{
| |
| 107 | $('#_start').text("STOP");
| |
| 108 | } | |
| 109 | ||
| 110 | if($("#updated_condition").text().indexOf('>') !== -1 && _mode == 'l'){
| |
| 111 | $("#updated_condition").trigger('click');
| |
| 112 | } | |
| 113 | else if($("#updated_condition").text().indexOf('<') !== -1 && _mode == 'h'){
| |
| 114 | $("#updated_condition").trigger('click');
| |
| 115 | } | |
| 116 | ||
| 117 | // | |
| 118 | $('#amount').val(_bet.toFixed(8));
| |
| 119 | // | |
| 120 | $("#editable-chance").trigger('click');
| |
| 121 | $("#editable-chance-field").val(_chance);
| |
| 122 | $("#editable-chance-field").trigger('focusout');
| |
| 123 | ||
| 124 | if(_auto){
| |
| 125 | // CHANGE | |
| 126 | change_seeds(); | |
| 127 | ||
| 128 | // SET TASK | |
| 129 | _seeds = setInterval(function() {
| |
| 130 | change_seeds(); | |
| 131 | console.log("CHANGE SEED TASK = " + _seeds.toString());
| |
| 132 | }, Math.round(Math.random() * (600000 - 300000) + 300000)); | |
| 133 | } | |
| 134 | _betting = _bet; | |
| 135 | // | |
| 136 | $('#btn-bet-dice').trigger('click');
| |
| 137 | } | |
| 138 | function increaseOnLost(bet, percent){
| |
| 139 | return parseFloat(bet) + ((parseFloat(bet)*percent)/100); | |
| 140 | } | |
| 141 | ||
| 142 | // | |
| 143 | $('#history-my-bets-dice').unbind();
| |
| 144 | $('#history-my-bets-dice').bind("DOMSubtreeModified",function(event){
| |
| 145 | if( $(event.currentTarget) ) | |
| 146 | {
| |
| 147 | clearInterval(_task); | |
| 148 | var bet , x, balance; | |
| 149 | if(_start) | |
| 150 | {
| |
| 151 | balance = parseFloat(document.getElementById('balances-lg').innerText);
| |
| 152 | if( balance<= 0 || parseFloat($('#amount').val()) > balance){
| |
| 153 | startDice(); | |
| 154 | return; | |
| 155 | } | |
| 156 | x = ($('#history-my-bets-dice tr td:last-child span')[0].innerText.indexOf('+') != 0 ) ? false : true;
| |
| 157 | _betting = parseFloat(_betting) + parseFloat($('#history-my-bets-dice tr td:last-child span')[0].innerText);
| |
| 158 | ||
| 159 | ||
| 160 | if(x != true) {
| |
| 161 | if(_onlost > 0){
| |
| 162 | bet = increaseOnLost($('#amount').val(), _onlost);
| |
| 163 | $('#amount').val(bet.toFixed(8));
| |
| 164 | } | |
| 165 | }else {
| |
| 166 | $('#amount').val(_bet.toFixed(8));
| |
| 167 | } | |
| 168 | ||
| 169 | ||
| 170 | if(_stopprofit){
| |
| 171 | if(_betting >= _profit){
| |
| 172 | startDice(); | |
| 173 | alert("PROFIT REACHED!");
| |
| 174 | return; | |
| 175 | } | |
| 176 | } | |
| 177 | ||
| 178 | if(_stopstake){
| |
| 179 | if( _betting <= _stake ){
| |
| 180 | startDice(); | |
| 181 | alert("STAKE REACHED!");
| |
| 182 | return; | |
| 183 | } | |
| 184 | ||
| 185 | } | |
| 186 | else {
| |
| 187 | if(_betting <= _stake){
| |
| 188 | if( _restart ){
| |
| 189 | clearInterval(_task); | |
| 190 | _betting = 0; | |
| 191 | $('#amount').val(_bet.toFixed(8));
| |
| 192 | }else{
| |
| 193 | startDice(); | |
| 194 | alert("STAKE REACHED!");
| |
| 195 | return; | |
| 196 | } | |
| 197 | } | |
| 198 | } | |
| 199 | _task = setInterval(function(){
| |
| 200 | if(!_start){
| |
| 201 | clearInterval(_task); | |
| 202 | clearInterval(_seeds); | |
| 203 | return; | |
| 204 | } | |
| 205 | ||
| 206 | if(_mode == 'z'){
| |
| 207 | $("#updated_condition").trigger('click');
| |
| 208 | } | |
| 209 | ||
| 210 | $('#btn-bet-dice').trigger('click');
| |
| 211 | }, 1000) | |
| 212 | } | |
| 213 | } | |
| 214 | }); |