Author

Topic: Skipping games in Bustabit V2. How? (Read 221 times)

newbie
Activity: 5
Merit: 0
October 28, 2020, 10:19:23 PM
#12
Hi all. I need the same: skipping some games in a martingale sequence. Option 1) Skip X number of games; option 2) Skip games until the multiplier is => X (number), then continue the martingale sequence.
newbie
Activity: 2
Merit: 0
August 27, 2020, 04:04:19 PM
#11
Hi there, I want to implement skipping in the simple martigale script from Bustabit but idk how its possible. i just want a button with I can select how many rounds I want to skip after a busted round. Can you guys please help me?

legendary
Activity: 2296
Merit: 2721
July 06, 2020, 05:12:57 AM
#10
is there a list of every command of the game? how does the engine know what the script means with "skip" etc. that's not clear for me in the source code.
Take a look at the statement I posted. He only calls the placeBet-function when waitXgames is bigger than skip. The waitXgames-variable gets increased everytime engine.on is called:

Code:
engine.on('game_crash', function(data) {
    if (data.game_crash / 100 >= CO) {
        waitXgames++;
    } else {
        waitXgames++;
    }
});

(altough I don't understand the if, its useless in my opinion). I think this is something like a delegator which gets called by the script engine as soon as a game starts but thats just an assumption. The control, whether a bet is placed or not, happens purely on the two variables "waitxgames" and "skip". As I see it, there is no further "magic" behind it Smiley

Otherwise you could of course write to the hoster of bustabit and ask them to provide more documentation about the script engine. He is also quite active here in the forum!
full member
Activity: 840
Merit: 105
★Bitvest.io★ Play Plinko or Invest!
July 05, 2020, 06:42:44 PM
#9
I find it fascinating combining existing and working features and building a better one. I think many would watch a tutorial on how to do this. It's kinda the same like a trading bot. but it's very hard if there is no documentation on the engine behind it.

I've tried making bots in the past and there is really no documentations on how to make such scripts but there are youtube videos that would help you enhance your algorithm. I think it hasn't have any documentation due to the fact that there are many logic that can have the same output and also there are a lot of output that can be an outcome of a single logic.

Casdinyard's logic was I think the nearest possibility that your bot's logic requires, have you also tried changing the skip values? I've noticed that it depends on you as well.
jr. member
Activity: 155
Merit: 7
July 05, 2020, 03:19:16 PM
#8
There would really be no tutorials writing a bot script as it only tolerates people whom only seeks "source code" than to learn algorithms by themselves lol.

I find it fascinating combining existing and working features and building a better one. I think many would watch a tutorial on how to do this. It's kinda the same like a trading bot. but it's very hard if there is no documentation on the engine behind it.
hero member
Activity: 2184
Merit: 891
Leading Crypto Sports Betting and Casino Platform
July 05, 2020, 03:00:23 PM
#7
~
thanks for your help. I already tried the exact same method you suggested but didn't succeeded. maybe it's the simulators fault, I don't know. But I need to simulate first with a high number of games before I'll try it in the real game.
scripts are allowed, why are you not fond of it? I know every script can bust and no one is flawless, I'm just intrigued. It's crazy though that there are no tutorials on how to write a script for this game.

I guess I'm not really fond of automating games, it just ruins the entertainment. Yet for some reasons, I now find it amusing that I could use my knowledge and skills in programming and I think that would be a much valuable entertainment for me. And yes it was the simulators fault in that case. The algorithm was right as I've read it numerous times just to see where could be the fault.

There would really be no tutorials writing a bot script as it only tolerates people whom only seeks "source code" than to learn algorithms by themselves lol.
jr. member
Activity: 155
Merit: 7
July 05, 2020, 02:18:32 PM
#6
~
and rather change the inner if statements with lostgames == 1, 2, so on and so fort.

This isn't really my programming language yet I've only answered base on what my guess that the algorithm would work fine. I'm not really fond of using scripts nor tolerate the use of it in such games yet I hope that solves the problem. If there would be an error, I guess you should rather move the topic on Development and Technical discussion (though I think it's only for Bitcoin's dev-related topics, I guess they could give huge help.)



thanks for your help. I already tried the exact same method you suggested but didn't succeeded. maybe it's the simulators fault, I don't know. But I need to simulate first with a high number of games before I'll try it in the real game.
scripts are allowed, why are you not fond of it? I know every script can bust and no one is flawless, I'm just intrigued. It's crazy though that there are no tutorials on how to write a script for this game.
hero member
Activity: 2184
Merit: 891
Leading Crypto Sports Betting and Casino Platform
July 05, 2020, 02:04:08 PM
#5
~

I think you should limit your first code attachment from
Code:
       if (lostGames >= 3) {
to....
Code:
       if (lostGames >= 1) {

and edit the inner code from

Code:
            waitXgames = 0;
            if (lostGames == 3) {
                skip = skip1;
            }
            if (lostGames == 4) {
                skip = skip2;
            }
            if (lostGames == 5) {
                skip = skip3;
            }
            if (lostGames == 6) {
                skip = skip4;
            }
            if (lostGames == 7) {
                skip = skip5;
            }
            if (lostGames >= 8) {
                skip = skip6;
            }
and rather change the inner if statements with lostgames == 1, 2, so on and so fort.

This isn't really my programming language yet I've only answered base on what my guess that the algorithm would work fine. I'm not really fond of using scripts nor tolerate the use of it in such games yet I hope that solves the problem. If there would be an error, I guess you should rather move the topic on Development and Technical discussion (though I think it's only for Bitcoin's dev-related topics, I guess they could give huge help.)

jr. member
Activity: 155
Merit: 7
July 05, 2020, 01:06:01 PM
#4
I don't know what you need exactly, everything you need is in the V1 script already. This is the crucial part:

Code:
if (waitXgames >= skip) {

        console.log('Placing bet of', Math.floor(currentBet / 100), 'at', Math.round(cashOut * 100) / 100, 'Cash out.');

        engine.placeBet(Math.floor(currentBet / 100) * 100, Math.floor(cashOut * 100), false);

    }

"skip" holds the value of how many games you want to skip, waitXgames is the counter which gets increased after every game.
You only have to change the script so that it automatically sets "skip" to 1 after a lost game, so you skip a game.
But as I said before, this requires changes in a few places, you need to be able to program at least a little bit to make the changes and not break the script (or even worse, add a bug that causes a behavior you definitely don't want)

thanks for your help.

the v1 scripts are not working anymore, that's the problem. I'm benchmarking the modifications on the simulator:
https://mtihc.github.io/bustabit-script-simulator/

I programmed before in c#, java and python (I'm not good though but passed college courses) but I can't wrap my head around this javascript.

is there a list of every command of the game? how does the engine know what the script means with "skip" etc. that's not clear for me in the source code.
I wasted many hours staring at the code and try to understand it.
this list of commands is not helping out: https://github.com/bustabit/autobet#the-engine-api

I can't find 1 single tutorial on writing these scripts.
legendary
Activity: 2296
Merit: 2721
July 05, 2020, 11:50:26 AM
#3
I don't know what you need exactly, everything you need is in the V1 script already. This is the crucial part:

Code:
if (waitXgames >= skip) {

        console.log('Placing bet of', Math.floor(currentBet / 100), 'at', Math.round(cashOut * 100) / 100, 'Cash out.');

        engine.placeBet(Math.floor(currentBet / 100) * 100, Math.floor(cashOut * 100), false);

    }

"skip" holds the value of how many games you want to skip, waitXgames is the counter which gets increased after every game.
You only have to change the script so that it automatically sets "skip" to 1 after a lost game, so you skip a game.
But as I said before, this requires changes in a few places, you need to be able to program at least a little bit to make the changes and not break the script (or even worse, add a bug that causes a behavior you definitely don't want)
jr. member
Activity: 155
Merit: 7
July 05, 2020, 11:27:23 AM
#2
bump.

I have found a working script which "chases" 90x. It stops 100 rounds after a win. I Just need to invert it so it stops after 2 losses for 100 rounds.

Can someone help?
jr. member
Activity: 155
Merit: 7
July 04, 2020, 01:30:44 AM
#1
Hi,

what I need:
skip 1 game after 1 loss and move on with the strategy.

I "just" need understand and implement the skipping function into my own script. I have no clue how to do it in V2 though.

I have found this for V1 and need it for V2:

Code:
// ------------------------------------------------------------------------------------------------------------------------
var baseBet = 200;    // Set the base bet here. I recommend to set it to ~200 if you have 100k bits as start balance.
// ------------------------------------------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------------------
// I recommend not to edit the settings below. They were calculated to be the best options possible.
// --------------------------------------------------------------------------------------------------
var skip1 = 6;    // skip X games after second lost game.

var skip2 = 0;    // skip X games after third lost game.

var skip3 = 6;    // skip X games after fourth lost game.

var skip4 = 0;    // skip X games after fifth lost game.

var skip5 = 6;    // skip X games after sixth lost game.

var skip6 = 2;    // skip X games afterwards. This means the script will bet once and then skip X games.
                  // This would continue to happen until a game is won or you bust.

// ------------------------------------------------------------------------------------------
//     The Code
// ------------------------------------------------------------------------------------------
var bet = baseBet * 100;
var currentBet = bet;

var cashOut = 1.05;

var startBalance = engine.getBalance();
var currentBalance = startBalance;

var losses = 0;

var skip = 0;
var lostGames = 0;
var waitXgames = 0;
var CO = 0;

engine.on('game_starting', function(info) {

    if (currentBet && engine.lastGamePlay() == 'LOST') {

        lostGames++;
        currentBalance = engine.getBalance();
        losses = startBalance - currentBalance;

        currentBet *= 2;
        cashOut = (losses / currentBet) + 1.01;

        if (lostGames >= 3) {

            waitXgames = 0;

            if (lostGames == 3) {

                skip = skip1;
            }
            if (lostGames == 4) {

                skip = skip2;
            }
            if (lostGames == 5) {

                skip = skip3;
            }
            if (lostGames == 6) {

                skip = skip4;
            }
            if (lostGames == 7) {

                skip = skip5;
            }
            if (lostGames >= 8) {

                skip = skip6;
            }

        }
    } else {

        currentBalance = engine.getBalance();

        if (currentBalance > startBalance) {

            currentBet = bet;
            cashOut = 1.05;

            startBalance = engine.getBalance();
            lostGames = 0;
            skip = 0;
        }
    }

    if (waitXgames >= skip) {

        console.log('Placing bet of', Math.floor(currentBet / 100), 'at', Math.round(cashOut * 100) / 100, 'Cash out.');

        engine.placeBet(Math.floor(currentBet / 100) * 100, Math.floor(cashOut * 100), false);

    }

});
engine.on('game_crash', function(data) {
    if (data.game_crash / 100 >= CO) {
        waitXgames++;
    } else {
        waitXgames++;
    }
});

same here:
Code:
/*
FinlayDaG33k's Script v2016.10.12.18.28
Do not sell script! (it's against my rules :C)
 
Simple rules apply:
- Do not sell my script, sharing it is okay though.
- Give me drink a when see me, I prefer Mountain Dew Citrus Blast.
- Give me a hug when see me.
- If make profit, donate some bits. This way I can try to increase the bot's power.
- Don't claim script as if it where your own.
- If you improve script, make a commit to the Github.
*/

// User Settings
var baseBet = 20;    // Set the base bet here. (integer)
var basecashOut = 1.5; // Set the base cashout multiplier here. (float)

// Change stuff below at risk of breaking bot :D
var cashOut = basecashOut;
var skip1 = 3; // Skip games after first loss
var skip2 = 2; // Skip games after second loss
var skip3 = 2; // Skip games after third loss
var skip4 = 0; // Skip games after fourth loss
var skip5 = 6; // Skip games after fifth loss
var skip6 = 2; // Skip games after every next loss
var bet = baseBet * 100;
var currentBet = bet;
var initBalance = engine.getBalance();
var startBalance = engine.getBalance();
var currentBalance = startBalance;
var losses = 0;
var skip = 0;
var lostGames = 0;
var waitXgames = 0;
var CO = 0;

engine.on('game_starting', function(info){
    if(currentBet && engine.lastGamePlay() == 'LOST'){
        lostGames++;
        currentBalance = engine.getBalance();
        losses = startBalance - currentBalance;

        currentBet *= 2;
        cashOut = (losses / currentBet) + 1.01;

        if (lostGames >= 1) {

            waitXgames = 0;

            if(lostGames == 3){ // If we lost 3 games in a row.
                skip = skip1;
            }
            if(lostGames == 4){ // If we lost 4 games in a row.
                skip = skip2;
            }
            if(lostGames == 5){ // If we lost 5 games in a row.
                skip = skip3;
            }
            if(lostGames == 6){ // If we lost 6 games in a row.
                skip = skip4;
            }
            if(lostGames == 7){ // If we lost 7 games in a row.
                skip = skip5;
            }
            if(lostGames >= 8){ // If we lost 8 games in a row.
                skip = skip6;
            }
        }
    }else{
        currentBalance = engine.getBalance();
        if (currentBalance > startBalance) {

            currentBet = bet;
            cashOut = basecashOut;

            startBalance = engine.getBalance();
            lostGames = 0;
            skip = 0;
        }
    }
    if (waitXgames >= skip) {
        console.log('Placing bet of', Math.floor(currentBet / 100), 'at', Math.round(cashOut * 100) / 100, 'Cash out. (Profit: ', ((engine.getBalance() - initBalance) / 100), ' Bits)');
        engine.placeBet(Math.floor(currentBet / 100) * 100, Math.floor(cashOut * 100), false);
    }

});
engine.on('game_crash', function(data){
    if(data.game_crash / 100 >= CO){
        waitXgames++;
    }else{
        waitXgames++;
    }
});
Jump to: