0% found this document useful (0 votes)
399 views7 pages

Harish Dice Bot v1.3

The document contains JavaScript code for configuring and running a dice betting game. It sets styles, initializes variables, defines functions for starting/stopping/resetting the bot, and makes API calls to place bets. On each bet, it parses the response to update balances, stats and seed values on the page.

Uploaded by

Lejla Kajic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
399 views7 pages

Harish Dice Bot v1.3

The document contains JavaScript code for configuring and running a dice betting game. It sets styles, initializes variables, defines functions for starting/stopping/resetting the bot, and makes API calls to place bets. On each bet, it parses the response to update balances, stats and seed values on the page.

Uploaded by

Lejla Kajic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

$("#news").

css("display", "none");
$("#body").css("background",
"url(https://luckygames.io/tml/luckygames/images/space.jpg) repeat-y 50% 0");
$("#content").css("background",
"url(https://luckygames.io/tml/luckygames/images/space.jpg) repeat-y 50% 0");
$("#gameContainer").css("visibility", "hidden");
$("#gameContainer").css("height", "30px");
$("#listContainer").css("display", "none");
$("#frontText").css("display", "none");
$("#stopbutton").prop("disabled", true);
$(".balanceContainer").css("border", "none");
$(".betContainer").html("<a style=\"float:left; margin-top:-40px; margin-left:-40px
; width:20px; line-height:18px\" class=\"btn grey\" id=\"exitbutton\"
onclick=\"exit();\">X</a><span style=\"float:right;margin-right:-40px;margin-top:-
40px\">Updated: 12-10-2018</span ><br><center> <input id=\"basebetAmount\"
type=\"number\" value=\"0.00000010\" style=\"font-size:normal;font-
weight:bold;width: 30%; text-align: center;\" placeholder=\"basebetAmount\"> <input
id=\"overbalance\" type=\"number\" value=\"0.00000001\" style=\"font-
size:normal;font-weight:bold;width: 30%; text-align: center;\"
placeholder=\"overbalance\"> <input id=\"underbalance\" type=\"number\"
value=\"0.00000000\" style=\"font-size:normal;font-weight:bold;width: 30%; text-
align: center;\" placeholder=\"underbalance\"><br><br><!---START----> <button
style=\"width:23%;background:#076C65\" class=\"btn\" id=\"startbutton\"
onclick=\"startbot();\">Start</button><!---STOP----> <button
style=\"width:23%;background:#AC0B13\" class=\"btn\" id=\"stopbutton\"
onclick=\"stopbot();\">Stop</button> <!---RESET----> <button class=\"btn\"
style=\"width:23%;background:#E3AD48\"\" id=\"resetbutton\"
onclick=\"resetbot();\">Reset</button><!---SEED----> <button class=\"btn\"
style=\"width:23%;background:#a7AD48\"\" id=\"seedbutton\"
onclick=\"resetseed();\">Seed</button><hr style=\"font-size:Cooper;font-
weight:bold;width: 30%; text-align: center;\"><br>HARISH DICE GAME V1.3</hr><p
style=\"background: green; text-bold: center; color: #fff; border: 3px solid
#fff;\">|| Time = <span id=\"playday\">00</span> - <span
id=\"playhour\">00</span>:<span id=\"playminute\">00</span>:<span
id=\"playsecond\">00</span> || Speed = <span id=\"speedbet\">000</span> bet/s ||
<br> || loseAmoumt = <span id=\"totalprofit\">0.00000000</span> ||<br>|| Profit =
<span id=\"tprofit\">0.00000000</span> ||<br>|| L.Bet = <span
id=\"largestbet\">0.00000000</span> || || L.Profit = <span
id=\"largestprofit\">0.00000000</span> ||<br>|| L.Win = <span
id=\"largestwin\">0.00000000</span> || || L.Lose = <span
id=\"largestlose\">0.00000000</span> ||<br>|| Bet = <span id=\"bet\">0000</span>
|| || Win = <span id=\"win\">0000</span> || || Lose = <span
id=\"lose\">0000</span> ||<br>|| WinStreak = <span id=\"winstreak\">0000</span> ||
|| MaxWinStreak = <span id=\"maxwinstreak\">0000</span> ||<br>|| LoseStreak =
<span id=\"losestreak\">0000</span> || || MaxLoseStreak = <span
id=\"maxlosestreak\">0000</span> ||<br> ");
$(".betContainer").css("background", "#F2F4F4");
$(".betContainer").css("color", "#000");
$(".betContainer").css("padding", "7px");
$(".betContainer").css("paddingBottom", "0px");
$(".betContainer").css("border", "1px solid #222");
$(".betContainer").css("margin-top", "-85px");
$("#stopbutton").prop("disabled", true);
$("#strategy").html("Harish");
$(".betContainer").css("border-radius", "5px");
randomizeSeed();
var _startbalance = parseFloat($("#balance").val());
var _onbalance = 0;
var _profit = 0;
var _totalprofit = 0;
var _overbalance = parseFloat($("#overbalance").val());
var _underbalance = parseFloat($("#underbalance").val());
var _prediction = 20;
var _previousprediction = 0;
var _basebetAmount = parseFloat($("#basebetAmount").val());
var _betAmount = _basebetAmount;
var _previousbetAmount = 0;
var _largestbet = 0;
var _largestprofit = 0;
var _largwin = 0;
var _largestwin = 0;
var _larglose = 0;
var _largestlose = 0;
var _direction = "over";
var _bet = 0;
var _win = 0;
var _winstreak = 0;
var _maxwinstreak = 0;
var _lose = 0;
var _losestreak = 0;
var _maxlosestreak = 0;
var _starttime = 0;
var _ontime = 0;
var _playtime = 0;
var _playday = 0;
var _playhour = 0;
var _playminute = 0;
var _playsecond = 0;
var _speedbet = 0;
var _stoped = true;
var _previousbetting = "...";
var _coin = $("#coin").val();
var round=0;
var tprofit=0;
var tbet=0;
var loseAmount=0;
function resetseed()
{
var n = Math.floor((Math.random() * (10 - 1 + 1)) + 1);

if (n === 1)
$("#clientSeed").val(111);
else if (n === 2)
$("#clientSeed").val(222);
else if (n === 3)
$("#clientSeed").val(333);
else if (n === 4)
$("#clientSeed").val(444);
else if (n === 5)
$("#clientSeed").val(555);
else if (n === 6)
$("#clientSeed").val(666);
else if (n === 7)
$("#clientSeed").val(777);
else if (n === 8)
$("#clientSeed").val(888);
else if (n === 9)
$("#clientSeed").val(999);
else
$("#clientSeed").val(123);
}

function startbot() {
_stoped = false;
_starttime = new Date;
_basebetAmount = parseFloat($("#basebetAmount").val());
_overbalance = parseFloat($("#overbalance").val());
_underbalance = parseFloat($("#underbalance").val());
_betAmount = _basebetAmount;
$("#startbutton").prop("disabled", true);
$("#stopbutton").prop("disabled", false);
$("#resetbutton").prop("disabled", true);
$("#exitbutton").css("pointer-events", "none");
$("#basebetAmount").val(_basebetAmount.toFixed(8));
$("#basebetAmount").prop("disabled", true);
$("#overbalance").val(_overbalance.toFixed(8));
$("#overbalance").prop("disabled", true);
$("#underbalance").val(_underbalance.toFixed(8));
$("#underbalance").prop("disabled", true);
dobet()
}

function stopbot() {
_stoped = true;
$("#startbutton").prop("disabled", false);
$("#stopbutton").prop("disabled", true);
$("#exitbutton").css("pointer-events", "auto");
$("#resetbutton").prop("disabled", false);
$("#basebetAmount").prop("disabled", false);
$("#overbalance").prop("disabled", false);
$("#underbalance").prop("disabled", false)
}

function resetbot() {
randomizeSeed();
_startbalance = parseFloat($("#balance").val());
_onbalance = 0;
_profit = 0;
_overbalance = parseFloat($("#overbalance").val());
_underbalance = parseFloat($("#underbalance").val());
_prediction = 80;
_previousprediction = 0;
_basebetAmount = parseFloat($("#basebetAmount").val());
_betAmount = _basebetAmount;
_previousbetAmount = 0;
_largestbet = 0;
_largestprofit = 0;
_largestwin = 0;
_largestlose = 0;
_direction = "under";
_bet = 0;
_win = 0;
_largwin = 0;
_winstreak = 0;
_maxwinstreak = 0;
_lose = 0;
_larglose = 0;
_losestreak = 0;
_maxlosestreak = 0;
_ontime = 0;
_playtime = 0;
_playday = 0;
_playhour = 0;
_playminute = 0;
_playsecond = 0;
_speedbet = 0;
_previousbetting = "...";
_stoped = true;
round=0;
tprofit=0;
tbet=0;
loseAmount=0;
$("#speedbet").html(_speedbet);
$("#playday").html(_playday);
$("#playhour").html(_playhour);
$("#playminute").html(_playminute);
$("#playsecond").html(_playsecond);
$("#totalprofit").html(_profit);
$("#largestbet").html(_largestbet);
$("#largestprofit").html(_largestprofit);
$("#bet").html(_bet);
$("#win").html(_win);
$("#largestwin").html(_largestwin);
$("#lose").html(_lose);
$("#largestlose").html(_largestlose);
$("#winstreak").html(_winstreak);
$("#maxwinstreak").html(_maxwinstreak);
$("#losestreak").html(_losestreak);
$("#maxlosestreak").html(_maxlosestreak);
$("#previousbetting").html(_previousbetting)
}

function exit() {
location.reload()

function dobet() {
if (_stoped === false) {
jQuery.ajax({
url: "https://" + user.domain + "/play/",
type: "POST",
dataType: "html",
timeout: 6E4,
data: {
game: "dice",
coin: _coin,
betAmount: _betAmount,
prediction: _prediction,
direction: _direction,
clientSeed: $("#clientSeed").val(),
serverSeedHash: $("#serverSeedHash").html(),
session: getCookie("SESSION"),
hash: user.hash
},
success: function(data) {
var _a = JSON.parse(data);
var _result = _a.result;
if (_result === true) {
var _gameresult = _a.gameResult;
var _resultnumber = _a.resultNumber;
$('#serverSeedHash').html(_a.serverSeedHash);
$('#prevServerSeed').html(_a.prevServerSeed);
$('#prevServerSeedHash').html(_a.prevServerSeedHash);
$('#prevClientSeed').html(_a.prevClientSeed);
$('#balance').animateBalance(_a.balance);
_onbalance = _a.balance;
_profit += parseFloat(_a.profit);
_previousprediction = _prediction;
_previousbetAmount = _betAmount;
_ontime = new Date().getTime();
_playtime = _ontime - _starttime;
_playday = Math.floor(_playtime / (1000 * 60 * 60 *
24));
_playhour = Math.floor((_playtime % (1000 * 60 * 60 *
24)) / (1000 * 60 * 60));
_playminute = Math.floor((_playtime % (1000 * 60 *
60)) / (1000 * 60));
_playsecond = Math.floor((_playtime % (1000 * 60)) /
1000);
_speedbet = parseFloat((_bet / _playtime) * 1000);
_bet++;

if (_gameresult == "win") {
_win++;
_winstreak++;
_losestreak = 0;
_largwin = _betAmount;
loseAmount=0;

_startbalance=_onbalance;
_prediction=20;
_direction='over';

_basebetAmount=_onbalance/1000000;
_betAmount = _basebetAmount;
_overbalance=_basebetAmount;
_underbalance=_onbalance*100/100;
$("#basebetAmount").val(_basebetAmount.toFixed(8));
$("#overbalance").val(_overbalance.toFixed(8));
$("#underbalance").val(_underbalance.toFixed(8));

} else {
_lose++;
_winstreak = 0;
_losestreak++;
_larglose = _betAmount;
loseAmount=_startbalance-_onbalance;
};

tbet=_betAmount+loseAmount;
if (_underbalance > 0 && tbet >= _underbalance) {

run=false;
} else {
if (loseAmount<=0) {
_prediction=20;
_direction='over';
_betAmount = _basebetAmount;
}
else {

if (_resultnumber>=89 && _resultnumber<=98) {


_betAmount = loseAmount*0.13;
_prediction=89;
_direction='over';
}
else if (_resultnumber<=10 && _resultnumber>=1) {
_betAmount = loseAmount*0.13;
_prediction=10;
_direction='under';
}
else if (_resultnumber>=79 && _resultnumber<=88) {
_betAmount = loseAmount*0.28;
_prediction=79;
_direction='over';
}
else if (_resultnumber<=20 && _resultnumber>=11) {
_betAmount = loseAmount*0.28;
_prediction=20;
_direction='under';
}
else if (_resultnumber>=69 && _resultnumber<=78) {
_betAmount = loseAmount*0.48;
_prediction=69;
_direction='over';
}
else if (_resultnumber<=30 && _resultnumber>=21) {
_betAmount = loseAmount*0.48;
_prediction=30;
_direction='under';
}
else if (_resultnumber>=59 && _resultnumber<=68) {
_betAmount = loseAmount*0.75;
_prediction=59;
_direction='over';
}
else if (_resultnumber<=39 && _resultnumber>=31) {
_betAmount = loseAmount*0.75;
_prediction=40;
_direction='under';
}
else if (_resultnumber>=50 && _resultnumber<=58) {
_betAmount = loseAmount*0.75;
_prediction=59;
_direction='over';
}
else if (_resultnumber<=49 && _resultnumber>=41) {
_betAmount = loseAmount*0.75;
_prediction=40;
_direction='under';
}
}
};
if (_betAmount > _largestbet) {
_largestbet = _betAmount
};
if (_profit > _largestprofit) {
_largestprofit = _profit
};
if (_largwin > _largestwin) {
_largestwin = _largwin
};
if (_larglose > _largestlose) {
_largestlose = _larglose
};
if (_winstreak > _maxwinstreak) {
_maxwinstreak = _winstreak
};
if (_losestreak > _maxlosestreak) {
_maxlosestreak = _losestreak
};
$("#speedbet").html(_speedbet.toFixed(2));
$("#playday").html(_playday);
$("#playhour").html(_playhour);
$("#playminute").html(_playminute);
$("#playsecond").html(_playsecond);
$("#totalprofit").html(loseAmount.toFixed(8));
$("#tprofit").html(_profit.toFixed(8));
$("#largestbet").html(_largestbet.toFixed(8));
$("#largestprofit").html(_largestprofit.toFixed(8));
$("#bet").html(_bet);
$("#win").html(_win);
$("#largestwin").html(_largestwin.toFixed(8));
$("#lose").html(_lose);
$("#largestlose").html(_largestlose.toFixed(8));
$("#winstreak").html(_winstreak);
$("#maxwinstreak").html(_maxwinstreak);
$("#losestreak").html(_losestreak);
$("#maxlosestreak").html(_maxlosestreak);
$("#previousbetting").html(_previousbetting);
if(_betAmount<=0.00000004)
_betAmount=0.00000004;
dobet()
} else {}
},
error: function(xhr, ajaxOptions, thrownError) {},
timeout: function(xhr, ajaxOptions, thrownError) {
check = true
},
abort: function(xhr, ajaxOptions, thrownError) {
check = true
}
})
} else {}
}

You might also like