system "Dozens-and-columns sequence System v1"
{
*************************************
*      System by TurboGenius        *
*        on the VIP Lounge          *
*************************************
        Rx-ed by St0rm0r

Track Dozens and Columns.
Log the combination of the two and bet against what happened last time.
Use progression 1,2,3,... on a loss
Reset on any new high or when equal to last high balance.
}
method "main"
begin
while starting new session
    begin
    call "init"
    exit
    end
if bankroll >= record"ref bank"data
    begin
    call "reset"
    end

if net < 0
    begin
    add 1 to record"pro"data
    end

if net > 0
    begin
    set flag "bet" false
    clear record"to bet"layout
end


track last dozen for 1 time in record"last dozen"layout
track last column for 1 time in record"last column"layout
track last number for 1 time in record"last number"layout
if record"last number"layout = number 0 or record"last number"layout = number 00
    begin
    copy number 0 to record"last dozen"layout
    end
call "loop to end of history list"
call "add last combination"

if record"history"layout count < record"end"data
    begin
    exit
    end

if flag "bet" false
    begin
    call "take last x combinations"
    call "check for match in history"
    end

if flag "bet" true
    begin
    add 1 record"to bet"layout index
    if record"to bet"layout index = record"to bet"layout count
        begin
        set flag "bet" false
        end
    if record"to bet"layout not = number 0
        begin
        put 1 record"number"layout index
        loop until record"to bet"layout = record"number"layout
            begin
            add 1 record"number"layout index
            end
        put 100% record"number"layout index in record"pointer"data
        multiply by 2 on record"pointer"data
        subtract 1 from record"pointer"data
        put 100% record"pointer"data in record"bet1"layout index
        put 0 record"counter"data
        loop until record"counter"data = 2
            begin
            if record"bet1"layout not = red
                begin
                put 12 record"bet1"layout
                multiply by 100% record"pro"data on record"bet1"layout
                end
            add 1 record"bet1"layout index
            add 1 record"counter"data
            end

        put 100% record"pointer"data in record"bet2"layout index
        put 0 record"counter"data
        loop until record"counter"data = 2
            begin
            if record"bet2"layout not = red
                begin
                put 4 record"bet2"layout
                multiply by 100% record"pro"data on record"bet2"layout
                end
            add 1 record"bet2"layout index
            add 1 record"counter"data
            end

        put 100% record"number"layout index in record"pointer"data
        multiply by 4 on record"pointer"data
        subtract 3 from record"pointer"data
        put 100% record"pointer"data in record"bet3"layout index
        put 0 record"counter"data
        loop until record"counter"data = 4
            begin
            if record"bet3"layout not = red
                begin
                put 2 record"bet3"layout
                multiply by 100% record"pro"data on record"bet3"layout
                end
            add 1 record"bet3"layout index
            add 1 record"counter"data
            end

        if record"zero coverage"data = 1
            begin
            if record"wheel"data = 1
                begin
                put 1 on number 0
                multiply by 100% record"pro"data on number 0
                end
                else
                begin
                put 2 on Split(0-00)
                multiply by 100% record"pro"data on Split(0-00)
                end
            end
        end
    end
end

method "init"
begin
clear record"history"layout
copy list [1st dozen, 2nd dozen, 3rd dozen] to record"D"layout
copy list [column A, column B, column C] to record"C"layout
copy list [number 1, number 2, number 3, number 4, number 5, number 6, number 7,
number 8, number 9] to record"number"layout
copy list [2nd dozen,3rd dozen,2nd dozen,3rd dozen,2nd dozen,3rd dozen,
           1st dozen,3rd dozen,1st dozen,3rd dozen,1st dozen,3rd dozen,
           1st dozen,2nd dozen,1st dozen,2nd dozen,1st dozen,2nd dozen]
           to record"bet1"layout
copy list [Corner(2:6),Corner(8:12),red,red,Corner(1:5),Corner(7:11),
           Corner(14:18),Corner(20:24),red,red,Corner(13:17),Corner(19:23),
           Corner(26:30),Corner(32:36),red,red,Corner(25:29),Corner(31:35)]
           to record"bet2"layout
copy list [red,red,red,red,Split(1-4),Split(7-10),Split(3-6),Split(9-12),red,red,red,red,
           red,red,red,red,Split(13-16),Split(19-22),Split(15-18),Split(21-24),red,red,red,red,
           red,red,red,red,Split(25-28),Split(31-34),Split(27-30),Split(33-36),red,red,red,red]
           to record"bet3"layout
group
    begin
    display "Dozens-and-columns sequence System"
    input data "Qualify on x combinations" to record"how many"data
    input dropdown "Zero coverage ?
    1:= Yes
    2:= No" to record"zero coverage"data
    input dropdown "Wheel Type ?
    1:= Single Wheel
    2:= Double Wheel" to record"wheel"data
    end
if record"wheel"data = 1
    begin
    load single wheel
    end
    else
    begin
    load double wheel
    end
if record"how many"data < 1
    begin
    put 1 record"how many"data
    end
put 100% record"how many"data in record"end"data
add 1 record"end"data
end

method "reset"
begin
put 100% bankroll in record"ref bank"data
put 1 in record"pro"data
set flag "bet" false
clear record"to bet"layout
end

method "loop to end of history list"
begin
put 1 record"history"layout index
loop until record"history"layout index > record"history"layout count
    begin
    add 1 record"history"layout index
    end
end

method "add last combination"
begin
//1st/A=1, 1st/B=2, 1st/C=3, 2nd/A=4, 2nd/B=5, 2nd/C=6, 3rd/A=7, 3rd/B=8, 3rd/C=9
if record"last dozen"layout not = number 0
    begin
    put 1 record"combination"data
    put 1 record"D"layout index
    loop until record"D"layout = record"last dozen"layout
        begin
        add 3 record"combination"data
        add 1 record"D"layout index
        end
    put 1 record"C"layout index
    loop until record"C"layout = record"last column"layout
        begin
        add 1 record"combination"data
        add 1 record"C"layout index
        end
    put 100% record"combination"data to record"number"layout index
    copy record"number"layout to record"history"layout
    end
    else
    begin
    copy number 0 record"history"layout
    end
end

method "take last x combinations"
begin
clear record "last x"layout
subtract 100% record"how many"data from record"history"layout index
add 1 record"history"layout index
loop until record"history"layout index > record"history"layout count
    begin
    copy record"history"layout to record "last x"layout
    add 1 record "last x"layout index
    add 1 record"history"layout index
    end
end

method "check for match in history"
begin
subtract 100% record"end"data from record"history"layout index
loop until record"history"layout index < 1
    begin
    put 1 record"go"data
    clear record "the rest"layout
    loop until record"go"data > record"how many"data
        begin
        copy record"history"layout to record "the rest"layout
        add 1 record "the rest"layout index
        add 1 record"go"data
        add 1 record"history"layout index
        end
    if record "last x"layout list has a pattern match in record "the rest"layout
    begin
    set flag "bet" true
    clear record"to bet"layout
    loop until record"history"layout index > record"history"layout count
        begin
        copy record"history"layout to record "to bet"layout
        add 1 record"to bet"layout index
        add 1 record"history"layout index
        end
    put 0 to record"to bet"layout index
    put 0 to record"history"layout index
    end
    subtract 100% record"end"data from record"history"layout index
    end
end
