Bitcoin Forum
April 25, 2024, 06:06:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: bustascript - Custom and designer scripts for bitcoin gambling sites  (Read 724 times)
devans
Sr. Member
****
Offline Offline

Activity: 528
Merit: 368


View Profile
April 29, 2018, 06:20:47 AM
 #21

Ah, super cool RGBKey! I've sent you the bounty Cheesy   hopefully it's a good framework for people who want to look back in history
Well that was pretty cool of you to offer a bounty and paid it out within a week. Grin
Does this script work on bustabit solely or can it work on bustadice interchangeably? Undecided

I rarely use scripts so might give this one a try if I knew which of the sites you created/co-own it works on first. Wink

bustabit and bustadice are provably fair in different ways and have different script editor APIs, so RGBKey's script will only work on bustabit.
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
StackGod (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 3


View Profile
April 29, 2018, 12:13:00 PM
Merited by RGBKey (1)
 #22

I've been trying to do it myself as I was curious. I've run into a problem where I cannot take the SHA3-256 HMAC of something, or I am doing it wrong. window.crypto.subtle.importKey does not support SHA3 operations, and I'm having an incredible amount of trouble trying to use outside code (current was trying to use http://caligatio.github.com/jsSHA/ as an alternative, but cannot get it to work).

Yeah, I had a try and it's a real pain in the ass. What would be ideal if devans could just expose a top level `bustaHash` and `hashToBust` function or something, I think it'd be super easy Cheesy

The functions SHA256 and gameResultFromHash are now available in the script editor. They're pretty self-explanatory, but you can find a usage example here. One thing to watch out for is that they both return a Promise rather than the result itself.

Damn, wish I'd checked this thread sooner! Nice work, RGBKey.
ShiftKeyBroken
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
May 18, 2018, 01:13:55 AM
 #23

thanks, bought another script, works good. pricey but i made it back in two days.
BTCevo
Legendary
*
Offline Offline

Activity: 1834
Merit: 1008


View Profile
May 19, 2018, 03:36:09 AM
 #24

thanks, bought another script, works good. pricey but i made it back in two days.

Are you alt account from OP? You should really give your proof to get this thing straight. I never know if there is any script really works unless you can tell me your username there so everyone can know your progression to make those profit back. Btw you said it is overprice so why are you still buying it? And that makes you are always buy more than one script to get profit? I just wondering if everything is really going well
seoinsection
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
September 18, 2018, 08:01:30 PM
 #25

Can i have your skype ? i want you to make Custom Script for me.
thanks,
Pif
Member
**
Offline Offline

Activity: 153
Merit: 18


View Profile
September 22, 2018, 03:46:08 PM
 #26

Quote from: RGBKey

That sure made this a lot easier. I had a crack at writing the script myself, seems pretty stable from what I've tested

[code
var config = {
    n: { value: '1', type: 'text', label: 'Rounds since last game >= multiplier (n)'},
    t: { value: 2, type: 'multiplier', label: 'Multiplier (t)'},
    wager: { value: 0, type: 'balance', label: 'Wager'}
};

// Globals
const n = parseInt(config.n.value);
const t = config.t.value;
const wager = config.wager.value;
let m = 0;

// Ensure user input makes sense
if(isNaN(n)) {
    stop('n must be an integer');
} else if(n < 0) {
    stop('n cannot be less than 0');
} else if(n === 0) {
    log('*** Warning: n is 0, the script will be betting on every game');
} else if(t > 1000) {
    log('*** Warning: You are using a very high multiplier');
    log('*** Using large values can cause the script to freeze temporarily');
}

// Recursive function to find the number of games since a multiplier
function findM(m, hash) {
  return new Promise((resolve, reject) => {
    gameResultFromHash(hash).then((result) => {
      if(result >= t) {
        resolve(m);
      } else {
        SHA256(hash).then((newHash) => {
          findM(m + 1, newHash).then((m) => {
            resolve(m);
          });
        });
      }
    });
  });
}

// Place a bet with the specified options
function placeBet() {
  log('Placing bet');
  checkBalance();
  engine.bet(wager, t);
}

// Pre-check before betting
function checkBalance() {
  if(userInfo.balance < config.wager.value) {
    stop('Insufficient balance');
  }
}

// Happens after the initial "sync", and after every game ending
function checkParams(initial) {
  if(engine.history.first().bust >= t && !initial) {
    log(`Multiplier for finished game was >= ${t}x, resetting count. `);
    m = 0;
    log(`${n-m} round(s) of multipliers < ${t}x before betting remaining`);
  } else {
    if(!initial) m++;
    if(m >= n) {
      placeBet();
      m = 0;
    } else {
      log(`${n-m} round(s) of multipliers < ${t}x before betting remaining`);
    }
  }
}

findM(0, engine.history.first().hash).then((value) => {
  // m is global here
  m = value;
  log(`${m} game(s) since multiplier of or at least ${t}x`);
  checkParams(true);
  // Set up event listeners to continue the script after the initial stage
  engine.on('GAME_ENDED', () => {
    checkParams();
  });
});
[/code]

Just bumped into this thread, and specifically to this post, and would like to know how to practically make use this script.
Would really appreciate if someone could drive me trought considering I have zero coding skills.
So something like: copypaste the script into bustabit script editor, replace"this " with your desired multiplier, replace "that" with number of rounds , and so on with bet amount and, if this script allows it, increase on lose and stop on win.
MyCryptoMint
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
January 22, 2019, 12:00:51 PM
 #27

i need this bustabit script to be install on my server can someone point me to the right direction .
Pif
Member
**
Offline Offline

Activity: 153
Merit: 18


View Profile
February 03, 2019, 09:16:35 AM
 #28

Quote from: RGBKey

That sure made this a lot easier. I had a crack at writing the script myself, seems pretty stable from what I've tested

[code
var config = {
    n: { value: '1', type: 'text', label: 'Rounds since last game >= multiplier (n)'},
    t: { value: 2, type: 'multiplier', label: 'Multiplier (t)'},
    wager: { value: 0, type: 'balance', label: 'Wager'}
};

// Globals
const n = parseInt(config.n.value);
const t = config.t.value;
const wager = config.wager.value;
let m = 0;

// Ensure user input makes sense
if(isNaN(n)) {
    stop('n must be an integer');
} else if(n < 0) {
    stop('n cannot be less than 0');
} else if(n === 0) {
    log('*** Warning: n is 0, the script will be betting on every game');
} else if(t > 1000) {
    log('*** Warning: You are using a very high multiplier');
    log('*** Using large values can cause the script to freeze temporarily');
}

// Recursive function to find the number of games since a multiplier
function findM(m, hash) {
  return new Promise((resolve, reject) => {
    gameResultFromHash(hash).then((result) => {
      if(result >= t) {
        resolve(m);
      } else {
        SHA256(hash).then((newHash) => {
          findM(m + 1, newHash).then((m) => {
            resolve(m);
          });
        });
      }
    });
  });
}

// Place a bet with the specified options
function placeBet() {
  log('Placing bet');
  checkBalance();
  engine.bet(wager, t);
}

// Pre-check before betting
function checkBalance() {
  if(userInfo.balance < config.wager.value) {
    stop('Insufficient balance');
  }
}

// Happens after the initial "sync", and after every game ending
function checkParams(initial) {
  if(engine.history.first().bust >= t && !initial) {
    log(`Multiplier for finished game was >= ${t}x, resetting count. `);
    m = 0;
    log(`${n-m} round(s) of multipliers < ${t}x before betting remaining`);
  } else {
    if(!initial) m++;
    if(m >= n) {
      placeBet();
      m = 0;
    } else {
      log(`${n-m} round(s) of multipliers < ${t}x before betting remaining`);
    }
  }
}

findM(0, engine.history.first().hash).then((value) => {
  // m is global here
  m = value;
  log(`${m} game(s) since multiplier of or at least ${t}x`);
  checkParams(true);
  // Set up event listeners to continue the script after the initial stage
  engine.on('GAME_ENDED', () => {
    checkParams();
  });
});
[/code]

Just bumped into this thread, and specifically to this post, and would like to know how to practically make use this script.
Would really appreciate if someone could drive me trought considering I have zero coding skills.
So something like: copypaste the script into bustabit script editor, replace"this " with your desired multiplier, replace "that" with number of rounds , and so on with bet amount and, if this script allows it, increase on lose and stop on win.


Bump.
Anyone knows?
shathi19
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 08, 2020, 05:17:23 AM
 #29

Hello StackGod

I’m looking for someone to code for me a bustascript.

What is your email? I want to discuss in private.

Thanks!
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!