Bitcoin Forum
May 04, 2024, 07:51:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 [160] 161 162 163 164 165 166 167 168 »
  Print  
Author Topic: Seuntjies DiceBot -Multi-Site, multi-strategy betting bot for dice. With Charts!  (Read 274500 times)
1982dre
Hero Member
*****
Offline Offline

Activity: 1372
Merit: 512



View Profile WWW
April 03, 2020, 06:37:45 AM
 #3181

I have noticed a few times that when i change the base bet, the bot doesn't reset after 2 wins.

I am using Dicebot 3.4.9.1.

Anyone having the same problem or is this already known? If not, i can upload the setting file/create a vid about it.

.....1% HOUSE EDGE.....
.....FAUCET 3.5K...........
.....RAINBOT
10K..........






















█████
 █████     ███
  █████     ███     █
   █████     ███     █
    █████     ███     █
     █████     ███     █
      █████     ███     █

     █████     ███     █

    █████     ███     █

   █████     ███     █

  █████     ███     █

 █████     ███

█████
..DuckDice..
█████
███     █████
█     ███     █████ 
█     ███     █████  
█     ███     █████   
█     ███     █████    
█     ███     █████     
█     ███     █████
    
█     ███     █████
   
█     ███     █████
  
█     ███     █████
 
███     █████

█████






















.....★  B O N U S E S.....
.....
  L O T T E R Y......
.....
  J A C K P O T......
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
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.
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
1714852288
Hero Member
*
Offline Offline

Posts: 1714852288

View Profile Personal Message (Offline)

Ignore
1714852288
Reply with quote  #2

1714852288
Report to moderator
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 04, 2020, 07:25:49 AM
 #3182

why you still don't give a sh*t? you are asked for evidences, im given you a database where you can see patterns and figure out something, but you are doing nothing?!
I did my tests. I found errors in the bot but found no substantial evidence or even anything suspicious in the site.

Hi, i'm a user of Windice and i like to prepare my bets using dicebot, but in the last 5 days i get over 15 fatal error and dicebot has to shut down...this is not normal becouse i'm using it on another 3 sites and everything is ok, can you help me? Cheesy

And if possible remember do add XRP on windice , thanks Cheesy

Can you email me your dicebotlog.txt file please? Also, are you from Russia? I've been informed that has banned the windice URL for gambling.


I have noticed a few times that when i change the base bet, the bot doesn't reset after 2 wins.

I am using Dicebot 3.4.9.1.

Anyone having the same problem or is this already known? If not, i can upload the setting file/create a vid about it.
That doesn't make sense, please send me your settings and a video.

PedroJMelo
Newbie
*
Offline Offline

Activity: 532
Merit: 0


View Profile
April 04, 2020, 10:03:18 AM
 #3183



Hi, i'm a user of Windice and i like to prepare my bets using dicebot, but in the last 5 days i get over 15 fatal error and dicebot has to shut down...this is not normal becouse i'm using it on another 3 sites and everything is ok, can you help me? Cheesy

And if possible remember do add XRP on windice , thanks Cheesy

Can you email me your dicebotlog.txt file please? Also, are you from Russia? I've been informed that has banned the windice URL for gambling.


Ok, sending the e-mail, i'm from Brazil Smiley
4nn0nn
Copper Member
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
April 13, 2020, 04:20:02 PM
 #3184

Hi @Seuntjie,

Could please share the code/formula to convert a roll number into a crash/payout number?

How do I calculate to crash value for like -> 49.50 = 2x & 33.00 = 3x etc etc

Thank you.
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 13, 2020, 04:24:20 PM
 #3185

Hi @Seuntjie,

Could please share the code/formula to convert a roll number into a crash/payout number?

How do I calculate to crash value for like -> 49.50 = 2x & 33.00 = 3x etc etc

Thank you.

https://steemit.com/gambling/@seuntjie/diecebot-math

Edit: If you're using the advanced mode or just quickly want to convert from the one or the other, you can just set the payout in the manual bet section or at the top of the strategies tab:

kwong1983
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
April 16, 2020, 03:12:26 PM
 #3186

chance  = math.random(1,10)

I need help. How do i code the chance lower than 1? like 0.10(990x Payout)

Thanks
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 16, 2020, 03:15:23 PM
 #3187

chance  = math.random(1,10)

I need help. How do i code the chance lower than 1? like 0.10(990x Payout)

Thanks

increase your maximum in the random call by some order of magnitude and the divide the result again by the same order of magnitude.

ie math.random(1,10*100)/100.0

PedroJMelo
Newbie
*
Offline Offline

Activity: 532
Merit: 0


View Profile
April 17, 2020, 04:37:18 AM
 #3188



Hi, i'm a user of Windice and i like to prepare my bets using dicebot, but in the last 5 days i get over 15 fatal error and dicebot has to shut down...this is not normal becouse i'm using it on another 3 sites and everything is ok, can you help me? Cheesy

And if possible remember do add XRP on windice , thanks Cheesy

Can you email me your dicebotlog.txt file please? Also, are you from Russia? I've been informed that has banned the windice URL for gambling.


Ok, sending the e-mail, i'm from Brazil Smiley

Still waiting for your answer Cheesy
kwong1983
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
April 17, 2020, 05:04:17 AM
 #3189

chance  = math.random(1,10)

I need help. How do i code the chance lower than 1? like 0.10(990x Payout)

Thanks

increase your maximum in the random call by some order of magnitude and the divide the result again by the same order of magnitude.

ie math.random(1,10*100)/100.0

Thanks  Grin
4nn0nn
Copper Member
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
April 21, 2020, 10:30:42 AM
 #3190

Hi seuntjie.

I can't login to stake with dicebot. They seem to have made some changes.
Will there be a new version soon?

Thanks
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 21, 2020, 10:36:53 AM
Last edit: April 21, 2020, 11:00:32 AM by seuntjie
 #3191

Hi seuntjie.

I can't login to stake with dicebot. They seem to have made some changes.
Will there be a new version soon?

Thanks
https://forum.seuntjie.com/index.php?topic=1334.msg2318#msg2318

Logins are working normally again.

4nn0nn
Copper Member
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
April 21, 2020, 11:50:01 AM
 #3192

Thanks Seuntjie!

I also got a different question; is there a way to reset the seed when profit = x amount?

I only see support for seed resetting on x amount of bets/wins or losses.

Thanks
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 21, 2020, 11:51:48 AM
 #3193

Thanks Seuntjie!

I also got a different question; is there a way to reset the seed when profit = x amount?

I only see support for seed resetting on x amount of bets/wins or losses.

Thanks

Not from the advanced mode no, but you can using the programmer mode

BabbCat
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 21, 2020, 03:20:40 PM
 #3194

Is there any way someone could make the lightguide script from bustabit work on the dicebot?  I'll paste the script below too see if anyone thinks they could do it.  It would be amazing if someone could


var config = {
    wager: {
      value: 100,
      type: 'balance',
      label: 'Base bet'
    },
    payout: {
      value: 2,
      type: 'multiplier',
      label: 'Coeff to wait for'
    },
    // limit_script_balance: {
    //   value: 100000,
    //   type: 'balance',
    //   label: 'Maximum lose'
    // }
  };
  // https://mtihc.github.io/bustabit-script-simulator/
  let wantedProfitInBits = config.wager.value / 100;
  let netProfit = 0;
  let baseList = [];
  let currentGamesPlayed = 0;
  let maxBet = 0;
  let balanceNeeded = 0;
  let wins = 0;
  let loses = 0;
  let currentlyPlaying = true;
  let SPLIT_INTO = 3;
  var MAX_LOSE = 0;
  var SESSION_NET_PROFIT = 0;
  var SESSION_MAX_BALANCE_NEEDED = 0;
  var ALL_GAMES = [];
  var SESSION_TIMES_ENTERED = 0;
  addLast50();
  var SMALL_SESSION_NET_PROFIT = 0;
  // generateLastNGames(engine.history.first().hash, 100);
 
  function addLast50() {
    var LATEST_50_GAMES = engine.history.toArray();
    // logTime(`LATEST_50 length ${LATEST_50_GAMES.length}`)
    for (let i = 0; i <= LATEST_50_GAMES.length - 1; i++) {
      ALL_GAMES.unshift(LATEST_50_GAMES.bust);
    }
    ALL_GAMES.push(engine.history.first().bust)
    for (var i = 0; i < ALL_GAMES.length - 1; i++) {
      // logTime(`id ${i} ${ALL_GAMES}`);
    }
  }
 
  function getLastNWinPercentage(n, targetPayout) {
    let wins = 0;
    let loses = 0;
    let elements_used = 0
    for (let i = ALL_GAMES.length - 1; i > -1 && i > ALL_GAMES.length - 1 - n; i--) {
      elements_used++;
      if (ALL_GAMES < targetPayout) {
        loses++;
      } else {
        wins++;
      }
    }
    let percentage = (wins / elements_used) * 100
    logTime(`L${elements_used} wins: ${percentage} %`);
    return percentage;
  }
 
 
  initScript();
 
 
  function getCurrentBetLightGuide() {
    let currentMultiplier = 0;
    let currentBet = null;
    if (netProfit >= 0 && currentGamesPlayed > 0) {
      return currentBet;
    }
    if (baseList.length >= 2) {
      currentMultiplier = baseList[0] + baseList[baseList.length - 1];
      currentBet = (currentMultiplier * config.wager.value);
    } else if (baseList.length === 1) {
      currentMultiplier = baseList[0];
      currentBet = (currentMultiplier * config.wager.value) * 2;
    } else {
      currentMultiplier = null;
    }
    return currentBet;
  }
 
  function initScript() {
 
    logTime(`Starting in game ${engine.history.first().id}`);
    // Want to earn: ` + wantedProfitInBits + ' bits. Splliting into: ' + SPLIT_INTO);
    SESSION_TIMES_ENTERED += 1;
    // let wanted_statistics = [800, 700, 600, 500, 400, 300, 200, 150, 100, 50, 40, 30, 20, 10];
    // wanted_statistics.forEach(function (element) {
    //   getLastNWinPercentage(element, 2);
    // })
    logTime('------------------------------------------------')
    // TO DO: Uncomment
    // for (let i = 1; i <= SPLIT_INTO; i++) {
    //   baseList.push(Math.round(wantedProfitInBits / SPLIT_INTO) * 100)
    // }
    baseList = [1, 2, 3];
    netProfit = 0;
    currentGamesPlayed = 0;
    maxBet = 0;
    balanceNeeded = 0;
    wins = 0;
    loses = 0;
    currentlyPlaying = true;
    SMALL_SESSION_NET_PROFIT = 0;
  }
 
  // Try to bet immediately when script starts
  if (engine.gameState === "GAME_STARTING") {
    makeBet();
  }
 
  engine.on('GAME_STARTING', onGameStarted);
  engine.on('GAME_ENDED', onGameEnded);
 
  function onGameStarted() {
    if (!currentlyPlaying) {
      initScript();
    }
    let currentBet = getCurrentBetLightGuide();
 
    if (!currentBet) {
      currentlyPlaying = false;
      printEndStatus();
      // engine.on('GAME_STARTING', function(){});
      initScript();
    }
    makeBet();
  }
 
  function onGameEnded() {
    ALL_GAMES.push(engine.history.first().bust);
    let lastGame = engine.history.first();
    // If we wagered, it means we played
    if (!lastGame.wager) {
      return;
    }
    let lastBet = getCurrentBetLightGuide();
 
    if (lastGame.cashedAt) {
      let profit = Math.round(((lastBet * config.payout.value) - lastBet) / 100);
      netProfit += profit;
      SESSION_NET_PROFIT += profit;
      SMALL_SESSION_NET_PROFIT += profit
      logTime(`Won ${profit} bits`);
      if (baseList.length > 1) {
        baseList.splice(baseList.length - 1, 1);
      }
      baseList.splice(0, 1);
      wins += 1;
    } else {
      var lost = lastBet / 100;
      logTime(`Lost ${lost} bits`);
      netProfit -= lost;
      SESSION_NET_PROFIT -= lost;
      baseList.push(lastBet / config.wager.value);
      loses += 1;
    }
    currentGamesPlayed += 1;
    // logTime(`Net profit: ${netProfit} Current bet: ${getCurrentBetLightGuide() / 100}`);
    let currentBalanceNeeded = netProfit + ((getCurrentBetLightGuide() / 100) * -1);
    if (currentBalanceNeeded < balanceNeeded) {
      balanceNeeded = currentBalanceNeeded;
    }
 
    if (currentBalanceNeeded < SESSION_MAX_BALANCE_NEEDED) {
      SESSION_MAX_BALANCE_NEEDED = currentBalanceNeeded;
    }
 
    logTime('Net profit: ' + netProfit + ' bits. Left to play: ' + baseList.length);
  }
 
  function printEndStatus() {
    logTime(`Game ended id: ${engine.history.first().id}. Played: ` + currentGamesPlayed + ' Net profit: ' + netProfit + ' bits. Balance needed: ' + balanceNeeded * -1 + ' bits Max bet: ' + maxBet / 100 + ' bits. Wins: ' + (wins / (wins + loses) * 100) + ' % Loses: ' + (loses / (wins + loses) * 100) + ' %');
    logTime(`SESSION NET PROFIT ${SESSION_NET_PROFIT} bits, SESSION MAX BALANCE NEEDED ${SESSION_MAX_BALANCE_NEEDED} bits, SESSION TIMES ENTERED ${SESSION_TIMES_ENTERED}`)
  }
 
  function makeBet() {
    let currentBet = getCurrentBetLightGuide();
    if (!currentBet) {
      printEndStatus();
      return;
    }
    engine.bet(currentBet, config.payout.value);
    if (currentBet > maxBet) {
      maxBet = currentBet;
    }
    logTime('betting ' + Math.round(currentBet / 100) + ' on ' + config.payout.value + ' x');
  }
 
  function logTime(msg) {
    let today = new Date();
    let calendarDate = `${today.getDate()}-${today.getMonth() + 1}-${today.getFullYear()}`;
    let now = `${today.getHours()}:${today.getMinutes()}:${today.getSeconds()}`;
    log(`${now} ${msg}`);
  }
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 27, 2020, 11:22:29 PM
 #3195

Is there any way someone could make the lightguide script from bustabit work on the dicebot?  I'll paste the script below too see if anyone thinks they could do it.  It would be amazing if someone could
Two things... first up, you might want to ask over in the programmer thread here on BitcoinTalk: https://bitcointalk.org/index.php?topic=1114503
or on the Bot forum: https://forum.seuntjie.com/index.php?board=4.0

Secondly... if you're going to copy/paste a large piece of code into a post... you should use the "code" tags... like this:
Code:
var config = {
    wager: {
      value: 100,
      type: 'balance',
      label: 'Base bet'
    },
    payout: {
      value: 2,
      type: 'multiplier',
      label: 'Coeff to wait for'
    },
    // limit_script_balance: {
    //   value: 100000,
    //   type: 'balance',
    //   label: 'Maximum lose'
    // }
  };
  // https://mtihc.github.io/bustabit-script-simulator/
  let wantedProfitInBits = config.wager.value / 100;
  let netProfit = 0;
  let baseList = [];
  let currentGamesPlayed = 0;
  let maxBet = 0;
  let balanceNeeded = 0;
  let wins = 0;
  let loses = 0;
  let currentlyPlaying = true;
  let SPLIT_INTO = 3;
  var MAX_LOSE = 0;
  var SESSION_NET_PROFIT = 0;
  var SESSION_MAX_BALANCE_NEEDED = 0;
  var ALL_GAMES = [];
  var SESSION_TIMES_ENTERED = 0;
  addLast50();
  var SMALL_SESSION_NET_PROFIT = 0;
  // generateLastNGames(engine.history.first().hash, 100);
 
  function addLast50() {
    var LATEST_50_GAMES = engine.history.toArray();
    // logTime(`LATEST_50 length ${LATEST_50_GAMES.length}`)
    for (let i = 0; i <= LATEST_50_GAMES.length - 1; i++) {
      ALL_GAMES.unshift(LATEST_50_GAMES[i].bust);
    }
    ALL_GAMES.push(engine.history.first().bust)
    for (var i = 0; i < ALL_GAMES.length - 1; i++) {
      // logTime(`id ${i} ${ALL_GAMES[i]}`);
    }
  }
 
  function getLastNWinPercentage(n, targetPayout) {
    let wins = 0;
    let loses = 0;
    let elements_used = 0
    for (let i = ALL_GAMES.length - 1; i > -1 && i > ALL_GAMES.length - 1 - n; i--) {
      elements_used++;
      if (ALL_GAMES[i] < targetPayout) {
        loses++;
      } else {
        wins++;
      }
    }
    let percentage = (wins / elements_used) * 100
    logTime(`L${elements_used} wins: ${percentage} %`);
    return percentage;
  }
 
 
  initScript();
 
 
  function getCurrentBetLightGuide() {
    let currentMultiplier = 0;
    let currentBet = null;
    if (netProfit >= 0 && currentGamesPlayed > 0) {
      return currentBet;
    }
    if (baseList.length >= 2) {
      currentMultiplier = baseList[0] + baseList[baseList.length - 1];
      currentBet = (currentMultiplier * config.wager.value);
    } else if (baseList.length === 1) {
      currentMultiplier = baseList[0];
      currentBet = (currentMultiplier * config.wager.value) * 2;
    } else {
      currentMultiplier = null;
    }
    return currentBet;
  }
 
  function initScript() {
 
    logTime(`Starting in game ${engine.history.first().id}`);
    // Want to earn: ` + wantedProfitInBits + ' bits. Splliting into: ' + SPLIT_INTO);
    SESSION_TIMES_ENTERED += 1;
    // let wanted_statistics = [800, 700, 600, 500, 400, 300, 200, 150, 100, 50, 40, 30, 20, 10];
    // wanted_statistics.forEach(function (element) {
    //   getLastNWinPercentage(element, 2);
    // })
    logTime('------------------------------------------------')
    // TO DO: Uncomment
    // for (let i = 1; i <= SPLIT_INTO; i++) {
    //   baseList.push(Math.round(wantedProfitInBits / SPLIT_INTO) * 100)
    // }
    baseList = [1, 2, 3];
    netProfit = 0;
    currentGamesPlayed = 0;
    maxBet = 0;
    balanceNeeded = 0;
    wins = 0;
    loses = 0;
    currentlyPlaying = true;
    SMALL_SESSION_NET_PROFIT = 0;
  }
 
  // Try to bet immediately when script starts
  if (engine.gameState === "GAME_STARTING") {
    makeBet();
  }
 
  engine.on('GAME_STARTING', onGameStarted);
  engine.on('GAME_ENDED', onGameEnded);
 
  function onGameStarted() {
    if (!currentlyPlaying) {
      initScript();
    }
    let currentBet = getCurrentBetLightGuide();
 
    if (!currentBet) {
      currentlyPlaying = false;
      printEndStatus();
      // engine.on('GAME_STARTING', function(){});
      initScript();
    }
    makeBet();
  }
 
  function onGameEnded() {
    ALL_GAMES.push(engine.history.first().bust);
    let lastGame = engine.history.first();
    // If we wagered, it means we played
    if (!lastGame.wager) {
      return;
    }
    let lastBet = getCurrentBetLightGuide();
 
    if (lastGame.cashedAt) {
      let profit = Math.round(((lastBet * config.payout.value) - lastBet) / 100);
      netProfit += profit;
      SESSION_NET_PROFIT += profit;
      SMALL_SESSION_NET_PROFIT += profit
      logTime(`Won ${profit} bits`);
      if (baseList.length > 1) {
        baseList.splice(baseList.length - 1, 1);
      }
      baseList.splice(0, 1);
      wins += 1;
    } else {
      var lost = lastBet / 100;
      logTime(`Lost ${lost} bits`);
      netProfit -= lost;
      SESSION_NET_PROFIT -= lost;
      baseList.push(lastBet / config.wager.value);
      loses += 1;
    }
    currentGamesPlayed += 1;
    // logTime(`Net profit: ${netProfit} Current bet: ${getCurrentBetLightGuide() / 100}`);
    let currentBalanceNeeded = netProfit + ((getCurrentBetLightGuide() / 100) * -1);
    if (currentBalanceNeeded < balanceNeeded) {
      balanceNeeded = currentBalanceNeeded;
    }
 
    if (currentBalanceNeeded < SESSION_MAX_BALANCE_NEEDED) {
      SESSION_MAX_BALANCE_NEEDED = currentBalanceNeeded;
    }
 
    logTime('Net profit: ' + netProfit + ' bits. Left to play: ' + baseList.length);
  }
 
  function printEndStatus() {
    logTime(`Game ended id: ${engine.history.first().id}. Played: ` + currentGamesPlayed + ' Net profit: ' + netProfit + ' bits. Balance needed: ' + balanceNeeded * -1 + ' bits Max bet: ' + maxBet / 100 + ' bits. Wins: ' + (wins / (wins + loses) * 100) + ' % Loses: ' + (loses / (wins + loses) * 100) + ' %');
    logTime(`SESSION NET PROFIT ${SESSION_NET_PROFIT} bits, SESSION MAX BALANCE NEEDED ${SESSION_MAX_BALANCE_NEEDED} bits, SESSION TIMES ENTERED ${SESSION_TIMES_ENTERED}`)
  }
 
  function makeBet() {
    let currentBet = getCurrentBetLightGuide();
    if (!currentBet) {
      printEndStatus();
      return;
    }
    engine.bet(currentBet, config.payout.value);
    if (currentBet > maxBet) {
      maxBet = currentBet;
    }
    logTime('betting ' + Math.round(currentBet / 100) + ' on ' + config.payout.value + ' x');
  }
 
  function logTime(msg) {
    let today = new Date();
    let calendarDate = `${today.getDate()}-${today.getMonth() + 1}-${today.getFullYear()}`;
    let now = `${today.getHours()}:${today.getMinutes()}:${today.getSeconds()}`;
    log(`${now} ${msg}`);
  }

It keeps your post a lot tidier... and it stops the forum from interpretting things like the [ i ] in your code as text formatting Wink

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
4nn0nn
Copper Member
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
April 29, 2020, 11:19:27 PM
 #3196

Hi @Seuntjie!

Thanks for your quick reply to my previous questions.
I am dealing with another thing at the moment.

You know how we sometimes receive the 'bet result received does not match last bet placed! stopping for your safety' error?

I know how to restart my scripts using the start() command in lua, but is there a way to add a piece of code where the script would 'remember' where it was before it received the error?

That way I can, for example, continue a martingale right after instead of starting all over again.

Thank you.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 30, 2020, 12:48:43 AM
Last edit: April 30, 2020, 01:07:29 AM by HCP
 #3197

The short answer is "No".

The much longer answer is that ass soon as you use start() all the initialisation at the beginning of your script is executed... so the "state" is completely wiped and you start from the very beginning again.

Depending on how complex your script is, you might be able to fashion a "dumpState()" type function that would dump all the current value of all the variables you are using in your script into a table as it iterates through each "dobet" cycle.

That way, you could see the "state" showing in the output log. It should then be theoretically possible to copy/paste that table data into the beginning of your script with some "loadState()" type function that could then initialise all your variables to what they were when the script stopped.

Again, how complicated your script is would dictate whether this was viable and how badly it would affect the performance of the script.

So for example... something like this:
Code:
initialBet = 0.00000003
count = 0

dataDump = {count=5,bet=0.00000015}
loadData = True

function loadState()
  count = dataDump["count"]
  nextbet = dataDump["bet"]
end

if loadData then loadState() end

function dobet()
  print("dataDump = {count=" .. count .. ",bet=" .. nextbet .."}")
....
end

Every time through dobet(), it would dump out the 'dataDump' table string... if the script crashes, you copy/paste that back into the top of the script and set loadData = True. If you want the script to just start normally and use the 'default' values, you set loadData = False and the data would not be loaded.

But yeah, depending on how many variables, counters, flags, loops etc... it could get very messy very quickly.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
April 30, 2020, 06:23:24 AM
Merited by HCP (5)
 #3198

Hi @Seuntjie!

Thanks for your quick reply to my previous questions.
I am dealing with another thing at the moment.

You know how we sometimes receive the 'bet result received does not match last bet placed! stopping for your safety' error?

I know how to restart my scripts using the start() command in lua, but is there a way to add a piece of code where the script would 'remember' where it was before it received the error?

That way I can, for example, continue a martingale right after instead of starting all over again.

Thank you.

Take a look at the pattern in https://forum.seuntjie.com/index.php?topic=2.msg2195#msg2195

It does basically what you need if you alter your script to initialize your variables in the right place, but like HCP said, the more complex your script, the harder it becomes.

Stephov
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 01, 2020, 01:41:00 PM
 #3199

Hi, Seuntjie!
Today I've downloaded source code from github, but it is 3.4.9 version. Could you upload the latest version, please?
seuntjie (OP)
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
May 01, 2020, 02:44:01 PM
 #3200

Hi, Seuntjie!
Today I've downloaded source code from github, but it is 3.4.9 version. Could you upload the latest version, please?

Sure, I've pushed my latest changes, though you'll see the only changes are updating the version no in cDiceBot.cs and About.cs, and extra logging for wolf.bet. The rest of the changes for v 3.4.10.1 were pushed before the update

Pages: « 1 ... 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 [160] 161 162 163 164 165 166 167 168 »
  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!