The improved Martingale double up red and black. This macro has a very different approach. Some functions have evolved, some are entirely new. Do not confuse these two!
What is specific with this one?!*HumanBettingMode was removed. I will put it back later if you complain too much

* It uses FreeSpin if you choose to. It will Freespin until one of the colours have appeared a preset number of times in a row, then bet on the other colour.
Improves your odds of winning greatly.Known issues: * I think Free Spin randomly, but very seldom, counts wrong. Occurred once.
* Somewhere during Free Spin, or upon moving to "place bets", a accidental click occurs way off. This is repeatable when using low bets, but I have not managed to track it down.
* I'm now implementing redundancy all over, to make sure no errors occur, amongst them a clear bets function if bets are accidentally placed before actually "placing bets".
How to use: * It should be fairly straight forward due to commented code.
1: Specify the casino window name. Don't be to exact. Omit session numbers etc (macro does a close match).
2: Insert coordinates and values of markers 1 to 7. If there is no marker 7, set value to 9999 and coordinates to 0 and 0 just to be safe.
3: You need to adjust a few functions to match your casino. Check red and check black needs to be working spot on! Check "Good to know".
4: You also need to fix how the macro determines readiness. Check "Good to know".
5: Specify your betting limits.
6: Try it out with fun money for a while until you're satisfied it works.
7: Everything good? Post your version of the macro, which casino you where playing at, and if you've won anything.
Good to know: * Detecting if we won or lost in this version is very much different than the last. It will check the statistics window for the colours at a specific location.
* Macro checks for "readiness" by checking if spin is available. Currently it checks if the spin button is not there, a black table border, and will do so until spin button appears. Adjust function to suit the particular casino you're using.
* Due to "human mouse movement", be precise when you input "middle" coordinates of markers, bet area and spin button. Adjust accuracy if the areas are small.
* Upper and lower betting limits are of actual currency. Not the amount of times to chuck in a chosen marker. Make sure you try it out on play for fun money first. I'm not 100% sure it behaves as it should.
* This one uses "FreeSpin" differently. It will Freespin until a colour has won a preset amount of times, then it will bet on the other colour. Having a very low number here will basically neglect the efficency, having a too high number will not work, because of statistics. Having it set to "four" will make earnings slow, but it will increase the odds of you turning up a win within two to three bettings.
VERSION HISTORYv1.1 (Upcoming version)* Double checks and tripple checks to make sure it works.
* Clear bets function. In case of any mishap.
* Budget function. Maximum loss before quit and and win goal before quit.
v1.0 (Original version)* FreeSpin bug.
* Random click bug?! Maybe related to Free Spin.
The lengthy code: Code:
begin
// Set your maximum and minimum bet below. This is real values! //
Variable.Set("MinimumBet", "1")
Variable.Set("MaximumBet", "20")
// What's the name of the window? //
Variable.Set("CasinoWindowName", "European Roulette - Gala Casino")
// To make myself more human alike, we use random pauses. Specify high and low in milliseconds below. //
Variable.Set("RandomLow", "125")
Variable.Set("RandomHigh", "600")
// We're using human mouse movement/clicks. Specify the accuracy in pixels from the middle below //
Variable.Set("MouseAccuracy", "6")
// Location of Red and Black betting locations //
Variable.Set("RedBetLocationX", "420")
Variable.Set("RedBetLocationY", "444")
Variable.Set("BlackBetLocationX", "360")
Variable.Set("BlackBetLocationY", "400")
// Where is the spin button located? //
Variable.Set("SpinButtonX", "190")
Variable.Set("SpinButtonY", "428")
// Should I log statistics somewhere? (Yes/No) If so, where? //
Variable.Set("UseStatisticsModule", "Yes")
Variable.Set("SpinsTillWinRedLogLocation", "C:\SpinsTillWinRed.txt")
Variable.Set("SpinsTillWinBlackLogLocation", "C:\SpinsTillWinBlack.txt")
Variable.Set("SpinsTillWinLogLocation", "C:\SpinsTillWin.txt")
Variable.Set("WinningsLogLocation", "C:\Winnings.txt")
Variable.Set("FreeSpinLogLocation", "C:\FreeSpins.txt")
// Use free spin? (Yes/No)
Variable.Set("Freespin", "Yes")
Variable.Set("ConsecutiveTarget", "4")
// Below you type in the coordinates and values of betting markers. From lowest to highest marker//
Variable.Set("Marker1Value", "0,10")
Variable.Set("Marker2Value", "0,50")
Variable.Set("Marker3Value", "1")
Variable.Set("Marker4Value", "5")
Variable.Set("Marker5Value", "10")
Variable.Set("Marker6Value", "25")
Variable.Set("Marker7Value", "100")
Variable.Set("Marker1X", "230")
Variable.Set("Marker1Y", "373")
Variable.Set("Marker2X", "259")
Variable.Set("Marker2Y", "392")
Variable.Set("Marker3X", "285")
Variable.Set("Marker3Y", "412")
Variable.Set("Marker4X", "312")
Variable.Set("Marker4Y", "430")
Variable.Set("Marker5X", "338")
Variable.Set("Marker5Y", "449")
Variable.Set("Marker6X", "364")
Variable.Set("Marker6Y", "468")
Variable.Set("Marker7X", "392")
Variable.Set("Marker7Y", "487")
// Below you find the variables that decide which colour to initially bet //
Variable.Set("BetRed", "Yes")
Variable.Set("BetBlack", "No")
// /////////////////////////////////////////
// System variables below. Do not adjust. //
// /////////////////////////////////////////
//
Variable.Set("WonRed", "No")
Variable.Set("WonBlack", "No")
Variable.Set("FreespinDone", "No")
Variable.Set("BetLocationX", "0")
Variable.Set("BetLocationY", "0")
Variable.Set("MarkerX", "0")
Variable.Set("MarkerY", "0")
Variable.Set("MarkerValue", "9999")
Variable.Set("BetsLeftToBeMade", "0")
Variable.Set("Won", "No")
// Statistical values obviously begin at zero //
Variable.Set("TimesWonBlack", "0")
Variable.Set("TimesWonRed", "0")
Variable.Set("TimesWonTotal", "0")
Variable.Set("SpinsTillWin", "0")
Variable.Set("SpinsTillWinRed", "0")
Variable.Set("SpinsTillWinBlack", "0")
Variable.Set("TotalSpins", "0")
// /////////////////////////////////////////
// Actual sequence below. Nothing to adjust. //
// /////////////////////////////////////////
//
Function.Execute("Reset window location")
Variable.Set("bet", "{MinimumBet}")
Variable.Set("CurrentlyBetting", "No")
begin loop()
// Lets check if casino is ready by checking for available spin //
Function.Execute("Wait for spin")
// Casino is ready. Lets freespin, if chosen//
Function.Execute("Freespin until consecutive colours")
// Lets check if casino is ready by checking for available spin //
Function.Execute("Wait for spin")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
// Casino is ready. Lets bet! //
Function.Execute("Place bet")
// Bet is placed. Let's spin! //
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Function.Execute("Spin the wheel")
// Lets check if casino is ready for Win Check by available spin //
Function.Execute("Wait for spin")
// Check if red colour just won //
Function.Execute("Check red win")
// Check if black colour just won //
Function.Execute("Check black win")
// Lets check if we won //
Function.Execute("Check if we won")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
// We did not win function below. We assume we didn't win first. Function will only process if we lost. //
Function.Execute("Did not win")
// We did win function below. Function will only process if we won. //
Function.Execute("Did win")
// Statistics function if chosen will process last //
Function.Execute("Statistics")
Function.Execute setting 2 variables("Do random pause", "low", "1000", "high", "2000")
end
end
// Reset Casino Window module //
// Wait for spin determines casino readyness. It has to be met before proceeding.
// Spin the weel function
// Check if ball landed on red
// Check if ball landed on black
// Spin the wheel until "X" amount of consecutive wins on any colour.
// Check if we won function
function("Reset window location")
begin
Window.Set location("{CasinoWindowName}", "No", "1", "1")
Window.Bring to front("{CasinoWindowName}", "No")
Macro.Pause("1000")
Macro.Report progress("Adjusting Casino Window")
end
function
function("Wait for spin")
begin
Macro.Report progress("Waiting for spin")
while Color.Near coordinate is within (RGB range)("30", "30", "30", "10", "190", "428", "3")
begin
Function.Execute setting 2 variables("Do random pause", "low", "200", "high", "1000")
end
end
function
function("Spin the wheel")
begin
Macro.Report progress("Spinning the wheel")
Function.Execute setting 3 variables("Human mouse", "x", "{SpinButtonX}", "y", "{SpinButtonY}", "accuracy", "{MouseAccuracy}")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Mouse.Click("Left")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
end
function
function("Check red win")
begin
// For consistensy, we assume it did not land on red initially
Variable.Set("RedWonNow", "No")
Variable.Set("RedLostNow", "Yes")
// Check statistics in casino window for red number at top right
if Color.Near coordinate is (RGB)("255", "0", "0", "782", "60", "4")
begin
Variable.Set("RedWonNow", "Yes")
end
end
function
function("Check black win")
begin
// For consistensy, we assume it did not land on black initially
Variable.Set("BlackWonNow", "No")
Variable.Set("BlackLostNow", "Yes")
// Check statistics in casino window for black number at top left
if Color.Near coordinate is (RGB)("255", "255", "0", "734", "60", "4")
begin
Variable.Set("BlackWonNow", "Yes")
end
end
function
function("Freespin until consecutive colours")
begin
// Will not do initial free spins if you have not chosen in preset variables.
if Variable.Is equal to("Freespin", "Yes")
and
Variable.Is equal to("CurrentlyBetting", "No")
begin
Variable.Set("BetRed", "No")
Variable.Set("BetBlack", "No")
Variable.Set("BlackWonNow", "No")
Variable.Set("RedWonNow", "No")
Variable.Set("BlackWonLast", "No")
Variable.Set("RedWonLast", "No")
Variable.Set("FreespinTargetMet", "No")
Variable.Set("ConsecutiveRedWins", "0")
Variable.Set("ConsecutiveBlackWins", "0")
Variable.Set("FreespinDone", "No")
Variable.Set("SpinsTillConsecutiveTarget", "0")
begin loop()
Macro.Report progress("Starting Freespin loop until colour has won preset amount of times in a row")
Function.Execute("Wait for spin")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Function.Execute("Spin the wheel")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Variable.Add (Math)("SpinsTillConsecutiveTarget", "1")
Function.Execute("Check red win")
Function.Execute("Check black win")
// If Red Won, adding it to consective counter and resetting black
if Variable.Is equal to("RedWonNow", "Yes")
begin
Variable.Add (Math)("ConsecutiveRedWins", "1")
Variable.Set("ConsecutiveBlackWins", "0")
Variable.Set("RedWonLast", "Yes")
Variable.Set("BlackWonLast", "No")
end
// If Black Won, adding it to consective counter and resetting red
if Variable.Is equal to("BlackWonNow", "Yes")
begin
Variable.Add (Math)("ConsecutiveBlackWins", "1")
Variable.Set("ConsecutiveRedWins", "0")
Variable.Set("BlackWonLast", "Yes")
Variable.Set("RedWonLast", "No")
end
// If Red has won enough times, FreespinTarget is met and we can proceed betting on black
if Variable.Is equal to("ConsecutiveRedWins", "{ConsecutiveTarget}")
begin
Variable.Set("FreespinTargetMet", "Yes")
Variable.Set("BetBlack", "Yes")
Variable.Set("BetRed", "No")
end
// If Black has won enough times, FreespinTarget is met and we can proceed betting on red
if Variable.Is equal to("ConsecutiveBlackWins", "{ConsecutiveTarget}")
begin
Variable.Set("FreespinTargetMet", "Yes")
Variable.Set("BetBlack", "No")
Variable.Set("BetRed", "Yes")
end
if Variable.Is equal to("FreespinTargetMet", "Yes")
begin
Variable.Set("FreespinDone", "Yes")
Macro.Break from loop("Yes")
end
end
end
end
function
function("Place bet")
begin
Macro.Report progress("Placing bets")
Variable.Set("CurrentlyBetting", "Yes")
Variable.Set("BetsLeftToBeMade", "{bet}")
if Variable.Is equal to("BetBlack", "Yes")
begin
Variable.Set("BetLocationX", "{BlackBetLocationX}")
Variable.Set("BetLocationY", "{BlackBetLocationY}")
end
if Variable.Is equal to("BetRed", "Yes")
begin
Variable.Set("BetLocationX", "{RedBetLocationX}")
Variable.Set("BetLocationY", "{RedBetLocationY}")
end
begin loop()
// Initial colours are set, we are now ready to proceed //
if Variable.Is equal to("BetsLeftToBeMade", "{Marker1Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker1Value}")
begin
Variable.Set("MarkerX", "{Marker1X}")
Variable.Set("MarkerY", "{Marker1Y}")
Variable.Set("MarkerValue", "{Marker1Value}")
Variable.Set("CurrentMarker", "Marker 1")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker2Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker2Value}")
begin
Variable.Set("MarkerX", "{Marker2X}")
Variable.Set("MarkerY", "{Marker2Y}")
Variable.Set("MarkerValue", "{Marker2Value}")
Variable.Set("CurrentMarker", "Marker 2")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker3Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker3Value}")
begin
Variable.Set("MarkerX", "{Marker3X}")
Variable.Set("MarkerY", "{Marker3Y}")
Variable.Set("MarkerValue", "{Marker3Value}")
Variable.Set("CurrentMarker", "Marker 3")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker4Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker4Value}")
begin
Variable.Set("MarkerX", "{Marker4X}")
Variable.Set("MarkerY", "{Marker4Y}")
Variable.Set("MarkerValue", "{Marker4Value}")
Variable.Set("CurrentMarker", "Marker 4")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker5Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker5Value}")
begin
Variable.Set("MarkerX", "{Marker5X}")
Variable.Set("MarkerY", "{Marker5Y}")
Variable.Set("MarkerValue", "{Marker5Value}")
Variable.Set("CurrentMarker", "Marker 5")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker6Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker6Value}")
begin
Variable.Set("MarkerX", "{Marker6X}")
Variable.Set("MarkerY", "{Marker6Y}")
Variable.Set("MarkerValue", "{Marker6Value}")
Variable.Set("CurrentMarker", "Marker 6")
end
if Variable.Is equal to("BetsLeftToBeMade", "{Marker7Value}")
or
Variable.Is greater than (Math)("BetsLeftToBeMade", "{Marker7Value}")
begin
Variable.Set("MarkerX", "{Marker7X}")
Variable.Set("MarkerY", "{Marker7Y}")
Variable.Set("MarkerValue", "{Marker7Value}")
Variable.Set("CurrentMarker", "Marker 7")
end
Function.Execute setting 3 variables("Human mouse", "x", "{MarkerX}", "y", "{MarkerY}", "accuracy", "{MouseAccuracy}")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Mouse.Click("Left")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Macro.Report progress("Selected {CurrentMarker}")
begin loop()
Function.Execute setting 3 variables("Human mouse", "x", "{BetLocationX}", "y", "{BetLocationY}", "accuracy", "{MouseAccuracy}")
Function.Execute setting 2 variables("Do random pause", "low", "{RandomLow}", "high", "{RandomHigh}")
Mouse.Click("Left")
Macro.Report progress("Placed {CurrentMarker}")
Variable.Subtract (Math)("BetsLeftToBeMade", "{MarkerValue}")
if Variable.Is less than (Math)("BetsLeftToBeMade", "{MarkerValue}")
begin
Macro.Break from loop("Yes")
end
end
if Variable.Is less than (Math)("BetsLeftToBeMade", "{Marker1Value}")
begin
Macro.Break from loop("Yes")
end
end
end
function
function("Check if we won")
begin
if Variable.Is equal to("CurrentlyBetting", "Yes")
begin
// Always assume we did not win, until criteria is met //
Variable.Set("Won", "No")
Variable.Set("WonRed", "No")
Variable.Set("WonBlack", "No")
if Variable.Is equal to("BetRed", "Yes")
begin
if Variable.Is equal to("RedWonNow", "Yes")
begin
Variable.Set("Won", "Yes")
Variable.Set("WonRed", "Yes")
end
end
if Variable.Is equal to("BetBlack", "Yes")
begin
if Variable.Is equal to("BlackWonNow", "Yes")
begin
Variable.Set("Won", "Yes")
Variable.Set("WonBlack", "Yes")
end
end
end
end
function
function("Did not win")
begin
if Variable.Is equal to("Won", "No")
and
Variable.Is equal to("CurrentlyBetting", "Yes")
begin
Macro.Report progress("We did not win. Doubling bet.")
// We didn't win, so we multiply our bets times two //
Variable.Multiply (Math)("bet", "2")
// Lets give up if we've lost enough times //
if Variable.Is greater than (Math)("bet", "{MaximumBet}")
begin
Macro.Report progress("We doubled enough. Giving up!")
Variable.Set("bet", "{MinimumBet}")
// After we have given up, we are not currently in a betting sequence //
Variable.Set("CurrentlyBetting", "No")
// If Freespin is not active, alternate between colours, otherwise Freespin chooses //
if Variable.Is equal to("Freespin", "No")
begin
if Variable.Is equal to("BetRed", "Yes")
and
Variable.Is equal to("RedLostNow", "Yes")
begin
Variable.Set("BetBlack", "Yes")
Variable.Set("BetRed", "No")
end
if Variable.Is equal to("BetBlack", "Yes")
and
Variable.Is equal to("BlackLostNow", "Yes")
begin
Variable.Set("BetRed", "Yes")
Variable.Set("BetBlack", "No")
end
end
end
end
end
function
function("Did win")
begin
if Variable.Is equal to("Won", "Yes")
and
Variable.Is equal to("CurrentlyBetting", "Yes")
begin
Macro.Report progress("We won!")
Variable.Set("bet", "{MinimumBet}")
// If Freespin is not active, alternate between colours, otherwise Freespin chooses //
if Variable.Is equal to("Freespin", "No")
begin
if Variable.Is equal to("WonRed", "Yes")
begin
Variable.Set("BetBlack", "Yes")
Variable.Set("BetRed", "No")
end
if Variable.Is equal to("WonBlack", "Yes")
begin
Variable.Set("BetBlack", "No")
Variable.Set("BetRed", "Yes")
end
end
// Because we just won, we are not in a betting mode anymore. //
Variable.Set("CurrentlyBetting", "No")
end
end
function
function("Do random pause")
begin
Variable.Set random number("ms", "{low}", "{high}")
Macro.Pause("{ms}")
end
function
function("Human mouse")
begin
Variable.Evaluate (Math)("{x} - {accuracy}", "lowerX")
Variable.Evaluate (Math)("{x} + {accuracy}", "upperX")
Variable.Evaluate (Math)("{y} - {accuracy}", "lowerY")
Variable.Evaluate (Math)("{y} + {accuracy}", "upperY")
Variable.Set random number("finalX", "{lowerX}", "{upperX}")
Variable.Set random number("finalY", "{lowerY}", "{upperY}")
Mouse.Move to coordinate("{finalX}", "{finalY}")
end
function
function("Statistics")
begin
// Shall we use the Statistics module or not? //
if Variable.Is equal to("UseStatisticsModule", "Yes")
begin
// Lets log FreeSpins first.
if Variable.Is equal to("FreespinDone", "Yes")
begin
File.Write text("C:\FreeSpin.txt", "Yes", "{SpinsTillConsecutiveTarget}")
Variable.Set("FreeSpinDone", "No")
end
// If we did not win, do this for statistics. //
if Variable.Is equal to("Won", "No")
begin
if Variable.Is equal to("BetRed", "Yes")
begin
Variable.Add (Math)("SpinsTillWinRed", "1")
end
if Variable.Is equal to("BetBlack", "Yes")
begin
Variable.Add (Math)("SpinsTillWinBlack", "1")
end
Variable.Add (Math)("SpinsTillWin", "1")
end
// If we did win, do this for statistics //
if Variable.Is equal to("Won", "Yes")
begin
Variable.Add (Math)("TimesWonTotal", "1")
Variable.Add (Math)("SpinsTillWin", "1")
if Variable.Is equal to("WonRed", "Yes")
begin
Variable.Add (Math)("TimesWonRed", "1")
Variable.Add (Math)("SpinsTillWinRed", "1")
File.Write text("{SpinsTillWinRedLogLocation}", "Yes", "{SpinsTillWinRed}")
end
if Variable.Is equal to("WonBlack", "Yes")
begin
Variable.Add (Math)("TimesWonBlack", "1")
Variable.Add (Math)("SpinsTillWinBlack", "1")
File.Write text("{SpinsTillWinBlackLogLocation}", "Yes", "{SpinsTillWinBlack}")
end
File.Write text("{SpinsTillWinLogLocation}", "Yes", "{SpinsTillWin}")
File.Write text("{WinningsLogLocation}", "No", "TimesWonTotal")
File.Write text("{WinningsLogLocation}", "Yes", "{TimesWonTotal}")
File.Write text("{WinningsLogLocation}", "Yes", "TimesWonRed")
File.Write text("{WinningsLogLocation}", "Yes", "{TimesWonRed}")
File.Write text("{WinningsLogLocation}", "Yes", "TimesWonBlack")
File.Write text("{WinningsLogLocation}", "Yes", "{TimesWonBlack}")
Variable.Set("SpinsTillWinBlack", "0")
Variable.Set("SpinsTillWinRed", "0")
Variable.Set("SpinsTillWin", "0")
end
end
end
function