Skip to content

Commit

Permalink
bust code added
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhu007 committed Jun 6, 2021
1 parent 104c4ff commit cf148b1
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 0 deletions.
Binary file added bust/autobet-master.zip
Binary file not shown.
Binary file added bust/bustabit-autobet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions bust/help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
siddhartha
Siddhun9JB5AuPGo

#########################################################
var arr = [100,100,300,500,800,1300,2100,3400,5400,8100,12200,18300,27400,41100,61700];


var first = arr[0];

var iterator = arr.values();




function if_lose()
{
return iterator.next().value;
}


function if_win()
{
iterator = arr.values();
return iterator.next().value;
}



function roundBit(bet) {
return Math.round(bet / 100) * 100;
}
###############################################################

https://github.com/bustabit/autobet#how-to-write-a-script

https://mtihc.github.io/bustabit-script-simulator/

https://gist.github.com/RHavar/e608bb389a5cfe2f01e1
23 changes: 23 additions & 0 deletions bust/till_now_sucess.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* 100 satoshis (1 bit) */

var config = {

};

log('Simulation begins here...');
var arr = [100,100,300,500,800,1300,2100];
var iterator = arr.values();

engine.on('GAME_STARTING', function (res) {
log('a game is starting');
engine.bet(iterator.next().value, 2);
log(res);
});


engine.on('GAME_ENDED', function (res) {
log('a game is edded');
log(res);
});


50 changes: 50 additions & 0 deletions bust/trail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
var config = {

};

var iterifyArr = function (arr) {
var cur = 0;
arr.next = (function () { return (++cur >= this.length) ? false : this[cur]; });
arr.prev = (function () { return (--cur < 0) ? false : this[cur]; });
arr.reset = (function () { cur = 0; });
return arr;
};

log('Simulation begins here...');
/* 100 satoshis (1 bit) */
var wagers = [100,100,200,300,500,800,1300,2100,3400,5400,8100,12200,900];
//var wagers = [100,100,200,300,500,900];
iterifyArr(wagers);

const payout = 3;

engine.on('GAME_STARTING', function (res) {
log('a game is starting');
var wager = wagers.next();
if(wager == 900)
{
wagers.reset();
var wager = wagers.next();
}
engine.bet(wager, payout);
log(res);
});


engine.on('GAME_ENDED', function (res) {
log('a game is edded');
log(res);
var lastGame = engine.history.first();
if (lastGame.cashedAt)
{
// We won
// iterator = arr.reset();
wagers.reset();
log("we won");
}
else
{
// We loss
log("we loss");
}
});

0 comments on commit cf148b1

Please sign in to comment.