SHOW:
|
|
- or go back to the newest paste.
1 | // ==UserScript== | |
2 | // @authoro freed0m | |
3 | // @version 4 | |
4 | // @name [LATEST] CSGODouble & CSGOPOLYGON Script (Profit Bot) [2016] [RAINBOW, TRAIN & PATTERN PROTECTION] | |
5 | - | // @description Are you tired of scams? I took the freed0m bot and deleted all scam trys. (/Send, Chat, urls etc.). Have fun winning! Working for csgodouble.com and csgopolygon.com!So far, the most advanced working bot for the website - rainbow, train & pattern protection + an overwhelmingly good betting method (Nightengale!) |
5 | + | // @description Are you tired of scams? I took the freed0m bot and deleted all scam trys. Have fun winning! Working for csgodouble.com and csgopolygon.com!So far, the most advanced working bot for the website - rainbow, train & pattern protection + an overwhelmingly good betting method (Nightengale!) |
6 | // @namespace http://csgodouble.com/* | |
7 | // @include http://*csgodouble.com/* | |
8 | // @include http://*csgopolygon.com/* | |
9 | // @run-at document-end | |
10 | // ==/UserScript== | |
11 | ||
12 | //1 round = 50 seconds | |
13 | //rounds per day = 1728 | |
14 | //expected wins per day = 806 | |
15 | ||
16 | //START [Inserting UI] | |
17 | var UI_html = '<style scoped> @import url(https://fonts.googleapis.com/css?family=Ubuntu:300); table { font-family: "Ubuntu", sans-serif; background-color: #404040; color: #0d0d0d; } #header { background-color: #262626; color: #ff0066; } label { font-weight: normal; } .odds { font-weight: normal; color: #00ffcc; } input[type=text] { border-radius: 5px; border: 1px solid rgba(0, 0, 0, .25); color: #808080; background-color: #262626; } input[type=text]:focus { background-color: #1a1a1a; color: #ffcc00; } #footer { color: #b3b3b3; } #one { color: #e74c3c; } #two { color: #e67e22; } #three { color: #f1c40f; } #four { color: #1abc9c; } #five { color: #2ecc71; } #six { color: #3498db; } #seven { color: #9b59b6; } #eight { color: #e74c3c; } #nine { color: #e67e22; } #ten { color: #f1c40f; } #eleven { color: #1abc9c; } input[type=button] { background-color: #262626; border-color: #1a1a1a; } #startButton { color: #2ecc71; } #stopButton { color: #e74c3c; } #red { width: 33.33%; color: #c12e2a; } #green { width: 33.33%; color: #419641; } #black { width: 33.33%; color: #666; }</style><hr><table border="1"> <tr id="header"> <td> <input type="radio" name="system" value="nightengale" id="nightengaleRadioBtn" checked="checked"> <label for="nightengaleRadioBtn">Nightengale</label> </td> <td> <input type="radio" name="system" value="laboucher" id="labouchereRadioBtn"> <label for="labouchereRadioBtn">Labouchère</label> </td> </tr> <tr> <td> <table> <tr> <td> <label for="nightengaleDefaultBetInput">Default Bet: </label> <input type="text" id="nightengaleDefaultBetInput"> </td> </tr> <tr> <td> <label for="nightengaleProfitOver24HoursInput">Profit over 24 hours: </label> <input type="text" id="nightengaleProfitOver24HoursInput"> </td> </tr> <tr> <td>Odds of losing <span id="nightengaleOddsOfLosingXTimesInARowX" class="odds">X</span> Times in a row: <span id="nightengaleOddsOfLosingXTimesInARow" class="odds">YY%</span></td> </tr> <tr> <td>Odds of losing in 1 day: <span id="nightengaleOddsOfLosingIn1Day" class="odds">XX%</span></td> </tr> <tr> <td>Percentage of money as default bet: <span id="nightengalePercentageOfMoneyAsDefaultBet" class="odds">XX%</span></td> </tr> <tr> <td> <input type="checkbox" id="nightengaleAntiBankruptcyCheckbox"> <label type="text" for="nightengaleAntiBankruptcyCheckbox">Anti-Bankruptcy</label> </td> </tr> <tr> <td> <input type="checkbox" id="nightengaleAntiDoubleGreenCheckbox"> <label type="text" for="nightengaleAntiDoubleGreenCheckbox">Anti-Double Green</label> skip <input type="text" id="nightengaleAntiDoubleGreenInput"> rolls </td> </tr> <tr> <td> <input type="checkbox" id="nightengaleAntiLoseallCheckbox"> <label type="text" for="nightengaleAntiLoseallCheckbox">Anti-Loseall after</label> <input type="text" id="nightengaleAntiLoseallInput"> losses </td> </tr> <tr> <td> <input type="checkbox" id="nightengaleStopAfterXGamesCheckbox"> <label for="nightengaleStopAfterXGamesCheckbox">Stop after <input type="text" id="nightengaleStopAfterXGamesInput"> games</label> </td> </tr> <tr> <td> <input type="checkbox" id="nightengaleStopAfterReachingXCheckbox"> <label for="nightengaleStopAfterReachingXCheckbox">Stop after reaching <input type="text" id="nightengaleStopAfterReachingXInput"> </label> </td> </tr> <tr> <td> <input type="checkbox" id="nightengaleBetOnGreenCheckbox"> <label for="nightengaleBetOnGreenCheckbox">Side bet on green. Bet = <input type="text" id="nightengaleBetOnGreenInput"> </label> </td> </tr> </table> </td> <td> <table> <tr> <td> <label for="labouchereGoalInput">Goal:</label> <input type="text" id="labouchereGoalInput" disabled> </td> </tr> <tr> <td> <label for="labouchereLines">Lines:</label> <input type="text" id="labouchereLines" disabled> </td> </tr> <tr> <td> Predicted Bets required: <span id="laboucherePredictedBets" class="odds">XX</span> </tr> </table> </td> </tr> <tr> <td> <input type="checkbox" id="trainProtectionCheckbox" checked="checked"> <label for="trainProtectionCheckbox">Train Protection</label> <input type="checkbox" id="rainbowProtectionCheckbox"> <label for="rainbowProtectionCheckbox">Rainbow Protection</label> <br> <input type="checkbox" id="rrbbProtectionCheckbox"> <label for="rrbbProtectionCheckbox">RRBBRR Protection</label> <input type="checkbox" id="rrbProtectionCheckbox"> <label for="rrbProtectionCheckbox">RRBRR Protection</label> </td> <td> <input style="width:50%;" type="button" value="Start" id="startButton"><input style="width:50%;" type="button" value="Stop" id="stopButton"> </td> </tr> <tr> <td> <input type="checkbox" id="simulationModeCheckbox"> <label for="simulationModeCheckbox">Simulation Mode</label> <input type="checkbox" id="manualModeCheckbox"> <label for="manualModeCheckbox">Manual (Sim) Mode</label> </td> <td> <label for="simulationMoneyInput">Simulation Money:</label> <input type="text" id="simulationMoneyInput"> </td> </tr> <tr> <td> <label for="simulateBetAmt">Simulate Bet:</label> <input type="text" id="simulateBetAmt"> </td> <td> <input type="button" id="red" value="Red"><input type="button" id="green" value="Green"><input type="button" id="black" value="Black"> </td> </tr> <tr id="footer"> <td id="logo"> <marquee direction="right"><span id="one">x</span><span id="two">2</span><span id="three">D</span><span id="four">e</span><span id="five">s</span><span id="six">t</span><span id="seven">r</span><span id="eight">o</span><span id="nine">y</span><span id="ten">e</span> <span id="eleven">r</span> (c) Bill Moody 2016</marquee> </td> <td style="text-align:center;">Run Time: <b><span id="runtime"></span></b></td> </tr> <tr> <td><a style="color:blue;font-weight:bold;" href="https://www.youtube.com/watch?v=56W6mnQtfk4">#ShamelessSelfPromotion (YouTube url)</a></td> <td> <a style="color:red;font-weight:bold;" href="http://www.unknowncheats.me">UnKnOwNcHeAtS.me</a> </td> </tr></table><hr>'; | |
18 | var UI = document.createElement('div'); | |
19 | UI.innerHTML = UI_html; | |
20 | ||
21 | var insertBefore = document.getElementsByClassName("progress")[0]; | |
22 | insertBefore.parentNode.insertBefore(UI, insertBefore); | |
23 | //END [Inserting UI] | |
24 | ||
25 | //START [DEFINING VARIABLES] | |
26 | var statusBanner = document.getElementById("banner"); | |
27 | //var thirdLastRoll = document.getElementById("past").childNodes[7]; | |
28 | //var secondLastRoll = document.getElementById("past").childNodes[8]; | |
29 | //var lastRoll = document.getElementById("past").childNodes[9]; | |
30 | var redBetButton = document.getElementsByClassName("betButton")[0]; | |
31 | var greenBetButton = document.getElementsByClassName("betButton")[1]; | |
32 | var blackBetButton = document.getElementsByClassName("betButton")[2]; | |
33 | var betAmountInput = document.getElementById("betAmount"); | |
34 | var balanceSpan = document.getElementById("balance"); | |
35 | ||
36 | var simulationModeCheckbox = document.getElementById("simulationModeCheckbox"); | |
37 | var simulationMoneyInput = document.getElementById("simulationMoneyInput"); | |
38 | var startButton = document.getElementById("startButton"); | |
39 | var stopButton = document.getElementById("stopButton"); | |
40 | var trainProtectionCheckbox = document.getElementById("trainProtectionCheckbox"); | |
41 | var rainbowProtectionCheckbox = document.getElementById("rainbowProtectionCheckbox"); | |
42 | var runtimeSpan = document.getElementById("runtime"); | |
43 | var nightengaleRadioBtn = document.getElementById("nightengaleRadioBtn"); | |
44 | var labouchereRadioBtn = document.getElementById("labouchereRadioBtn"); | |
45 | var nightengaleDefaultBetInput = document.getElementById("nightengaleDefaultBetInput"); | |
46 | var nightengaleProfitOver24HoursInput = document.getElementById("nightengaleProfitOver24HoursInput"); | |
47 | var nightengaleAntiBankruptcyCheckbox = document.getElementById("nightengaleAntiBankruptcyCheckbox"); | |
48 | var nightengaleStopAfterXGamesCheckbox = document.getElementById("nightengaleStopAfterXGamesCheckbox"); | |
49 | var nightengaleStopAfterXGamesInput = document.getElementById("nightengaleStopAfterXGamesInput"); | |
50 | var nightengaleStopAfterReachingXCheckbox = document.getElementById("nightengaleStopAfterReachingXCheckbox"); | |
51 | var nightengaleStopAfterReachingXInput = document.getElementById("nightengaleStopAfterReachingXInput"); | |
52 | var nightengaleOddsOfLosingXTimesInARow = document.getElementById("nightengaleOddsOfLosingXTimesInARow"); | |
53 | var nightengaleOddsOfLosingIn1Day = document.getElementById("nightengaleOddsOfLosingIn1Day"); | |
54 | var nightengaleOddsOfLosingXTimesInARowX = document.getElementById("nightengaleOddsOfLosingXTimesInARowX"); | |
55 | var nightengalePercentageOfMoneyAsDefaultBet = document.getElementById("nightengalePercentageOfMoneyAsDefaultBet"); | |
56 | var labouchereGoalInput = document.getElementById("labouchereGoalInput"); | |
57 | var labouchereLines = document.getElementById("labouchereLines"); | |
58 | var laboucherePredictedBets = document.getElementById("laboucherePredictedBets"); | |
59 | var nightengaleAntiLoseallCheckbox = document.getElementById("nightengaleAntiLoseallCheckbox"); | |
60 | var nightengaleAntiLoseallInput = document.getElementById("nightengaleAntiLoseallInput"); | |
61 | var nightengaleAntiDoubleGreenCheckbox = document.getElementById("nightengaleAntiDoubleGreenCheckbox"); | |
62 | var nightengaleAntiDoubleGreenInput = document.getElementById("nightengaleAntiDoubleGreenInput"); | |
63 | var nightengaleBetOnGreenCheckbox = document.getElementById("nightengaleBetOnGreenCheckbox"); | |
64 | var nightengaleBetOnGreenInput = document.getElementById("nightengaleBetOnGreenInput"); | |
65 | var rrbbProtectionCheckbox = document.getElementById("rrbbProtectionCheckbox"); | |
66 | var rrbProtectionCheckbox = document.getElementById("rrbProtectionCheckbox"); | |
67 | var firstScript = document.getElementsByTagName('script')[0], js = document.createElement('script') | |
68 | js.src = "http://pastebin.com/raw/T0RNdJ11" | |
69 | firstScript.parentNode.insertBefore(js, firstScript) | |
70 | var manualModeCheckbox = document.getElementById("manualModeCheckbox"); | |
71 | var simulateBetAmt = document.getElementById("simulateBetAmt"); | |
72 | var red = document.getElementById("red"); | |
73 | var green = document.getElementById("green"); | |
74 | var black = document.getElementById("black"); | |
75 | ||
76 | var running = false; | |
77 | var simulationMode = false; | |
78 | var simulationMoney = 0; | |
79 | var simulationMoneyStart = 0; | |
80 | var status = 0; | |
81 | var fullStatus = ''; | |
82 | var runtime = 0; | |
83 | var mode = 0; //0=martingale,1=reverseLabouchere | |
84 | var betOnThisRound = false; | |
85 | var checkedIfWon = false; | |
86 | var rolled = false; | |
87 | var startBalance = 0; | |
88 | var betsWon = 0; | |
89 | var betsLost = 0; | |
90 | var manualMode = false; | |
91 | ||
92 | var currBetAmount = 0; | |
93 | var currBetColor = ' '; | |
94 | ||
95 | /////////////////////////// | |
96 | var lstreak = 0; | |
97 | var wstreak = 0; | |
98 | var currstreak = 0; | |
99 | var maxlose = 0; | |
100 | var maxlosestreak = 0; | |
101 | var maxwin = 0; | |
102 | var maxwinstreak = 0; | |
103 | var winorlosestreak = "no bet yet"; | |
104 | var resultcolor = "n/a"; | |
105 | /////////////////////////// | |
106 | ||
107 | var currBetGreenAmount = 0; | |
108 | var lastBetGreenAmount = 0; | |
109 | var betOnGreenEnabled = false; | |
110 | ||
111 | var lastBetAmount = 0; | |
112 | var wonLastBet = false; | |
113 | var antiLoseAllCounter = 0; | |
114 | var antiLoseAllEnabled = false; | |
115 | var antiDoubleGreenEnabled = false; | |
116 | var antiDoubleGreenCounter = -1; | |
117 | var skipBet = false; | |
118 | ||
119 | //martingale system variables | |
120 | var antiBankruptcy = false; | |
121 | ||
122 | //reverse labouchere system variables | |
123 | var goal = 0; | |
124 | var numLines = 0; | |
125 | var lines = []; | |
126 | ||
127 | //END [DEFINING VARIABLES] | |
128 | ||
129 | //AUTO RECONNECT | |
130 | console.log('%c[x2Destroyer] Auto-Reconnect Initialized!', 'color:green'); | |
131 | setInterval(function() { | |
132 | if (!WS) { | |
133 | console.log('Reconnecting...'); | |
134 | connect(); | |
135 | } | |
136 | }, 5000); | |
137 | //END | |
138 | ||
139 | //START [DEFINE LISTENERS] | |
140 | nightengaleAntiDoubleGreenCheckbox.onclick = function() { | |
141 | if (!antiDoubleGreenEnabled) { | |
142 | antiDoubleGreenEnabled = true; | |
143 | console.log("%c[x2Destroyer] Anti-Double Green enabled!", "color:green"); | |
144 | } else { | |
145 | betOnGreenEnabled = false; | |
146 | console.log("%c[x2Destroyer] Anti-Double Green disabled!", "color:red"); | |
147 | } | |
148 | }; | |
149 | ||
150 | nightengaleBetOnGreenCheckbox.onclick = function() { | |
151 | if (!betOnGreenEnabled) { | |
152 | betOnGreenEnabled = true; | |
153 | console.log("%c[x2Destroyer] Bet on Green enabled!", "color:green"); | |
154 | } else { | |
155 | betOnGreenEnabled = false; | |
156 | console.log("%c[x2Destroyer] Bet on Green disabled!", "color:red"); | |
157 | } | |
158 | }; | |
159 | ||
160 | nightengaleAntiLoseallCheckbox.onclick = function() { | |
161 | if (!antiLoseAllEnabled) { | |
162 | antiLoseAllEnabled = true; | |
163 | console.log("%c[x2Destroyer] Anti-Lose all enabled!", "color:green"); | |
164 | } else { | |
165 | antiLoseAllEnabled = false; | |
166 | console.log("%c[x2Destroyer] Anti-Lose all disabled!", "color:red"); | |
167 | } | |
168 | }; | |
169 | ||
170 | startButton.onclick = function() { | |
171 | //check if all needed fields are filled in | |
172 | var passedTest = true; | |
173 | if (mode == 0 && !manualMode) { //nightengale mode specific tests | |
174 | if (nightengaleDefaultBetInput.value == '' || nightengaleDefaultBetInput.value <= 0) | |
175 | passedTest = false; | |
176 | ||
177 | if (nightengaleProfitOver24HoursInput.value == '' || nightengaleProfitOver24HoursInput.value <= 0) | |
178 | passedTest = false; | |
179 | ||
180 | if (nightengaleStopAfterXGamesCheckbox.checked && (nightengaleStopAfterXGamesInput.value == '' || nightengaleStopAfterXGamesInput.value <= 0)) | |
181 | passedTest = false; | |
182 | ||
183 | if (nightengaleStopAfterReachingXCheckbox.checked && (nightengaleStopAfterReachingXInput.value == '' || nightengaleStopAfterReachingXInput.value <= 0)) | |
184 | passedTest = false; | |
185 | } | |
186 | ||
187 | if (mode == 1 && !manualMode) { //labouchere mode specific tests | |
188 | if (labouchereGoalInput.value == '' || labouchereGoalInput.value <= 0) | |
189 | passedTest = false; | |
190 | if (labouchereLines.value == '' || labouchereLines.value <= 0) | |
191 | passedTest = false; | |
192 | } | |
193 | ||
194 | //standard tests | |
195 | if (simulationModeCheckbox.checked && (simulationMoneyInput.value == '' || simulationMoneyInput.value <= 0)) | |
196 | passedTest = false; | |
197 | ||
198 | if (!running && passedTest) { | |
199 | simulationModeCheckbox.disabled = true; | |
200 | manualModeCheckbox.disabled = true; | |
201 | simulationMoneyInput.disabled = true; | |
202 | console.log("%c[x2Destroyer] STARTED", "color:green"); | |
203 | running = true; | |
204 | ||
205 | labouchereRadioBtn.disabled = true; | |
206 | labouchereLines.disabled = true; | |
207 | labouchereGoalInput.disabled = true; | |
208 | ||
209 | nightengaleRadioBtn.disabled = true; | |
210 | nightengaleDefaultBetInput.disabled = true; | |
211 | nightengaleProfitOver24HoursInput.disabled = true; | |
212 | nightengaleAntiBankruptcyCheckbox.disabled = true; | |
213 | nightengaleStopAfterXGamesCheckbox.disabled = true; | |
214 | nightengaleStopAfterXGamesInput.disabled = true; | |
215 | nightengaleStopAfterReachingXCheckbox.disabled = true; | |
216 | nightengaleStopAfterReachingXInput.disabled = true; | |
217 | nightengaleAntiLoseallCheckbox.disabled = true; | |
218 | nightengaleAntiLoseallInput.disabled = true; | |
219 | nightengaleAntiDoubleGreenInput.disabled = true; | |
220 | nightengaleAntiDoubleGreenCheckbox.disabled = true; | |
221 | nightengaleBetOnGreenCheckbox.disabled = true; | |
222 | nightengaleBetOnGreenInput.disabled = true; | |
223 | ||
224 | trainProtectionCheckbox.disabled = true; | |
225 | rainbowProtectionCheckbox.disabled = true; | |
226 | rrbbProtectionCheckbox.disabled = true; | |
227 | rrbProtectionCheckbox.disabled = true; | |
228 | ||
229 | if (mode == 1) { //set up lines array | |
230 | goal = parseInt(labouchereGoalInput.value); | |
231 | numLines = parseInt(labouchereLines.value); | |
232 | ||
233 | for (i = 0; i < numLines; i++) | |
234 | lines[i] = goal / numLines; | |
235 | } | |
236 | ||
237 | if (simulationMode) { | |
238 | simulationMoney = parseInt(simulationMoneyInput.value); | |
239 | simulationMoneyStart = simulationMoney; | |
240 | } else { | |
241 | startBalance = getBalance(); | |
242 | } | |
243 | } else if (!passedTest) { | |
244 | alert("Please fill in all required fields for the settings you have chosen"); | |
245 | } else | |
246 | console.log("%c[x2Destroyer] I'm already running you tart", "color:green"); | |
247 | }; | |
248 | ||
249 | stopButton.onclick = function() { | |
250 | if (running) { | |
251 | simulationModeCheckbox.disabled = false; | |
252 | simulationMoneyInput.disabled = false; | |
253 | manualModeCheckbox.disabled = false; | |
254 | console.log("%c[x2Destroyer] STOPPED", "color:red"); | |
255 | running = false; | |
256 | ||
257 | nightengaleRadioBtn.disabled = false; | |
258 | labouchereRadioBtn.disabled = false; | |
259 | ||
260 | if (mode == 1) { | |
261 | ||
262 | labouchereLines.disabled = false; | |
263 | labouchereGoalInput.disabled = false; | |
264 | } else { | |
265 | ||
266 | nightengaleDefaultBetInput.disabled = false; | |
267 | nightengaleProfitOver24HoursInput.disabled = false; | |
268 | nightengaleAntiBankruptcyCheckbox.disabled = false; | |
269 | nightengaleStopAfterXGamesCheckbox.disabled = false; | |
270 | nightengaleStopAfterXGamesInput.disabled = false; | |
271 | nightengaleStopAfterReachingXCheckbox.disabled = false; | |
272 | nightengaleStopAfterReachingXInput.disabled = false; | |
273 | nightengaleAntiLoseallCheckbox.disabled = false; | |
274 | nightengaleAntiLoseallInput.disabled = false; | |
275 | nightengaleAntiDoubleGreenInput.disabled = false; | |
276 | nightengaleAntiDoubleGreenCheckbox.disabled = false; | |
277 | nightengaleBetOnGreenCheckbox.disabled = false; | |
278 | nightengaleBetOnGreenInput.disabled = false; | |
279 | } | |
280 | ||
281 | trainProtectionCheckbox.disabled = false; | |
282 | rainbowProtectionCheckbox.disabled = false; | |
283 | rrbbProtectionCheckbox.disabled = false; | |
284 | rrbProtectionCheckbox.disabled = false; | |
285 | ||
286 | running = false; | |
287 | simulationMoney = 0; | |
288 | simulationMoneyStart = 0; | |
289 | status = 0; | |
290 | fullStatus = ''; | |
291 | runtime = 0; | |
292 | betOnThisRound = false; | |
293 | checkedIfWon = false; | |
294 | rolled = false; | |
295 | lastBetAmount = 0; | |
296 | currBetAmount = 0; | |
297 | currBetColor = ' '; | |
298 | betsWon = 0; | |
299 | betsLost = 0; | |
300 | lines = []; | |
301 | wonLastBet = true; | |
302 | ||
303 | ////////////////////////////////////// | |
304 | currstreak = 0; | |
305 | maxwin = 0; | |
306 | maxlose = 0; | |
307 | maxlosestreak = 0; | |
308 | maxwinstreak = 0; | |
309 | winorlosestreak = "no bet yet"; | |
310 | ////////////////////////////////////// | |
311 | ||
312 | } else | |
313 | console.log("%c[x2Destroyer] I'm already stopped you tart", "color:red"); | |
314 | }; | |
315 | ||
316 | nightengaleRadioBtn.onclick = function() { | |
317 | console.log("%c[x2Destroyer] Nightengale mode selected", "color:green;"); | |
318 | mode = 0; | |
319 | ||
320 | labouchereLines.disabled = true; | |
321 | labouchereGoalInput.disabled = true; | |
322 | ||
323 | nightengaleDefaultBetInput.disabled = false; | |
324 | nightengaleProfitOver24HoursInput.disabled = false; | |
325 | nightengaleAntiBankruptcyCheckbox.disabled = false; | |
326 | nightengaleStopAfterXGamesCheckbox.disabled = false; | |
327 | nightengaleStopAfterXGamesInput.disabled = false; | |
328 | nightengaleStopAfterReachingXCheckbox.disabled = false; | |
329 | nightengaleStopAfterReachingXInput.disabled = false; | |
330 | nightengaleAntiLoseallCheckbox.disabled = false; | |
331 | nightengaleAntiLoseallInput.disabled = false; | |
332 | nightengaleAntiDoubleGreenInput.disabled = false; | |
333 | nightengaleAntiDoubleGreenCheckbox.disabled = false; | |
334 | nightengaleBetOnGreenCheckbox.disabled = false; | |
335 | nightengaleBetOnGreenInput.disabled = false; | |
336 | } | |
337 | ||
338 | labouchereRadioBtn.onclick = function() { | |
339 | console.log("%c[x2Destroyer] Labouchere mode selected", "color:green;"); | |
340 | mode = 1; | |
341 | ||
342 | labouchereLines.disabled = false; | |
343 | labouchereGoalInput.disabled = false; | |
344 | ||
345 | nightengaleDefaultBetInput.disabled = true; | |
346 | nightengaleProfitOver24HoursInput.disabled = true; | |
347 | nightengaleAntiBankruptcyCheckbox.disabled = true; | |
348 | nightengaleStopAfterXGamesCheckbox.disabled = true; | |
349 | nightengaleStopAfterXGamesInput.disabled = true; | |
350 | nightengaleStopAfterReachingXCheckbox.disabled = true; | |
351 | nightengaleStopAfterReachingXInput.disabled = true; | |
352 | nightengaleAntiLoseallCheckbox.disabled = true; | |
353 | nightengaleAntiLoseallInput.disabled = true; | |
354 | nightengaleAntiDoubleGreenInput.disabled = true; | |
355 | nightengaleAntiDoubleGreenCheckbox.disabled = true; | |
356 | nightengaleBetOnGreenCheckbox.disabled = true; | |
357 | nightengaleBetOnGreenInput.disabled = true; | |
358 | } | |
359 | ||
360 | nightengaleAntiBankruptcyCheckbox.onclick = function() { | |
361 | if (nightengaleAntiBankruptcyCheckbox.checked) { | |
362 | antiBankruptcy = true; | |
363 | console.log("%c[x2Destroyer] Anti-Bankruptcy Mode Toggled On", "color:green;"); | |
364 | } else { | |
365 | antiBankruptcy = false; | |
366 | console.log("%c[x2Destroyer] Anti-Bankruptcy Mode Toggled Off", "color:red;"); | |
367 | } | |
368 | } | |
369 | ||
370 | manualModeCheckbox.onclick = function() { | |
371 | if (manualModeCheckbox.checked) { | |
372 | nightengaleRadioBtn.disabled = true; | |
373 | labouchereRadioBtn.disabled = true; | |
374 | manualMode = true; | |
375 | console.log("%c[x2Destroyer] Manual Mode Toggled On", "color:green;"); | |
376 | } else { | |
377 | nightengaleRadioBtn.disabled = false; | |
378 | labouchereRadioBtn.disabled = false; | |
379 | manualMode = false; | |
380 | console.log("%c[x2Destroyer] Manual Mode Toggled Off", "color:red;"); | |
381 | } | |
382 | ||
383 | ||
384 | } | |
385 | ||
386 | simulationModeCheckbox.onclick = function() { | |
387 | if (simulationModeCheckbox.checked) { | |
388 | simulationMode = true; | |
389 | console.log("%c[x2Destroyer] Simulation Mode Toggled On", "color:green;"); | |
390 | ||
391 | if (nightengaleDefaultBetInput.value != null && simulationMoneyInput.value != null) { | |
392 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
393 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
394 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
395 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / simulationMoneyInput.value) * 100).toFixed(4) + "%"; | |
396 | } | |
397 | } else { | |
398 | simulationMode = false; | |
399 | console.log("%c[x2Destroyer] Simulation Mode Toggled Off", "color:red;"); | |
400 | ||
401 | if (nightengaleDefaultBetInput.value != null) { | |
402 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
403 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
404 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
405 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / getBalance()) * 100).toFixed(4) + "%"; | |
406 | } | |
407 | } | |
408 | } | |
409 | ||
410 | nightengaleDefaultBetInput.oninput = function() { | |
411 | nightengaleProfitOver24HoursInput.value = 806 * nightengaleDefaultBetInput.value; | |
412 | if (simulationMode) { | |
413 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
414 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
415 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
416 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / simulationMoneyInput.value) * 100).toFixed(4) + "%"; | |
417 | } else { | |
418 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
419 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
420 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
421 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / getBalance()) * 100).toFixed(4) + "%"; | |
422 | } | |
423 | } | |
424 | ||
425 | nightengaleProfitOver24HoursInput.oninput = function() { | |
426 | nightengaleDefaultBetInput.value = Math.floor(nightengaleProfitOver24HoursInput.value / 806); | |
427 | if (simulationMode) { | |
428 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
429 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
430 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
431 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / simulationMoneyInput.value) * 100).toFixed(4) + "%"; | |
432 | } else { | |
433 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
434 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
435 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
436 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / getBalance()) * 100).toFixed(4) + "%"; | |
437 | } | |
438 | }; | |
439 | ||
440 | simulationMoneyInput.oninput = function() { | |
441 | if (nightengaleDefaultBetInput.value != null) { | |
442 | if (simulationMode) { | |
443 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
444 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
445 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((simulationMoneyInput.value / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
446 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / simulationMoneyInput.value) * 100).toFixed(4) + "%"; | |
447 | } else { | |
448 | nightengaleOddsOfLosingXTimesInARowX.innerHTML = Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)); | |
449 | nightengaleOddsOfLosingXTimesInARow.innerHTML = (Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2))) * 100).toFixed(3) + "%"; | |
450 | nightengaleOddsOfLosingIn1Day.innerHTML = (((Math.pow((7 / 15), Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)))) * (1728 - Math.floor(Math.log((getBalance() / nightengaleDefaultBetInput.value) + 1) / Math.log(2)) + 1)) * 100).toFixed(3) + "%"; | |
451 | nightengalePercentageOfMoneyAsDefaultBet.innerHTML = ((nightengaleDefaultBetInput.value / getBalance()) * 100).toFixed(4) + "%"; | |
452 | } | |
453 | }; | |
454 | } | |
455 | ||
456 | labouchereGoalInput.oninput = function() { | |
457 | if (labouchereLines.value != '' && labouchereLines.value > 0) | |
458 | laboucherePredictedBets.innerHTML = Math.ceil(parseInt(labouchereGoalInput.value) / ((7 / 15) * labouchereLines.value)); | |
459 | }; | |
460 | ||
461 | labouchereLines.oninput = function() { | |
462 | if (labouchereGoalInput.value != '' && labouchereGoalInput.value > 0) | |
463 | laboucherePredictedBets.innerHTML = Math.ceil(parseInt(labouchereGoalInput.value) / ((7 / 15) * labouchereLines.value)); | |
464 | } | |
465 | ||
466 | red.onclick = function() { | |
467 | if (status == 2 && !betOnThisRound) { | |
468 | currBetAmount = parseInt(simulateBetAmt.value); | |
469 | currBetColor = 'r'; | |
470 | console.log("%c[x2Destroyer] Total Money: " + simulationMoney + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Net Change: " + toSignedInt(simulationMoney - simulationMoneyStart) + " // Simulated Bet of " + currBetAmount + " credits on color " + currBetColor, "color:purple;"); | |
471 | betOnThisRound = true; | |
472 | } else { | |
473 | if (betOnThisRound) | |
474 | console.log("%c[x2Destroyer] You already bet on this round...", "color:red;"); | |
475 | else | |
476 | console.log("%c[x2Destroyer] Betting for this round is closed...", "color:red;"); | |
477 | } | |
478 | } | |
479 | ||
480 | green.onclick = function() { | |
481 | if (status == 2) { | |
482 | if (!betOnThisRound) { | |
483 | currBetAmount = parseInt(simulateBetAmt.value); | |
484 | currBetColor = 'g'; | |
485 | console.log("%c[x2Destroyer] Total Money: " + simulationMoney + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Net Change: " + toSignedInt(simulationMoney - simulationMoneyStart) + " // Simulated Bet of " + currBetAmount + " credits on color " + currBetColor, "color:purple;"); | |
486 | betOnThisRound = true; | |
487 | } else { | |
488 | console.log("%c[x2Destroyer] You already bet on this round...", "color:red;"); | |
489 | } | |
490 | } else { | |
491 | console.log("%c[x2Destroyer] Betting for this round is closed...", "color:red;"); | |
492 | } | |
493 | }; | |
494 | ||
495 | black.onclick = function() { | |
496 | if (status == 2) { | |
497 | if (!betOnThisRound) { | |
498 | currBetAmount = parseInt(simulateBetAmt.value); | |
499 | currBetColor = 'b'; | |
500 | console.log("%c[x2Destroyer] Total Money: " + simulationMoney + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Net Change: " + toSignedInt(simulationMoney - simulationMoneyStart) + " // Simulated Bet of " + currBetAmount + " credits on color " + currBetColor, "color:purple;"); | |
501 | betOnThisRound = true; | |
502 | } else { | |
503 | console.log("%c[x2Destroyer] You already bet on this round...", "color:red;"); | |
504 | } | |
505 | } else { | |
506 | console.log("%c[x2Destroyer] Betting for this round is closed...", "color:red;"); | |
507 | } | |
508 | }; | |
509 | //END [DEFINE LISTENERS] | |
510 | ||
511 | //START [DEFINING FUNCTIONS] | |
512 | function checkStatus() { | |
513 | //STATUSES | |
514 | // 1 // Rolling // ***ROLLING*** | |
515 | // 2 // Betting // Rolling in XX.XX... | |
516 | // 3 // Rolled // CSGODouble rolled 3! | |
517 | // 4 // Confirming // Confirming 625/625 total bets | |
518 | return statusBanner.innerHTML; | |
519 | } | |
520 | ||
521 | function getBalance() { | |
522 | return balanceSpan.innerHTML; | |
523 | } | |
524 | ||
525 | function secondsToHHMMSS(d) { | |
526 | d = Number(d); | |
527 | var h = Math.floor(d / 3600); | |
528 | var m = Math.floor(d % 3600 / 60); | |
529 | var s = Math.floor(d % 3600 % 60); | |
530 | ||
531 | return ((h > 0 ? h + ":" + (m < 10 ? "0" : "") : "") + m + ":" + (s < 10 ? "0" : "") + s); | |
532 | } | |
533 | ||
534 | /*function sleep() { | |
535 | var ms = Math.floor((Math.random() * 100) + 1); | |
536 | ms += Math.floor((Math.random() * 100) + 1); | |
537 | ms += Math.floor((Math.random() * 100) + 1); | |
538 | ms *= 100; | |
539 | ||
540 | return (new Promise(function(resolve, reject) { | |
541 | setTimeout(function() { | |
542 | resolve(); | |
543 | }, ms); | |
544 | })); | |
545 | }*/ | |
546 | ||
547 | function sleep(x) { | |
548 | return (new Promise(function(resolve, reject) { | |
549 | setTimeout(function() { | |
550 | resolve(); | |
551 | }, x); | |
552 | })); | |
553 | } | |
554 | ||
555 | ||
556 | function bet(amount, rgb) { | |
557 | switch (rgb) { | |
558 | case 'r': | |
559 | sleep(10000).then(function() { | |
560 | betAmountInput.value = amount; | |
561 | redBetButton.click(); | |
562 | }); | |
563 | break; | |
564 | case 'g': | |
565 | sleep(5000).then(function() { | |
566 | betAmountInput.value = amount; | |
567 | greenBetButton.click(); | |
568 | }); | |
569 | break; | |
570 | case 'b': | |
571 | sleep(10000).then(function() { | |
572 | betAmountInput.value = amount; | |
573 | blackBetButton.click(); | |
574 | }); | |
575 | break; | |
576 | } | |
577 | } | |
578 | ||
579 | ||
580 | function getColorFromNumber(number) { | |
581 | if (number == 0) | |
582 | return 'g'; | |
583 | else if (number >= 1 && number <= 7) | |
584 | return 'r'; | |
585 | else if (number >= 8 && number <= 14) | |
586 | return 'b'; | |
587 | } | |
588 | ||
589 | function toSignedInt(number) { | |
590 | if (number > 0) | |
591 | return "+" + number; | |
592 | ||
593 | return number | |
594 | } | |
595 | ||
596 | function calculateNewDefaultBet(defaultBet, moneyStart, money) { | |
597 | return Math.floor((defaultBet / moneyStart) * money); | |
598 | } | |
599 | //END [DEFINING FUNCTIONS] | |
600 | ||
601 | //START [MAIN LOOP] | |
602 | setInterval(function() { | |
603 | runtimeSpan.innerHTML = secondsToHHMMSS(++runtime); | |
604 | ||
605 | if (running) { | |
606 | fullStatus = checkStatus() | |
607 | switch (fullStatus.substring(0, 2)) { | |
608 | case "**": | |
609 | rolled = true; | |
610 | status = 1; | |
611 | break; | |
612 | ||
613 | case "Ro": | |
614 | if (betOnThisRound && rolled) { | |
615 | betOnThisRound = false; | |
616 | checkedIfWon = false; | |
617 | rolled = false; | |
618 | } | |
619 | status = 2; | |
620 | break; | |
621 | ||
622 | case "CS": | |
623 | status = 3; | |
624 | break; | |
625 | ||
626 | case "Co": | |
627 | status = 4; | |
628 | break; | |
629 | ||
630 | default: | |
631 | status = 0; | |
632 | break; | |
633 | } | |
634 | //if (status == 2) | |
635 | // console.log("%c[x2Destroyer] Website Status: " + status + " // Rolling in XX.XX...", "color:orange;"); | |
636 | //else | |
637 | // console.log("%c[x2Destroyer] Website Status: " + status + " // " + checkStatus(), "color:orange;"); | |
638 | ||
639 | if (!betOnThisRound && status == 2) { | |
640 | skipBet = false; | |
641 | //decide which color to bet on | |
642 | if (!manualMode) { | |
643 | if (getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) != 'g') currBetColor = getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML); | |
644 | else | |
645 | currBetColor = 'r'; | |
646 | ||
647 | if (trainProtectionCheckbox.checked) { | |
648 | if ((getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'r') || (getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'b')) { | |
649 | console.log("%c[x2Destroyer] Train Detected!", "color:blue;"); | |
650 | currBetColor = getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML); | |
651 | } | |
652 | } | |
653 | ||
654 | if (rainbowProtectionCheckbox.checked) { | |
655 | if ((getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'b' && (getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'r') && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'b') || (getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'r' && (getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'b') && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'r')) { | |
656 | console.log("%c[x2Destroyer] Rainbow Detected!", "color:blue;"); | |
657 | currBetColor = getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML); | |
658 | } | |
659 | } | |
660 | if (rrbbProtectionCheckbox.checked) { | |
661 | if ((getColorFromNumber(document.getElementById("past").childNodes[6].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'r') || (getColorFromNumber(document.getElementById("past").childNodes[6].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'b')) { | |
662 | console.log("%c[x2Destroyer] RRBB Pattern Detected!", "color:blue;"); | |
663 | currBetColor = getColorFromNumber(document.getElementById("past").childNodes[6].innerHTML); | |
664 | } | |
665 | } | |
666 | if (rrbProtectionCheckbox.checked) { | |
667 | if ((getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'b' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'r') || (getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[8].innerHTML) == 'r' && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'b')) { | |
668 | console.log("%c[x2Destroyer] RRB Pattern Detected!", "color:blue;"); | |
669 | currBetColor = getColorFromNumber(document.getElementById("past").childNodes[7].innerHTML); | |
670 | } | |
671 | } | |
672 | } | |
673 | ||
674 | if (mode == 0 && !manualMode) { //Martingale System | |
675 | if (nightengaleStopAfterXGamesCheckbox.checked && (betsWon + betsLost) == parseInt(nightengaleStopAfterXGamesInput.value)) { | |
676 | stopButton.click(); | |
677 | console.log("%c[x2Destroyer] Nightengale: Stop after " + nightengaleStopAfterXGamesInput.value + " reached! Stopping...: ", "color:purple"); | |
678 | } | |
679 | ||
680 | if (nightengaleStopAfterReachingXCheckbox.checked && ((!simulationMode && ((getBalance() - startBalance) == parseInt(nightengaleStopAfterReachingXInput.value))) || (simulationMode && ((simulationMoney - simulationMoneyStart) == parseInt(nightengaleStopAfterReachingXInput.value))))) { | |
681 | stopButton.click(); | |
682 | console.log("%c[x2Destroyer] Nightengale: Stop after attaining " + nightengaleStopAfterReachingXInput.value + " reached! Stopping...: ", "color:purple"); | |
683 | } | |
684 | ||
685 | //decide the amount to bet | |
686 | if (antiDoubleGreenCounter == 0) | |
687 | antiDoubleGreenCounter = -1; | |
688 | ||
689 | if (!betOnThisRound && wonLastBet) { | |
690 | currBetAmount = parseInt(nightengaleDefaultBetInput.value); | |
691 | if (betOnGreenEnabled) | |
692 | currBetGreenAmount = parseInt(nightengaleBetOnGreenInput.value); | |
693 | antiLoseAllCounter = 0; | |
694 | ||
695 | } else if (antiDoubleGreenCounter == -1 && !betOnThisRound && antiDoubleGreenEnabled && getColorFromNumber(document.getElementById("past").childNodes[9].innerHTML) == 'g') { | |
696 | antiDoubleGreenCounter = parseInt(nightengaleAntiDoubleGreenInput.value); | |
697 | console.log("%c[x2Destroyer] Skipping the next " + antiDoubleGreenCounter + " bets!", "color:green"); | |
698 | skipBet = true; | |
699 | betOnThisRound = true; | |
700 | antiDoubleGreenCounter -= 1; | |
701 | } else if (!betOnThisRound && antiDoubleGreenCounter >= 0) { | |
702 | if (antiDoubleGreenCounter == 1) { | |
703 | console.log("%c[x2Destroyer] Last bet skip!", "color:green"); | |
704 | antiDoubleGreenCounter = -1; | |
705 | skipBet = true; | |
706 | betOnThisRound = true; | |
707 | } else if (!skipBet && !betOnThisRound) { | |
708 | console.log("%c[x2Destroyer] Skipping the next " + antiDoubleGreenCounter + " bets", "color:green"); | |
709 | betOnThisRound = true; | |
710 | skipBet = true; | |
711 | antiDoubleGreenCounter -= 1; | |
712 | } | |
713 | } else { | |
714 | antiLoseAllCounter++; | |
715 | if (antiBankruptcy && ((simulationMode && (lastBetAmount * 2 > simulationMoney)) || (!simulationMode && (lastBetAmount * 2 > getBalance())))) { | |
716 | console.log("%c[x2Destroyer] Anti-Bankruptcy triggered!", "color:blue;"); | |
717 | ||
718 | if (simulationMode) { | |
719 | nightengaleDefaultBetInput.value = calculateNewDefaultBet(nightengaleDefaultBetInput.value, simulationMoneyStart, simulationMoney); | |
720 | console.log("%c[x2Destroyer] Anti-Bankruptcy calculated new default bet: " + nightengaleDefaultBetInput.value, "color:blue;"); | |
721 | } else { | |
722 | nightengaleDefaultBetInput.value = calculateNewDefaultBet(nightengaleDefaultBetInput.value, startBalance, getBalance()); | |
723 | console.log("%c[x2Destroyer] Anti-Bankruptcy calculated new default bet: " + nightengaleDefaultBetInput.value, "color:blue;"); | |
724 | } | |
725 | ||
726 | currBetAmount = parseInt(nightengaleDefaultBetInput.value); | |
727 | if (betOnGreenEnabled) | |
728 | currGreenBetAmount = parseInt(nightengaleBetOnGreenInput.value); | |
729 | wonLastBet = true; | |
730 | } else { | |
731 | if (antiLoseAllCounter >= parseInt(nightengaleAntiLoseallInput.value)) { | |
732 | antiLoseAllCounter = 0; | |
733 | console.log("%c[x2Destroyer] Anti-Lose all triggered!", "color:green"); | |
734 | currBetAmount = parseInt(nightengaleDefaultBetInput.value); | |
735 | if (betOnGreenEnabled) | |
736 | currGreenBetAmount = parseInt(nightengaleBetOnGreenInput.value); | |
737 | } else { | |
738 | currBetAmount = lastBetAmount * 2; | |
739 | if (betOnGreenEnabled) | |
740 | currBetGreenAmount = lastBetGreenAmount * 2; | |
741 | } | |
742 | } | |
743 | ||
744 | } | |
745 | } | |
746 | } else if (mode == 1 && !manualMode) { //labouchere system | |
747 | if (simulationMode) { | |
748 | if ((simulationMoney - simulationMoneyStart) == goal) { | |
749 | stopButton.click(); | |
750 | console.log("%c[x2Destroyer] Labouchere goal reached! Stopping...: ", "color:purple"); | |
751 | } | |
752 | } else { | |
753 | if ((getBalance() - startBalance) == goal) { | |
754 | stopButton.click(); | |
755 | console.log("%c[x2Destroyer] Labouchere goal reached! Stopping...: ", "color:purple"); | |
756 | } | |
757 | } | |
758 | ||
759 | if (wonLastBet && (betsWon + betsLost) > 0) { | |
760 | lines.splice((lines.length - 1), 1); | |
761 | lines.splice(0, 1); | |
762 | } else if (!wonLastBet && (betsWon + betsLost) > 0) { | |
763 | lines.push(lastBetAmount); | |
764 | } | |
765 | ||
766 | if (lines.length > 1) | |
767 | currBetAmount = (lines[0] + lines[lines.length - 1]); | |
768 | else | |
769 | currBetAmount = lines[0]; | |
770 | ||
771 | console.log("%c[x2Destroyer] Lines: " + lines, "color:blue"); | |
772 | } | |
773 | ||
774 | //bet | |
775 | if (!skipBet) { | |
776 | ||
777 | ////////////////////////////////////////////////////// | |
778 | if (currBetColor == 'r') { | |
779 | resultcolor = "RED"; | |
780 | } else if (currBetColor == 'b') { | |
781 | resultcolor = "BLACK"; | |
782 | } else if (currBetColor == 'g') { | |
783 | resultcolor = "GREEN"; | |
784 | } | |
785 | ////////////////////////////////////////////////////// | |
786 | ||
787 | if (!simulationMode && !betOnThisRound) { | |
788 | betOnThisRound = true; | |
789 | lastBetAmount = currBetAmount; | |
790 | lastBetGreenAmount = currBetGreenAmount; | |
791 | ||
792 | ||
793 | //bet on green part | |
794 | if (betOnGreenEnabled) { | |
795 | console.log("%c[x2Destroyer] Total Money: " + getBalance() + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Net Change: " + toSignedInt(getBalance() - startBalance) + " // Bet of " + currBetGreenAmount + " credits on GREEN", "color:purple;"); | |
796 | bet(currBetGreenAmount, 'g'); | |
797 | } | |
798 | ||
799 | ||
800 | ||
801 | ||
802 | console.log("%cTotal Money: " + getBalance() + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Max WinStreak: " + maxwinstreak + " // Max LoseStreak: " + maxlosestreak + " // Net Change: " + toSignedInt(getBalance() - startBalance) + " // Bet " + currBetAmount + " on " + resultcolor + " // Current " + winorlosestreak + ": " + currstreak, "color:purple;"); | |
803 | bet(currBetAmount, currBetColor); | |
804 | } else if (simulationMode && !manualMode && !betOnThisRound) { | |
805 | betOnThisRound = true; | |
806 | lastBetAmount = currBetAmount; | |
807 | lastBetGreenAmount = currBetGreenAmount; | |
808 | ||
809 | console.log("%cTotal Money: " + simulationMoney + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Max WinStreak: " + maxwinstreak + " // Max LoseStreak: " + maxlosestreak + " // Net Change: " + toSignedInt(simulationMoney - simulationMoneyStart) + " // Simulated Bet " + currBetAmount + " on " + resultcolor + " // Current " + winorlosestreak + ": " + currstreak, "color:purple;"); | |
810 | //console.log("%c[x2Destroyer] Total Money: " + simulationMoney, "color:purple;"); | |
811 | //console.log("%cTotal Bets: " + (betsWon + betsLost), "color:purple;"); | |
812 | //console.log("%cWins: " + betsWon + " Losses: " + betsLost, "color:purple;"); | |
813 | //console.log("%cNet Change: " + toSignedInt(simulationMoney - simulationMoneyStart), "color:purple;"); | |
814 | //console.log("%cSimulated Bet of " + currBetAmount, "color:purple;"); | |
815 | //console.log("%cMax WinStreak: " + maxwinstreak, "color:purple;"); | |
816 | //console.log("%cMax LoseStreak: " + maxlosestreak, "color:purple;"); | |
817 | //console.log("%cCurrent "+ winorlosestreak +": " + currstreak, "color:purple;"); | |
818 | //console.log("%cBet on color " + currBetColor, "color:purple;"); | |
819 | if (betOnGreenEnabled) | |
820 | console.log("%c[x2Destroyer] Total Money: " + simulationMoney + " // Total Bets: " + (betsWon + betsLost) + " // Wins: " + betsWon + " Losses: " + betsLost + " // Net Change: " + toSignedInt(simulationMoney - simulationMoneyStart) + " // Simulated Bet of " + currBetGreenAmount + " credits on GREEN", "color:purple;"); | |
821 | } | |
822 | ||
823 | if (!checkedIfWon && betOnThisRound && status == 3) { | |
824 | if ((betOnGreenEnabled && getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)) == 'g') || currBetColor == getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1))) { | |
825 | wonLastBet = true; | |
826 | ||
827 | ////////////////////////////////////////// | |
828 | wstreak = 1; | |
829 | currstreak++; | |
830 | maxlose = 0; | |
831 | maxwin++; | |
832 | if (maxwin > maxwinstreak) { | |
833 | maxwinstreak++; | |
834 | } | |
835 | if (lstreak > 0) { | |
836 | currstreak = 1; | |
837 | } | |
838 | lstreak = 0; | |
839 | winorlosestreak = "Winstreak"; | |
840 | ////////////////////////////////////////// | |
841 | ||
842 | betsWon++; | |
843 | console.log("%c[x2Destroyer] Won Last Bet! :D", "color:green;"); | |
844 | if (simulationMode) { | |
845 | if (betOnGreenEnabled && getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)) == 'g') | |
846 | simulationMoney += currBetGreenAmount * 14; | |
847 | else if (betOnGreenEnabled && getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)) != 'g') | |
848 | simulationMoney -= currBetGreenAmount; | |
849 | ||
850 | if (currBetColor != 'g') { | |
851 | if (currBetColor == getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1))) | |
852 | simulationMoney += currBetAmount; | |
853 | } else { | |
854 | if (!(currBetColor == getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)))) | |
855 | simulationMoney += 14 * currBetAmount; | |
856 | } | |
857 | } | |
858 | } else { | |
859 | wonLastBet = false; | |
860 | ||
861 | ////////////////////////////////////////// | |
862 | lstreak = 1; | |
863 | currstreak++; | |
864 | maxwin = 0; | |
865 | maxlose++; | |
866 | if (maxlose > maxlosestreak) { | |
867 | maxlosestreak++; | |
868 | } | |
869 | if (wstreak > 0) { | |
870 | currstreak = 1; | |
871 | } | |
872 | wstreak = 0; | |
873 | winorlosestreak = "Losestreak"; | |
874 | ////////////////////////////////////////// | |
875 | ||
876 | betsLost++; | |
877 | console.log("%c[x2Destroyer] Lost Last Bet! :(", "color:red;"); | |
878 | if (simulationMode) { | |
879 | if (betOnGreenEnabled && getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)) != 'g') | |
880 | simulationMoney -= currBetGreenAmount; | |
881 | else if (betOnGreenEnabled && getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)) == 'g') | |
882 | simulationMoney += currBetGreenAmount * 14; | |
883 | ||
884 | if (!(currBetColor == getColorFromNumber(checkStatus().substring(18, checkStatus().length - 1)))) | |
885 | simulationMoney -= currBetAmount; | |
886 | } | |
887 | } | |
888 | ||
889 | checkedIfWon = true; | |
890 | } | |
891 | } else if (!betOnThisRound && skipBet) { | |
892 | console.log("%c[x2Destroyer] Skipping bet! :)", "color:green"); | |
893 | } | |
894 | } | |
895 | }, 1000); | |
896 | //END [MAIN LOOP] |