sweepabit bot


SUBMITTED BY: bakhajan

DATE: Sept. 14, 2016, 5:45 p.m.

UPDATED: Sept. 14, 2016, 5:47 p.m.

FORMAT: Text only

SIZE: 2.8 kB

HITS: 1623

  1. var _settings = {
  2. baseBet: 4, // 1 bit. Cannot be lower than 0.01.
  3. bombs: 3, // 3 bombs. Cannot be lower than 1 or higher than 24.
  4. multiply: 9, // Multiply the previous stake by 8 times if lost.
  5. tiles: 1, // Amount of tiles to click before cashing out.
  6. houseEdge: 1 // 1% House edge. Cannot be lower than 0.01 and max 100. (Do not touch if not sure)
  7. };
  8. // --- Edit over this line --- \\
  9. var bet = _settings.baseBet, lastBet = 0, lastGame = null;
  10. var houseEdge, odds, next;
  11. var tilesClicked = 0;
  12. console.log("[BOT] Starting Bot...")
  13. $.post("https://api.moneypot.com/v1/hashes?access_token="+access_token, '', function(json) {
  14. if(!connected) return;
  15. Hash = (typeof json.hash === "undefined"?false:json.hash);
  16. houseEdge = (_settings.houseEdge/100);
  17. odds = ( (25-_settings.bombs-tilesClicked) / (25-tilesClicked) );
  18. console.log("[BOT] Received first provably fair hash:", Hash);
  19. placeBet();
  20. });
  21. function placeBet(){
  22. //console.log("[BOT] Betting...");
  23. odds = ( (25-_settings.bombs-tilesClicked) / (25-tilesClicked) );
  24. var wager = (bet*100);
  25. var rangeWin = Math.floor(Math.pow(2,32)*(odds));
  26. next = ( bet * ((1.0-houseEdge)/odds) ) - bet;
  27. $.ajax({
  28. type: "POST",
  29. contentType: "application/json",
  30. url: "https://api.moneypot.com/v1/bets/custom?access_token="+access_token,
  31. data: JSON.stringify({
  32. client_seed: parseInt(game.clientSeed),
  33. hash: String(Hash),
  34. wager: wager,
  35. "payouts": [
  36. {from: 0, to: rangeWin, value: ((bet+next)*100)},
  37. {from: rangeWin, to: Math.pow(2,32), value: 0}
  38. ]
  39. }),
  40. dataType: "json",
  41. error: function(xhr, status, error) {
  42. console.error("[BET ERROR]",xhr.responseText);
  43. console.alert("Important: Remember to not show your access token to anyone.");
  44. return;
  45. }
  46. }).done(function(data){
  47. lastBet = bet;
  48. Hash = data.next_hash;
  49. if(data.outcome >= rangeWin){ // lost
  50. //console.log("[BOT] Lost bet.");
  51. bet *= _settings.multiply;
  52. lastGame = "lost";
  53. tilesClicked = 0;
  54. setTimeout(function(){placeBet();},100);
  55. }else{ // win
  56. //console.log("[BOT] Won bet.")
  57. if(lastGame=="lost") bet = _settings.baseBet;
  58. lastGame = "won";
  59. tilesClicked++;
  60. if(_settings.tiles>0 && tilesClicked<_settings.tiles){
  61. bet = next + bet;
  62. }else{
  63. bet = _settings.baseBet;
  64. tilesClicked = 0;
  65. }
  66. setTimeout(function(){placeBet();},100);
  67. }
  68. });
  69. }

comments powered by Disqus