Jump to content

Would it be possible to script a function that automatically deposits "X" amount into the vault??


Jamiekson

Recommended Posts

then figure out the amount you want to deposit and put it into the part in the code that takes the amound to be deposited which just search for this text  :${theAmount}
 

at this point though outside of doing it for you you have more than all the information you need to make it work.

ok seriously you are making this way overly complicated 

 

if (runningBalalnce >= (originalBalance + 0.1)) {
    var theCoin = hdg.currencyName;
    var theAmount runningBalance-originalBalance;
    runningBalalnce -= theAmount;
Link to comment
Share on other sites

Yeah but it does not work unless I define theAmount as a specific number. It doesnt depsoit anything when I do

var theAmount runningBalance-originalBalance;

It has to be set to something like 
var theAmount = 0.02;

So are you saying if I change theCoin to "hdg.currencyName" then I would be able to use var theAmount runningBalance-originalBalance;  afterall?

Link to comment
Share on other sites

it will always be able to use that variable

its the decimal representation of the coin to depposit.  hdg.currencyName will give you the name of the currently selected coin for the game when playing hashdice only

hdg being the hashdice game object.  If you want this for other games you will have to hunt down the best way to get it. limbo is lbg, but i don't kow if all of the games have it represented in the same manor

but what the script says is deposit this amount of this coin.  I don't know why you thought it woulnd't work before.  if you happen to have i set to BCD  and .01 but your trying to deposit LTC it will still work as long as you have that amount of BDC to deposit.  you will just think it is trying to deposit LTC. mean while it will be vaulting the coin you tell it in the command to vault.

also do you even know what the value is when it tries to run the script perhaps that could help you determine the problem.  like is it "5.20-5.00" or is it "0.20" or is it 0.20. all will mean different things and require different things to fix. but in almost all cases you can fix it by parsing it as a float. so to be stupidly careful you could do something like.

var theAmount = Number.parseFloat(runningBalance.toString()) - Number.parseFloat(originalBalance.toString());

 

then no matter what data type it things it is it will force it to be reparsed as a float and then you know for sure what it is a this point in time.

Link to comment
Share on other sites

9 hours ago, Jamiekson said:

Sorry for spamming this post, but I did find a work-around.  I just made the deposit amount smaller like 0.1, and then it will deposite that much any time the runningbalance > (originalBalance+0.1) and then subtract that amount from running balance.

I really just wanted to change the exact amount that gets deposited after a win, because sometimes my profit is 0.001 and sometimes its 10+ and I want it all to go to the vault, so to work around that I did this:

 

if (runningBalalnce >= (originalBalance + 0.1)) {
    var theCoin = 'BCD';
    var theAmount = 0.1;
    runningBalalnce -= 0.1;
   
    fetch("https://bc.game/api/vault/amount/recharge/", {
        "headers": {
            "accept": "application/json, text/plain, */*",
            "accept-language": "en-US,en;q=0.9",
            "content-type": "application/json",
            "sec-fetch-dest": "empty",
            "sec-fetch-mode": "cors",
            "sec-fetch-site": "same-origin",
            "sec-gpc": "1"
        },
        "referrer": "https://bc.game/wallet/vault",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": `{\"currencyName\":\"${theCoin}\",\"amount\":${theAmount}}`,
        "method": "POST",
        "mode": "cors",
        "credentials": "include"
    })
   
    .then(r => r.json())
    .then(r => {
        if(r.code) console.log(r);
    })
    .catch(error => {
        console.log(error);
    });
}


So basically if my profit is at 0.52 after a win, instead of figuring out how to deposit 0.52 once, it will deposit 0.1 5 times in a row until the running balance returns to the original balance.
Its not perfect, but it does accomplish exactly what I wanted.

In my view, you are nothing short of a genius 😄

Link to comment
Share on other sites

On 4/11/2022 at 12:27 AM, Jamiekson said:

Sorry for spamming this post, but I did find a work-around.  I just made the deposit amount smaller like 0.1, and then it will deposite that much any time the runningbalance > (originalBalance+0.1) and then subtract that amount from running balance.

I really just wanted to change the exact amount that gets deposited after a win, because sometimes my profit is 0.001 and sometimes its 10+ and I want it all to go to the vault, so to work around that I did this:

 

if (runningBalalnce >= (originalBalance + 0.1)) {
    var theCoin = 'BCD';
    var theAmount = 0.1;
    runningBalalnce -= 0.1;
   
    fetch("https://bc.game/api/vault/amount/recharge/", {
        "headers": {
            "accept": "application/json, text/plain, */*",
            "accept-language": "en-US,en;q=0.9",
            "content-type": "application/json",
            "sec-fetch-dest": "empty",
            "sec-fetch-mode": "cors",
            "sec-fetch-site": "same-origin",
            "sec-gpc": "1"
        },
        "referrer": "https://bc.game/wallet/vault",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": `{\"currencyName\":\"${theCoin}\",\"amount\":${theAmount}}`,
        "method": "POST",
        "mode": "cors",
        "credentials": "include"
    })
   
    .then(r => r.json())
    .then(r => {
        if(r.code) console.log(r);
    })
    .catch(error => {
        console.log(error);
    });
}


So basically if my profit is at 0.52 after a win, instead of figuring out how to deposit 0.52 once, it will deposit 0.1 5 times in a row until the running balance returns to the original balance.
Its not perfect, but it does accomplish exactly what I wanted.

I get runningBalalnce is not defined when I added it to other script

Link to comment
Share on other sites

well is it defined? are you updating it else where? running balance isn't a variable that you are given,, you actively need to keep it up to date and either modify it after every bet and result, or you need to screen scrape it from the html that has the users running balance.  I am sure its also probably somewhere in thye SS object but i haven't looked for it.  I would just keep track of it yourself

Link to comment
Share on other sites

  • 2 weeks later...

I couldn't seem to get ".toString" to work at all, but ".toLocaleString" worked for some reason.  I also believe some coins might have a lower minimum deposit so its possible I wasn't sending enough.

 

Link to comment
Share on other sites

Correct on the later point, so you know what .toString() is returning since it is defined on every object in JS so it has to be returning something probably a string like [object] or something useless like that though.  At least the .tolocaestring works as long as you are in a local that uses the same . and , in their numbers and doesn't swap them.  Then you may end up with some weirdness but more likely it will just throw an exception.

Link to comment
Share on other sites

can you help me fix this script?

please help me Sir...script can't run..

 

var config = {
   basebet: ( label, "basebet" , value; currency.minAmount, type: "number" , )
//payout: ( label, "payout" , value; 2, type: "number" , )
minchance: ( label, "minchance" , value; 1, type; "number" , )
maxchance: ( label, "maxchance" , value; 98, type; "number" , )
stop: ( label, "stop of bet >" , value; 1e8, type; "number" , )
balanceRisk: ( label, "balance risk %" , value; 100, type; "number", )
onLossTitle: ( label, "on Lose" , type; "title" ),
onLoss: (
Label: "
value: "reset" ,
type: "radio" ,
option: (
( value: "reset" , label: "Return to basebet" ),
( value: "Increase" , label: "Increase bet by | loss multiplier) " ),
),
},
winStreak: ( label, "win streak" , value; 2, type; "number" ),
winMultiplier: ( label, "win multiplier" , value; 2, type; "number" ),
},

var run = false;
//var bet = currency.amount/config.divider.value;
var bet = config.baseBet.value;
var baseBet = bet;
var start time = new Date();
var timestring = ";
var roundWins = 0;
var roundLosses = 0;
var chance = Math.random() * { config.maxChance.value, config.minChance.value} + config.minChance.value;
var currentProfitt = 0;
var currentProfittt = 0;
var curProf = 0;
var balance = currency.amount;
var lasbalance = balance;

function main (| (
  run = true;
  var current Bet = config.baseBet.value;
  game.onBet = function (|(
  //balance = currency.amount;
 //of (balance >= lasbalance) last balance = balance; chance = Math.random(|`
(config.maxChance.value + config.minChance.value) + config.minChance.value;
 //game.bet ( current Bet;
config.payout.value). then ( function {payout} (game.bet {current Bet;
(99/chance |. toFixed (4). then ( function { payout } ( /"
   current Profitt += curProf;
   if { current Profitt >= current Profittt } (
current Profittt = current Profitt;
  current Bet = config.baseBet.value;
   roundWins = 0;
   roundLosses = 0;
)
"/

if (payout >1 ) {
         balance += current Bet * 99/chance } current Bet; 
)else{
        balance = current Bet;
        roundWins ++;
if ( config.onwin.value === "reset" ) {
     current Bet = config.baseBet.value; 
)else{
    //Current Bet" = config.winMuktiplier.value;
      if ( roundwins % config.win Streak.value === 0)
{
current Bet *= config.winMultiplier.value;
  }
}
log.succes)
  "We won,so next bet Will be" + current Bet + " " +
   currency.currencyName
);
)else{
   curProf = current Bet;
    roundLosses ++;
 if ( config.onLoss.value === "reset") {
     current Bet = config.baseBet.value;
)else{
  //current Bet "= config.lossMultiplier.value;
if ( config.lossMultiplier.value);
  }
}
Log.error|
   "We Lost,so next bet Will be" + current Bet + 
      currency.currencyName
  );
)

current Profitt += curProf;
if ( current Profitt >= current Profittt ) (
Current Profittt = current Profitt;
     Current Bet = config.baseBet.value;
      roundWins = 0;
      roundLosses = 0;

if ( current Bet < config.baseBet.value) (
          current Bet = config.baseBet.value )

var stop level = ( 1000•
config.balanceRisk.value) " Last balance /100;
       if ( balance * current Bet < stop level ) (
);
game stop ();
   )
)(;
);
}
//"
setinterval ( function ) (
      var cur = new Date ();
      var + = Math.floor {( cur - start Time) /1000};
      var hour = Math.floor (+/3600};
      if (hour <10) hour = '0 + Math.floor (+/3600);
      t = t % 3600;
      var minutes = Math.floor (+/60);
      if ( minutes <10) minutes = '0' + Math.floor (+/60);
      var seconds = t % 60;
      if ( seconds <10) seconds = '0' + + % 60;
      if (run) timestring = "Playtime" + hour + ":'+ minutes
+ ':' + seconds + ";
          else timestring = ";
), "1000;
"/

Link to comment
Share on other sites

So i started fixing this until i realize its a bastardized set of several scripts from the forums half assedly jamed together with clearly no idea what they are doing.  Most of it looks like you had to have fucked it up on purpose.  So i have fixed the first half, after the nested calls to bet and seeing the random ass set interval at the end i decided it was probably better i not finish fixing it.  Either someone doesn't want you to have it or you are purposefully wasting my time i can't decide which but i don't like either.

 

 

 

var config = {
    basebet: { label:'basebet', value:currency.minAmount, type: 'number' },
  //payout: {
  //    label:'payout', 
  //    value:2, 
  //    type:'number'
  //},
    minchance: { label:'minchance', value:1, type:'number' },
    maxchance: { label:'maxchance', value:98, type:'number' },
    stop: { label:'stop of bet >' , value:1e8, type:'number' },
    balanceRisk: { label:'balance risk %', value:100, type:'number'},
    onLossTitle: { label:'on Lose', type:'title' },
    onLoss: { label:'', value: 'reset', type:'radio',
        options: [{
                value: 'reset', 
                label: 'Return to basebet' 
                }, {
                value: 'Increase', 
                label: 'Increase bet by | loss multiplier' 
                }
             ]
        },
    
    winStreak: { label:'win streak', value:2, type:'number' },
    winMultiplier: {label:'win multiplier', value:2, type:'number' },
    
  // Here i am adding the config values i see referenced in code but clearly missing from the config
  missingConfigValuesLabel: { label: 'Config values referenced but not provided' type:'title' },
  divider: { label:'divider', value:1, type:'number' }
}

var run = false;
//var bet = currency.amount/config.divider.value;
var bet = config.baseBet.value;
var baseBet = bet;
var start time = new Date();
var timestring = ";
var roundWins = 0;
var roundLosses = 0;
var chance = Math.random() * { config.maxChance.value, config.minChance.value} + config.minChance.value;
var currentProfitt = 0;
var currentProfittt = 0;
var curProf = 0;
var balance = currency.amount;
var lasbalance = balance;

function main ()
{
  run = true;
  var currentBet = config.baseBet.value;
  
  game.onBet = function (){
  
  balance = currency.amount;
  if(balance >= lasbalance) 
  {
    last balance = balance; 
    
    //making the assumption you want an arbitrary value between the min and max value here.
    chance = Math.random() * (config.maxChance.value - config.minChance.value) + config.minChance.value;
 
    game.bet( currentBet; config.payout.value).then( function(payout)
        {
        }
    game.bet( currentBet, (99/chance).toFixed(4)).then( function(payout)
        {
            currentProfitt += curProf;
            if( currentProfitt >= currentProfittt ) 
            {
                currentProfittt = currentProfitt;
                currentBet = config.baseBet.value;
                roundWins = 0;
                roundLosses = 0;
            }
            
            if (payout >1 ) 
            {
                balance += (currentBet * (99/chance))-currentBet; 
            }else
            {
                balance = currentBet;
                roundWins ++;
                if(config.onwin.value === "reset" ) 
                {
                    currentBet = config.baseBet.value; 
                }else
                {
                    currentBet = config.winMultiplier.value;
                if( roundwins % config.winStreak.value === 0)
                {
                    currentBet *= config.winMultiplier.value;
                }
            }
             log.success('We won,so next bet Will be' + current Bet + ' ' + currency.currencyName')
        
        }
}

/*  This is where i stopped fixing your bullshit excuse for being drunk or high and definately 
not understanding wtf you are writing its like you purposefully tried to make this fucked up and combined
several diffent scripts and methods that are out there i won't contribute to the dumbing down of people with shit like this. */


/*
else{
   curProf = current Bet;
    roundLosses ++;
 if ( config.onLoss.value === "reset") {
     current Bet = config.baseBet.value;
)else{
  //current Bet "= config.lossMultiplier.value;
if ( config.lossMultiplier.value);
  }
}
Log.error|
   "We Lost,so next bet Will be" + current Bet + 
      currency.currencyName
  );
)

current Profitt += curProf;
if ( current Profitt >= current Profittt ) (
Current Profittt = current Profitt;
     Current Bet = config.baseBet.value;
      roundWins = 0;
      roundLosses = 0;

if ( current Bet < config.baseBet.value) (
          current Bet = config.baseBet.value )

var stop level = ( 1000•
config.balanceRisk.value) " Last balance /100;
       if ( balance * current Bet < stop level ) (
);
game stop ();
   )
)(;
);
}
//"
setinterval ( function ) (
      var cur = new Date ();
      var + = Math.floor {( cur - start Time) /1000};
      var hour = Math.floor (+/3600};
      if (hour <10) hour = '0 + Math.floor (+/3600);
      t = t % 3600;
      var minutes = Math.floor (+/60);
      if ( minutes <10) minutes = '0' + Math.floor (+/60);
      var seconds = t % 60;
      if ( seconds <10) seconds = '0' + + % 60;
      if (run) timestring = "Playtime" + hour + ":'+ minutes
+ ':' + seconds + ";
          else timestring = ";
), "1000;
*/

Link to comment
Share on other sites

tolong bantu saya pak..script tidak bisa jalan..

 

var config = {
   basebet: ( label, "basebet" , nilai; currency.minAmount, ketik: "number" , )
//payout: ( label, "payout" , nilai; 2, ketik: "number" , )
minchance: ( label, "minchance" , value; 1, type; "number" , )
maxchance: ( label, "maxchance" , value; 98, type; "number" , )
stop: ( label, "stop of bet >" , nilai; 1e8, ketik; "angka", )
balanceRisk: ( label, "keseimbangan risiko %", nilai; 100, ketik; "angka", )
onLossTitle: ( label, "pada Kalah", ketik; "judul" ),
onLoss: (
Label: "
nilai: "reset" ,
ketik: "radio" ,
opsi: (
( nilai: "reset" , label: "Kembali ke basebet" ),
( nilai: "Kenaikan" , label: "Kenaikan taruhan sebesar | pengganda kerugian) " ),
),
},
winStreak: ( label, "win streak", nilai; 2, ketik; "angka" ),
winMultiplier: ( label, "win multiplier", nilai; 2, ketik; "angka" ),
},

var run = salah;
//var taruhan = currency.amount/config.divider.value;
var bet = config.baseBet.value;
var baseBet = taruhan;
var waktu mulai = Tanggal baru();
var timestring = ";
var roundWins = 0;
var roundLosses = 0;
var chance = Math.random() * { config.maxChance.value, config.minChance.value} + config.minChance.value;
var currentProfitt = 0;
var currentProfittt = 0;
var curProf = 0;
var balance = mata uang.jumlah;
var lasbalance = saldo;

function main (| (
  run = true;
  var Current Bet = config.baseBet.value;
  game.onBet = function (|(
  //balance = currency.amount;
 //of (balance >= lasbalance) last balance = balance; peluang = Math.random(|`
(config.maxChance.value + config.minChance.value) + config.minChance.value;
 //game.bet ( Taruhan saat ini;
config.payout.value) lalu ( function {payout} ( game.bet {Taruhan saat ini;
(99/peluang |. tetap (4). lalu ( fungsi { pembayaran } ( /"
   Laba saat ini += CurProf;
   jika { Profit saat ini >= Profit saat ini } (
Profit saat ini = Profit saat ini;
  saat ini Taruhan = config.baseBet.value;
   roundWins = 0;
   roundLosses = 0;
)
"/

if (pembayaran >1 ) {
         saldo += Taruhan saat ini * 99/kesempatan } Taruhan saat ini; 
)else{
        saldo = Taruhan saat ini;
        putaranMenang++;
if ( config.onwin.value === "reset" ) {
     Taruhan saat ini = config.baseBet.value; 
)else{
    //Taruhan Saat Ini" = config.winMuktiplier.value;
      if ( roundwins % config.win Streak.value === 0)
{
Taruhan saat ini *= config.winMultiplier.value;
  }
}
log.succes)
  "Kami menang ,jadi taruhan berikutnya adalah" + Taruhan saat ini + " " +
   currency.currencyName
);
)else{
   curProf = Taruhan saat ini;
    roundLosses ++;
 if ( config.onLoss.value === "reset") {
     Taruhan saat ini = config.baseBet.value;
)else{
  //current Bet "= config.lossMultiplier.value;
if ( config.lossMultiplier.value);
  }
}
Log.error|
   "Kami Kalah, jadi taruhan berikutnya adalah" + Taruhan saat ini + 
      currency.currencyName
  );
)

Laba saat ini += curProf;
if ( Laba Saat Ini >= Laba Saat Ini ) (
Laba Saat Ini = Laba Saat Ini;
     Taruhan Saat Ini = config.baseBet.value;
      roundWins = 0;
      roundLosses = 0;

if ( Taruhan saat ini < config.baseBet.value) (
          Taruhan saat ini = config.baseBet.value )

var stop level = ( 1000•
config.balanceRisk.value) " Saldo terakhir /100;
       if ( saldo * Taruhan saat ini < level stop ) (
);
game stop ();
   )
)(;
);
}
//"
setinterval ( fungsi ) (
      var cur = new Date();
      var + = Math.floor {( cur - Waktu mulai) /1000};
      var hour = Math.floor (+/3600};
      if (jam <10) jam = '0 + Math.floor (+/3600);
      t = t % 3600;
      var menit = Math.floor (+/60);
      if ( menit <10) menit = '0' + Math.floor (+/60);
      var detik = t % 60;
      jika ( detik <10) detik = '0' + + % 60;
      if (jalankan) timestring = "Waktu bermain" + jam + ":'+ menit
+ ':' + detik + ";
          else string waktu = ";
), "1000;
"/

Sorry sir, I'm new to playing bcgame.. I don't mean to harm other people, my family's situation is now very worrying..
and I get a script that is not normal, and I hope from this script I can be a little bit able to buy food for my little family, am I wrong sir?
I got this script in the form of a screen shot, and the sign in the picture is not clear, and I wrote it in a book.. I don't know where the semicolon or closing parenthesis is, because the picture is not clear... sorry sir, I'm not a drunk or a drunk. smoker..because I don't like to waste money on useless things..
Link to comment
Share on other sites

if you are trying to feed a family stop gambling, that right there is irresponsible. Just go get a job and stop risking whether or not your family can eat on gambling.  

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...