SHOW:
|
|
- or go back to the newest paste.
1 | /* Average bot by Bator (other BustaBit accounts: Bator2, TheRealNyanCat) | |
2 | * The bot will bet your baseBet and try to cash out at the average of the last 4 games. | |
3 | * | |
4 | * | |
5 | */ | |
6 | var baseBet = 1; | |
7 | var maxMultiplier = 10; //If the average is above this, it will cash out at this multiplier | |
8 | var stopLoss = 100; //Stop after losing this much | |
9 | var stopProfit= 100; //Stop after winning this much | |
10 | //------------------------ | |
11 | var tempCrash; | |
12 | var gameAverage; | |
13 | var currentGame = 0; | |
14 | var game1; | |
15 | var game2; | |
16 | var game3; | |
17 | var game4; | |
18 | ||
19 | ||
20 | //-------Do not edit below this line!--------------- | |
21 | var startingBalance = engine.getBalance(); | |
22 | var tempCrash; | |
23 | var currentGame = 0; | |
24 | ||
25 | // On a game starting | |
26 | engine.on('game_starting', function(info) | |
27 | { | |
28 | ||
29 | if (currentGame < 1) | |
30 | { | |
31 | console.log("Bot started. It will wait 4 games until it starts betting."); | |
32 | currentGame = currentGame + 1; | |
33 | } | |
34 | else if (currentGame >= 1) | |
35 | { | |
36 | engine.placeBet(baseBet*100, gameAverage, 1); | |
37 | currentGame = currentGame + 1; | |
38 | } | |
39 | }); | |
40 | ||
41 | ||
42 | //On game crash. | |
43 | engine.on('game_crash', function(data) { | |
44 | console.log("The current game is:", currentGame); | |
45 | tempCrash = (data.game_crash / 100); | |
46 | console.log("Game crashed at:", tempCrash); | |
47 | ||
48 | if (engine.getBalance() < startingBalance - stopLoss*100){ | |
49 | engine.stop(); | |
50 | } | |
51 | ||
52 | if (engine.getBalance() > startingBalance + stopProfit*100){ | |
53 | engine.stop(); | |
54 | } | |
55 | ||
56 | if (currentGame == 1){ | |
57 | game1 = tempCrash*100; | |
58 | } | |
59 | else if(currentGame == 2){ | |
60 | game2 = tempCrash*100; | |
61 | } | |
62 | else if(currentGame == 3){ | |
63 | game3 = tempCrash*100; | |
64 | } | |
65 | else if(currentGame == 4){ | |
66 | game4 = tempCrash*100; | |
67 | } | |
68 | else if(currentGame >= 5){ | |
69 | currentGame = 1; | |
70 | game1 = tempCrash*100; | |
71 | } | |
72 | gameAverage = Math.round((game1+game2+game3+game4)/4); | |
73 | console.log("Average:", gameAverage/100); | |
74 | ||
75 | if (gameAverage > maxMultiplier*100){ | |
76 | console.log("Average is higher than your maxMultipler so we are betting at:", maxMultiplier); | |
77 | gameAverage = maxMultiplier*100; | |
78 | } | |
79 | ||
80 | }); |