Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var flameBot, betspeed, aftermanualtrigger, swaplosscount, swapcount, loop, loopenabled, betData, condition, profit, target, losscount, totalloss, totalwin, currentbet, basebet, mainmult, initmult, result, afterwin, UI = '',
- UI2 = '';
- profit = 0;
- var streakcounter = [];
- var balance;
- var winstreak = 0;
- betspeed = 500;
- loopcount = 0;
- betstarted = false;
- loopenabled = false;
- aftermanualtrigger = false;
- afterwin = false;
- var consecutive = 0,
- singlewin = 0;
- swaplosscount = 0;
- var conseclossenabled = false;
- var swapnextwin = false;
- swapcount = 0;
- var firstInit = true;
- if (firstInit == true) {
- balance = Math.floor($('div.hero span.btn__text.select div').text()*1e8);
- }
- flameBot = {
- initialize: {
- init1: function () {
- var lib = '<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/dark-hive/jquery-ui.css" /><script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>';
- $(lib).appendTo('head');
- setTimeout(function () {
- flameBot.initialize.init2();
- }, 1000);
- },
- init2: function () {
- losscount = 0;
- totalloss = 0;
- totalwin = 0;
- $('.hero__main').empty().css('width', '550px') & $('.hero__main').css("padding", "0") & $(UI).appendTo('.hero__main') &
- $('#flameBot').tabs() & $('button').button().css('font-size', '13px').css('padding', '5px');
- $('#stats th').css("width", "20%").css("font-size", "14px");
- $('#hilo, #resetorzero').buttonset();
- $('#flameBot li').css('font-size', '15px');
- $('#flameBot #resetorzero').css('font-size', '13px');
- $('#flameBot div[role=tabpanel] td').css('padding', 1);
- $('.hero__main').css('margin-top', '-75px');
- $('#stats2 th').css('width', '6.25%');
- var css = '',
- backgroundurl = 'http://cdn.wonderfulengineering.com/wp-content/uploads/2014/01/HD-backgrounds-3.jpg';
- css += '<style id="paraDark">';
- css += 'header, .tabs, .slideout__content__inside, .chat__you *, .btn, .hero__main, .rollrow-dark, .rollbox--prominent, .chat__input-holder{background-color:#121212 !important;color:#ccc !important;}';
- css += 'time{color:#ccc !important;}';
- css += 'div.tabs > div > div.live-data-header > div{background-color:#111111;border-top:1px solid #777; border-bottom:1px solid #777;}';
- css += '.btn,.btn--secondary.btn--active,.btn--secondary.btn--selector, .btn--submit:last-child{border:1px solid #777 !important;background-color:#242130 !important;color:#ccc!important;}';
- css += '.btn:hover,.btn--secondary.btn--active:hover,.btn--secondary.btn--selector:hover{border:1px solid #777 !important;background-color:#322E47 !important;color:#ccc!important;}';
- css += '.hero{margin-bottom:0px;background:url("' + backgroundurl + '") no-repeat 50% 50%;}';
- css += '.slideout *{color:#ccc;}';
- css += '.tabs{padding-top:20px;border-top:1px solid #777 !important;}';
- css += 'header{border: 1px solid #777 !important;border-left:none !important;border-right:none !important;}';
- css += '.rollrow-thin, .rollrow-dark .chat__input-holder {background-color:#212121;}';
- css += '.input{background-color:#323232 !important;color:#ccc;}';
- css += '.action-open-slideout{background-color:#121212 !important;}';
- css += 'span.admin{color:red !important}';
- css += '</style>';
- $(css).appendTo('head');
- $('#stats2, #stats3').css('margin-left', '10px');
- $('#stats3 th').css('width', '25%').css('text-align', 'center');
- $('#stats3').css('width', '50%').css('text-align', 'center');
- $('<center><button onclick="flameBot.API.bet();" class="btn btn--primary btn--huge btn--limited btn--block text--center" id="spinner2">Roll</button></center>').appendTo('.hero__main');
- $('#resetorzero').css('font-size', '11px');
- $('#lastbet th').css('text-align', 'center');
- $('#lastbet th').css('padding', '3px');
- $('#lastbet tr').css('border-top', '1px solid #fff');
- $('#lastbet3 > tbody > tr').css('background', '#181818', 'important');
- $('#lastbet2 > tbody').css('background', '#181818');
- $('.hero__main').css('border', '1px solid #777');
- for (i = 0; i < $('#stats2 th').length; i++) {
- streakcounter.push(0);
- }
- for (i = 0; i < $('#stats2 th').length; i++) {
- var lol = $('#stats2 th')[i];
- lol.textContent = (i + 1).toString() + "(" + streakcounter[i] + ")";
- }
- $('#resetstats').click(function () {
- streakcounter = [];
- for (i = 0; i < $('#stats2 th').length; i++) {
- streakcounter.push(0);
- }
- for (i = 0; i < $('#stats2 th').length; i++) {
- var lol = $('#stats2 th')[i];
- lol.textContent = (i + 1).toString() + "(" + streakcounter[i] + ")";
- }
- totalwin = 0;
- totalloss = 0;
- profit = 0;
- consecutive = 0,
- singlewin = 0;
- winstreak = 0;
- losscount = 0;
- flameBot.API.addRow();
- });
- $('#start').click(function () {
- looptimes = 999999999;
- if (loopenabled === false) {
- loopenabled = true;
- loop = setInterval(function () {
- if (loopcount >= looptimes) {
- clearInterval(loop);
- loopcount = 0;
- loopenabled = false;
- } else {
- if (betstarted === true) {} else {
- flameBot.API.bet();
- }
- }
- }, betspeed);
- }
- });
- $('#stop').click(function () {
- clearInterval(loop);
- loopenabled = false;
- loopcount = 0;
- });
- $('#setparams').click(function () {
- flameBot.API.setParams();
- })
- }
- },
- tools: {
- dec2Sat: function (decimal) {
- return (Math.floor(decimal * 1e8));
- },
- token: function () {
- return localStorage.token;
- },
- satToDec: function (satoshi) {
- return ((satoshi / 1e8).toFixed(8));
- },
- },
- API: {
- onLoss: function () {
- totalloss++;
- losscount++;
- if (afterwin === true) {
- afterwin = false;
- flameBot.API.setParams();
- }
- if (winstreak >= 2) {
- consecutive++;
- $('#consecutive').text(consecutive);
- winstreak = 0;
- }
- if (winstreak == 1) {
- singlewin++;
- $('#single').text(singlewin);
- winstreak = 0;
- }
- if ($('#swaplossesenabled').is(':checked') === true) {
- swaplosscount++;
- if (swaplosscount >= $('#swaplosses').val()) {
- swapnextwin = true;
- swaplosscount = 0;
- }
- }
- if ($('#afterlossesenabled').is(':checked') === true) {
- if (losscount >= $('#afterlosses').val()) {
- if ($('#aftermanualenabled').is(':checked') === true) {
- if (aftermanualtrigger === true) {} else {
- var r = prompt("Enter '1' to reset to base. Enter '2' to bet 0 until win. Enter '3' to stop.");
- if (r == 1) {
- aftermanualtrigger = false;
- currentbet = basebet;
- losscount = 0;
- } else if (r == 2) {
- aftermanualtrigger = true;
- currentbet = 0;
- } else {
- clearInterval(loop);
- aftermanualtrigger = false;
- loopenabled = false;
- }
- }
- } else {
- if ($('input:radio[name=resetorzero]:checked').val() == 'orzero') {
- currentbet = 0;
- } else if ($('input:radio[name=resetorzero]:checked').val() == 'orstop') {
- clearInterval(loop);
- loopenabled = false;
- } else if ($('input:radio[name=resetorzero]:checked').val() == 'resetor') {
- losscount = 0;
- currentbet = basebet;
- }
- }
- } else {
- if (losscount == $('#startlosses').val()) {
- currentbet = currentbet * $('#initialmultiplier').val();
- } else if (losscount > $('#startlosses').val()) {
- currentbet = currentbet * $('#mainmultiplier').val();
- }
- }
- } else {
- if (losscount == $('#startlosses').val()) {
- currentbet = currentbet * $('#initialmultiplier').val();
- } else if (losscount > $('#startlosses').val()) {
- currentbet = currentbet * $('#mainmultiplier').val();
- }
- }
- flameBot.API.addRow();
- },
- onWin: function () {
- if ($('#betdivisorenabled').is(':checked') === true) {
- basebet = Math.floor(balance/$('#betdivisor').val());
- }
- winstreak++;
- conseclossenabled = false;
- if (swapnextwin === true) {
- flameBot.API.swap();
- swapnextwin = false;
- }
- if ($('#afterwinenabled').is(':checked') == true) {
- if (afterwin === false) {
- afterwin = true;
- }
- }
- if (aftermanualtrigger === true) {
- aftermanualtrigger = false
- }
- totalwin++;
- swaplosscount = 0;
- var streak = losscount;
- if (losscount >= 20) {
- losscount = 20;
- }
- streakcounter[losscount - 1] ++;
- losscount = 0;
- currentbet = basebet;
- flameBot.API.addRow();
- },
- setParams: function () {
- losscount = 0;
- aftermanualtrigger = false;
- swaplosscount = 0;
- swapcount = 0;
- initmult = $('#initialmultiplier').val();
- mainmult = $('#mainmultiplier').val();
- if ($('#betdivisorenabled').is(':checked') === true) {
- basebet = Math.floor(balance/$('#betdivisor').val());
- currentbet = basebet;
- } else {
- basebet = flameBot.tools.dec2Sat($('#basebet').val());
- currentbet = basebet;
- }
- if ($('input:radio[name=hilo]:checked').val() == 'hi') {
- condition = '>';
- target = (99.99 - (99 / $('#chance').val())).toFixed(2);
- } else if ($('input:radio[name=hilo]:checked').val() == 'lo') {
- condition = '<';
- target = (99 / $('#chance').val()).toFixed(2);
- } else if ($('input:radio[name=hilo]:checked').val() == 'swap') {
- condition = '<';
- target = 0 + (99 / $('#chance').val()).toFixed(2);
- }
- },
- addRow: function () {
- var bettable = '',
- bettab = '#lastbet2';
- bettable += '<tr><td>' + flameBot.tools.satToDec(result.bet.amount) + '</td>';
- bettable += '<td>' + result.bet.multiplier + 'x' + '</td>'; /* return bet payout */
- bettable += '<td>' + (result.bet.target).toFixed(2) + '</td>'; /* return target*/
- bettable += '<td>' + result.bet.roll + '</td>'; /* return roll */
- bettable += '<td id="proff">' + flameBot.tools.satToDec(result.bet.profit) + '</td></tr>';
- var stattable = '',
- stattab = '#lastbet3';
- stattable += '<tr><td style="color:green;">' + flameBot.tools.satToDec(result.user.balance) + '</td><td style="color:red;">' + losscount + '</td><td style="color:green;">' + totalwin + '</td><td style="color:red;">' + totalloss + '</td><td id="profit">' + (profit).toFixed(8) + '</td></tr>';
- $(stattab).empty();
- $(stattab).prepend(stattable);
- stattable = '';
- if ($(bettab + ' tbody tr').length >= 30) {
- $(bettab + ' tr').last().remove();
- $(bettab).prepend(bettable);
- bettable = '';
- } else if ($(bettab).length < 30) {
- $(bettab).prepend(bettable);
- bettable = '';
- }
- for (i = 0; i < $('#stats2 th').length; i++) {
- var lol = $('#stats2 th')[i];
- lol.textContent = (i + 1).toString() + "(" + streakcounter[i] + ")";
- }
- $('#stats2 th:nth-child(19)').text('>' + $('#stats2 th:nth-child(19)').text());
- $('#lastbet2 *, #lastbet3 *, #lastbet *, #proff').css('text-align', 'center');
- $('#lastbet2 *, #lastbet3 *, #lastbet *').css('width', '20%');
- $('#lastbet *').css('padding', '5px');
- $('#lastbet *').css('border-bottom', '1px solid #ccc');
- $('#result-1').css('padding', '5px');
- $('#lastbet2 *, #lastbet3 *, #proff').css('padding', '5px');
- $('#lastbet > tbody > tr > th:nth-child(2)').css('border-top', '1px solid #ddd');
- if (profit >= 0) {
- $('#profit').css('color', 'green');
- } else {
- $('#profit').css('color', 'red');
- }
- if (result.bet.win === true) {
- $('#proff:first').css('color', 'green');
- } else {
- $('#proff:first').css('color', 'red');
- }
- betstarted = false;
- },
- bet: function () {
- betstarted = true;
- if ($('#maxbetenabled').is(':checked') === true) {
- if ((currentbet / 1e8) >= $('#maxbet').val()) {
- $('#setparams').click();
- }
- }
- if ($('#afterwinenabled').is(':checked') === true) {
- if (afterwin === true) {
- currentbet = ($('#afterwinamount').val() * 1e8).toFixed(8);
- }
- }
- if ($('#clossenabled').is(':checked') === true) {
- if (losscount >= $('#clossafter').val()) {
- if (conseclossenabled === false) {
- conseclossenabled = true;
- currentbet = Math.floor($('#clossbet').val() * 1e8);
- }
- }
- }
- var betData = {
- amount: currentbet,
- condition: condition,
- target: target,
- };
- $.ajax({
- url: 'https://api.primedice.com/api/bet?access_token=' + flameBot.tools.token(),
- type: 'POST',
- data: betData,
- datatype: 'jsonp',
- success: function (data) {
- result = data;
- balance = result.user.balance;
- profit = parseFloat(profit) + parseFloat(flameBot.tools.satToDec(data.bet.profit));
- if ($('input:radio[name=hilo]:checked').val() == 'swap') {
- swapcount++;
- if (swapcount >= $('#swapevery').val()) {
- flameBot.API.swap();
- swapcount = 0;
- }
- }
- if (data.bet.win === true) {
- $('span.btn__text.select div').text(flameBot.tools.satToDec(result.user.balance)).css('color', 'green');
- flameBot.API.onWin();
- } else {
- $('span.btn__text.select div').text(flameBot.tools.satToDec(result.user.balance)).css('color', 'red');
- flameBot.API.onLoss();
- }
- },
- error: function (errorThrown) {
- betstarted = false;
- }
- });
- },
- seedChange: function () {
- function seedgen() {
- var seed = '';
- var seedlength = 10;
- var charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()';
- for (var i = 0; i <= seedlength; i++)
- seed += charset.charAt(Math.floor(Math.random() * charset.length));
- return seed;
- }
- var s = seedgen(),
- url = 'https://api.primedice.com/api/seed?access_token=' + localStorage.token,
- sData = {
- seed: s
- };
- $.ajax({
- url: url,
- type: 'POST',
- data: sData,
- datatype: 'json',
- success: function (data, textStatus, jqXHR) {
- data2 = data;
- $('#currentseed').val(data2.seeds.client);
- },
- error: function (jqXHR, textStatus, errorThrown) {
- return false;
- }
- });
- },
- swap: function () {
- if (condition == '<') {
- condition = '>';
- target = (99.99 - (99 / $('#chance').val())).toFixed(2);
- } else if (condition == '>') {
- condition = '<';
- target = (99 / $('#chance').val()).toFixed(2);
- }
- },
- }
- }
- var UI = '';
- UI += '<table style="margin:0; text-align:center; border-bottom: 1px solid #fff;border-top: 1px solid #fff;"id="stats">';
- UI += '<thead><tr><th style="text-align:center;padding:3px;">Balance</th><th style="text-align:center;padding:3px;">Loss Streak</th><th style="text-align:center;padding:3px;">Total Wins</th><th style="text-align:center;padding:3px;">Total Losses</th><th style="text-align:center;">Total Profit</th></tr></thead><tbody></tbody><table id="lastbet3"></table></table>';
- UI += '<table id="lastbet">';
- UI += '<tr><th>Bet</th><th>Payout</th><th>Game</th><th>Roll</th><th>Profit</th></tr></table>';
- UI += '<div style="max-height:390px !important;font-size:11px;overflow-y: scroll;overflow-x: hidden;"><table id="lastbet2"></table></div>';
- UI += '<div id="flameBot" style="width:550px"><ul><li>';
- UI += '<a href="/play#basic">Basic Settings</a></li>';
- UI += '<li><a href="/play#onloss">On Loss</a></li>';
- UI += '<li><a href="/play#onlosstreak">Loss - Adv.</a></li>';
- UI += '<li><a href="/play#onwin">On Win</a></li>';
- //UI += '<li style="margin:8px;font-size:9px;margin-left:15px;text-align:center;"><span>FlameBot - v1.0</span></li>';
- UI += '</ul>';
- UI += '<div id="basic" style="font-size:17.5px;">';
- UI += '<table style="display:table;"><thead><tr><th>Basebet: </th><th>Chance:</th></tr></thead><tbody><tr><td><input id="basebet" placeholder="ex. 0.00001000" type="text"></td><td><input id="chance" placeholder="ex. 10 for 10x, 2 for 2x, etc." type="text"></td></tr></tbody><thead><tr><th>High/Low/Swap:</th><th>Swap Every:</th></tr></thead><tbody><tr><td><div id="hilo"><input type="radio" id="hi" value="hi" name="hilo"><label for="hi">High</label> <input type="radio" id="lo" value="lo" name="hilo" checked="checked"><label for="lo">Low</label> <input type="radio" id="swap" value="swap" name="hilo"><label for="swap">Swap</label> </div></td><td><input id="swapevery" placeholder="# of rolls" type="text"></td></tr></tbody></table></div>';
- UI += '<div id="onloss" style="font-size:17.5px;">';
- UI += '<table style="display:table;"><thead><tr><th>Start Multipling: </th><th>Main Multiplier:</th></tr></thead><tbody><tr><td><input id="startlosses" style="text-align:center;" placeholder="after # of losses"type="text"></td><td><input id="mainmultiplier" style="text-align:center;" placeholder="2, 4, etc."type="text"></td></tr></tbody><thead><tr><th>Initial Multiplier</th><th>Max Bet: <input type="checkbox" id="maxbetenabled"></th></tr></thead><tbody><tr><td><input id="initialmultiplier" style="text-align:center;" placeholder="2, 4, etc."type="text"></td><td><input id="maxbet" style="text-align:center;" placeholder="ex. 0.001" type="text"></td></tr><tr><th>After: <input type="checkbox" id="clossenabled"></th><th>Change Bet To:</th></tr></thead></tr><tbody><tr><td><input id="clossafter" style="text-align:center;" placeholder="# of consecutive loss"type="text"></td><td><input id="clossbet" style="text-align:center;" placeholder="ex. 0.00100000"type="text"></td></tr></tbody></tbody><thead><tr><th>Divisible Basebet:</th><th>Basebet Divisor:</th></tr></thead><tbody><tr><td><input id="betdivisorenabled" style="text-align:center;" type="checkbox"></td><td><input id="betdivisor" style="text-align:center;" placeholder="ex. 0.00100000"type="text"></td></tr></tbody></tbody></table>';
- UI += '</div>';
- UI += '<div id="onlosstreak" style="font-size:17.5px;">';
- UI += '<table style="display:table;"><thead><tr><th>After: <input type="checkbox" id="afterlossesenabled"></th><th>Either: </th></tr></thead><tbody><tr><td><input id="afterlosses" style="text-align:center;" placeholder="# of losses"type="text"></td><td><div id="resetorzero"><input type="radio" id="resetor" value="resetor" name="resetorzero"><label for="resetor">Reset to Base</label><input type="radio" id="orzero" value="orzero" name="resetorzero" checked="checked"><label for="orzero">Roll 0 to Win</label><input type="radio" id="orstop" value="orstop" name="resetorzero" checked="checked"><label for="orstop">Stop</label></div></td></tr></tbody><thead><tr><th>Manualy Choose?</th><th>Swap After: <input id="swaplossesenabled" type="checkbox"></th></tr></thead><tbody><tr><td><input id="aftermanualenabled" type="checkbox"></td><td><input id="swaplosses" style="text-align:center;" placeholder="# of losses" type="text"></td></tr></tbody></table>';
- UI += '</div>';
- UI += '<div style="font-size:17.5px;" id="onwin">';
- UI += '<table style="display:table;"><thead><tr><th>After Win:</th><th>Bet X Until Loss </th></tr></thead><tbody><tr><td><input type="checkbox" id="afterwinenabled"></td><td><input type="text" placeholder="ex. 0.00002000" id="afterwinamount"></td></tr></tbody></table>';
- UI += '</div>';
- UI += '<div id="controlstat">';
- UI += '<center><div id="toolbar" class="ui-widget-header ui-corner-all"><div id="buttonz"><span id="startstop"><button id="start">Start</button><button id="stop">Stop</button></span><span id="set"><button id="setparams">Set Params</button><button id="resetstats">Reset Stats</button><br><button id="save">Save Settings</button><button id="load">Load Settings</button></div></center><br>';
- UI += '<table style="margin:3px;"id="stats2">';
- UI += '<span style="font-weight:bold;">Loss Streaks:</span>';
- UI += '<thead><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th></tr>';
- UI += '<tr><th>11</th><th>12</th><th>13</th><th>14</th><th>15</th><th>16</th><th>17</th><th>18</th><th>19</th><th>20</th></tr></thead></table>';
- UI += '<table style="margin:3px;"id="stats3">';
- UI += '<span style="font-weight:bold;">Wins:</span>';
- UI += '<thead><tr><th>Single:</th><th>Consecutive:</th></tr>';
- UI += '<tr><th id="single">0</th><th id="consecutive">0</th></tr></thead></table>';
- UI += '</div>';
- UI += '</div>';
- flameBot.initialize.init1();
Advertisement
Add Comment
Please, Sign In to add comment