T1/CM to Titan Two Script Converter [v0.28r6 - 11/30/2020]

Tutorials, How-tos and FAQs for the Titan Two device.

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Buffy » Sat Nov 30, 2019 8:29 pm

guko3867 wrote:I tried to convert the following script but I still get GPC error please help

Code: Select all
#pragma METAINFO("1.gpc", 1, 0, "Buffy's GPC Converter v0.26r6")
#include <titanone.gph>
 
 
/* *
 
 
* *************************************************************/
//1//
//2//
//3//
//4//
//5//
///6///
//-----Install-----//
//-------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
//1. Blue
//2. Red
//3. Green
//4. Pink
//5. LightBlue
//6. Yellow
//7. White
//--------------------------------------------------------------------------------------------
//////7//////
//8//
//9//   
//10//
//11//
//12//
//13//
//14//
//15//
//16//
//17//   
//18//     
//19//
//20// 
//21//
//22//
//23//
//24//
//25//
//26//
//27//
//////28//////
//Main End//
//-----Combos-----//
//end//
 
 
define PS = 0;
define SHARE = 1;
define OPTIONS = 2;
define RBR1 = 3;
define RTR2 = 4;
define RS = 5;
define LBL1 = 6;
define LTL2 = 7;
define LS = 8;
define RX = 9;
define RY = 10;
define LX = 11;
define LY = 12;
define UP = 13;
define DOWN = 14;
define LEFT = 15;
define RIGHT = 16;
define YTRIANGLE = 17;
define BCIRCLE = 18;
define ACROSS = 19;
define XSQUARE = 20;
define TOUCH = 27;
define Off = 0;
define Blue = 1;
define Red = 2;
define Green = 3;
define Pink = 4;
define SkyBlue = 5;
define Yellow = 6;
define White = 7;
 
data(1,
2, 0, 0, 0,
0, 2, 0, 0,
0, 0, 2, 0,
0, 0, 0, 2,
2, 0, 2, 0,
0, 2, 2, 0,
2, 2, 2, 2
);
 
int ELOCOJR0;
int ELOCOJR1, ELOCOJR15;
int ELOCOJR2, ELOCOJR25;
int ELOCOJR3 = TRUE;
int ELOCOJR4 = FALSE;
int ELOCOJR5 = FALSE;
int ELOCOJR6 = 17;
int ELOCOJR7 = -17;
int ELOCOJR8 = 20;
int ELOCOJR9 = 17;
int ELOCOJR10 = FALSE;
int ELOCOJR11 = FALSE;
int ELOCOJR12 = FALSE;
int ELOCOJR13 = FALSE;
int ELOCOJR14;
int ELOCOJR15;
int ELOCOJR16 = 396;
int ELOCOJR17;
int ELOCOJR18;
int ELOCOJR19;
int ELOCOJR20;
int ELOCOJR21;
int ELOCOJR22;
 
main {
    if (get_val(12) <=  -15 && get_val(8) == 100) {
        f_colourled(Red);
    }
    if (get_led(LED_2, 1)) {
        if (event_press(2)) {
            f_colourled(Blue);
        }
        if (event_press(16)) {
            f_colourled(Blue);
        }
        if (event_press(15)) {
            f_colourled(Blue);
        }
        if (event_press(0)) {
            f_colourled(Blue);
        }
        if (event_press(1)) {
            f_colourled(Blue);
        }
        if (ELOCOJR4) {
            if (get_val(7)) combo_run(c_ELOCOJR30);
        }
        if (get_battery() <= 1) {
            combo_run(c_ELOCOJR32);
        }
        if (get_val(6)) {
            combo_stop(c_ELOCOJR32);
        }
        deadzone(11, 12, DZ_CIRCLE, 10);
        deadzone(PS4_L2, PS4_R2, 99, 99);
        if (!get_val(7) && event_press(5)) {
            set_val(8, 0);
            combo_run(c_ELOCOJR28);
        }
        if (get_val(6)) {
            combo_stop(c_ELOCOJR28);
        }
        if (ELOCOJR17) {
            if (get_val(7) == 0 && get_val(6) == 0 && get_rumble(RUMBLE_B) == 0 && get_rumble(RUMBLE_A) == 87) {
                combo_stop(c_ELOCOJR32);
                set_val(3, 100);
                set_val(20, 100);
            }
        }
        if (ELOCOJR3) if (get_val(7) > 95) {
            combo_run(c_ELOCOJR23);
        }
        if (get_val(7) && event_press(14)) {
            ELOCOJR0 =! ELOCOJR0;
        }
        if (ELOCOJR0) {
            if (event_release(7)) {
                combo_run(c_ELOCOJR27);
            }
        }
        if (ELOCOJR14) {
            if (get_val(7) >= 1 && get_val(17)) {
                set_val(15, 100);
            }
        }
        if (!get_val(6) && get_val(7) && event_release(4)) {
            combo_run(c_ELOCOJR26);
        }
        if (event_release(7)) {
            combo_stop(c_ELOCOJR26);
        }
        if (ELOCOJR5) {
            if (!get_val(6) && get_val(5) == 0 && get_val(7) == 100 && get_ptime(7) > 20 && get_val(4) == 100 && get_ptime(4) > 20) {
                set_val(5, 100);
                combo_run(c_ELOCOJR25);
            }
            if (!get_val(6) && event_release(4)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (ELOCOJR12) {
            if (get_val(6) > 95 && get_val(10) > 95) {
                ELOCOJR10 = TRUE;
                ELOCOJR4 = TRUE;
                ELOCOJR11 = FALSE;
                ELOCOJR17 = TRUE;
                ELOCOJR5 = FALSE;
                ELOCOJR14 = TRUE;
                ELOCOJR3 = TRUE;
            }
        }
        if (ELOCOJR13) {
            if (get_val(6) > 95 && get_val(10) > 95) {
                ELOCOJR11 = FALSE;
            }
        }
        if (get_val(7) > 95 && get_val(10) > 95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = TRUE;
            ELOCOJR17 = TRUE;
            ELOCOJR4 = TRUE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = TRUE;
            ELOCOJR3 = TRUE;
        }
        if (ELOCOJR13) {
            if (get_val(6) > 95 && get_val(9) < -95) {
                ELOCOJR3 = TRUE;
                ELOCOJR17 = TRUE;
                ELOCOJR11 = TRUE;
                ELOCOJR10 = FALSE;
                ELOCOJR5 = FALSE;
                ELOCOJR14 = TRUE;
                ELOCOJR4 = TRUE;
            }
        }
        if (ELOCOJR12) {
            if (get_val(6) > 95 && get_val(9) < -95) {
                ELOCOJR10 = FALSE;
            }
        }
        if (get_val(6) > 95 && get_val(9) < -95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = TRUE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = TRUE;
            ELOCOJR4 = TRUE;
            ELOCOJR17 = TRUE;
            ELOCOJR3 = TRUE;
        }
        if (get_val(6) > 95 && get_val(10) < -95) {
            ELOCOJR22 = TRUE;
            ELOCOJR21 = FALSE;
            ELOCOJR10 = FALSE;
            ELOCOJR17 = TRUE;
            ELOCOJR11 = FALSE;
            ELOCOJR4 = TRUE;
            ELOCOJR5 = TRUE;
            ELOCOJR14 = TRUE;
            ELOCOJR3 = FALSE;
        }
        if (get_val(6) > 95 && get_val(9) > 95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = FALSE;
            ELOCOJR10 = FALSE;
            ELOCOJR11 = FALSE;
            ELOCOJR17 = FALSE;
            ELOCOJR4 = FALSE;
            ELOCOJR3 = FALSE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = FALSE;
        }
        if (ELOCOJR21) {
            if (get_val(6) == 0 && get_val(7) && get_ptime(7) > 250 && !ELOCOJR19) combo_run(c_ELOCOJR36);
            if (event_release(7)) {
                ELOCOJR19 = FALSE;
            }
        }
        if (ELOCOJR22) {
            if (get_val(6) == 0 && get_val(7) && get_ptime(7) > 150 && !ELOCOJR20) combo_run(c_ELOCOJR37);
            if (event_release(7)) {
                ELOCOJR20 = FALSE;
            }
        }
        if (get_val(6) && event_press(14)) {
            ELOCOJR12 =! ELOCOJR12;
            f_ELOCOJR15(ELOCOJR12);
            ELOCOJR10 = FALSE;
        }
        if (ELOCOJR15) combo_run(c_ELOCOJR24);
        if (ELOCOJR10) {
            if (get_val(7) > 95) {
                combo_run(c_ELOCOJR29);
            }
            if (get_val(7) > 15 && get_val(5) > 15) {
                ELOCOJR10 = FALSE;
            }
            if (event_release(7)) {
                combo_stop(c_ELOCOJR29);
            }
            if (!get_val(6) && event_release(7)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (get_val(6) && event_press(13)) {
            ELOCOJR13 =! ELOCOJR13;
            f_ELOCOJR15(ELOCOJR13);
            ELOCOJR11 = FALSE;
        }
        if (ELOCOJR15) combo_run(c_ELOCOJR24);
        if (ELOCOJR11) {
            if (get_val(7) > 95) {
                combo_run(c_ELOCOJR29);
            }
            if (get_val(7) > 15 && get_val(5) > 15) {
                ELOCOJR11 = FALSE;
            }
            if (event_release(7)) {
                combo_stop(c_ELOCOJR29);
            }
            if (!get_val(6) && event_release(7)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (ELOCOJR17) {
            if (get_val(7) == 0 && get_val(6) == 0 && get_val(3)) {
                if (event_press(20)) {
                    ELOCOJR1 = -96;
                    ELOCOJR15 = -49;
                }
                if (event_press(19)) {
                    ELOCOJR1 = 90;
                    ELOCOJR15 = -60;
                }
                if (ELOCOJR1|| ELOCOJR15) {
                    combo_run(c_ELOCOJR31);
                    combo_run(c_ELOCOJR33);
                    set_val(3, 100);
                    set_val(6, 100);
                }
            }
        }
        if (get_val(6)) {
            if (event_press(17)) {
                ELOCOJR2 = 0;
                ELOCOJR25 = -100;
                ELOCOJR22 = TRUE;
                ELOCOJR21 = FALSE;
                ELOCOJR10 = FALSE;
                ELOCOJR17 = TRUE;
                ELOCOJR11 = FALSE;
                ELOCOJR4 = TRUE;
                ELOCOJR5 = TRUE;
                ELOCOJR14 = TRUE;
                ELOCOJR3 = FALSE;
            }
            if (ELOCOJR2|| ELOCOJR25) {
                combo_run(c_ELOCOJR34);
            }
            if (get_val(17) && (get_ptime(17) >= 500)) {
                set_val(17, 100);
            }
            else {
                set_val(17, 0);
            }
            set_val(18, 0);
            set_val(20, 0);
        }
    }
    if (abs(get_val(12)) < 0 && abs(get_val(11)) < 0) {
        set_val(12, 0);
        set_val(11, 0);
    }
    if (abs(get_val(10)) < 0 && abs(get_val(9)) < 0) {
        set_val(10, 0);
        set_val(9, 0);
    }
}
 
 
combo c_ELOCOJR23 {
    if (ELOCOJR3) {
        set_rumble(RUMBLE_A, 0);
    }
    if (ELOCOJR3) {
        set_rumble(RUMBLE_B, 0);
    }
}
 
combo c_ELOCOJR24 {
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(200);
    ELOCOJR15--;
}
 
combo c_ELOCOJR25 {
    set_val(4, 100);
    wait(35);
    set_val(4, 0);
    wait(35);
}
 
combo c_ELOCOJR26 {
    wait(100);
    set_val(4, 0);
    wait(50);
    set_val(4, 100);
    wait(50);
}
 
combo c_ELOCOJR27 {
    set_val(7, 100);
    wait(50);
    set_val(7, 100);
    set_val(14, 100);
    wait(50);
    ELOCOJR0 = FALSE;
}
 
combo c_ELOCOJR28 {
    wait(30);
    set_val(8, 100);
    set_val(5, 100);
    wait(50);
}
 
combo c_ELOCOJR29 {
    set_val(7, 100);
    wait(ELOCOJR16);
    set_val(5, 100);
    set_val(4, 100);
    wait(ELOCOJR16);
    set_val(4, 0);
    wait(ELOCOJR16);
    set_val(4, 100);
    wait(ELOCOJR16);
    set_val(4, 0);
}
 
combo c_ELOCOJR30 {
    set_val(10, f_a_f(10, ELOCOJR6));
    wait(ELOCOJR8);
    set_val(9, f_a_f(9, ELOCOJR6));
    wait(ELOCOJR8);
    set_val(10, f_a_f(10, ELOCOJR7));
    wait(ELOCOJR8);
    set_val(9, f_a_f(9, ELOCOJR7));
    wait(ELOCOJR8);
}
 
combo c_ELOCOJR31 {
    set_val(9, ELOCOJR1);
    set_val(10, ELOCOJR15);
    wait(200);
    set_val(9, ELOCOJR1);
    set_val(10, ELOCOJR15);
    wait(40);
    ELOCOJR1 = 0;
    ELOCOJR15 = 0;
}
 
combo c_ELOCOJR32 {
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(500);
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(10000);
}
 
combo c_ELOCOJR33 {
    set_val(PS4_SQUARE, 100);
    wait(140);
    set_val(PS4_SQUARE, 0);
    wait(100);
}
 
combo c_ELOCOJR34 {
    set_val(9, ELOCOJR2);
    set_val(10, ELOCOJR25);
    wait(200);
    set_val(9, ELOCOJR2);
    set_val(10, ELOCOJR25);
    wait(40);
    ELOCOJR2 = 0;
    ELOCOJR25 = 0;
}
 
combo c_ELOCOJR35 {
    set_val(5, 0);
    wait(50);
    set_val(5, 100);
    wait(50);
}
 
combo c_ELOCOJR36 {
    set_val(9,  -20);
    set_val(10,  -100);
    wait(150);
    ELOCOJR19 = TRUE;
}
 
combo c_ELOCOJR37 {
    set_val(9,  -30);
    set_val(10,  -100);
    wait(250);
    ELOCOJR20 = TRUE;
}
 
 
function f_ELOCOJR15(f_bln) {
    if (f_bln) ELOCOJR15 = 1;
    else  ELOCOJR15 = 2;
}
 
function f_a_f(p, m) {
    if (abs(get_val(p)) < ELOCOJR9)
        return m;
    return get_val(p);
}
 
function f_colourled(Colour) {
    ELOCOJR18 = (Colour * 4)  -3;
    set_led(LED_1, dbyte(ELOCOJR18));
    set_led(LED_2, dbyte(ELOCOJR18+ 1));
    set_led(LED_3, dbyte(ELOCOJR18+ 2));
    set_led(LED_4, dbyte(ELOCOJR18+ 3));
}
 
 
 


Here you go (I'll fix this in the converter soon):
Code: Select all
 
#pragma METAINFO("1.gpc", 1, 0, "Buffy's GPC Converter v0.26r6")
#include <titanone.gph>
 
 
/* *
 
 
* *************************************************************/
//1//
//2//
//3//
//4//
//5//
///6///
//-----Install-----//
//-------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
//1. Blue
//2. Red
//3. Green
//4. Pink
//5. LightBlue
//6. Yellow
//7. White
//--------------------------------------------------------------------------------------------
//////7//////
//8//
//9//   
//10//
//11//
//12//
//13//
//14//
//15//
//16//
//17//   
//18//     
//19//
//20// 
//21//
//22//
//23//
//24//
//25//
//26//
//27//
//////28//////
//Main End//
//-----Combos-----//
//end//
 
 
define PS = 0;
define SHARE = 1;
define OPTIONS = 2;
define RBR1 = 3;
define RTR2 = 4;
define RS = 5;
define LBL1 = 6;
define LTL2 = 7;
define LS = 8;
define RX = 9;
define RY = 10;
define LX = 11;
define LY = 12;
define UP = 13;
define DOWN = 14;
define LEFT = 15;
define RIGHT = 16;
define YTRIANGLE = 17;
define BCIRCLE = 18;
define ACROSS = 19;
define XSQUARE = 20;
define TOUCH = 27;
define Off = 0;
define Blue = 1;
define Red = 2;
define Green = 3;
define Pink = 4;
define SkyBlue = 5;
define Yellow = 6;
define White = 7;
 
data(1,
2, 0, 0, 0,
0, 2, 0, 0,
0, 0, 2, 0,
0, 0, 0, 2,
2, 0, 2, 0,
0, 2, 2, 0,
2, 2, 2, 2
);
 
int ELOCOJR0;
int ELOCOJR1, ELOCOJR15;
int ELOCOJR2, ELOCOJR25;
int ELOCOJR3 = TRUE;
int ELOCOJR4 = FALSE;
int ELOCOJR5 = FALSE;
int ELOCOJR6 = 17;
int ELOCOJR7 = -17;
int ELOCOJR8 = 20;
int ELOCOJR9 = 17;
int ELOCOJR10 = FALSE;
int ELOCOJR11 = FALSE;
int ELOCOJR12 = FALSE;
int ELOCOJR13 = FALSE;
int ELOCOJR14;
int ELOCOJR16 = 396;
int ELOCOJR17;
int ELOCOJR18;
int ELOCOJR19;
int ELOCOJR20;
int ELOCOJR21;
int ELOCOJR22;
 
main {
    if (get_val(12) <=  -15 && get_val(8) == 100) {
        f_colourled(Red);
    }
    if (get_led(LED_2)) {
        if (event_press(2)) {
            f_colourled(Blue);
        }
        if (event_press(16)) {
            f_colourled(Blue);
        }
        if (event_press(15)) {
            f_colourled(Blue);
        }
        if (event_press(0)) {
            f_colourled(Blue);
        }
        if (event_press(1)) {
            f_colourled(Blue);
        }
        if (ELOCOJR4) {
            if (get_val(7)) combo_run(c_ELOCOJR30);
        }
        if (get_battery() <= 1) {
            combo_run(c_ELOCOJR32);
        }
        if (get_val(6)) {
            combo_stop(c_ELOCOJR32);
        }
        deadzone(11, 12, DZ_CIRCLE, 10);
        deadzone(PS4_L2, PS4_R2, 99, 99);
        if (!get_val(7) && event_press(5)) {
            set_val(8, 0);
            combo_run(c_ELOCOJR28);
        }
        if (get_val(6)) {
            combo_stop(c_ELOCOJR28);
        }
        if (ELOCOJR17) {
            if (get_val(7) == 0 && get_val(6) == 0 && get_rumble(RUMBLE_B) == 0 && get_rumble(RUMBLE_A) == 87) {
                combo_stop(c_ELOCOJR32);
                set_val(3, 100);
                set_val(20, 100);
            }
        }
        if (ELOCOJR3) if (get_val(7) > 95) {
            combo_run(c_ELOCOJR23);
        }
        if (get_val(7) && event_press(14)) {
            ELOCOJR0 =! ELOCOJR0;
        }
        if (ELOCOJR0) {
            if (event_release(7)) {
                combo_run(c_ELOCOJR27);
            }
        }
        if (ELOCOJR14) {
            if (get_val(7) >= 1 && get_val(17)) {
                set_val(15, 100);
            }
        }
        if (!get_val(6) && get_val(7) && event_release(4)) {
            combo_run(c_ELOCOJR26);
        }
        if (event_release(7)) {
            combo_stop(c_ELOCOJR26);
        }
        if (ELOCOJR5) {
            if (!get_val(6) && get_val(5) == 0 && get_val(7) == 100 && get_ptime(7) > 20 && get_val(4) == 100 && get_ptime(4) > 20) {
                set_val(5, 100);
                combo_run(c_ELOCOJR25);
            }
            if (!get_val(6) && event_release(4)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (ELOCOJR12) {
            if (get_val(6) > 95 && get_val(10) > 95) {
                ELOCOJR10 = TRUE;
                ELOCOJR4 = TRUE;
                ELOCOJR11 = FALSE;
                ELOCOJR17 = TRUE;
                ELOCOJR5 = FALSE;
                ELOCOJR14 = TRUE;
                ELOCOJR3 = TRUE;
            }
        }
        if (ELOCOJR13) {
            if (get_val(6) > 95 && get_val(10) > 95) {
                ELOCOJR11 = FALSE;
            }
        }
        if (get_val(7) > 95 && get_val(10) > 95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = TRUE;
            ELOCOJR17 = TRUE;
            ELOCOJR4 = TRUE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = TRUE;
            ELOCOJR3 = TRUE;
        }
        if (ELOCOJR13) {
            if (get_val(6) > 95 && get_val(9) < -95) {
                ELOCOJR3 = TRUE;
                ELOCOJR17 = TRUE;
                ELOCOJR11 = TRUE;
                ELOCOJR10 = FALSE;
                ELOCOJR5 = FALSE;
                ELOCOJR14 = TRUE;
                ELOCOJR4 = TRUE;
            }
        }
        if (ELOCOJR12) {
            if (get_val(6) > 95 && get_val(9) < -95) {
                ELOCOJR10 = FALSE;
            }
        }
        if (get_val(6) > 95 && get_val(9) < -95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = TRUE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = TRUE;
            ELOCOJR4 = TRUE;
            ELOCOJR17 = TRUE;
            ELOCOJR3 = TRUE;
        }
        if (get_val(6) > 95 && get_val(10) < -95) {
            ELOCOJR22 = TRUE;
            ELOCOJR21 = FALSE;
            ELOCOJR10 = FALSE;
            ELOCOJR17 = TRUE;
            ELOCOJR11 = FALSE;
            ELOCOJR4 = TRUE;
            ELOCOJR5 = TRUE;
            ELOCOJR14 = TRUE;
            ELOCOJR3 = FALSE;
        }
        if (get_val(6) > 95 && get_val(9) > 95) {
            ELOCOJR22 = FALSE;
            ELOCOJR21 = FALSE;
            ELOCOJR10 = FALSE;
            ELOCOJR11 = FALSE;
            ELOCOJR17 = FALSE;
            ELOCOJR4 = FALSE;
            ELOCOJR3 = FALSE;
            ELOCOJR5 = FALSE;
            ELOCOJR14 = FALSE;
        }
        if (ELOCOJR21) {
            if (get_val(6) == 0 && get_val(7) && get_ptime(7) > 250 && !ELOCOJR19) combo_run(c_ELOCOJR36);
            if (event_release(7)) {
                ELOCOJR19 = FALSE;
            }
        }
        if (ELOCOJR22) {
            if (get_val(6) == 0 && get_val(7) && get_ptime(7) > 150 && !ELOCOJR20) combo_run(c_ELOCOJR37);
            if (event_release(7)) {
                ELOCOJR20 = FALSE;
            }
        }
        if (get_val(6) && event_press(14)) {
            ELOCOJR12 =! ELOCOJR12;
            f_ELOCOJR15(ELOCOJR12);
            ELOCOJR10 = FALSE;
        }
        if (ELOCOJR15) combo_run(c_ELOCOJR24);
        if (ELOCOJR10) {
            if (get_val(7) > 95) {
                combo_run(c_ELOCOJR29);
            }
            if (get_val(7) > 15 && get_val(5) > 15) {
                ELOCOJR10 = FALSE;
            }
            if (event_release(7)) {
                combo_stop(c_ELOCOJR29);
            }
            if (!get_val(6) && event_release(7)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (get_val(6) && event_press(13)) {
            ELOCOJR13 =! ELOCOJR13;
            f_ELOCOJR15(ELOCOJR13);
            ELOCOJR11 = FALSE;
        }
        if (ELOCOJR15) combo_run(c_ELOCOJR24);
        if (ELOCOJR11) {
            if (get_val(7) > 95) {
                combo_run(c_ELOCOJR29);
            }
            if (get_val(7) > 15 && get_val(5) > 15) {
                ELOCOJR11 = FALSE;
            }
            if (event_release(7)) {
                combo_stop(c_ELOCOJR29);
            }
            if (!get_val(6) && event_release(7)) {
                combo_run(c_ELOCOJR35);
            }
        }
        if (ELOCOJR17) {
            if (get_val(7) == 0 && get_val(6) == 0 && get_val(3)) {
                if (event_press(20)) {
                    ELOCOJR1 = -96;
                    ELOCOJR15 = -49;
                }
                if (event_press(19)) {
                    ELOCOJR1 = 90;
                    ELOCOJR15 = -60;
                }
                if (ELOCOJR1|| ELOCOJR15) {
                    combo_run(c_ELOCOJR31);
                    combo_run(c_ELOCOJR33);
                    set_val(3, 100);
                    set_val(6, 100);
                }
            }
        }
        if (get_val(6)) {
            if (event_press(17)) {
                ELOCOJR2 = 0;
                ELOCOJR25 = -100;
                ELOCOJR22 = TRUE;
                ELOCOJR21 = FALSE;
                ELOCOJR10 = FALSE;
                ELOCOJR17 = TRUE;
                ELOCOJR11 = FALSE;
                ELOCOJR4 = TRUE;
                ELOCOJR5 = TRUE;
                ELOCOJR14 = TRUE;
                ELOCOJR3 = FALSE;
            }
            if (ELOCOJR2|| ELOCOJR25) {
                combo_run(c_ELOCOJR34);
            }
            if (get_val(17) && (get_ptime(17) >= 500)) {
                set_val(17, 100);
            }
            else {
                set_val(17, 0);
            }
            set_val(18, 0);
            set_val(20, 0);
        }
    }
    if (abs(get_val(12)) < 0 && abs(get_val(11)) < 0) {
        set_val(12, 0);
        set_val(11, 0);
    }
    if (abs(get_val(10)) < 0 && abs(get_val(9)) < 0) {
        set_val(10, 0);
        set_val(9, 0);
    }
}
 
 
combo c_ELOCOJR23 {
    if (ELOCOJR3) {
        set_rumble(RUMBLE_A, 0);
    }
    if (ELOCOJR3) {
        set_rumble(RUMBLE_B, 0);
    }
}
 
combo c_ELOCOJR24 {
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(200);
    ELOCOJR15--;
}
 
combo c_ELOCOJR25 {
    set_val(4, 100);
    wait(35);
    set_val(4, 0);
    wait(35);
}
 
combo c_ELOCOJR26 {
    wait(100);
    set_val(4, 0);
    wait(50);
    set_val(4, 100);
    wait(50);
}
 
combo c_ELOCOJR27 {
    set_val(7, 100);
    wait(50);
    set_val(7, 100);
    set_val(14, 100);
    wait(50);
    ELOCOJR0 = FALSE;
}
 
combo c_ELOCOJR28 {
    wait(30);
    set_val(8, 100);
    set_val(5, 100);
    wait(50);
}
 
combo c_ELOCOJR29 {
    set_val(7, 100);
    wait(ELOCOJR16);
    set_val(5, 100);
    set_val(4, 100);
    wait(ELOCOJR16);
    set_val(4, 0);
    wait(ELOCOJR16);
    set_val(4, 100);
    wait(ELOCOJR16);
    set_val(4, 0);
}
 
combo c_ELOCOJR30 {
    set_val(10, f_a_f(10, ELOCOJR6));
    wait(ELOCOJR8);
    set_val(9, f_a_f(9, ELOCOJR6));
    wait(ELOCOJR8);
    set_val(10, f_a_f(10, ELOCOJR7));
    wait(ELOCOJR8);
    set_val(9, f_a_f(9, ELOCOJR7));
    wait(ELOCOJR8);
}
 
combo c_ELOCOJR31 {
    set_val(9, ELOCOJR1);
    set_val(10, ELOCOJR15);
    wait(200);
    set_val(9, ELOCOJR1);
    set_val(10, ELOCOJR15);
    wait(40);
    ELOCOJR1 = 0;
    ELOCOJR15 = 0;
}
 
combo c_ELOCOJR32 {
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(500);
    set_rumble(RUMBLE_B, 100);
    wait(250);
    reset_rumble();
    wait(10000);
}
 
combo c_ELOCOJR33 {
    set_val(PS4_SQUARE, 100);
    wait(140);
    set_val(PS4_SQUARE, 0);
    wait(100);
}
 
combo c_ELOCOJR34 {
    set_val(9, ELOCOJR2);
    set_val(10, ELOCOJR25);
    wait(200);
    set_val(9, ELOCOJR2);
    set_val(10, ELOCOJR25);
    wait(40);
    ELOCOJR2 = 0;
    ELOCOJR25 = 0;
}
 
combo c_ELOCOJR35 {
    set_val(5, 0);
    wait(50);
    set_val(5, 100);
    wait(50);
}
 
combo c_ELOCOJR36 {
    set_val(9,  -20);
    set_val(10,  -100);
    wait(150);
    ELOCOJR19 = TRUE;
}
 
combo c_ELOCOJR37 {
    set_val(9,  -30);
    set_val(10,  -100);
    wait(250);
    ELOCOJR20 = TRUE;
}
 
 
function f_ELOCOJR15(f_bln) {
    if (f_bln) ELOCOJR15 = 1;
    else  ELOCOJR15 = 2;
}
 
function f_a_f(p, m) {
    if (abs(get_val(p)) < ELOCOJR9)
        return m;
    return get_val(p);
}
 
function f_colourled(Colour) {
    ELOCOJR18 = (Colour * 4)  -3;
    set_led(LED_1, dbyte(ELOCOJR18));
    set_led(LED_2, dbyte(ELOCOJR18+ 1));
    set_led(LED_3, dbyte(ELOCOJR18+ 2));
    set_led(LED_4, dbyte(ELOCOJR18+ 3));
}
 
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Dimakra666 » Sat Dec 07, 2019 8:26 am

Is it possible anyonecan help me convert this s ript to titan 2 please?
Attachments
the_apex_legends_script_-_master_edition_-_the_#1_script_for_apex_legends_.gpc
(24.16 KiB) Downloaded 266 times
User avatar
Dimakra666
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 231
Joined: Fri Feb 17, 2017 3:34 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Mad » Sat Dec 07, 2019 8:30 am

Use Buffy's converter: viewtopic.php?f=3&t=12027
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Dimakra666 » Sat Dec 07, 2019 9:42 am

well ive tried that and no luck ,it gives me 2 warnings ,please help ,thnx in advance btw its a cm script
User avatar
Dimakra666
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 231
Joined: Fri Feb 17, 2017 3:34 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Mad » Sat Dec 07, 2019 9:59 am

Dimakra666 wrote:well ive tried that and no luck ,it gives me 2 warnings ,please help ,thnx in advance btw its a cm script


It compiles fine, you can ignore the warnings.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Dimakra666 » Sat Dec 07, 2019 10:50 am

Mad wrote:
Dimakra666 wrote:well ive tried that and no luck ,it gives me 2 warnings ,please help ,thnx in advance btw its a cm script


It compiles fine, you can ignore the warnings.

i dont know what im doing wrong . its not compiling for me
GPC: GPC Compile ABORTED with 2 warning(s) and 1 error(s).

Iv tried the converter but no luck any pros here can convert it and repost the converted version here or by pm.
I will apriciate the help thnx in advance.
Attachments
the_apex_legends_script_-_master_edition_-_the_#1_script_for_apex_legends_.gpc
(24.16 KiB) Downloaded 242 times
User avatar
Dimakra666
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 231
Joined: Fri Feb 17, 2017 3:34 am

Re: T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/201

Postby Buffy » Sat Dec 07, 2019 4:13 pm

Try re-downloading the converter, it converted perfectly for me with either VM or non-VM modes.
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Re: T1/CM to Titan Two Script Converter [v0.27r1 - 12/22/201

Postby Sindonesia » Wed Dec 25, 2019 1:56 am

Can anyone convert this to T2

Code: Select all
#include <titanone.gph> 
#define wait(a) wait(a);
//LAYOUT
 
    define FIRE_BTN = XB1_RT;
    define ADS_BTN = XB1_LT;
    define TACTICAL = XB1_LB;
    define LETHAL = XB1_RB;
    define RX = XB1_RX;
    define RY = XB1_RY;
    define LX = XB1_LX;
    define LY = XB1_LY;
    define CROUCH_BTN = XB1_RS;
    define SPRINT_BTN = XB1_LS;
    define RELOAD_BTN = XB1_X
    define JUMP_BTN = XB1_A;
    define MELEE_BTN = XB1_B;
    define SWAP_BTN = XB1_Y;
    define UP = XB1_UP;
    define LEFT = XB1_LEFT;
    define RIGHT = XB1_RIGHT;
    define DOWN = XB1_DOWN;
 
//SETTINGS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 

//Aim Assist:
 
    int AimAssist = TRUE;
    int value   = 33;
    int value2  = -33;
    int delay   = 11;
 
//Rapid Fire:
 
    int RapidFire = TRUE;
    define SPEED = 25;
 
//Dropshot:
 
    int Dropshot = FALSE;
 
//Jumpshot:
 
    int Jumpshot = FALSE
 
//Hold Breath (Snipers):
 
    int HoldBreath = TRUE;
 
//AutoRun:
 
    int AutoRun = TRUE;
 
 
//MAIN\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

main {
 
      if (AimAssist)
        if(get_val(ADS_BTN)) {
            combo_run(LT_C);
        }
 
        if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
            combo_stop(LT_C);
            combo_run(RT_C);
        }
 
      if (RapidFire)
        if (get_val(XB1_RT)) {
        combo_run(RAPID_FIRE);
        }
 
      if (Dropshot)
        if(get_val(XB1_RT) > 99){
             combo_run(DROPSHOT);
        }
 
      if (Jumpshot) 
        if(get_val(XB1_RT) > 99){
             combo_run(JUMPSHOT);
        }
 
      if (HoldBreath)
        if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100)
        }
 
      if(AutoRun)
        if(get_val(LY) <= -20){set_val(XB1_LS, 100);
        }
 
 
        if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
            combo_stop(LT_C);
            combo_stop(RT_C);
        }
}
 
//COMBOS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

   combo LT_C {
       set_val(RY, -25);         
       wait(delay)
       set_val(RX, 25);
       set_val(RY, 15);
       wait(delay)
       set_val(RY, 15);
       wait(delay)                 
       set_val(RX, -25);
       set_val(RY, 15);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, -35);             
       wait(delay)
       set_val(RX, 35);
       set_val(RY, 25);
       wait(delay)
       set_val(RY, 25);
       wait(delay)                 
       set_val(RX, -35);
       set_val(RY, 25);
       wait(delay)
    }
 
    combo RAPID_FIRE {
       set_val(XB1_RT,100);
       wait(SPEED);
       set_val(XB1_RT,0);
       wait(SPEED);
    }
 
    combo DROPSHOT {
   set_val(XB1_RS, 100);
   wait(1200);
    }
 
    combo JUMPSHOT {
   set_val(XB1_A, 100);
   wait(100);
   wait(300);   
    }
User avatar
Sindonesia
Master Sergeant
Master Sergeant
 
Posts: 38
Joined: Sat Oct 04, 2014 8:07 pm

Re: T1/CM to Titan Two Script Converter [v0.27r1 - 12/22/201

Postby Mad » Wed Dec 25, 2019 2:24 am

Sindonesia wrote:Can anyone convert this to T2

Code: Select all
#include <titanone.gph> 
#define wait(a) wait(a);
//LAYOUT
 
    define FIRE_BTN = XB1_RT;
    define ADS_BTN = XB1_LT;
    define TACTICAL = XB1_LB;
    define LETHAL = XB1_RB;
    define RX = XB1_RX;
    define RY = XB1_RY;
    define LX = XB1_LX;
    define LY = XB1_LY;
    define CROUCH_BTN = XB1_RS;
    define SPRINT_BTN = XB1_LS;
    define RELOAD_BTN = XB1_X
    define JUMP_BTN = XB1_A;
    define MELEE_BTN = XB1_B;
    define SWAP_BTN = XB1_Y;
    define UP = XB1_UP;
    define LEFT = XB1_LEFT;
    define RIGHT = XB1_RIGHT;
    define DOWN = XB1_DOWN;
 
//SETTINGS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 

//Aim Assist:
 
    int AimAssist = TRUE;
    int value   = 33;
    int value2  = -33;
    int delay   = 11;
 
//Rapid Fire:
 
    int RapidFire = TRUE;
    define SPEED = 25;
 
//Dropshot:
 
    int Dropshot = FALSE;
 
//Jumpshot:
 
    int Jumpshot = FALSE;
 
//Hold Breath (Snipers):
 
    int HoldBreath = TRUE;
 
//AutoRun:
 
    int AutoRun = TRUE;
 
 
//MAIN\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

main {
 
      if (AimAssist)
        if(get_val(ADS_BTN)) {
            combo_run(LT_C);
        }
 
        if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
            combo_stop(LT_C);
            combo_run(RT_C);
        }
 
      if (RapidFire)
        if (get_val(XB1_RT)) {
        combo_run(RAPID_FIRE);
        }
 
      if (Dropshot)
        if(get_val(XB1_RT) > 99){
             combo_run(DROPSHOT);
        }
 
      if (Jumpshot) 
        if(get_val(XB1_RT) > 99){
             combo_run(JUMPSHOT);
        }
 
      if (HoldBreath)
        if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100);
        }
 
      if(AutoRun)
        if(get_val(LY) <= -20){set_val(XB1_LS, 100);
        }
 
 
        if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
            combo_stop(LT_C);
            combo_stop(RT_C);
        }
}
 
//COMBOS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

   combo LT_C {
       set_val(RY, -25);         
       wait(delay)
       set_val(RX, 25);
       set_val(RY, 15);
       wait(delay)
       set_val(RY, 15);
       wait(delay)                 
       set_val(RX, -25);
       set_val(RY, 15);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, -35);             
       wait(delay)
       set_val(RX, 35);
       set_val(RY, 25);
       wait(delay)
       set_val(RY, 25);
       wait(delay)                 
       set_val(RX, -35);
       set_val(RY, 25);
       wait(delay)
    }
 
    combo RAPID_FIRE {
       set_val(XB1_RT,100);
       wait(SPEED);
       set_val(XB1_RT,0);
       wait(SPEED);
    }
 
    combo DROPSHOT {
   set_val(XB1_RS, 100);
   wait(1200);
    }
 
    combo JUMPSHOT {
   set_val(XB1_A, 100);
   wait(100);
   wait(300);   
    }
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: T1/CM to Titan Two Script Converter [v0.27r3 - 01/26/202

Postby TrayDay » Wed Jan 29, 2020 8:20 am

Code: Select all
    //##################################################################################################
 
 
    //Button Layout
    define PS = 0;
    define SHARE = 1;
    define OPTIONS = 2;
    define R1 = 3;
    define R2 = 4;
    define R3 = 5;
    define L1 = 6;
    define L2 = 7;
    define L3 = 8;
    define RX = 9;
    define RY = 10;
    define LX = 11;
    define LY = 12;
    define UP = 13;
    define DOWN = 14;
    define LEFT = 15;
    define RIGHT = 16;
    define TRIANGLE = 17;
    define CIRCLE = 18;
    define CROSS = 19;
    define SQUARE = 20
    define TOUCHPAD = 27;
 
    define Blue = 1;
    define Red = 2;
    define Green  = 3;
    define Pink  = 4;
    define SkyBlue = 5;
    define Yellow  = 6;
    define White = 7;
    //----------------------------------------------------------------------------------------------
    //RF_SWITCH and AR_SWITCH toggle buttons // Change here with above numbers if needed
    //----------------------------------------------------------------------------------------------
    define RF_switch  = 17;   //RAPID FIRE XB1_Y - 17 17 UP 13 // CEMU_EXTRA1 = 21   
    define save       =  2;   // XB1_MENU - 2 2 // CEMU_EXTRA3 = 23        SAVE BUTTON
    define ON = TRUE;
    define OFF = FALSE;
    //----------------------------------------------------------------------------------------------
 
    //---------------------------------------------------------------------------------------------
    //VARIABLES     - YOU CAN MAKE ADJUSTMENTS HERE IF NEEDED !!!!!
    //---------------------------------------------------------------------------------------------
    int AS = ON;         //SET OFF IF YOU DONT WANT SHAKY AIM ASSIST OR FEEL WEIRD BEHAVIOUR
    int Flipped = OFF;     //CHANGE OFF TO ON IF YOU PLAY WITH FLIPPED TRIGGERS
    int RUN = OFF;         //CHANGE ON TO OFF IF YOU DON'T WANT AUTO RUN
    int SS = OFF;         //CHANGE OFF TO ON IF YOU WANT SUPER SPRINT - AUTO RUN MUST BE ON
    int HT = ON;         //CHANGE ON TO OFF IF YOU DON'T WANT HAIR TRIGGER   
    int HB = OFF;         //CHANGE ON TO OFF IF YOU DON'T WANT HOLD BREATH   
    int rapid_onoff   = TRUE; // IF TRUE RAPIDFIRE IS ON BY DEFAULT - IF FALSE, OFF BY DEFAULT
    int RATE_OF_FIRE  = 13;       // RANGE: 1 TO 25 RPS (ROUND/S)
    int Col_ind;
    int fire_button;
    int scope_button;
    int hold_time;
    int rest_time;
    int SP = ON;
    int Remove_Block;
    //-------------------------------------------------------------------------------------------------
    //  AIM ABUSE // INCREASE AP & AM FOR MORE ASSIST BUT IT CAN CAUSE SHAKE LIKE JUMPY CROSSHAIR
    //                 MORE THAN 23 NOT RECOMMENDED. int AS = OFF TO DISABLE ABOVE   
    //-------------------------------------------------------------------------------------------------
    int AP = 20;    // ARELEASE MUST BE 1 HIGHER THAN AP & AM.
    int AM = -20;    // DECREASE AP & AM IF YOU FEEL SHAKE OR WEIRD MOVEMENT AND DON'T LIKE IT.
    int Delay = 20; // THIS WILL NOT AFFECT SWEET EVILS AIMBOT.
    int ARelease = 21;     
 
        //#################################################################################################
        //
        // State machine variable
        //
            int Current_State          = 0;
            int Aim_Abuse_State      = 2;
 
 
            define Get_Last_Value     = 0;
            define Get_Current_Value = 1;
            define Aim_Correction      = 2;
            define Aim_Boost          = 3;
 
            define Aim_Perfection_Limit = 60;
 
        //
        //#################################################################################################
        //######################################### Script variable #######################################
        //#################################################################################################
        //
        // Dont't change!
        //
            int X_Last_Value     = 0;
            int Y_Last_Value     = 0;
            int X_Current_Value  = 0;
            int Y_Current_Value  = 0;
 
            int mvt = 0;
            int Aim_Boost_Val = 0;
            int Aim_Correction_Val = 0;
        //
        //#################################################################################################
        //####################################### Batts anti-recoil #######################################
        //#################################################################################################
        //
        //--Anti-Recoil Progression Adjustable Transition Point
        //
        //#################################################################################################
        //
        //--Anti-Recoil values go from Starting_Anti_Recoil_Value to Mid_Point_Anti_Recoil_Value over Progression_Point_Percent of Total_Anti_Recoil_Time
        //--Anti-Recoil values then go from Mid_Point_Anti_Recoil_Value to Ending_Anti_Recoil_Value for the remaining Total_Anti_Recoil_Time percent
        //--Ending_Anti_Recoil_Value is then applied until trigger release.
        //
        //--Zero's out controller input of less than 10
        //
        //#################################################################################################
        //
        //--Adjust These Values
            define    Starting_Anti_Recoil_Value  = 20;    //--postive values only
            define    Mid_Point_Anti_Recoil_Value = 28;
            define    Ending_Anti_Recoil_Value    = 10;
            define    Total_Anti_Recoil_Time      = 2500//-- 10ms increments (min - 2000)
            define    Progression_Point_Percent   = 30;    //--percentage of total time to transition to mid to end values 10% increments
        //
        //#################################################################################################
        //
        //--Do not alter sequence of the variables below.  Script uses in-direct reference to access the values (ex... inc[0] = inc , inc[1] = inc_2)
        //
        //#################################################################################################
        //
            int p,inc,inc_2,pr,pr_2,vm,vm_2;
            int loops,loops_2,vm_count,p_count,v,ar_y;
        //
        //#################################################################################################
        init {
            {fire_button  = 4; scope_button = 7;}
            RATE_OF_FIRE  = get_pvar(SPVAR_10, 25, 13);
             }   
        init {
            loops = (Total_Anti_Recoil_Time / 100) * (Progression_Point_Percent / 10);
            loops_2 = (Total_Anti_Recoil_Time / 10) - loops;
            if(Starting_Anti_Recoil_Value < Mid_Point_Anti_Recoil_Value)
                inc = 1;
            else
                inc = -1;
            if(Mid_Point_Anti_Recoil_Value < Ending_Anti_Recoil_Value)
                inc_2 = 1;
            else
                inc_2 = -1;
            pr = abs(Starting_Anti_Recoil_Value - Mid_Point_Anti_Recoil_Value);
            pr_2 = abs(Mid_Point_Anti_Recoil_Value - Ending_Anti_Recoil_Value);
            vm = loops / pr;
            vm_2 = loops_2 / pr_2;
         }
 
        //
        //#################################################################################################
        //############################################# MAIN ##############################################
        //#################################################################################################
        //
        main
        {
         //update main every 8ms --> only for PS4
           // vm_tctrl(-2);
 
            //--LT pulled
 
                if(get_val(PS4_L2))
                {       
                    if (Current_State == Get_Last_Value)
                    {
                        X_Last_Value = get_lval(PS4_RX);
                        Y_Last_Value = get_lval(PS4_RY);
 
                        Current_State = Get_Current_Value;
 
                    }
                    else if (Current_State == Get_Current_Value)
                    {
                        X_Current_Value = get_val(PS4_RX);
                        Y_Current_Value = get_val(PS4_RY);
 
                        if(Aim_Abuse_State == Aim_Correction)
                        {   
                            Current_State = Aim_Boost;
                        }
                        else
                        {
                            Current_State = Aim_Correction;
                        }   
                    }
                    if (Current_State == Aim_Boost)
                    {
                        //Applying BOOST
                        //Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS )
                        Aim_Perfection(X_Last_Value, X_Current_Value, 1, 0, 1, 0 );
                        Aim_Perfection(Y_Last_Value, Y_Current_Value, 1, 0, 0, 1 );
 
                        Current_State = Get_Last_Value;
                        Aim_Abuse_State = Aim_Boost; 
                    }
                    else if (Current_State == Aim_Correction)
                    {
                        //Applying CORRECTION
                        //Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS )
                        Aim_Perfection(X_Last_Value, X_Current_Value, 0, 1, 1, 0 );
                        Aim_Perfection(Y_Last_Value, Y_Current_Value, 0, 1, 0, 1 );
 
                        Current_State = Get_Last_Value;
                        Aim_Abuse_State = Aim_Correction;
                    }
                }
                else //--LT not pulled
                {
                    Current_State = Get_Last_Value;
                    Aim_Abuse_State = Aim_Correction;
                }
 
        //
        //#################################################################################################
        //####################################### Batts anti-recoil #######################################
        //#################################################################################################
        //
                //--reset counters/pointers
                if(!get_lval(PS4_R2))
                {
                    p = 0;
                    vm_count = 0;
                    p_count = 0;
                    ar_y = Starting_Anti_Recoil_Value;
                }
 
                    //--anti recoil
                if((get_val(PS4_R2) && !get_val(PS4_L2)) ||
                ((get_val(PS4_R2) && get_val(PS4_L2) && (Current_State == Get_Current_Value || Current_State == Get_Last_Value))))
                {
                    p = p_cycle();
                    if(p != -1)
                        ar_y = p_val();
                    else
                        ar_y = Ending_Anti_Recoil_Value;
                    set_val(PS4_RY,y_val());
                }
 
 
    if(get_val(7) && event_press(RF_switch))  { // CHANGE 7 INTO DESIRED BUTTON FOR TOGGLE DEFINED ABOVE
    combo_run (vibrate);
    rapid_onoff=!rapid_onoff;
    }
    if((rapid_onoff)) colourled(Green);         
    if((!rapid_onoff)) colourled(Red);
 
    if(rapid_onoff) { if(get_val(4)) {
    combo_run (RAPID_FIRE);}}     
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
 
    if(get_val(19)) { 
    if(event_press(UP)) {
    RATE_OF_FIRE = RATE_OF_FIRE+ 1;
    }
    if(event_press(DOWN)) {
    RATE_OF_FIRE = RATE_OF_FIRE- 1;
    }
    set_val(UP,0); set_val(DOWN,0);
    }       
    if(get_val(scope_button) && event_press(save)){        // SAVE VALUES TO DEVICE MONITOR
    combo_run(vibrate);
    set_pvar(SPVAR_1, RATE_OF_FIRE);
    set_val(save, 0);
    }
 
    if(AS)
    if(get_val(L2)) combo_run(AS);
 
    if(Flipped) {
    swap(R1,R2);
    swap(L1,L2);}
 
    if(HT)
    deadzone(L2,R2,100,100);   
    if(HB)
    if(get_val(L2)) set_val(L3,100);
    if(HB)
    if(get_val(LY) <-90 && get_val(L2) && get_ptime(L2) > 200) combo_stop(CH);
    if(HB)
    if(event_press(L2)) combo_run(CH);
    if(HB)
    if(get_val(L2) && get_lval(L3)) set_val(L3,0);   
    if(RUN)
    if(get_val(LY)<-90 && !get_val(L2)) set_val(L3,100)
    if(SS == ON && get_val(L2)) combo_stop(SS);   
    if(SS)
    if(SP && get_val(LY)<-90) combo_run(SS);
    if(get_val(LY)>-90) SP = ON;
        if(get_val(L2)) {
        if(event_press(UP)) {
        Remove_Block=!Remove_Block;}
        if(event_press(RIGHT)) {
        Remove_Block=!Remove_Block;}
        if(event_press(DOWN)) {
        Remove_Block=!Remove_Block;}
        if(event_press(LEFT)) {
        Remove_Block=!Remove_Block;}
        if(event_press(R3)) {
        Remove_Block=!Remove_Block;}
        if(event_press(TRIANGLE)) {
        Remove_Block=!Remove_Block;}
        if(event_press(R1)) {
        Remove_Block=!Remove_Block;}
        if(event_press(L1)) {
        Remove_Block=!Remove_Block;}
        set_val(UP,0);set_val(RIGHT,0);set_val(DOWN,0);set_val(LEFT,0);set_val(R3,0);set_val(TRIANGLE,0);set_val(R1,0);set_val(L1,0);}
        if(get_val(OPTIONS)) {
        if(event_press(SHARE)) {
        Remove_Block=!Remove_Block;}
        set_val(SHARE,0);}
    }
        //
        //#################################################################################################
        //############################################# FUNC ##############################################
        //#################################################################################################
        //           
 
        function
        Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS)
            {
               mvt = abs(Last_Value) + abs(Current_Value);
               Aim_Boost_Val = ( mvt + 1 )/2; //Rounding integer division (instead of truncating)
               Aim_Correction_Val = Aim_Boost_Val + 4;
 
               if(Aim_Boost_Val >= 10)
               {
                   Aim_Boost_Val = 10;
                   Aim_Correction_Val = 14;
               }
               else if(Aim_Boost_Val == 0)
               {
                    Aim_Boost_Val = 2
                    Aim_Correction_Val = 4;
               }
 
 
               if(mvt < Aim_Perfection_Limit)
               {
                    //--moving right
                    if(Last_Value < Current_Value)
                    {           
                        if (Boost)
                        {
                            if (X_AXIS)
                                set_val(PS4_RX, (Current_Value + Aim_Boost_Val));
 
                            if (Y_AXIS)
                                set_val(PS4_RY, (Current_Value + Aim_Boost_Val));
                        }
                        else if(Correction)
                        {
                            if (X_AXIS)
                                set_val(PS4_RX, (Current_Value - Aim_Correction_Val));
 
                            if (Y_AXIS)
                                set_val(PS4_RY, (Current_Value - Aim_Correction_Val));           
                        }
                    }
                    else //--moving left
                    {
                        if (Boost)
                        {
                            if (X_AXIS)
                                set_val(PS4_RX, (Current_Value - Aim_Boost_Val));
 
                            if (Y_AXIS)
                                set_val(PS4_RY, (Current_Value - Aim_Boost_Val));
                        }
                        else if(Correction)
                        {
                            if (X_AXIS)
                                set_val(PS4_RX, (Current_Value + Aim_Correction_Val));
 
                            if (Y_AXIS)
                                set_val(PS4_RY, (Current_Value + Aim_Correction_Val));           
                        }
                    }
                }
            }
 
        //
        //#################################################################################################
        //####################################### Batts anti-recoil #######################################
        //#################################################################################################
        //   
                //--return progression index
            function
            p_cycle()
            {
                vm_count++;
                if (vm_count > loops[p])
                {
                    if(!p)
                    {
                        vm_count = 0;
                        return 1;
                    }
                    else
                    {
                        vm_count = loops_2;
                        return -1;
                    }
                 }
                 return p;
            }
            //--return current ar val
            function
            p_val()
            {
                p_count++;
                if(p_count == vm[p])
                {
                    p_count = 0;
                    ar_y += inc[p];
                }
                return ar_y;
            }
            //--return ar val + input or input if above release
            function y_val()
            {
                v = get_val(PS4_RY);
                if(abs(v) < 10)
                    v = 0;
                if(abs(v) > ar_y + 5)
                    return v;
                return v + ar_y;           
            }
 
    combo CH {
        set_val(L3,0);
        wait(60);
        set_val(L3,100);
        wait(110);
        set_val(L3,0);
        wait(110);}
 
        combo SS {
        wait(20);
        set_val(L3,100);
        wait(40);
        set_val(L3,0);
        wait(40);
        SP = OFF;}
 
    combo AS {
    set_val(RY,a_f(RY,AP));
    wait(Delay)
    set_val(RX,a_f(RX,AP));
    wait(Delay)
    set_val(RY,a_f(RY,AM));
    wait(Delay)
    set_val(RX,a_f(RX,AM));
    wait(Delay)
    }
 
    function a_f(p,m) {
    if(abs(get_val(p)) < ARelease)
    return m;
    return get_val(p);
    }
    combo vibrate {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
    }
    combo RAPID_FIRE {
    set_val(fire_button, 100);
    wait(hold_time);
    set_val(fire_button, 0);
    wait(rest_time);
    set_val(fire_button, 0);
    }
 
 
    // COLOR LED function
    //--------------------------------------------------------------
    function colourled(Colour) {
    Col_ind=(Colour*4)- 3;
    set_led(LED_1,dbyte(Col_ind  ));
    set_led(LED_2,dbyte(Col_ind+ 1));
    set_led(LED_3,dbyte(Col_ind+ 2));
    set_led(LED_4,dbyte(Col_ind+ 3));
    }
        //
        //#################################################################################################
        //############################################# END ###############################################
        //#################################################################################################


I've tried converting this script. Yes, used the converter as well, and just can't get it to clear the errors of "invalid symbol redefinition" for "SS" and "AS". Identifiers?
User avatar
TrayDay
First Sergeant
First Sergeant
 
Posts: 60
Joined: Wed Nov 02, 2016 11:12 pm

PreviousNext

Return to Tutorials and FAQs

Who is online

Users browsing this forum: No registered users and 54 guests