system "Alternating Dozens v1"
{
*************************************
*          System by Stark          *
*         on the VIP Lounge         *
*************************************
          Rx-ed by St0rm0r
-------------------------------------
           00-c0mpatible
-------------------------------------
We bet on 2 dozens ,always different of the last one.
If we have 3 consecutive losses (means if a dozen repeated 4times or more)
then we stop and start again,after the streak has ended and a different dozen came up.
Use a negative 1-4-14 progression.
By 0 we continue as if we had a no-spin and we keep on betting on previous dozens .
As betting concerns on the last progression step (14 units on each dozen) we bet also 1 unit on 0(zero) as hedge.

Wait for at least a 5 dozenrepeat and start betting after the next dozenchange
for the next 40 spins with 25E chips ,he will come out every time with 1000E win.
-------------------------------------
}
method "main"
begin
// section 1: do this once
while starting new session
    begin
    call "init"
    exit
    end

// section 2: do the tracking
if record"#bets"data > record"B"data
    begin
    set flag "qualified" false
    put 0 record"#losses"data
    end

track last number for 1 record"last N"layout
if record"last N"layout not = number 0 and record"last N"layout not = number 00
    begin
    track last dozen for record"R"data times record"D series"layout
    end
copy record"last D"layout record"previous D"layout
track last dozen for 1 record"last D"layout
if record"D series"layout count < record"R"data
    begin
    exit
    end

// section 3: act on a loss
if net < 0
    begin
    if record"last N"layout not = number 0 and record"last N"layout not = number 00
        begin
        add 1 record"#losses"data
        add 1 record"pro"data index
        if record"pro"data index > record"pro"data count
            begin
            put 1 record"pro"data index
            end
        end
    if record"#losses"data >= 3
        begin
        set flag "qualified" false
        end
    end

// section 4:act on a win
if net > 0
    begin
    put 1 record"pro"data index
    if record"last N"layout not = number 0 and record"last N"layout not = number 00
        begin
        put 0 record"#losses"data
        end
    end
if record"last D"layout not = record"previous D"layout and record"#losses"data >= 3
    begin
    put 0 record"#losses"data
    end

//section 5: act when not qualified
if flag "qualified" false
    begin
    if record"#losses"data < 3
        begin
        set flag "go" true
        if record"R"data > 1
            begin
            put 1 record"D series"layout index
            copy record"D series"layout record"reference"layout
            loop until record"D series"layout index = record"D series"layout count
                begin
                if record"D series"layout not = record"reference"layout
                    begin
                    set flag "go" false
                    end
                add 1 record"D series"layout index
                end

            if flag "go" true
                begin
                if record"D series"layout = record"reference"layout
                    begin
                    set flag "go" false
                    end
                end
            end
        if flag "go" true
            begin
            set flag "qualified" true
            put 0 record"#bets"data
            end
        end
    end

//section 6: act when qualified
if flag "qualified" true
    begin
    //bet
    add 1 record"#bets"data
    put 1 record"dozens"layout index
    loop until record"dozens"layout index > record"dozens"layout count
        begin
        if record"dozens"layout not = record"last D"layout
            begin
            put 100% record"pro"data record"dozens"layout
            multiply by 100% record"U"data record"dozens"layout
            end
        add 1 record"dozens"layout index
        end
    if record"pro"data index = 3
        begin
        put 100% record"U"data number 0
        put 100% record"U"data number 00
        end
    end

end

// subroutines
method "init"
begin
group
    begin
    display "In order to qualify"
    input data "wait for at least an x dozen repeat" record"R"data
    display "and start beting after the next dozen change"
    input data "Once qualified, bet max. x spins (eg.40): "record"B"data
    input data "Base bet unit:" record"U"data
    end
copy list [1st dozen, 2nd dozen, 3rd dozen] to record"dozens"layout
set list [1,4,14] record"pro"data
put 0 record"#losses"data
add 1 record"R"data
set flag "qualified" false
end
