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.26r5 - 11/05/201

Postby JustyChaos » Tue Nov 05, 2019 12:06 pm

That's it! Thank you so much! I was doing something completely different. Compiled straight away with no errors. I'm beyond grateful for your help.
User avatar
JustyChaos
Master Sergeant
Master Sergeant
 
Posts: 37
Joined: Wed Nov 08, 2017 4:29 pm

Convert simple script to Titan Two

Postby CarlosJr » Tue Nov 05, 2019 4:36 pm

hello.

here is the script I want and thanks
Code: Select all
//Bo4 Script
 
//--Controls
    define VIEW  =  1;
    define MENU  =  2;
    define RB    =  3;
    define RT    =  4;
    define RS    =  5;
    define LB    =  6;
    define LT    =  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 Y     = 17;
    define B     = 18;
    define A     = 19;
    define X     = 20;
 
//--Aim Assist
    //--constants
    define AA_P      =  26;       //--ads values
    define AA_N      = -26;
    define FA_P      =  34;       //--firing values
    define FA_N      = -34;
    define AA_DELAY  =  20;       //--delay between values
    //--variables
    int release      = AA_P + 1//--aim assist release
    int aa_p,aa_n;
 
//--Anti Recoil
    define AR_Y      =  20;       //--anti recoil value
 
//--Sensitivity
    //--constants
    define SENS_X = 80;       //--initial RX sentitivity
    define SENS_Y = 80;       //--initial RY sensitivity
    define SENS_STRAFE = 200; //--LX sensitivity when firing for increased strafing movement
    define X_THRESHOLD = 70//--stick input point where RX sens increases
    define Y_THRESHOLD = 70//--stick input point where RY sens increases
    define X_RESET = 30;      //--stick input point where RX sens will reset back to initial value
    define Y_RESET = 30;      //--stick input point where RY sens will reset back to initial value
    define MAX_SENS = 150;    //--maximum sensitivity value
    define SENS_RATE = 8;     //--rate sensitivity increased (8 = 80ms delay between increase)
    //--variables
    int sens_x = SENS_X;
    int sens_y = SENS_Y;
    int sens_xcnt,sens_ycnt;
 
//--Rapid Fire
    //--constants
    define RF_ROF =  40;       //--rounds per sec
    define RF_DEF = 80;
    //--variables
    int rf_hold = RF_DEF;
    int rapid_fire = FALSE;
    int rf_wait;
 
 
    //--boolean
    int reloading;
    int fired;
 
    int auto_run = FALSE;
 
    int rumb_count,dbl_click;
main {
 
 
    set_val(30,sens_x);
    set_val(31,sens_y);
 
    //--rapid fire toggle
    if(dbl_tap(LT,DOWN)) {
        rapid_fire = !rapid_fire;
        set_rumb(rapid_fire);
    }
 
    //--auto_run toggle
    if(dbl_tap(LT,UP)) {
        auto_run = !auto_run;
        set_rumb(auto_run);
    }
 
    //--Auto Run     
    if(event_release(RT)) combo_run(FIRED);
 
    if(event_release(LEFT) && fired)
        combo_run(RELOADING);
 
 
    //--auto run
    if(auto_run &&!get_val(LT) && !get_val(RT) && !reloading && get_val(LY) < -90)combo_run(SPRINT)
 
    //--general sensitivity
    sensitivity(RX,NOT_USE,100);
    sensitivity(RY,NOT_USE,100);
    sensitivity(LX,NOT_USE,100);
 
    //--deadzone ~ zero out cotroller values 10 or less
    combo_run(DZ);
 
    //--ads only ~ run sensitivity setting, set ads aim assit values, run aim assist
    if(get_val(LT) && !get_val(RT)) {
        combo_run(SENS_SET);
        aa_p = AA_P; aa_n = AA_N;
        release = aa_p + 1;
        combo_run(AA_XY);
    }
 
    //--firing ~ run sensitivity setting, set firing aim assit values, run aim assist
    if(get_val(RT)) {
        if(rapid_fire) combo_run(RAPID_FIRE);
        combo_run(SENS_SET);
        aa_p = FA_P; aa_n = FA_N;
        release = aa_p + 1;
        combo_run(AA_XY)
    }
 
    //--reset sensitivity values
    if((event_release(LT) && !get_val(RT)) || (event_release(RT) && !get_val(LT))) {
        sens_x = SENS_X; sens_y = SENS_Y;
        combo_stop(AA_XY);
    }
 
    if(rumb_count) combo_run(NOTIFY);
}
combo SENS_SET {
    //--increase rx sens
    if(abs(get_lval(RX)) >= X_THRESHOLD) {
        sens_xcnt += 1;
        if(sens_xcnt >= SENS_RATE && sens_x < MAX_SENS) {
            sens_x += 1; sens_xcnt = 0;
        } else if(sens_x >= MAX_SENS) sens_xcnt = 0
    }
    //--reset rx sens
    else if(abs(get_val(RX)) < X_RESET) {
        sens_xcnt = 0; sens_x = SENS_X;               
    }
    //--increase ry sens
    if(abs(get_val(RY)) >= Y_THRESHOLD) {
        sens_ycnt += 1;
        if(sens_ycnt >= SENS_RATE && sens_y < MAX_SENS) {
            sens_y += 1; sens_ycnt = 1;
        } else if(sens_y >= MAX_SENS) sens_ycnt = 0;
    }
    //--decrease rx sens
    else if(abs(get_val(RY)) < X_RESET) {
        sens_y = SENS_X ; sens_ycnt = 0;
    }
    //--set r x/y sensitivity
    sensitivity(RX,NOT_USE,sens_x);
    sensitivity(RY,NOT_USE,sens_y);
    //--increased lx sens for strafing
    sensitivity(LX,NOT_USE,SENS_STRAFE);
}
//--aim assist & anti recoil
combo AA_XY {
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_p));
        else set_val(RY,xy_val(RY,AR_Y))
    wait(AA_DELAY);
    set_val(RX,xy_val(RX,aa_p));
    set_val(LX,xy_val(LX,aa_p));
    wait(AA_DELAY);
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_n));
        else set_val(RY,xy_val(RY,AR_Y));
    wait(AA_DELAY)
    set_val(RX,xy_val(RX,aa_n));
    set_val(LX,xy_val(LX,aa_n));
    wait(AA_DELAY);
}
//--controller deadzone
combo DZ {
    //--zero out input 10 or less
    if(abs(get_val(LX)) <= 10) set_val(LX,0);
     if(abs(get_val(LY)) <= 10) set_val(LY,0);
    if(abs(get_val(RX)) <= 10) set_val(RX,0);
    if(abs(get_val(RY)) <= 10) set_val(RY,0);
}
 
 
combo RAPID_FIRE {
   rf_time();
   set_val(RT,100);
   wait(rf_hold);
   set_val(RT,0);
   wait(rf_wait);
}
 
//--timer
combo FIRED {
    fired = TRUE;
    wait(3000);
    fired = FALSE;
}
//--timer
combo RELOADING { 
    reloading = FALSE;
    wait(2000);
    reloading = FALSE;
 
}
combo SPRINT {
    set_val(8,100);
    wait(40);
    wait(100);
}
//--Timer for Double TaP
combo TAP { 
    dbl_click = TRUE;
    wait(300);
    dbl_click = FALSE;
}
combo NOTIFY {
    set_rumble(RUMBLE_A,100);
    wait(250);
    reset_rumble();
    wait(150);
    rumb_count --;
}
//--return aim assist value or controller value if above release
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
//--calc wait & hold times for rapid fire
function rf_time() {
    rf_wait = (1000 / RF_ROF) - rf_hold
    if(rf_wait < rf_hold ) {
        rf_wait = (1000 / RF_ROF) / 2;
            if(rf_wait < 30) rf_wait = 30;
             rf_hold = rf_wait;
    }
    else rf_hold = RF_DEF;
}
//--rumble
function set_rumb (rumb){
    rumb_count = rumb ;
    if(rumb <= 0 ) rumb_count = rumb + 2;
}
function dbl_tap(f_btn1,f_btn2) {
    if(get_val(f_btn1) && event_press(f_btn2) && !dbl_click) combo_run(TAP);
 
    if(get_val(f_btn1) && event_press(f_btn2) &&  dbl_click) return TRUE;
    return FALSE;
}
User avatar
CarlosJr
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Nov 05, 2019 4:28 pm

Re: Convert simple script to Titan Two

Postby Mad » Tue Nov 05, 2019 6:08 pm

Check out Buffy's converter: viewtopic.php?f=26&t=12027

Code: Select all
#include <titanone.gph>
 
//Bo4 Script
 
//--Controls
    define VIEW  =  1;
    define MENU  =  2;
    define RB    =  3;
    define RT    =  4;
    define RS    =  5;
    define LB    =  6;
    define LT    =  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 Y     = 17;
    define B     = 18;
    define A     = 19;
    define X     = 20;
 
//--Aim Assist
    //--constants
    define AA_P      =  26;       //--ads values
    define AA_N      = -26;
    define FA_P      =  34;       //--firing values
    define FA_N      = -34;
    define AA_DELAY  =  20;       //--delay between values
    //--variables
    int release      = AA_P + 1//--aim assist release
    int aa_p,aa_n;
 
//--Anti Recoil
    define AR_Y      =  20;       //--anti recoil value
 
//--Sensitivity
    //--constants
    define SENS_X = 80;       //--initial RX sentitivity
    define SENS_Y = 80;       //--initial RY sensitivity
    define SENS_STRAFE = 200; //--LX sensitivity when firing for increased strafing movement
    define X_THRESHOLD = 70//--stick input point where RX sens increases
    define Y_THRESHOLD = 70//--stick input point where RY sens increases
    define X_RESET = 30;      //--stick input point where RX sens will reset back to initial value
    define Y_RESET = 30;      //--stick input point where RY sens will reset back to initial value
    define MAX_SENS = 150;    //--maximum sensitivity value
    define SENS_RATE = 8;     //--rate sensitivity increased (8 = 80ms delay between increase)
    //--variables
    int sens_x = SENS_X;
    int sens_y = SENS_Y;
    int sens_xcnt,sens_ycnt;
 
//--Rapid Fire
    //--constants
    define RF_ROF =  40;       //--rounds per sec
    define RF_DEF = 80;
    //--variables
    int rf_hold = RF_DEF;
    int rapid_fire = FALSE;
    int rf_wait;
 
 
    //--boolean
    int reloading;
    int fired;
 
    int auto_run = FALSE;
 
    int rumb_count,dbl_click;
main {
 
 
    set_val(30,sens_x);
    set_val(31,sens_y);
 
    //--rapid fire toggle
    if(dbl_tap(LT,DOWN)) {
        rapid_fire = !rapid_fire;
        set_rumb(rapid_fire);
    }
 
    //--auto_run toggle
    if(dbl_tap(LT,UP)) {
        auto_run = !auto_run;
        set_rumb(auto_run);
    }
 
    //--Auto Run     
    if(event_release(RT)) combo_run(FIRED);
 
    if(event_release(LEFT) && fired)
        combo_run(RELOADING);
 
 
    //--auto run
    if(auto_run &&!get_val(LT) && !get_val(RT) && !reloading && get_val(LY) < -90)combo_run(SPRINT)
 
    //--general sensitivity
    sensitivity(RX,NOT_USE,100);
    sensitivity(RY,NOT_USE,100);
    sensitivity(LX,NOT_USE,100);
 
    //--deadzone ~ zero out cotroller values 10 or less
    combo_run(DZ);
 
    //--ads only ~ run sensitivity setting, set ads aim assit values, run aim assist
    if(get_val(LT) && !get_val(RT)) {
        combo_run(SENS_SET);
        aa_p = AA_P; aa_n = AA_N;
        release = aa_p + 1;
        combo_run(AA_XY);
    }
 
    //--firing ~ run sensitivity setting, set firing aim assit values, run aim assist
    if(get_val(RT)) {
        if(rapid_fire) combo_run(RAPID_FIRE);
        combo_run(SENS_SET);
        aa_p = FA_P; aa_n = FA_N;
        release = aa_p + 1;
        combo_run(AA_XY)
    }
 
    //--reset sensitivity values
    if((event_release(LT) && !get_val(RT)) || (event_release(RT) && !get_val(LT))) {
        sens_x = SENS_X; sens_y = SENS_Y;
        combo_stop(AA_XY);
    }
 
    if(rumb_count) combo_run(NOTIFY);
}
combo SENS_SET {
    //--increase rx sens
    if(abs(get_lval(RX)) >= X_THRESHOLD) {
        sens_xcnt += 1;
        if(sens_xcnt >= SENS_RATE && sens_x < MAX_SENS) {
            sens_x += 1; sens_xcnt = 0;
        } else if(sens_x >= MAX_SENS) sens_xcnt = 0
    }
    //--reset rx sens
    else if(abs(get_val(RX)) < X_RESET) {
        sens_xcnt = 0; sens_x = SENS_X;               
    }
    //--increase ry sens
    if(abs(get_val(RY)) >= Y_THRESHOLD) {
        sens_ycnt += 1;
        if(sens_ycnt >= SENS_RATE && sens_y < MAX_SENS) {
            sens_y += 1; sens_ycnt = 1;
        } else if(sens_y >= MAX_SENS) sens_ycnt = 0;
    }
    //--decrease rx sens
    else if(abs(get_val(RY)) < X_RESET) {
        sens_y = SENS_X ; sens_ycnt = 0;
    }
    //--set r x/y sensitivity
    sensitivity(RX,NOT_USE,sens_x);
    sensitivity(RY,NOT_USE,sens_y);
    //--increased lx sens for strafing
    sensitivity(LX,NOT_USE,SENS_STRAFE);
}
//--aim assist & anti recoil
combo AA_XY {
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_p));
        else set_val(RY,xy_val(RY,AR_Y))
    wait(AA_DELAY);
    set_val(RX,xy_val(RX,aa_p));
    set_val(LX,xy_val(LX,aa_p));
    wait(AA_DELAY);
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_n));
        else set_val(RY,xy_val(RY,AR_Y));
    wait(AA_DELAY)
    set_val(RX,xy_val(RX,aa_n));
    set_val(LX,xy_val(LX,aa_n));
    wait(AA_DELAY);
}
//--controller deadzone
combo DZ {
    //--zero out input 10 or less
    if(abs(get_val(LX)) <= 10) set_val(LX,0);
     if(abs(get_val(LY)) <= 10) set_val(LY,0);
    if(abs(get_val(RX)) <= 10) set_val(RX,0);
    if(abs(get_val(RY)) <= 10) set_val(RY,0);
}
 
 
combo RAPID_FIRE {
   rf_time();
   set_val(RT,100);
   wait(rf_hold);
   set_val(RT,0);
   wait(rf_wait);
}
 
//--timer
combo FIRED {
    fired = TRUE;
    wait(3000);
    fired = FALSE;
}
//--timer
combo RELOADING { 
    reloading = FALSE;
    wait(2000);
    reloading = FALSE;
 
}
combo SPRINT {
    set_val(8,100);
    wait(40);
    wait(100);
}
//--Timer for Double TaP
combo TAP { 
    dbl_click = TRUE;
    wait(300);
    dbl_click = FALSE;
}
combo NOTIFY {
    set_rumble(RUMBLE_A,100);
    wait(250);
    reset_rumble();
    wait(150);
    rumb_count --;
}
//--return aim assist value or controller value if above release
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
//--calc wait & hold times for rapid fire
function rf_time() {
    rf_wait = (1000 / RF_ROF) - rf_hold;
    if(rf_wait < rf_hold ) {
        rf_wait = (1000 / RF_ROF) / 2;
            if(rf_wait < 30) rf_wait = 30;
             rf_hold = rf_wait;
    }
    else rf_hold = RF_DEF;
}
//--rumble
function set_rumb (rumb){
    rumb_count = rumb ;
    if(rumb <= 0 ) rumb_count = rumb + 2;
}
function dbl_tap(f_btn1,f_btn2) {
    if(get_val(f_btn1) && event_press(f_btn2) && !dbl_click) combo_run(TAP);
 
    if(get_val(f_btn1) && event_press(f_btn2) &&  dbl_click) return TRUE;
    return FALSE;
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: Convert simple script to Titan Two

Postby CarlosJr » Tue Nov 05, 2019 11:00 pm

Mad wrote:Check out Buffy's converter: viewtopic.php?f=26&t=12027

Code: Select all
#include <titanone.gph>
 
//Bo4 Script
 
//--Controls
    define VIEW  =  1;
    define MENU  =  2;
    define RB    =  3;
    define RT    =  4;
    define RS    =  5;
    define LB    =  6;
    define LT    =  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 Y     = 17;
    define B     = 18;
    define A     = 19;
    define X     = 20;
 
//--Aim Assist
    //--constants
    define AA_P      =  26;       //--ads values
    define AA_N      = -26;
    define FA_P      =  34;       //--firing values
    define FA_N      = -34;
    define AA_DELAY  =  20;       //--delay between values
    //--variables
    int release      = AA_P + 1//--aim assist release
    int aa_p,aa_n;
 
//--Anti Recoil
    define AR_Y      =  20;       //--anti recoil value
 
//--Sensitivity
    //--constants
    define SENS_X = 80;       //--initial RX sentitivity
    define SENS_Y = 80;       //--initial RY sensitivity
    define SENS_STRAFE = 200; //--LX sensitivity when firing for increased strafing movement
    define X_THRESHOLD = 70//--stick input point where RX sens increases
    define Y_THRESHOLD = 70//--stick input point where RY sens increases
    define X_RESET = 30;      //--stick input point where RX sens will reset back to initial value
    define Y_RESET = 30;      //--stick input point where RY sens will reset back to initial value
    define MAX_SENS = 150;    //--maximum sensitivity value
    define SENS_RATE = 8;     //--rate sensitivity increased (8 = 80ms delay between increase)
    //--variables
    int sens_x = SENS_X;
    int sens_y = SENS_Y;
    int sens_xcnt,sens_ycnt;
 
//--Rapid Fire
    //--constants
    define RF_ROF =  40;       //--rounds per sec
    define RF_DEF = 80;
    //--variables
    int rf_hold = RF_DEF;
    int rapid_fire = FALSE;
    int rf_wait;
 
 
    //--boolean
    int reloading;
    int fired;
 
    int auto_run = FALSE;
 
    int rumb_count,dbl_click;
main {
 
 
    set_val(30,sens_x);
    set_val(31,sens_y);
 
    //--rapid fire toggle
    if(dbl_tap(LT,DOWN)) {
        rapid_fire = !rapid_fire;
        set_rumb(rapid_fire);
    }
 
    //--auto_run toggle
    if(dbl_tap(LT,UP)) {
        auto_run = !auto_run;
        set_rumb(auto_run);
    }
 
    //--Auto Run     
    if(event_release(RT)) combo_run(FIRED);
 
    if(event_release(LEFT) && fired)
        combo_run(RELOADING);
 
 
    //--auto run
    if(auto_run &&!get_val(LT) && !get_val(RT) && !reloading && get_val(LY) < -90)combo_run(SPRINT)
 
    //--general sensitivity
    sensitivity(RX,NOT_USE,100);
    sensitivity(RY,NOT_USE,100);
    sensitivity(LX,NOT_USE,100);
 
    //--deadzone ~ zero out cotroller values 10 or less
    combo_run(DZ);
 
    //--ads only ~ run sensitivity setting, set ads aim assit values, run aim assist
    if(get_val(LT) && !get_val(RT)) {
        combo_run(SENS_SET);
        aa_p = AA_P; aa_n = AA_N;
        release = aa_p + 1;
        combo_run(AA_XY);
    }
 
    //--firing ~ run sensitivity setting, set firing aim assit values, run aim assist
    if(get_val(RT)) {
        if(rapid_fire) combo_run(RAPID_FIRE);
        combo_run(SENS_SET);
        aa_p = FA_P; aa_n = FA_N;
        release = aa_p + 1;
        combo_run(AA_XY)
    }
 
    //--reset sensitivity values
    if((event_release(LT) && !get_val(RT)) || (event_release(RT) && !get_val(LT))) {
        sens_x = SENS_X; sens_y = SENS_Y;
        combo_stop(AA_XY);
    }
 
    if(rumb_count) combo_run(NOTIFY);
}
combo SENS_SET {
    //--increase rx sens
    if(abs(get_lval(RX)) >= X_THRESHOLD) {
        sens_xcnt += 1;
        if(sens_xcnt >= SENS_RATE && sens_x < MAX_SENS) {
            sens_x += 1; sens_xcnt = 0;
        } else if(sens_x >= MAX_SENS) sens_xcnt = 0
    }
    //--reset rx sens
    else if(abs(get_val(RX)) < X_RESET) {
        sens_xcnt = 0; sens_x = SENS_X;               
    }
    //--increase ry sens
    if(abs(get_val(RY)) >= Y_THRESHOLD) {
        sens_ycnt += 1;
        if(sens_ycnt >= SENS_RATE && sens_y < MAX_SENS) {
            sens_y += 1; sens_ycnt = 1;
        } else if(sens_y >= MAX_SENS) sens_ycnt = 0;
    }
    //--decrease rx sens
    else if(abs(get_val(RY)) < X_RESET) {
        sens_y = SENS_X ; sens_ycnt = 0;
    }
    //--set r x/y sensitivity
    sensitivity(RX,NOT_USE,sens_x);
    sensitivity(RY,NOT_USE,sens_y);
    //--increased lx sens for strafing
    sensitivity(LX,NOT_USE,SENS_STRAFE);
}
//--aim assist & anti recoil
combo AA_XY {
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_p));
        else set_val(RY,xy_val(RY,AR_Y))
    wait(AA_DELAY);
    set_val(RX,xy_val(RX,aa_p));
    set_val(LX,xy_val(LX,aa_p));
    wait(AA_DELAY);
    if(!get_val(RT))set_val(RY,xy_val(RY,aa_n));
        else set_val(RY,xy_val(RY,AR_Y));
    wait(AA_DELAY)
    set_val(RX,xy_val(RX,aa_n));
    set_val(LX,xy_val(LX,aa_n));
    wait(AA_DELAY);
}
//--controller deadzone
combo DZ {
    //--zero out input 10 or less
    if(abs(get_val(LX)) <= 10) set_val(LX,0);
     if(abs(get_val(LY)) <= 10) set_val(LY,0);
    if(abs(get_val(RX)) <= 10) set_val(RX,0);
    if(abs(get_val(RY)) <= 10) set_val(RY,0);
}
 
 
combo RAPID_FIRE {
   rf_time();
   set_val(RT,100);
   wait(rf_hold);
   set_val(RT,0);
   wait(rf_wait);
}
 
//--timer
combo FIRED {
    fired = TRUE;
    wait(3000);
    fired = FALSE;
}
//--timer
combo RELOADING { 
    reloading = FALSE;
    wait(2000);
    reloading = FALSE;
 
}
combo SPRINT {
    set_val(8,100);
    wait(40);
    wait(100);
}
//--Timer for Double TaP
combo TAP { 
    dbl_click = TRUE;
    wait(300);
    dbl_click = FALSE;
}
combo NOTIFY {
    set_rumble(RUMBLE_A,100);
    wait(250);
    reset_rumble();
    wait(150);
    rumb_count --;
}
//--return aim assist value or controller value if above release
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
//--calc wait & hold times for rapid fire
function rf_time() {
    rf_wait = (1000 / RF_ROF) - rf_hold;
    if(rf_wait < rf_hold ) {
        rf_wait = (1000 / RF_ROF) / 2;
            if(rf_wait < 30) rf_wait = 30;
             rf_hold = rf_wait;
    }
    else rf_hold = RF_DEF;
}
//--rumble
function set_rumb (rumb){
    rumb_count = rumb ;
    if(rumb <= 0 ) rumb_count = rumb + 2;
}
function dbl_tap(f_btn1,f_btn2) {
    if(get_val(f_btn1) && event_press(f_btn2) && !dbl_click) combo_run(TAP);
 
    if(get_val(f_btn1) && event_press(f_btn2) &&  dbl_click) return TRUE;
    return FALSE;
}


Thanks alot :)
unfortunately I am restricted to use Java :(

can you convert these for me plz

Code: Select all
// GPC Online Library
// cod_modern_warfare:_the_perfect_aim_edition_(pae)_-_#1_script_for_cod!_.gpc
 
/*
 
                      A GPC POWER SCRIPT BY CRESCENS FOR device
                 ___      _ _          __      ___       _                               
                / __\__ _| | |   ___  / _|    /   \_   _| |_ _   _                       
               / /  / _` | | |  / _ \| |_    / /\ / | | | __| | | |                     
              / /__| (_| | | | | (_) |  _|  / /_//| |_| | |_| |_| |                     
              \____/\__,_|_|_|  \___/|_|   /___,'  \__,_|\__|\__, |                     
                                                             |___/                       
                       _                   __    __            __               
       /\/\   ___   __| | ___ _ __ _ __   / / /\ \ \__ _ _ __ / _| __ _ _ __ ___
      /    \ / _ \ / _` |/ _ \ '__| '_ \  \ \/  \/ / _` | '__| |_ / _` | '__/ _ \
     / /\/\ \ (_) | (_| |  __/ |  | | | |  \  /\  / (_| | |  |  _| (_| | | |  __/
     \/    \/\___/ \__,_|\___|_|  |_| |_|   \/  \/ \__,_|_|  |_|  \__,_|_|  \___|             
 
                    ___  ____ ____ ____ ____ ____ ___    ____ _ _  _       
                    |__] |___ |__/ |___ |___ |     |     |__| | |\/|       
                    |    |___ |  \ |    |___ |___  |     |  | | |  |       
 
                            ____ ___  _ ___ _ ____ _  _                           
                            |___ |  \ |  |  | |  | |\ |                           
                            |___ |__/ |  |  | |__| | \|                           
 
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__ 
 
                   CALL OF DUTY THE PERFECT AIM EDITION IS BACK!!
                                   STRONGER THEN EVER!                           
                           THE #1 COD SCRIPT WORLD WIDE!                                       
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__                                   
 
 ___________________________________________________________________________________________
 
     BUTTON / STICK LAYOUT    : ALL BUTTON & STICK LAYOUTS ARE SUPPORTED                         
     BUMPERS / TRIGGERS       : DEFAULT & FLIPPED ARE SUPPORTED                   
     VERSION                  : 3.2 BETA
     PLATFORMS                : XBOX ONE, PS4 (works on both consoles)
     INPUT DEVICES            : ALL CONTROLLERS, ELITE CROSS OVER FOR PS4, M&K
     SUPPORT / REQUESTS       : TINYURL.COM/GPCSUPPORT
     INSTRUCTIONS              : OPEN THIS LINK IN YOUR BROWSER: tinyurl.com/scriptinstructions
     RECOMMENDED FOR          : ADVANCED GPC USERS
     SCRIPT COMPLETION LEVEL  : 99% - STILL IN BETA, BUTS WORKS LIKE A CHARM SO FAR (ITS AN AWESOME SCRIPT)
 _____________________________________________________________________________________________
 
                               _    ,----------------------------------------------.
                             __))   | INSTRUCTIONS: tinyurl.com/scriptinstructions |
                            ( oo)   _)---------------------------------------------'
------------------------ooO--(_)--Ooo---------------------------------------------------
 
---------------------------/ START USER CONFIG \------------------------------------------
    USER CONFIGURATION                         
         _                 ___   
     ___| |_ ___ ___   |_  | 
    |_ -|  _| -_| . |   _| |_
    |___|_| |___|  _|  |_____|
    USER CONFIG |_|Sticks, Buttons & Recoil
 
    Anti Recoil values: */

    const byte AR[][]{/*
    t_v, s_v, e_v    // t_v = Time Value | s_v = Start Value | e_v = End Value*/

    {35, 25 , 35}, // AR PROFILE B / CIRCLE
    {35, 20 , 38}, // AR PROFILE A / CROSS
    {35, 15 , 30} // AR PROFILE X / SQUARE
    };/*   
 
    CHECK THE STICK & BUTTON LAYOUTS BELOW. DO NOT MIND THE CONSOLE/PLATFORM,
    BUT MAKE SURE THAT THE BUTTON DISCRIPTIONS (FIRE, ADS, ETC) MATCHES WITH YOURS.
    IF YOU NEED TO MAKE CHANGES, THERE IS A LIST OF IDENTIFIERS JUST BELOW.
 
    //-- STICKS        */

    define WALK=PS4_LY;                    
    define STRAFE=WII_LX;                   
    define AIM_H=XB360_RX;//AIM HORIZONTAL                 
    define AIM_V=PS3_RY;//AIM VERTICAL                     
 
    //--BUTTONS                        
    define FIRE=XB1_RT;                     
    define ADS=XB1_LT;                       
    define SPRINT=XB1_LS;               
    define TACTICAL=PS4_L1;               
    define LETHAL=PS4_R1;                  
    define PRONE=XB1_RS;                             
    define MELEE=XB1_B;
    define JUMP=XB1_A;
    /*
       PS4_CIRCLE              XB1_B         STICKS:
       PS4_CROSS              XB1_A
       PS4_R1                XB1_RB
       PS4_R2                XB1_RT        PS4_LY          XB1_LY 
       PS4_R3                XB1_RS        PS4_LX          XB1_LX   
       PS4_L1                XB1_LB        PS4_RX          XB1_RX     
       PS4_L2                XB1_LT        PS4_RY          XB1_RY 
       PS4_L3                XB1_LS        Fore more indentifiers go to the manual:
                                           tinyurl.com/scriptinstructions     
         _              ___
     ___| |_ ___ ___   |_  |
    |_ -|  _| -_| . |  |  _|
    |___|_| |___|  _|  |___|
    USER CONFIG |_| Mod Menu
                    & Settings   
*/

 
    define invert=1;//If you play with inverted set to -1*/
    int in_game_menu_sens=12;//-----fill out your in game sensitivity here (and TWO times more further down)
    define aim_sens_corrections=1;// [0 = OFF / 1 = ON / 2 = ON + ZOOM SENS IS ALSO ON - ZOOM SENS DOES NOT WORK WITH BUMPERS - TRIGGERS FLIPPED]
    define sticky_aim_assist=1;//[0 = OFF / 1 = ON] strongest aim assist for COD BO 4 multiplayer 
    define _v=24;//If your screen shakes whilst using aim assist - lower this value (try 22, 20)
    define smart_reload=1;//[0 = OFF / 1 = ON] cancel sprint to reload & cancel reload with fire or ads - calibrate reload times to make it work
    define drop_and_slide_options=3;// [0 = EASY DROP OFF / 1 = DROP ONLY When firing, 2 = DROP ALSO when aiming, 3 = SLIDE ALSO when sprinting (tap crouch to activate the slide or drop)]
    define smart_thumb_stick=4;//see below
    define walk_tresh= -75;    //Easy sprint stick treshhold (-75 = pressed more than 75%)
    /*
    smart_thumb_stick:
    0 = not activated (Auto Sprint = OFF)
    1 = Auto Sprint activated = on your Left Thumb (just push stick more than 75% forward to run, more than 99% = super sprint)                                                           
    2 = Auto Sprint activated + Easy Jump under Left Stick Click        
    3 = Auto Sprint activated + Easy Crouch/Slide under Left Stick Click
    4 = Auto Sprint activated + Easy Melee under Left Stick Click
 
    ---------------------------/ END USER CONFIG \------------------------------------------
 
    SHORT VERSION OF THE SCRIPT INSTRUCTIONS BELOW, FOR THE DETAILED VERSION: tinyurl.com/scriptinstructions 
 
    -----------------------/ START SHORT INSTRUCTIONS \-------------------------------------
 
    ____________________________ MENU ADS & LEDS ___________________________________________   
 
     HOLD ADS +
                     - TAP UP            = ANTI RECOIL ON / RAPID FIRE OFF - led flashes the color of the recoil profile before turning solid green
                     - TAP RIGHT         = RAPID FIRE ON / ANTI RECOIL OFF - led becomes solid white (to indicate Rapid Fire is on)
                     - TAP LEFT          = RAPID FIRE SECONDARY ON / ANTI RECOIL OFF (blue led = primary weapon, white led is secondary weapon (with rapid fire)
                     - HOLD LEFT         = RAPID FIRE SECONFARY ON + ANTI RECOIL ON (green led = primary weapon, white led is secondary weapon (with rapid fire)
                     - TAP DOWN          = RAPID FIRE OFF / ANTI RECOIL OFF (blue led)
                     - HOLD VIEW/SHARE   = RESET DEFAULTS (to reset aim correction value and reload time value)
                       - TAP MENU/OPTIONS     = AUTO DEAD SILENCE ON / OFF
                       - TAP HOME          = (ONLY WORKS IN RAPID FIRE SECONDARY ON MODE; SO HOLD ADS + TAP LEFT FIRST) SNIPER MODE ON / OFF
 
    WHEN RAPID FIRE SECONDARY = ON
 
                     - TAP "SWITCH WEAPON" shortly TO SWITCH BETWEEN RAPID FIRE AND NORMAL FIRE (WHITE LED = RAPID FIRE)
                     - TAP "RELOAD" shortly TO RELOAD
                     - TO RESET/SYNC LED COLORS IF YOU DIED USING YOUR SECONDARY WEAPON: HOLD "RELOAD" FOR >180ms
    LEDS
                      - GREEN             = ANTI RECOIL IS ON
                      - WHITE            = RAPID FIRE IS ON
                      - OFF                = EDIT MODE IS ON
                      - BLUE                = NEUTRAL (RAPID FIRE & ANTI RECOIL BOTH OFF)
 
  ____________________________ ANTI RECOIL ________________________________________________                   
 
  HOLD ADS + TAP MENU/OPTIONS: AUTO DEAD SILENCE ON / OFF
 
  HOLD D_PAD DOWN +
                       - TAP A / CROSS    -> ANTI RECOIL PROFILE COLOR = PINK
                       - TAP B / CIRCLE     -> ANTI RECOIL PROFILE COLOR = BLUE                      
                      - TAP X / SQUARE    -> ANTI RECOIL PROFILE COLOR = RED
 
    NOTE: YOU CAN ONLY SWITCH PROFILES WHEN ANTI RECOIL IS ON (SO WHEN THE GREEN LED IS ACTIVE)
    THE SCRIPT WILL REMEMBER THE LAST RECOIL PROFILE YOU USED (PROFILE COLOR BLINKS 4X WHEN YOU SWITCH ON ANTI RECOIL)
 
    HOW TO CHANGE ANTI RECOIL VALUES ON THE FLY:
 
         1. START ANTI RECOIL (HOLD ADS + TAP UP)
         2. ACTIVATE THE ANTI RECCOIL PROFILE YOU WANT TO MODIFY
         3. ENTER THE EDIT MENU -> IN EDIT MODE THE LED WILL BE OFF
        4. EDIT VALUES (SEE BELOW)
        5. LEAVE EDIT MENU
 
 
 
    TOGGLE THE EDIT MENU ON/OFF:
             HOLD B / CIRCLE AND HOLD Y / TRIANGLE +
                 - TAP D_PAD UP
 
 
    HOW TO EDIT VALUES;
 
        START VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD RELOAD BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
          END VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD PS4_CIRCLE / XB1_B BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
 
        * =    FLASHES LED WITH EACH TAP
                - FLASH 1x the profile color if changed by plus or minus 1
                - FLASH 2x the profile color if changed by plus or minus 10
 
         SAVE VALUES
            Values are auto saved
 
 
   ____________________________ RELOAD TIME CALIBRATION ________________________________________________                   
 
   THIS TIME VALUE IS USED FOR:
       - AUTO CANCEL RELOAD (to cancel out of a reload press fire or press ads)
       - PREVENT "SPRINT CANCEL RELOAD" WHEN EASY_RUN (AUTO SPRINT) IS ON
 
     TO CALIBRATE RELOAD TIMES:
 
         - BEFORE RELOADING; HOLD D-PAD DOWN
         - THEN PRESS RELOAD TO START RELOADING AND HOLD DOWN THE RELOAD BTN DURING RELOAD ANIMATION
         - IT WILL RUMBLE ONCE AFTER 500ms TO CONFIRM THAT YOU ARE CALIBRATING
         - RELEASE THE RELOAD BTN EXACTLY AT THE END OF THE RELOAD ANIMATION
         - IT WILL RUMBLE TWICE TO CONFIRM SUCCESSFULL CALIBRATION
         - NOW YOU CAN RELEASE ALSO THE D_PAD DOWN BTN
 
     THE RELOAD TIME YOU JUST CALIBRATED PREVENTS "SPRINT CANCEL RELOAD" BUT IT IS
     ALSO IS THE TIME IN WHICH YOU CAN CANCEL OUT OF A RELOAD BY FIRING OR AIMING YOUR WEAPON
 
  ____________________________ AIM CORRECTIONS ________________________________________________ 
 
    AIM CORRECTIONS INTRODUCTION:
 
        THE IDEA BEHIND AIM CORRECTIONS IS THAT YOU HIGHER YOUR IN-GAME SENSITIVITY WITH 2 OR 3
        CLICKS. THIS WILL ALLOW YOU TO TURN AROUND FAST WITHOUT LOSING CONTROL OVER YOUR AIM:
        THE SCRIPT WILL LOWER YOUR SENSITIVITY WHEN YOU AIM AND EVEN MORE WHEN YOU AIM & FIRE
        SO THAT YOU CAN LOCK ON TARGET. SO FOR EXAMPLE: IF YOU PLAY NORMALLY WITH SENS 8 IN THE
        GAME, SET YOUR SENSITIVITY TO 11 IN THE GAME MENU AND FOLLOW THE STEPS BELOW.   
 
        1) FILL OUT THE IN-GAME STICK SENSITIVITY YOU JUST CONFIGURED IN THE GAME MENU UNDER
        "USER CONFIGURATION" IN THE SCRIPT AND TWO TIMES MORE IN THE SCRIPT (scroll down and whatch for indicators)   
        2) THAT`S IT! YOU`RE ALL SET AND GOOD TO GO!
 
        AIM CORRECTIONS IS NOW AUTOMATICALLY OPTIMIZED TO YOUR IN GAME SENSITIVITY, MAKING THE
        AIM ASSIST STRONGER. IT WILL TAKE A FEW ROUNDS TO ADJUST, BUT IF YOU FEEL THAT THE AIM
        CORRECTIONS ARE NOT "RIGHT" FOR YOU TWEAK THE VALUES ON THE FLY:
 
      TO TWEAK AIM CORRECTIONS ON THE FLY
 
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP SHARE / VIEW (-1)
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP MENU / OPTIONS (+1)
 
    ZOOM SENS (DOES NOT WORK WITH FLIPPED TRIGGERS/BUMPERS) - FOR TAKING LONG SHOTS:
        Whilst aiming and in the need for more accuracy to take a long shot,
        TAP TACTICAL BTN TO ACTIVATE ZOOM_SENS (rumbles once to confirm it is on).
        WHEN YOU RELEASE ADS _ ZOOM_SENS WILL BE OFF AGAIN.
 
   ____________________________ DYNAMIC RAPID FIRE ________________________________________________
 
    DYNAMIC RAPID FIRE: FIRE RATE INCREASES WITH THE AMOUNT OF PRESSURE APPLIED TO THE TRIGGER
 
    ____________________________EASY DROP & EASY SLIDE ___________________________________________
 
    Whilst firing your weapon, a simple tap/press of the crouch btn will make you drop. You have the options
    to activate    Easy Drop also when you are aiming and to add Easy Slide to the mix as well.
    option 1 = tap crouch to go prone whilst firing
    option 2 = always go prone when crouch is tapped
    option 3 = when crouch is tapped: always go prone + auto slide if sprinting 
 
   -----------------------/ END SHORT INSTRUCTIONS \-------------------------------------     
 
 
 __________________________________________________________________________________________________________
 
                SCRIPT STARTS HERE / MAKE NO CHANGES UNLESS INDICATED
 __________________________________________________________________________________________________________   
 
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
data(0,0,3,0,3,0,0,0,0,0,0,3,
         0,3,0,0,3,0,3,0);
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
int strt_v[3];
int end__v[3]
 
int idx;         
int pin = 145;   
int code;       
int record;     
 
 
int i_val;
int i_pnt;
int i_num;
int i_cnt;
int v,ar_y;
int edit = FALSE;
int no_recoil=FALSE;
int aa_max;
int switch;
int b=0;
//---aim corrections variables (script controls sens for: hip fire, general, tactical & lethal grenade, ads, ads + fire and long shots (zoom sens))
int ads_grenade_sens, ads_fire_sens, Sens;
int long_shot_sens;
int Zoom=FALSE;
//--RF
int ROF;
int hold_time;
//--EASY THUMBS
int l_stick_click;
int auto_run=0;
int SNIPE=FALSE;
 
 
//---other variables used by the script
 
int rumble;
int wpn_holster=FALSE;
int WPN_1;
 
int rld_time, b_reload=FALSE;
int rapid_fire=FALSE;
int first_time;
int s = FALSE; // AUTO DEAD SILENCE, WHEN FALSE = OFF BY DEFAULT
 
init {
 
    rld_time= get_pvar(PVAR_3, 0, 4000, 1200);
    in_game_menu_sens = get_pvar(PVAR_15, 3, 20, 12); //-----REPLACE 12 with your in game sensitivity here (and once more further down under reset defaults)
    first_time = get_pvar(PVAR_16, 0, 1, 1);
    aa_max = _v + 1
        code = get_pvar(SPVAR_16,140,150,140);
        if(code == pin) {
 
        strt_v[1] = get_pvar(SPVAR_7, -100,100,0)
        strt_v[2] = get_pvar(SPVAR_8, -100,100,0);  strt_v[0] = get_pvar(SPVAR_9, -100,100,0);
        end__v[1] = get_pvar(SPVAR_12,-100,100,0);  end__v[2] = get_pvar(SPVAR_13,-100,100,0)
        end__v[0] = get_pvar(SPVAR_14,-100,100,0);
    }
 
}
 
main{
 
 
 
   if (first_time == 1)
                       {
                       RESET_Defaults();
                       } 
 
 
 
       if(drop_and_slide_options>0)
                       {                               
                    if(get_val(FIRE)|| get_val (ADS) && drop_and_slide_options >=1 || combo_running (EASY_RUN)&& drop_and_slide_options >=2 )
                            {                   
                             if(event_press (PRONE))
                                             {
                                              combo_run(DROP);
                                             } 
                            }
                    }                      
 
    /*
/*   
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

   if(get_val(ADS) && !edit)   
                 {
     //--FIRE MODS OFF
     if(event_press(PS4_DOWN))
                 {//D-pad DOWN
                     switch=FALSE
                     rapid_fire=FALSE;
                     rumble (rapid_fire);
                     wpn_holster=FALSE;
                     no_recoil=FALSE;
                  }
 //--FIRE MODS OFF / anti recoil on
     if(event_press(PS4_UP))
                 {//D-pad UP
                     switch=TRUE
                     rapid_fire=FALSE;
                     rumble (rapid_fire);
                     wpn_holster=FALSE;
                     no_recoil=TRUE;
                     b=4;   
                 }
 //--RAPID FIRE ON
     if(event_press(PS4_RIGHT))
                 {//D-pad RIGHT
                     switch=FALSE
                     rapid_fire=TRUE;           
                     rumble (rapid_fire);
                     wpn_holster=FALSE;
                     no_recoil=FALSE;                     
                 }
 //--rapid_fire SECONDANRY
     if(event_press(PS4_LEFT))
                 {//D-pad LEFT
                      switch = TRUE
                      rapid_fire=TRUE;
                      wpn_holster=TRUE;
                      rumble (wpn_holster);
                      no_recoil=FALSE;     
                 }
     if (switch && event_press (0))
                 {
                 SNIPE = !SNIPE;
                 rumble(SNIPE);
                 }
     if (get_val (PS4_LEFT)&& get_ptime (PS4_LEFT) > 800)
                 {
                     no_recoil=TRUE;
                     rumble (no_recoil);
                     b=4;
                 }
     if(get_val(PS4_SHARE) && get_ptime (PS4_SHARE) > 800)
                 {
                     RESET_Defaults()
                 }
     if(event_press (WII_PLUS))
                {
                      s = !s;    rumble (s);       
                }
 
    btn (PS4_SHARE);btn (PS4_LEFT);btn (PS4_RIGHT);btn (PS4_UP);btn (PS4_DOWN);btn (WII_HOME); btn (WII_PLUS);
 
     }//--END
 /*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|C|O|R|D| |T|I|M|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

     if(!edit && get_val(XB1_DOWN) && get_val (XB1_X) && get_ptime (XB1_X)>500 && !record)     
                                             {
                                             record = TRUE; rumble (record);
                                             }
 
                 if (record)
                                  {
                                  rld_time = get_ptime(XB1_X);
                                                          if (event_release (XB1_X))
                                                          {
                                                         record = FALSE; save_pvars (); rumble (record);
                                                         }
                                 }                               
 
 
 
 
 
 
 /*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|L|O|A|D| |T|I|M|E|R| | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
 
     if(event_release(XB1_X))
                         {
                         b_reload=TRUE;
                         }
     if(b_reload)
                 {
                 b_reload = b_reload + get_rtime();
                 }
     if(b_reload >= rld_time)
                                     {
                                     b_reload = 0;
                                     b_reload = FALSE;
                                     }
  /*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

     if (smart_reload==1)
             {
             if (b_reload &&!edit && (event_press(FIRE)||event_press(ADS)))
                                                                 {
                                                                 combo_run(CANCEL_RLD);
                                                                 }
             }   
 /*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |W|E|A|P|O|N| |F|I|R|E| |M|O|D|S| | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
     
     if(event_release(XB1_Y) && get_ptime(XB1_Y) < 300 && wpn_holster)
                                 {                         
                                 switch = !switch; rumble (switch);
                                 } 
 
 
     if (record==FALSE &&wpn_holster && get_val (XB1_X)&& switch==FALSE && get_ptime(XB1_X) > 180)
                                 {//--RESET
                                  switch = TRUE; rumble (switch);
                                 }
 //-- Rapid fire
     if (rapid_fire)
     {
        ROF =(get_val(FIRE))/4;
        if (ROF >= 20) ROF=20;
        if (ROF <= 2) ROF=2;
        hold_time = 500 / ROF;                 
        if(hold_time >=125) hold_time=125;
        if(hold_time <25) hold_time=25;
 
         {
         if (!switch && wpn_holster || !switch &&!wpn_holster)
                                             {
                                             if (get_val (FIRE) && rapid_fire )                       
                                                                             {
                                                                             combo_run (RAPID_FIRE);                                                                           
                                                                             }
                                             }else if(combo_running(RAPID_FIRE)){ 
            combo_stop(RAPID_FIRE);}
         }
 
     }
                      /*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                      _     _   
*/

 
  if(aim_sens_corrections > 0)
                         {//----------------------------start AIM CORRECTIONS
                        ads_grenade_sens=111-(in_game_menu_sens*2); ads_fire_sens=106-(in_game_menu_sens*2); long_shot_sens=90-(in_game_menu_sens*2);
 
       if (get_val (ADS))
                   if (aim_sens_corrections==2)
                                       {
                                       if (get_val (LETHAL)) block(LETHAL,150);
                                       if (event_release(LETHAL))
                                           {
                                        if(get_ptime(LETHAL) < 150&&get_val(ADS)) {Zoom = TRUE; rumble(Zoom);}
                                         else Zoom = FALSE;
                                         }
                                    }
            if (!Zoom)
                                    {//--!Zoom   
                                      if(get_val(FIRE) && get_val(ADS))                             
                                              {
                                              Sens = ads_fire_sens;                                             
                                              }
                                    if(!get_val(FIRE) && !get_val(ADS) || get_val (FIRE) &&!get_val(ADS))
                                              {
                                            Sens = 100; //--general sens & hip fire sens
                                              }   
                                      if(!get_val(FIRE) && get_val(ADS) || get_val (LETHAL) && !get_val (ADS) || get_val (TACTICAL) && !get_val (ADS))
                                              {
                                            Sens = ads_grenade_sens;
                                              }
                                    } //--!Zoom  end 
            if(Zoom)
                                            {
                                    if(get_val(ADS))
                                                { //--Zoom   
                                                Sens = long_shot_sens;
                                                }
                                                else
                                                    {
                                                    Sens = 100;
                                                    Zoom = FALSE;
                                                    rumble(Zoom);
                                                    }
                                            }// -- Zoom end
        if(Sens > 100) Sens = 100
        sensitivity(AIM_H, NOT_USE, Sens);
        sensitivity(AIM_V, NOT_USE, Sens);
    }//----------------------------end AIM_CORRECTIONS
 
if (get_val(XB1_B) &&get_val(XB1_Y))
         {
                     if (no_recoil && switch)
                                             {
 
                                            if (event_press(XB1_UP))
                                                                         {
                                                                         edit = !edit; rumble(edit);
                                                                         }
                                             }
                     if (event_press(XB1_VIEW))
                                             {
                                             in_game_menu_sens --; save_pvars ();
                                             }
                     if (event_press(XB1_MENU))
                                             {
                                             in_game_menu_sens ++; save_pvars ();                                                         
                                             }
 
 
         btn (XB1_B); btn(XB1_Y);  btn (XB1_UP); btn (XB1_VIEW); btn(XB1_MENU);//-START     
         }/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|U|T|O| |R|U|N| |+| |E|A|S|Y| |T|H|U|M|B| | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 if (smart_thumb_stick >  0)     auto_run=1;
 if (smart_thumb_stick == 2)     l_stick_click = JUMP;
 if (smart_thumb_stick == 3)     l_stick_click = PRONE;
 if (smart_thumb_stick == 4)     l_stick_click = MELEE;
 if (smart_thumb_stick > 1 && smart_thumb_stick <5 && get_val(XB1_LS))if (SNIPE){ if (!get_val (ADS)){set_val(l_stick_click, 100);}
 }else
 {set_val(l_stick_click, 100);}
 if (auto_run==1)
                              if (!b_reload && !get_val(ADS)&& get_val(WALK) < (walk_tresh) && get_val(WALK)> -99)
                                                                                            {
                                                                                             if (s) {combo_run (silent);}
                                                                                             combo_run (EASY_RUN);
                                                                                             }
                                                                         else if (!b_reload && !get_val(ADS)&& get_val(WALK) < -99)
                                                                                             {
                                                                                             combo_stop (EASY_RUN);
                                                                                             combo_run (EASY_SPRINT);
                                                                                             if (s) {combo_run (silent);}
                                                                                             } /*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

if (sticky_aim_assist==1)
                {
                if(get_val(ADS)) combo_run(STICKY_AIM);
                else combo_stop(STICKY_AIM);               
                }
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |H|O|L|D| |B|R|E|A|T|H| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
   if(SNIPE && switch) { 
           if(get_val(ADS))
           { set_val(SPRINT,100); } 
 
             }/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 credits Noozbar*/
   
 
 
if (no_recoil && switch)
                {
 
 
//--calculate values for progression
 
    //--adding or subtracting
    if((AR[idx][1] + strt_v[idx]) < (AR[idx][2] + end__v[idx]))
        i_val = 1;
    else
        i_val = -1;
    //--iteration point for progression
    i_pnt = (AR[idx][0] * 10) / (abs((AR[idx][1] + strt_v[idx]) - (AR[idx][2] + end__v[idx])));
 
 
//--reset counters/pointers
    if(!get_lval(FIRE))
    {
       ar_y = AR[idx][1] + strt_v[idx];
       i_cnt = 0;
       i_num = 0;
    }
 
    if(get_val(FIRE))
    {
 
        if(!p_complete()) 
            ar_y = p_val();
        else
            ar_y = AR[idx][2] + end__v[idx];
        //--set RY to anti recoil value
            if(y_val() > 100)
                set_val(AIM_V, 100);
         else
            set_val(AIM_V,y_val());
    }
 
 
    idx = WPN_1;
 
 
    if(get_val(XB1_DOWN) && !get_val(ADS))
    {
 
    if(event_release(XB1_X) && get_ptime (XB1_X)<500)
            {WPN_1 = 2; b=4;}
        if(event_press(XB1_A))
            {WPN_1 = 1; b=4;}
        if(event_press(XB1_B))
            {WPN_1 = 0; b=4;}
 
 
    btn(XB1_Y);btn(XB1_B);btn (XB1_A);
    } // DOWN end
 
    if (edit){
 
 
    if(get_val(ADS))
    {
        if(get_val(XB1_X))
        {
            if(event_press(XB1_UP))
                {strt_v[idx] += 1;  b=1;}       
            if(event_press(XB1_DOWN))
                {strt_v[idx] -= 1;  b=1;}   
            if(event_press(XB1_RIGHT))
                {strt_v[idx] += 10;  b=2;}
            if(event_press(XB1_LEFT))
                {strt_v[idx] -= 10; b=2;}
        }
 
        if(get_val(XB1_B))
        {
            if(event_press(XB1_UP))
                {end__v[idx] += 1;  b=1;}       
            if(event_press(XB1_DOWN))
                {end__v[idx] -= 1;  b=1; }   
            if(event_press(XB1_RIGHT))
                {end__v[idx] += 10;   b=2; }
            if(event_press(XB1_LEFT))
                {end__v[idx] -= 10;  b=2; }
        }
 
 
 btn(XB1_X);btn(XB1_B);btn(XB1_UP);btn(XB1_DOWN);btn(XB1_RIGHT);btn(XB1_LEFT);
    } // ADS end
 
 
        } // EDIT end
 
 } // no_recoil && switch end
 
 /*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |L|E|D|S| |R|U|M|B|L|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

       if (b>0) blink ();
    if (!get_ledx()){
    if (edit==TRUE)f_Led (0,0,0,0);
    else if (wpn_holster && !switch||!wpn_holster && rapid_fire && !switch) f_Led (2,2,2,2);
    else if (no_recoil)f_Led (0,0,2,0);
    else f_Led (2,0,0,0);} if(rumble) combo_run(RUMBLE);
 
}
//--END OF MAIN
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

  combo STICKY_AIM {
    set_val(AIM_V,xy_val(AIM_V, _v));
    wait(20);
    set_val(AIM_H,xy_val(AIM_H, _v));
    set_val(STRAFE,xy_val(STRAFE, _v));
    wait(20);
    set_val(AIM_V,xy_val(AIM_V, _v * -1));
    wait(20);
    set_val(AIM_H,xy_val(AIM_H, _v * -1));
    set_val(STRAFE,xy_val(STRAFE, _v * -1));
    wait(20);
}
combo DROP {           
    set_val(PRONE,100);
    wait(1200);
    wait(800);
}   
 
combo RAPID_FIRE {
    set_val(FIRE,100);
    wait(hold_time);
    set_val(FIRE,  0);
    wait(hold_time);
}
 combo CANCEL_RLD { 
     set_val(XB1_Y, 100);
     wait(30);
     wait(20);
     set_val(XB1_Y, 100);
     wait(30);
     wait(20);
     b_reload=FALSE;
 }
 combo RUMBLE{
     wait(150);
     set_rumble(1,100);
     wait(150);
     reset_rumble();
     rumble--;
 }
combo EASY_RUN{                 
    set_val(SPRINT,100);           
} 
combo EASY_SPRINT{
    set_val(SPRINT,100);       
    wait(30);                     
    wait(100);     
}
combo silent{
 set_val (TACTICAL, 100); set_val(LETHAL,100);
 wait (30);
 wait (30000);
 }
 
function p_complete() {
    i_cnt++;
    if (i_cnt > AR[idx][0] * 10) {
        //--avoid stack overflow
        i_cnt = AR[idx][0] * 10;
        //--progression complete
        return 1;
    }
    //--progression not complete
    return 0;
}
function p_val() {
    i_num++;
    if(i_num == i_pnt) {
        //--reset counter
        i_num = 0;
        //--adjust ar_y
        ar_y += i_val;
    }
    return ar_y;
}
 
function rumble(pos) {
    if(pos)
        rumble = 1;
    else
        rumble = 2;
}
function btn(f__btn) {
    if (!get_val(f__btn)) return;
    set_val(f__btn, 0);
    } 
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < aa_max) 
    return f_val;   
    return get_val(f_axis);     
}
function y_val() {
    v = get_val(AIM_V);
    if(abs(v) < 10)
        v = 0;
    if(abs(v) > ar_y + 5)
        return v;
    return v + ar_y;           
}
function RESET_Defaults () {
 
    in_game_menu_sens=12;//-------------------------------------------------replace 12 with your in_game_sens here for the last time
    first_time=0
    rld_time=1200;
    save_pvars ();   
}
function save_pvars () {
         if (edit)
                 {
 
                set_pvar(SPVAR_7 ,strt_v[1])
                set_pvar(SPVAR_8 ,strt_v[2]);
                set_pvar(SPVAR_9 ,strt_v[0]);
                set_pvar(SPVAR_12,end__v[1]);
                set_pvar(SPVAR_13,end__v[2])
                set_pvar(SPVAR_14,end__v[0]);
                set_pvar(SPVAR_16,pin); rumble(1);
                }
    set_pvar(PVAR_15, in_game_menu_sens);
    set_pvar(PVAR_16, first_time);
    set_pvar(PVAR_3, rld_time);
    rumble (2);
    }
 
function blink (){
    if (WPN_1 == 0) set_ledx(LED_1, b);
    if (WPN_1 == 2) set_ledx(LED_2, b);
    if (WPN_1 == 1) set_ledx(LED_4, b);
    if (b==1 || b==2) save_pvars ();
    b=0;
    }
function f_Led (a,b,c,d){ 
   set_led(LED_1,a)
   set_led(LED_2,b);
   set_led(LED_3,c);
   set_led(LED_4,d);
}
 


Code: Select all
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Tuesday 5th of November, 2019 22:58 UTC 
 
 
 
    int aa_p  = 24;
    int aa_n = -24;
    int aa_delay  = 20;
    int release = 25;
 
main {
 
    if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);             
 
}
 
 
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay)
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay)
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}


thanks in advanced bro :)
User avatar
CarlosJr
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Nov 05, 2019 4:28 pm

Re: Convert simple script to Titan Two

Postby Mad » Tue Nov 05, 2019 11:32 pm

Code: Select all
#pragma METAINFO("c.gpc", 1, 0, "Buffy's GPC Converter v0.26")
#include <titanone.gph>
 
 
// GPC Online Library
// cod_modern_warfare:_the_perfect_aim_edition_(pae)_-_#1_script_for_cod!_.gpc
/*
 
                      A GPC POWER SCRIPT BY CRESCENS FOR device
                 ___      _ _          __      ___       _                               
                / __\__ _| | |   ___  / _|    /   \_   _| |_ _   _                       
               / /  / _` | | |  / _ \| |_    / /\ / | | | __| | | |                     
              / /__| (_| | | | | (_) |  _|  / /_//| |_| | |_| |_| |                     
              \____/\__,_|_|_|  \___/|_|   /___,'  \__,_|\__|\__, |                     
                                                             |___/                       
                       _                   __    __            __               
       /\/\   ___   __| | ___ _ __ _ __   / / /\ \ \__ _ _ __ / _| __ _ _ __ ___
      /    \ / _ \ / _` |/ _ \ '__| '_ \  \ \/  \/ / _` | '__| |_ / _` | '__/ _ \
     / /\/\ \ (_) | (_| |  __/ |  | | | |  \  /\  / (_| | |  |  _| (_| | | |  __/
     \/    \/\___/ \__,_|\___|_|  |_| |_|   \/  \/ \__,_|_|  |_|  \__,_|_|  \___|             
 
                    ___  ____ ____ ____ ____ ____ ___    ____ _ _  _       
                    |__] |___ |__/ |___ |___ |     |     |__| | |\/|       
                    |    |___ |  \ |    |___ |___  |     |  | | |  |       
 
                            ____ ___  _ ___ _ ____ _  _                           
                            |___ |  \ |  |  | |  | |\ |                           
                            |___ |__/ |  |  | |__| | \|                           
 
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__ 
 
                   CALL OF DUTY THE PERFECT AIM EDITION IS BACK!!
                                   STRONGER THEN EVER!                           
                           THE #1 COD SCRIPT WORLD WIDE!                                       
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__                                   
 
 ___________________________________________________________________________________________
 
     BUTTON / STICK LAYOUT    : ALL BUTTON & STICK LAYOUTS ARE SUPPORTED                         
     BUMPERS / TRIGGERS       : DEFAULT & FLIPPED ARE SUPPORTED                   
     VERSION                  : 3.2 BETA
     PLATFORMS                : XBOX ONE, PS4 (works on both consoles)
     INPUT DEVICES            : ALL CONTROLLERS, ELITE CROSS OVER FOR PS4, M&K
     SUPPORT / REQUESTS       : TINYURL.COM/GPCSUPPORT
     INSTRUCTIONS              : OPEN THIS LINK IN YOUR BROWSER: tinyurl.com/scriptinstructions
     RECOMMENDED FOR          : ADVANCED GPC USERS
     SCRIPT COMPLETION LEVEL  : 99% - STILL IN BETA, BUTS WORKS LIKE A CHARM SO FAR (ITS AN AWESOME SCRIPT)
 _____________________________________________________________________________________________
 
                               _    ,----------------------------------------------.
                             __))   | INSTRUCTIONS: tinyurl.com/scriptinstructions |
                            ( oo)   _)---------------------------------------------'
------------------------ooO--(_)--Ooo---------------------------------------------------
 
---------------------------/ START USER CONFIG \------------------------------------------
    USER CONFIGURATION                         
         _                 ___   
     ___| |_ ___ ___   |_  | 
    |_ -|  _| -_| . |   _| |_
    |___|_| |___|  _|  |_____|
    USER CONFIG |_|Sticks, Buttons & Recoil
 
    Anti Recoil values: **/
/*
    t_v, s_v, e_v    // t_v = Time Value | s_v = Start Value | e_v = End Value**/
// AR PROFILE B / CIRCLE
// AR PROFILE A / CROSS
// AR PROFILE X / SQUARE
/*   
 
    CHECK THE STICK & BUTTON LAYOUTS BELOW. DO NOT MIND THE CONSOLE/PLATFORM,
    BUT MAKE SURE THAT THE BUTTON DISCRIPTIONS (FIRE, ADS, ETC) MATCHES WITH YOURS.
    IF YOU NEED TO MAKE CHANGES, THERE IS A LIST OF IDENTIFIERS JUST BELOW.
 
    //-- STICKS        **/
//AIM HORIZONTAL                 
//AIM VERTICAL                     
//--BUTTONS                         
/*
       PS4_CIRCLE              XB1_B         STICKS:
       PS4_CROSS              XB1_A
       PS4_R1                XB1_RB
       PS4_R2                XB1_RT        PS4_LY          XB1_LY 
       PS4_R3                XB1_RS        PS4_LX          XB1_LX   
       PS4_L1                XB1_LB        PS4_RX          XB1_RX     
       PS4_L2                XB1_LT        PS4_RY          XB1_RY 
       PS4_L3                XB1_LS        Fore more indentifiers go to the manual:
                                           tinyurl.com/scriptinstructions     
         _              ___
     ___| |_ ___ ___   |_  |
    |_ -|  _| -_| . |  |  _|
    |___|_| |___|  _|  |___|
    USER CONFIG |_| Mod Menu
                    & Settings   
**/
//If you play with inverted set to -1*/
//-----fill out your in game sensitivity here (and TWO times more further down)
// [0 = OFF / 1 = ON / 2 = ON + ZOOM SENS IS ALSO ON - ZOOM SENS DOES NOT WORK WITH BUMPERS - TRIGGERS FLIPPED]
//[0 = OFF / 1 = ON] strongest aim assist for COD BO 4 multiplayer 
//If your screen shakes whilst using aim assist - lower this value (try 22, 20)
//[0 = OFF / 1 = ON] cancel sprint to reload & cancel reload with fire or ads - calibrate reload times to make it work
// [0 = EASY DROP OFF / 1 = DROP ONLY When firing, 2 = DROP ALSO when aiming, 3 = SLIDE ALSO when sprinting (tap crouch to activate the slide or drop)]
//see below
//Easy sprint stick treshhold (-75 = pressed more than 75%)
/*
    smart_thumb_stick:
    0 = not activated (Auto Sprint = OFF)
    1 = Auto Sprint activated = on your Left Thumb (just push stick more than 75% forward to run, more than 99% = super sprint)                                                           
    2 = Auto Sprint activated + Easy Jump under Left Stick Click         
    3 = Auto Sprint activated + Easy Crouch/Slide under Left Stick Click
    4 = Auto Sprint activated + Easy Melee under Left Stick Click
 
    ---------------------------/ END USER CONFIG \------------------------------------------
 
    SHORT VERSION OF THE SCRIPT INSTRUCTIONS BELOW, FOR THE DETAILED VERSION: tinyurl.com/scriptinstructions 
 
    -----------------------/ START SHORT INSTRUCTIONS \-------------------------------------
 
    ____________________________ MENU ADS & LEDS ___________________________________________   
 
     HOLD ADS +
                     - TAP UP            = ANTI RECOIL ON / RAPID FIRE OFF - led flashes the color of the recoil profile before turning solid green
                     - TAP RIGHT         = RAPID FIRE ON / ANTI RECOIL OFF - led becomes solid white (to indicate Rapid Fire is on)
                     - TAP LEFT          = RAPID FIRE SECONDARY ON / ANTI RECOIL OFF (blue led = primary weapon, white led is secondary weapon (with rapid fire)
                     - HOLD LEFT         = RAPID FIRE SECONFARY ON + ANTI RECOIL ON (green led = primary weapon, white led is secondary weapon (with rapid fire)
                     - TAP DOWN          = RAPID FIRE OFF / ANTI RECOIL OFF (blue led)
                     - HOLD VIEW/SHARE   = RESET DEFAULTS (to reset aim correction value and reload time value)
                       - TAP MENU/OPTIONS     = AUTO DEAD SILENCE ON / OFF
                       - TAP HOME          = (ONLY WORKS IN RAPID FIRE SECONDARY ON MODE; SO HOLD ADS + TAP LEFT FIRST) SNIPER MODE ON / OFF
 
    WHEN RAPID FIRE SECONDARY = ON
 
                     - TAP "SWITCH WEAPON" shortly TO SWITCH BETWEEN RAPID FIRE AND NORMAL FIRE (WHITE LED = RAPID FIRE)
                     - TAP "RELOAD" shortly TO RELOAD
                     - TO RESET/SYNC LED COLORS IF YOU DIED USING YOUR SECONDARY WEAPON: HOLD "RELOAD" FOR >180ms
    LEDS
                      - GREEN             = ANTI RECOIL IS ON
                      - WHITE            = RAPID FIRE IS ON
                      - OFF                = EDIT MODE IS ON
                      - BLUE                = NEUTRAL (RAPID FIRE & ANTI RECOIL BOTH OFF)
 
  ____________________________ ANTI RECOIL ________________________________________________                   
 
  HOLD ADS + TAP MENU/OPTIONS: AUTO DEAD SILENCE ON / OFF
 
  HOLD D_PAD DOWN +
                       - TAP A / CROSS    -> ANTI RECOIL PROFILE COLOR = PINK
                       - TAP B / CIRCLE     -> ANTI RECOIL PROFILE COLOR = BLUE                     
                      - TAP X / SQUARE    -> ANTI RECOIL PROFILE COLOR = RED
 
    NOTE: YOU CAN ONLY SWITCH PROFILES WHEN ANTI RECOIL IS ON (SO WHEN THE GREEN LED IS ACTIVE)
    THE SCRIPT WILL REMEMBER THE LAST RECOIL PROFILE YOU USED (PROFILE COLOR BLINKS 4X WHEN YOU SWITCH ON ANTI RECOIL)
 
    HOW TO CHANGE ANTI RECOIL VALUES ON THE FLY:
 
         1. START ANTI RECOIL (HOLD ADS + TAP UP)
         2. ACTIVATE THE ANTI RECCOIL PROFILE YOU WANT TO MODIFY
         3. ENTER THE EDIT MENU -> IN EDIT MODE THE LED WILL BE OFF
        4. EDIT VALUES (SEE BELOW)
        5. LEAVE EDIT MENU
 
 
 
    TOGGLE THE EDIT MENU ON/OFF:
             HOLD B / CIRCLE AND HOLD Y / TRIANGLE +
                 - TAP D_PAD UP
 
 
    HOW TO EDIT VALUES;
 
        START VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD RELOAD BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
          END VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD PS4_CIRCLE / XB1_B BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
 
        * =    FLASHES LED WITH EACH TAP
                - FLASH 1x the profile color if changed by plus or minus 1
                - FLASH 2x the profile color if changed by plus or minus 10
 
         SAVE VALUES
            Values are auto saved
 
 
   ____________________________ RELOAD TIME CALIBRATION ________________________________________________                   
 
   THIS TIME VALUE IS USED FOR:
       - AUTO CANCEL RELOAD (to cancel out of a reload press fire or press ads)
       - PREVENT "SPRINT CANCEL RELOAD" WHEN EASY_RUN (AUTO SPRINT) IS ON
 
     TO CALIBRATE RELOAD TIMES:
 
         - BEFORE RELOADING; HOLD D-PAD DOWN
         - THEN PRESS RELOAD TO START RELOADING AND HOLD DOWN THE RELOAD BTN DURING RELOAD ANIMATION
         - IT WILL RUMBLE ONCE AFTER 500ms TO CONFIRM THAT YOU ARE CALIBRATING
         - RELEASE THE RELOAD BTN EXACTLY AT THE END OF THE RELOAD ANIMATION
         - IT WILL RUMBLE TWICE TO CONFIRM SUCCESSFULL CALIBRATION
         - NOW YOU CAN RELEASE ALSO THE D_PAD DOWN BTN
 
     THE RELOAD TIME YOU JUST CALIBRATED PREVENTS "SPRINT CANCEL RELOAD" BUT IT IS
     ALSO IS THE TIME IN WHICH YOU CAN CANCEL OUT OF A RELOAD BY FIRING OR AIMING YOUR WEAPON
 
  ____________________________ AIM CORRECTIONS ________________________________________________ 
 
    AIM CORRECTIONS INTRODUCTION:
 
        THE IDEA BEHIND AIM CORRECTIONS IS THAT YOU HIGHER YOUR IN-GAME SENSITIVITY WITH 2 OR 3
        CLICKS. THIS WILL ALLOW YOU TO TURN AROUND FAST WITHOUT LOSING CONTROL OVER YOUR AIM:
        THE SCRIPT WILL LOWER YOUR SENSITIVITY WHEN YOU AIM AND EVEN MORE WHEN YOU AIM & FIRE
        SO THAT YOU CAN LOCK ON TARGET. SO FOR EXAMPLE: IF YOU PLAY NORMALLY WITH SENS 8 IN THE
        GAME, SET YOUR SENSITIVITY TO 11 IN THE GAME MENU AND FOLLOW THE STEPS BELOW.   
 
        1) FILL OUT THE IN-GAME STICK SENSITIVITY YOU JUST CONFIGURED IN THE GAME MENU UNDER
        "USER CONFIGURATION" IN THE SCRIPT AND TWO TIMES MORE IN THE SCRIPT (scroll down and whatch for indicators)   
        2) THAT`S IT! YOU`RE ALL SET AND GOOD TO GO!
 
        AIM CORRECTIONS IS NOW AUTOMATICALLY OPTIMIZED TO YOUR IN GAME SENSITIVITY, MAKING THE
        AIM ASSIST STRONGER. IT WILL TAKE A FEW ROUNDS TO ADJUST, BUT IF YOU FEEL THAT THE AIM
        CORRECTIONS ARE NOT "RIGHT" FOR YOU TWEAK THE VALUES ON THE FLY:
 
      TO TWEAK AIM CORRECTIONS ON THE FLY
 
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP SHARE / VIEW (-1)
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP MENU / OPTIONS (+1)
 
    ZOOM SENS (DOES NOT WORK WITH FLIPPED TRIGGERS/BUMPERS) - FOR TAKING LONG SHOTS:
        Whilst aiming and in the need for more accuracy to take a long shot,
        TAP TACTICAL BTN TO ACTIVATE ZOOM_SENS (rumbles once to confirm it is on).
        WHEN YOU RELEASE ADS _ ZOOM_SENS WILL BE OFF AGAIN.
 
   ____________________________ DYNAMIC RAPID FIRE ________________________________________________
 
    DYNAMIC RAPID FIRE: FIRE RATE INCREASES WITH THE AMOUNT OF PRESSURE APPLIED TO THE TRIGGER
 
    ____________________________EASY DROP & EASY SLIDE ___________________________________________
 
    Whilst firing your weapon, a simple tap/press of the crouch btn will make you drop. You have the options
    to activate    Easy Drop also when you are aiming and to add Easy Slide to the mix as well.
    option 1 = tap crouch to go prone whilst firing
    option 2 = always go prone when crouch is tapped
    option 3 = when crouch is tapped: always go prone + auto slide if sprinting 
 
   -----------------------/ END SHORT INSTRUCTIONS \-------------------------------------     
 
 
 __________________________________________________________________________________________________________
 
                SCRIPT STARTS HERE / MAKE NO CHANGES UNLESS INDICATED
 __________________________________________________________________________________________________________   
 
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//---aim corrections variables (script controls sens for: hip fire, general, tactical & lethal grenade, ads, ads + fire and long shots (zoom sens))
//--RF
//--EASY THUMBS
//---other variables used by the script
// AUTO DEAD SILENCE, WHEN FALSE = OFF BY DEFAULT
//-----REPLACE 12 with your in game sensitivity here (and once more further down under reset defaults)
/*
/*   
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--FIRE MODS OFF
//D-pad DOWN
//--FIRE MODS OFF / anti recoil on
//D-pad UP
//--RAPID FIRE ON
//D-pad RIGHT
//--rapid_fire SECONDANRY
//D-pad LEFT
//--END
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|C|O|R|D| |T|I|M|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|L|O|A|D| |T|I|M|E|R| | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |W|E|A|P|O|N| |F|I|R|E| |M|O|D|S| | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--RESET
//-- Rapid fire
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                      _     _   
**/
//----------------------------start AIM CORRECTIONS
//--!Zoom   
//--general sens & hip fire sens
//--!Zoom  end 
//--Zoom   
// -- Zoom end
//----------------------------end AIM_CORRECTIONS
//-START     
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|U|T|O| |R|U|N| |+| |E|A|S|Y| |T|H|U|M|B| | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |H|O|L|D| |B|R|E|A|T|H| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 credits Noozbar**/
//--calculate values for progression
//--adding or subtracting
//--iteration point for progression
//--reset counters/pointers
//--set RY to anti recoil value
// DOWN end
// ADS end
// EDIT end
// no_recoil && switch end
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |L|E|D|S| |R|U|M|B|L|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--END OF MAIN
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--avoid stack overflow
//--progression complete
//--progression not complete
//--reset counter
//--adjust ar_y
//-------------------------------------------------replace 12 with your in_game_sens here for the last time
 
 
define WALK = PS4_LY;
define STRAFE = WII_LX;
define AIM_H = XB360_RX;
define AIM_V = PS3_RY;
define FIRE = XB1_RT;
define ADS = XB1_LT;
define SPRINT = XB1_LS;
define TACTICAL = PS4_L1;
define LETHAL = PS4_R1;
define PRONE = XB1_RS;
define MELEE = XB1_B;
define JUMP = XB1_A;
define invert = 1;
define aim_sens_corrections = 1;
define sticky_aim_assist = 1;
define _v = 24;
define smart_reload = 1;
define drop_and_slide_options = 3;
define smart_thumb_stick = 4;
define walk_tresh =- 75;
 
data(0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 3,
0, 3, 0, 0, 3, 0, 3, 0);
 
const int8 AR[] = {
    352535,
    352038,
    351530
};
 
int in_game_menu_sens = 12;
int strt_v[3];
int end__v[3];
int idx;
int pin = 145;
int code;
int record;
int i_val;
int i_pnt;
int i_num;
int i_cnt;
int v, ar_y;
int edit = FALSE;
int no_recoil = FALSE;
int aa_max;
int t1_switch;
int b = 0;
int ads_grenade_sens,  ads_fire_sens,  Sens;
int long_shot_sens;
int Zoom = FALSE;
int ROF;
int hold_time;
int l_stick_click;
int auto_run = 0;
int SNIPE = FALSE;
int rumble;
int wpn_holster = FALSE;
int WPN_1;
int rld_time,  b_reload = FALSE;
int rapid_fire = FALSE;
int first_time;
int s = FALSE;
 
init {
    rld_time = get_pvar(PVAR_3, 0, 4000, 1200);
    in_game_menu_sens = get_pvar(PVAR_15, 3, 20, 12);
    first_time = get_pvar(PVAR_16, 0, 1, 1);
    aa_max = _v + 1;
    code = get_pvar(SPVAR_16, 140, 150, 140);
    if (code == pin) {
        strt_v[1] = get_pvar(SPVAR_7, - 100, 100, 0);
        strt_v[2] = get_pvar(SPVAR_8, - 100, 100, 0);
        strt_v[0] = get_pvar(SPVAR_9, - 100, 100, 0);
        end__v[1] = get_pvar(SPVAR_12, - 100, 100, 0);
        end__v[2] = get_pvar(SPVAR_13, - 100, 100, 0);
        end__v[0] = get_pvar(SPVAR_14, - 100, 100, 0);
    }
}
 
 
main {
    if (first_time == 1) {
        f_RESET_Defaults();
    }
    if (drop_and_slide_options > 0) {
        if (get_val(FIRE) || get_val(ADS) && drop_and_slide_options >= 1 || combo_running(c_EASY_RUN) && drop_and_slide_options >= 2) {
            if (event_press(PRONE)) {
                combo_run(c_DROP);
            }
        }
    }
    if (get_val(ADS) && !edit) {
        if (event_press(PS4_DOWN)) {
            t1_switch = FALSE;
            rapid_fire = FALSE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = FALSE;
        }
        if (event_press(PS4_UP)) {
            t1_switch = TRUE;
            rapid_fire = FALSE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = TRUE;
            b = 4;
        }
        if (event_press(PS4_RIGHT)) {
            t1_switch = FALSE;
            rapid_fire = TRUE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = FALSE;
        }
        if (event_press(PS4_LEFT)) {
            t1_switch = TRUE;
            rapid_fire = TRUE;
            wpn_holster = TRUE;
            f_rumble(wpn_holster);
            no_recoil = FALSE;
        }
        if (t1_switch && event_press(0)) {
            SNIPE =! SNIPE;
            f_rumble(SNIPE);
        }
        if (get_val(PS4_LEFT) && get_ptime(PS4_LEFT) > 800) {
            no_recoil = TRUE;
            f_rumble(no_recoil);
            b = 4;
        }
        if (get_val(PS4_SHARE) && get_ptime(PS4_SHARE) > 800) {
            f_RESET_Defaults();
        }
        if (event_press(WII_PLUS)) {
            s =! s;
            f_rumble(s);
        }
        f_btn(PS4_SHARE);
        f_btn(PS4_LEFT);
        f_btn(PS4_RIGHT);
        f_btn(PS4_UP);
        f_btn(PS4_DOWN);
        f_btn(WII_HOME);
        f_btn(WII_PLUS);
    }
    if (!edit && get_val(XB1_DOWN) && get_val(XB1_X) && get_ptime(XB1_X) > 500 && !record) {
        record = TRUE;
        f_rumble(record);
    }
    if (record) {
        rld_time = get_ptime(XB1_X);
        if (event_release(XB1_X)) {
            record = FALSE;
            f_save_pvars();
            f_rumble(record);
        }
    }
    if (event_release(XB1_X)) {
        b_reload = TRUE;
    }
    if (b_reload) {
        b_reload = b_reload + get_rtime();
    }
    if (b_reload >= rld_time) {
        b_reload = 0;
        b_reload = FALSE;
    }
    if (smart_reload == 1) {
        if (b_reload && !edit && (event_press(FIRE) || event_press(ADS))) {
            combo_run(c_CANCEL_RLD);
        }
    }
    if (event_release(XB1_Y) && get_ptime(XB1_Y) < 300 && wpn_holster) {
        t1_switch =! t1_switch;
        f_rumble(t1_switch);
    }
    if (record == FALSE && wpn_holster && get_val(XB1_X) && t1_switch == FALSE && get_ptime(XB1_X) > 180) {
        t1_switch = TRUE;
        f_rumble(t1_switch);
    }
    if (rapid_fire) {
        ROF = (get_val(FIRE)) / 4;
        if (ROF >= 20) ROF = 20;
        if (ROF <= 2) ROF = 2;
        hold_time = 500 / ROF;
        if (hold_time >= 125) hold_time = 125;
        if (hold_time < 25) hold_time = 25;
        if (!t1_switch && wpn_holster || !t1_switch && !wpn_holster) {
            if (get_val(FIRE) && rapid_fire) {
                combo_run(c_RAPID_FIRE);
            }
        }
        else if (combo_running(c_RAPID_FIRE)) {
            combo_stop(c_RAPID_FIRE);
        }
    }
    if (aim_sens_corrections > 0) {
        ads_grenade_sens = 111 - (in_game_menu_sens * 2);
        ads_fire_sens = 106 - (in_game_menu_sens * 2);
        long_shot_sens = 90 - (in_game_menu_sens * 2);
        if (get_val(ADS)) if (aim_sens_corrections == 2) {
            if (get_val(LETHAL)) block(LETHAL, 150);
            if (event_release(LETHAL)) {
                if (get_ptime(LETHAL) < 150 && get_val(ADS)) {
                    Zoom = TRUE;
                    f_rumble(Zoom);
                }
                else  Zoom = FALSE;
            }
        }
        if (!Zoom) {
            if (get_val(FIRE) && get_val(ADS)) {
                Sens = ads_fire_sens;
            }
            if (!get_val(FIRE) && !get_val(ADS) || get_val(FIRE) && !get_val(ADS)) {
                Sens = 100;
            }
            if (!get_val(FIRE) && get_val(ADS) || get_val(LETHAL) && !get_val(ADS) || get_val(TACTICAL) && !get_val(ADS)) {
                Sens = ads_grenade_sens;
            }
        }
        if (Zoom) {
            if (get_val(ADS)) {
                Sens = long_shot_sens;
            }
            else {
                Sens = 100;
                Zoom = FALSE;
                f_rumble(Zoom);
            }
        }
        if (Sens > 100) Sens = 100;
        sensitivity(AIM_H, NOT_USE, Sens);
        sensitivity(AIM_V, NOT_USE, Sens);
    }
    if (get_val(XB1_B) && get_val(XB1_Y)) {
        if (no_recoil && t1_switch) {
            if (event_press(XB1_UP)) {
                edit =! edit;
                f_rumble(edit);
            }
        }
        if (event_press(XB1_VIEW)) {
            in_game_menu_sens -- ;
            f_save_pvars();
        }
        if (event_press(XB1_MENU)) {
            in_game_menu_sens ++ ;
            f_save_pvars();
        }
        f_btn(XB1_B);
        f_btn(XB1_Y);
        f_btn(XB1_UP);
        f_btn(XB1_VIEW);
        f_btn(XB1_MENU);
    }
    if (smart_thumb_stick > 0) auto_run = 1;
    if (smart_thumb_stick == 2) l_stick_click = JUMP;
    if (smart_thumb_stick == 3) l_stick_click = PRONE;
    if (smart_thumb_stick == 4) l_stick_click = MELEE;
    if (smart_thumb_stick > 1 && smart_thumb_stick < 5 && get_val(XB1_LS)) if (SNIPE) {
        if (!get_val(ADS)) {
            set_val(l_stick_click, 100);
        }
    }
    else {
        set_val(l_stick_click, 100);
    }
    if (auto_run == 1) if (!b_reload && !get_val(ADS) && get_val(WALK) < (walk_tresh) && get_val(WALK) >- 99) {
        if (s) {
            combo_run(c_silent);
        }
        combo_run(c_EASY_RUN);
    }
    else if (!b_reload && !get_val(ADS) && get_val(WALK) <- 99) {
        combo_stop(c_EASY_RUN);
        combo_run(c_EASY_SPRINT);
        if (s) {
            combo_run(c_silent);
        }
    }
    if (sticky_aim_assist == 1) {
        if (get_val(ADS)) combo_run(c_STICKY_AIM);
        else  combo_stop(c_STICKY_AIM);
    }
    if (SNIPE && t1_switch) {
        if (get_val(ADS)) {
            set_val(SPRINT, 100);
        }
    }
    if (no_recoil && t1_switch) {
        if ((AR[(3 * (idx)) + (1)] + strt_v[idx]) < (AR[(3 * (idx)) + (2)] + end__v[idx])) i_val = 1;
        else  i_val =- 1;
        i_pnt = (AR[(3 * (idx)) + (0)] * 10) / (abs((AR[(3 * (idx)) + (1)] + strt_v[idx]) - (AR[(3 * (idx)) + (2)] + end__v[idx])));
        if (!get_lval(FIRE)) {
            ar_y = AR[(3 * (idx)) + (1)] + strt_v[idx];
            i_cnt = 0;
            i_num = 0;
        }
        if (get_val(FIRE)) {
            if (!f_p_complete()) ar_y = f_p_val();
            else  ar_y = AR[(3 * (idx)) + (2)] + end__v[idx];
            if (f_y_val() > 100) set_val(AIM_V, 100);
            else  set_val(AIM_V, f_y_val());
        }
        idx = WPN_1;
        if (get_val(XB1_DOWN) && !get_val(ADS)) {
            if (event_release(XB1_X) && get_ptime(XB1_X) < 500) {
                WPN_1 = 2;
                b = 4;
            }
            if (event_press(XB1_A)) {
                WPN_1 = 1;
                b = 4;
            }
            if (event_press(XB1_B)) {
                WPN_1 = 0;
                b = 4;
            }
            f_btn(XB1_Y);
            f_btn(XB1_B);
            f_btn(XB1_A);
        }
        if (edit) {
            if (get_val(ADS)) {
                if (get_val(XB1_X)) {
                    if (event_press(XB1_UP)) {
                        strt_v[idx] += 1;
                        b = 1;
                    }
                    if (event_press(XB1_DOWN)) {
                        strt_v[idx] -= 1;
                        b = 1;
                    }
                    if (event_press(XB1_RIGHT)) {
                        strt_v[idx] += 10;
                        b = 2;
                    }
                    if (event_press(XB1_LEFT)) {
                        strt_v[idx] -= 10;
                        b = 2;
                    }
                }
                if (get_val(XB1_B)) {
                    if (event_press(XB1_UP)) {
                        end__v[idx] += 1;
                        b = 1;
                    }
                    if (event_press(XB1_DOWN)) {
                        end__v[idx] -= 1;
                        b = 1;
                    }
                    if (event_press(XB1_RIGHT)) {
                        end__v[idx] += 10;
                        b = 2;
                    }
                    if (event_press(XB1_LEFT)) {
                        end__v[idx] -= 10;
                        b = 2;
                    }
                }
                f_btn(XB1_X);
                f_btn(XB1_B);
                f_btn(XB1_UP);
                f_btn(XB1_DOWN);
                f_btn(XB1_RIGHT);
                f_btn(XB1_LEFT);
            }
        }
    }
    if (b > 0) f_blink();
    if (!get_ledx()) {
        if (edit == TRUE) f_f_Led(0, 0, 0, 0);
        else if (wpn_holster && !t1_switch || !wpn_holster && rapid_fire && !t1_switch) f_f_Led(2, 2, 2, 2);
        else if (no_recoil) f_f_Led(0, 0, 2, 0);
        else  f_f_Led(2, 0, 0, 0);
    }
    if (rumble) combo_run(c_RUMBLE);
}
 
 
combo c_STICKY_AIM {
    set_val(AIM_V, f_xy_val(AIM_V, _v));
    wait(20);
    set_val(AIM_H, f_xy_val(AIM_H, _v));
    set_val(STRAFE, f_xy_val(STRAFE, _v));
    wait(20);
    set_val(AIM_V, f_xy_val(AIM_V, _v *- 1));
    wait(20);
    set_val(AIM_H, f_xy_val(AIM_H, _v *- 1));
    set_val(STRAFE, f_xy_val(STRAFE, _v *- 1));
    wait(20);
}
 
combo c_DROP {
    set_val(PRONE, 100);
    wait(1200);
    wait(800);
}
 
combo c_RAPID_FIRE {
    set_val(FIRE, 100);
    wait(hold_time);
    set_val(FIRE, 0);
    wait(hold_time);
}
 
combo c_CANCEL_RLD {
    set_val(XB1_Y, 100);
    wait(30);
    wait(20);
    set_val(XB1_Y, 100);
    wait(30);
    wait(20);
    b_reload = FALSE;
}
 
combo c_RUMBLE {
    wait(150);
    set_rumble(1, 100);
    wait(150);
    reset_rumble();
    rumble -- ;
}
 
combo c_EASY_RUN {
    set_val(SPRINT, 100);
}
 
combo c_EASY_SPRINT {
    set_val(SPRINT, 100);
    wait(30);
    wait(100);
}
 
combo c_silent {
    set_val(TACTICAL, 100);
    set_val(LETHAL, 100);
    wait(30);
    wait(30000);
}
 
 
function f_p_complete() {
    i_cnt ++ ;
    if (i_cnt > AR[(3 * (idx)) + (0)] * 10) {
        i_cnt = AR[(3 * (idx)) + (0)] * 10;
        return 1;
    }
    return 0;
}
 
function f_p_val() {
    i_num ++ ;
    if (i_num == i_pnt) {
        i_num = 0;
        ar_y += i_val;
    }
    return ar_y;
}
 
function f_rumble(pos) {
    if (pos) rumble = 1;
    else  rumble = 2;
}
 
function f_btn(f__btn) {
    if (!get_val(f__btn))
        return ;
    set_val(f__btn, 0);
}
 
function f_xy_val(f_axis, f_val) {
    if (abs(get_val(f_axis)) < aa_max)
        return f_val;
    return get_val(f_axis);
}
 
function f_y_val() {
    v = get_val(AIM_V);
    if (abs(v) < 10) v = 0;
    if (abs(v) > ar_y + 5)
        return v;
    return v + ar_y;
}
 
function f_RESET_Defaults() {
    in_game_menu_sens = 12;
    first_time = 0;
    rld_time = 1200;
    f_save_pvars();
}
 
function f_save_pvars() {
    if (edit) {
        set_pvar(SPVAR_7, strt_v[1]);
        set_pvar(SPVAR_8, strt_v[2]);
        set_pvar(SPVAR_9, strt_v[0]);
        set_pvar(SPVAR_12, end__v[1]);
        set_pvar(SPVAR_13, end__v[2]);
        set_pvar(SPVAR_14, end__v[0]);
        set_pvar(SPVAR_16, pin);
        f_rumble(1);
    }
    set_pvar(PVAR_15, in_game_menu_sens);
    set_pvar(PVAR_16, first_time);
    set_pvar(PVAR_3, rld_time);
    f_rumble(2);
}
 
function f_blink() {
    if (WPN_1 == 0) set_ledx(LED_1, b);
    if (WPN_1 == 2) set_ledx(LED_2, b);
    if (WPN_1 == 1) set_ledx(LED_4, b);
    if (b == 1 || b == 2) f_save_pvars();
    b = 0;
}
 
function f_f_Led(a, b, c, d) {
    set_led(LED_1, a);
    set_led(LED_2, b);
    set_led(LED_3, c);
    set_led(LED_4, d);
}
 


Code: Select all
#include <titanone.gph>
 
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Tuesday 5th of November, 2019 22:58 UTC 
 
    int aa_p  = 24;
    int aa_n = -24;
    int aa_delay  = 20;
    int release = 25;
 
main {
 
    if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);             
 
}
 
 
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay);
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay);
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
 
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: Convert simple script to Titan Two

Postby CarlosJr » Thu Nov 07, 2019 9:10 pm

Mad wrote:
Code: Select all
#pragma METAINFO("c.gpc", 1, 0, "Buffy's GPC Converter v0.26")
#include <titanone.gph>
 
 
// GPC Online Library
// cod_modern_warfare:_the_perfect_aim_edition_(pae)_-_#1_script_for_cod!_.gpc
/*
 
                      A GPC POWER SCRIPT BY CRESCENS FOR device
                 ___      _ _          __      ___       _                               
                / __\__ _| | |   ___  / _|    /   \_   _| |_ _   _                       
               / /  / _` | | |  / _ \| |_    / /\ / | | | __| | | |                     
              / /__| (_| | | | | (_) |  _|  / /_//| |_| | |_| |_| |                     
              \____/\__,_|_|_|  \___/|_|   /___,'  \__,_|\__|\__, |                     
                                                             |___/                       
                       _                   __    __            __               
       /\/\   ___   __| | ___ _ __ _ __   / / /\ \ \__ _ _ __ / _| __ _ _ __ ___
      /    \ / _ \ / _` |/ _ \ '__| '_ \  \ \/  \/ / _` | '__| |_ / _` | '__/ _ \
     / /\/\ \ (_) | (_| |  __/ |  | | | |  \  /\  / (_| | |  |  _| (_| | | |  __/
     \/    \/\___/ \__,_|\___|_|  |_| |_|   \/  \/ \__,_|_|  |_|  \__,_|_|  \___|             
 
                    ___  ____ ____ ____ ____ ____ ___    ____ _ _  _       
                    |__] |___ |__/ |___ |___ |     |     |__| | |\/|       
                    |    |___ |  \ |    |___ |___  |     |  | | |  |       
 
                            ____ ___  _ ___ _ ____ _  _                           
                            |___ |  \ |  |  | |  | |\ |                           
                            |___ |__/ |  |  | |__| | \|                           
 
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__ 
 
                   CALL OF DUTY THE PERFECT AIM EDITION IS BACK!!
                                   STRONGER THEN EVER!                           
                           THE #1 COD SCRIPT WORLD WIDE!                                       
  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__  ____o__                                   
 
 ___________________________________________________________________________________________
 
     BUTTON / STICK LAYOUT    : ALL BUTTON & STICK LAYOUTS ARE SUPPORTED                         
     BUMPERS / TRIGGERS       : DEFAULT & FLIPPED ARE SUPPORTED                   
     VERSION                  : 3.2 BETA
     PLATFORMS                : XBOX ONE, PS4 (works on both consoles)
     INPUT DEVICES            : ALL CONTROLLERS, ELITE CROSS OVER FOR PS4, M&K
     SUPPORT / REQUESTS       : TINYURL.COM/GPCSUPPORT
     INSTRUCTIONS              : OPEN THIS LINK IN YOUR BROWSER: tinyurl.com/scriptinstructions
     RECOMMENDED FOR          : ADVANCED GPC USERS
     SCRIPT COMPLETION LEVEL  : 99% - STILL IN BETA, BUTS WORKS LIKE A CHARM SO FAR (ITS AN AWESOME SCRIPT)
 _____________________________________________________________________________________________
 
                               _    ,----------------------------------------------.
                             __))   | INSTRUCTIONS: tinyurl.com/scriptinstructions |
                            ( oo)   _)---------------------------------------------'
------------------------ooO--(_)--Ooo---------------------------------------------------
 
---------------------------/ START USER CONFIG \------------------------------------------
    USER CONFIGURATION                         
         _                 ___   
     ___| |_ ___ ___   |_  | 
    |_ -|  _| -_| . |   _| |_
    |___|_| |___|  _|  |_____|
    USER CONFIG |_|Sticks, Buttons & Recoil
 
    Anti Recoil values: **/
/*
    t_v, s_v, e_v    // t_v = Time Value | s_v = Start Value | e_v = End Value**/
// AR PROFILE B / CIRCLE
// AR PROFILE A / CROSS
// AR PROFILE X / SQUARE
/*   
 
    CHECK THE STICK & BUTTON LAYOUTS BELOW. DO NOT MIND THE CONSOLE/PLATFORM,
    BUT MAKE SURE THAT THE BUTTON DISCRIPTIONS (FIRE, ADS, ETC) MATCHES WITH YOURS.
    IF YOU NEED TO MAKE CHANGES, THERE IS A LIST OF IDENTIFIERS JUST BELOW.
 
    //-- STICKS        **/
//AIM HORIZONTAL                 
//AIM VERTICAL                     
//--BUTTONS                         
/*
       PS4_CIRCLE              XB1_B         STICKS:
       PS4_CROSS              XB1_A
       PS4_R1                XB1_RB
       PS4_R2                XB1_RT        PS4_LY          XB1_LY 
       PS4_R3                XB1_RS        PS4_LX          XB1_LX   
       PS4_L1                XB1_LB        PS4_RX          XB1_RX     
       PS4_L2                XB1_LT        PS4_RY          XB1_RY 
       PS4_L3                XB1_LS        Fore more indentifiers go to the manual:
                                           tinyurl.com/scriptinstructions     
         _              ___
     ___| |_ ___ ___   |_  |
    |_ -|  _| -_| . |  |  _|
    |___|_| |___|  _|  |___|
    USER CONFIG |_| Mod Menu
                    & Settings   
**/
//If you play with inverted set to -1*/
//-----fill out your in game sensitivity here (and TWO times more further down)
// [0 = OFF / 1 = ON / 2 = ON + ZOOM SENS IS ALSO ON - ZOOM SENS DOES NOT WORK WITH BUMPERS - TRIGGERS FLIPPED]
//[0 = OFF / 1 = ON] strongest aim assist for COD BO 4 multiplayer 
//If your screen shakes whilst using aim assist - lower this value (try 22, 20)
//[0 = OFF / 1 = ON] cancel sprint to reload & cancel reload with fire or ads - calibrate reload times to make it work
// [0 = EASY DROP OFF / 1 = DROP ONLY When firing, 2 = DROP ALSO when aiming, 3 = SLIDE ALSO when sprinting (tap crouch to activate the slide or drop)]
//see below
//Easy sprint stick treshhold (-75 = pressed more than 75%)
/*
    smart_thumb_stick:
    0 = not activated (Auto Sprint = OFF)
    1 = Auto Sprint activated = on your Left Thumb (just push stick more than 75% forward to run, more than 99% = super sprint)                                                           
    2 = Auto Sprint activated + Easy Jump under Left Stick Click         
    3 = Auto Sprint activated + Easy Crouch/Slide under Left Stick Click
    4 = Auto Sprint activated + Easy Melee under Left Stick Click
 
    ---------------------------/ END USER CONFIG \------------------------------------------
 
    SHORT VERSION OF THE SCRIPT INSTRUCTIONS BELOW, FOR THE DETAILED VERSION: tinyurl.com/scriptinstructions 
 
    -----------------------/ START SHORT INSTRUCTIONS \-------------------------------------
 
    ____________________________ MENU ADS & LEDS ___________________________________________   
 
     HOLD ADS +
                     - TAP UP            = ANTI RECOIL ON / RAPID FIRE OFF - led flashes the color of the recoil profile before turning solid green
                     - TAP RIGHT         = RAPID FIRE ON / ANTI RECOIL OFF - led becomes solid white (to indicate Rapid Fire is on)
                     - TAP LEFT          = RAPID FIRE SECONDARY ON / ANTI RECOIL OFF (blue led = primary weapon, white led is secondary weapon (with rapid fire)
                     - HOLD LEFT         = RAPID FIRE SECONFARY ON + ANTI RECOIL ON (green led = primary weapon, white led is secondary weapon (with rapid fire)
                     - TAP DOWN          = RAPID FIRE OFF / ANTI RECOIL OFF (blue led)
                     - HOLD VIEW/SHARE   = RESET DEFAULTS (to reset aim correction value and reload time value)
                       - TAP MENU/OPTIONS     = AUTO DEAD SILENCE ON / OFF
                       - TAP HOME          = (ONLY WORKS IN RAPID FIRE SECONDARY ON MODE; SO HOLD ADS + TAP LEFT FIRST) SNIPER MODE ON / OFF
 
    WHEN RAPID FIRE SECONDARY = ON
 
                     - TAP "SWITCH WEAPON" shortly TO SWITCH BETWEEN RAPID FIRE AND NORMAL FIRE (WHITE LED = RAPID FIRE)
                     - TAP "RELOAD" shortly TO RELOAD
                     - TO RESET/SYNC LED COLORS IF YOU DIED USING YOUR SECONDARY WEAPON: HOLD "RELOAD" FOR >180ms
    LEDS
                      - GREEN             = ANTI RECOIL IS ON
                      - WHITE            = RAPID FIRE IS ON
                      - OFF                = EDIT MODE IS ON
                      - BLUE                = NEUTRAL (RAPID FIRE & ANTI RECOIL BOTH OFF)
 
  ____________________________ ANTI RECOIL ________________________________________________                   
 
  HOLD ADS + TAP MENU/OPTIONS: AUTO DEAD SILENCE ON / OFF
 
  HOLD D_PAD DOWN +
                       - TAP A / CROSS    -> ANTI RECOIL PROFILE COLOR = PINK
                       - TAP B / CIRCLE     -> ANTI RECOIL PROFILE COLOR = BLUE                     
                      - TAP X / SQUARE    -> ANTI RECOIL PROFILE COLOR = RED
 
    NOTE: YOU CAN ONLY SWITCH PROFILES WHEN ANTI RECOIL IS ON (SO WHEN THE GREEN LED IS ACTIVE)
    THE SCRIPT WILL REMEMBER THE LAST RECOIL PROFILE YOU USED (PROFILE COLOR BLINKS 4X WHEN YOU SWITCH ON ANTI RECOIL)
 
    HOW TO CHANGE ANTI RECOIL VALUES ON THE FLY:
 
         1. START ANTI RECOIL (HOLD ADS + TAP UP)
         2. ACTIVATE THE ANTI RECCOIL PROFILE YOU WANT TO MODIFY
         3. ENTER THE EDIT MENU -> IN EDIT MODE THE LED WILL BE OFF
        4. EDIT VALUES (SEE BELOW)
        5. LEAVE EDIT MENU
 
 
 
    TOGGLE THE EDIT MENU ON/OFF:
             HOLD B / CIRCLE AND HOLD Y / TRIANGLE +
                 - TAP D_PAD UP
 
 
    HOW TO EDIT VALUES;
 
        START VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD RELOAD BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
          END VALUE:
               HOLD PS4_L2 / XB1_LT  AND HOLD PS4_CIRCLE / XB1_B BUTTON +
                - TAP UP = +1 (*)
                - TAP DOWN = -1 (*)
                - TAP RIGHT = +10 (*)
                - TAP DOWN = -10 (*)
 
 
        * =    FLASHES LED WITH EACH TAP
                - FLASH 1x the profile color if changed by plus or minus 1
                - FLASH 2x the profile color if changed by plus or minus 10
 
         SAVE VALUES
            Values are auto saved
 
 
   ____________________________ RELOAD TIME CALIBRATION ________________________________________________                   
 
   THIS TIME VALUE IS USED FOR:
       - AUTO CANCEL RELOAD (to cancel out of a reload press fire or press ads)
       - PREVENT "SPRINT CANCEL RELOAD" WHEN EASY_RUN (AUTO SPRINT) IS ON
 
     TO CALIBRATE RELOAD TIMES:
 
         - BEFORE RELOADING; HOLD D-PAD DOWN
         - THEN PRESS RELOAD TO START RELOADING AND HOLD DOWN THE RELOAD BTN DURING RELOAD ANIMATION
         - IT WILL RUMBLE ONCE AFTER 500ms TO CONFIRM THAT YOU ARE CALIBRATING
         - RELEASE THE RELOAD BTN EXACTLY AT THE END OF THE RELOAD ANIMATION
         - IT WILL RUMBLE TWICE TO CONFIRM SUCCESSFULL CALIBRATION
         - NOW YOU CAN RELEASE ALSO THE D_PAD DOWN BTN
 
     THE RELOAD TIME YOU JUST CALIBRATED PREVENTS "SPRINT CANCEL RELOAD" BUT IT IS
     ALSO IS THE TIME IN WHICH YOU CAN CANCEL OUT OF A RELOAD BY FIRING OR AIMING YOUR WEAPON
 
  ____________________________ AIM CORRECTIONS ________________________________________________ 
 
    AIM CORRECTIONS INTRODUCTION:
 
        THE IDEA BEHIND AIM CORRECTIONS IS THAT YOU HIGHER YOUR IN-GAME SENSITIVITY WITH 2 OR 3
        CLICKS. THIS WILL ALLOW YOU TO TURN AROUND FAST WITHOUT LOSING CONTROL OVER YOUR AIM:
        THE SCRIPT WILL LOWER YOUR SENSITIVITY WHEN YOU AIM AND EVEN MORE WHEN YOU AIM & FIRE
        SO THAT YOU CAN LOCK ON TARGET. SO FOR EXAMPLE: IF YOU PLAY NORMALLY WITH SENS 8 IN THE
        GAME, SET YOUR SENSITIVITY TO 11 IN THE GAME MENU AND FOLLOW THE STEPS BELOW.   
 
        1) FILL OUT THE IN-GAME STICK SENSITIVITY YOU JUST CONFIGURED IN THE GAME MENU UNDER
        "USER CONFIGURATION" IN THE SCRIPT AND TWO TIMES MORE IN THE SCRIPT (scroll down and whatch for indicators)   
        2) THAT`S IT! YOU`RE ALL SET AND GOOD TO GO!
 
        AIM CORRECTIONS IS NOW AUTOMATICALLY OPTIMIZED TO YOUR IN GAME SENSITIVITY, MAKING THE
        AIM ASSIST STRONGER. IT WILL TAKE A FEW ROUNDS TO ADJUST, BUT IF YOU FEEL THAT THE AIM
        CORRECTIONS ARE NOT "RIGHT" FOR YOU TWEAK THE VALUES ON THE FLY:
 
      TO TWEAK AIM CORRECTIONS ON THE FLY
 
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP SHARE / VIEW (-1)
         - HOLD B/CIRCLE AND HOLD TRIANGLE / Y + TAP MENU / OPTIONS (+1)
 
    ZOOM SENS (DOES NOT WORK WITH FLIPPED TRIGGERS/BUMPERS) - FOR TAKING LONG SHOTS:
        Whilst aiming and in the need for more accuracy to take a long shot,
        TAP TACTICAL BTN TO ACTIVATE ZOOM_SENS (rumbles once to confirm it is on).
        WHEN YOU RELEASE ADS _ ZOOM_SENS WILL BE OFF AGAIN.
 
   ____________________________ DYNAMIC RAPID FIRE ________________________________________________
 
    DYNAMIC RAPID FIRE: FIRE RATE INCREASES WITH THE AMOUNT OF PRESSURE APPLIED TO THE TRIGGER
 
    ____________________________EASY DROP & EASY SLIDE ___________________________________________
 
    Whilst firing your weapon, a simple tap/press of the crouch btn will make you drop. You have the options
    to activate    Easy Drop also when you are aiming and to add Easy Slide to the mix as well.
    option 1 = tap crouch to go prone whilst firing
    option 2 = always go prone when crouch is tapped
    option 3 = when crouch is tapped: always go prone + auto slide if sprinting 
 
   -----------------------/ END SHORT INSTRUCTIONS \-------------------------------------     
 
 
 __________________________________________________________________________________________________________
 
                SCRIPT STARTS HERE / MAKE NO CHANGES UNLESS INDICATED
 __________________________________________________________________________________________________________   
 
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//---aim corrections variables (script controls sens for: hip fire, general, tactical & lethal grenade, ads, ads + fire and long shots (zoom sens))
//--RF
//--EASY THUMBS
//---other variables used by the script
// AUTO DEAD SILENCE, WHEN FALSE = OFF BY DEFAULT
//-----REPLACE 12 with your in game sensitivity here (and once more further down under reset defaults)
/*
/*   
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--FIRE MODS OFF
//D-pad DOWN
//--FIRE MODS OFF / anti recoil on
//D-pad UP
//--RAPID FIRE ON
//D-pad RIGHT
//--rapid_fire SECONDANRY
//D-pad LEFT
//--END
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|C|O|R|D| |T|I|M|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |R|E|L|O|A|D| |T|I|M|E|R| | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |W|E|A|P|O|N| |F|I|R|E| |M|O|D|S| | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--RESET
//-- Rapid fire
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                      _     _   
**/
//----------------------------start AIM CORRECTIONS
//--!Zoom   
//--general sens & hip fire sens
//--!Zoom  end 
//--Zoom   
// -- Zoom end
//----------------------------end AIM_CORRECTIONS
//-START     
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|U|T|O| |R|U|N| |+| |E|A|S|Y| |T|H|U|M|B| | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |H|O|L|D| |B|R|E|A|T|H| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 credits Noozbar**/
//--calculate values for progression
//--adding or subtracting
//--iteration point for progression
//--reset counters/pointers
//--set RY to anti recoil value
// DOWN end
// ADS end
// EDIT end
// no_recoil && switch end
/*
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | | | | | | | | |L|E|D|S| |R|U|M|B|L|E| | | | | | | | | | | | | | | | | | | | | | | | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--END OF MAIN
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+**/
//--avoid stack overflow
//--progression complete
//--progression not complete
//--reset counter
//--adjust ar_y
//-------------------------------------------------replace 12 with your in_game_sens here for the last time
 
 
define WALK = PS4_LY;
define STRAFE = WII_LX;
define AIM_H = XB360_RX;
define AIM_V = PS3_RY;
define FIRE = XB1_RT;
define ADS = XB1_LT;
define SPRINT = XB1_LS;
define TACTICAL = PS4_L1;
define LETHAL = PS4_R1;
define PRONE = XB1_RS;
define MELEE = XB1_B;
define JUMP = XB1_A;
define invert = 1;
define aim_sens_corrections = 1;
define sticky_aim_assist = 1;
define _v = 24;
define smart_reload = 1;
define drop_and_slide_options = 3;
define smart_thumb_stick = 4;
define walk_tresh =- 75;
 
data(0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 3,
0, 3, 0, 0, 3, 0, 3, 0);
 
const int8 AR[] = {
    352535,
    352038,
    351530
};
 
int in_game_menu_sens = 12;
int strt_v[3];
int end__v[3];
int idx;
int pin = 145;
int code;
int record;
int i_val;
int i_pnt;
int i_num;
int i_cnt;
int v, ar_y;
int edit = FALSE;
int no_recoil = FALSE;
int aa_max;
int t1_switch;
int b = 0;
int ads_grenade_sens,  ads_fire_sens,  Sens;
int long_shot_sens;
int Zoom = FALSE;
int ROF;
int hold_time;
int l_stick_click;
int auto_run = 0;
int SNIPE = FALSE;
int rumble;
int wpn_holster = FALSE;
int WPN_1;
int rld_time,  b_reload = FALSE;
int rapid_fire = FALSE;
int first_time;
int s = FALSE;
 
init {
    rld_time = get_pvar(PVAR_3, 0, 4000, 1200);
    in_game_menu_sens = get_pvar(PVAR_15, 3, 20, 12);
    first_time = get_pvar(PVAR_16, 0, 1, 1);
    aa_max = _v + 1;
    code = get_pvar(SPVAR_16, 140, 150, 140);
    if (code == pin) {
        strt_v[1] = get_pvar(SPVAR_7, - 100, 100, 0);
        strt_v[2] = get_pvar(SPVAR_8, - 100, 100, 0);
        strt_v[0] = get_pvar(SPVAR_9, - 100, 100, 0);
        end__v[1] = get_pvar(SPVAR_12, - 100, 100, 0);
        end__v[2] = get_pvar(SPVAR_13, - 100, 100, 0);
        end__v[0] = get_pvar(SPVAR_14, - 100, 100, 0);
    }
}
 
 
main {
    if (first_time == 1) {
        f_RESET_Defaults();
    }
    if (drop_and_slide_options > 0) {
        if (get_val(FIRE) || get_val(ADS) && drop_and_slide_options >= 1 || combo_running(c_EASY_RUN) && drop_and_slide_options >= 2) {
            if (event_press(PRONE)) {
                combo_run(c_DROP);
            }
        }
    }
    if (get_val(ADS) && !edit) {
        if (event_press(PS4_DOWN)) {
            t1_switch = FALSE;
            rapid_fire = FALSE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = FALSE;
        }
        if (event_press(PS4_UP)) {
            t1_switch = TRUE;
            rapid_fire = FALSE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = TRUE;
            b = 4;
        }
        if (event_press(PS4_RIGHT)) {
            t1_switch = FALSE;
            rapid_fire = TRUE;
            f_rumble(rapid_fire);
            wpn_holster = FALSE;
            no_recoil = FALSE;
        }
        if (event_press(PS4_LEFT)) {
            t1_switch = TRUE;
            rapid_fire = TRUE;
            wpn_holster = TRUE;
            f_rumble(wpn_holster);
            no_recoil = FALSE;
        }
        if (t1_switch && event_press(0)) {
            SNIPE =! SNIPE;
            f_rumble(SNIPE);
        }
        if (get_val(PS4_LEFT) && get_ptime(PS4_LEFT) > 800) {
            no_recoil = TRUE;
            f_rumble(no_recoil);
            b = 4;
        }
        if (get_val(PS4_SHARE) && get_ptime(PS4_SHARE) > 800) {
            f_RESET_Defaults();
        }
        if (event_press(WII_PLUS)) {
            s =! s;
            f_rumble(s);
        }
        f_btn(PS4_SHARE);
        f_btn(PS4_LEFT);
        f_btn(PS4_RIGHT);
        f_btn(PS4_UP);
        f_btn(PS4_DOWN);
        f_btn(WII_HOME);
        f_btn(WII_PLUS);
    }
    if (!edit && get_val(XB1_DOWN) && get_val(XB1_X) && get_ptime(XB1_X) > 500 && !record) {
        record = TRUE;
        f_rumble(record);
    }
    if (record) {
        rld_time = get_ptime(XB1_X);
        if (event_release(XB1_X)) {
            record = FALSE;
            f_save_pvars();
            f_rumble(record);
        }
    }
    if (event_release(XB1_X)) {
        b_reload = TRUE;
    }
    if (b_reload) {
        b_reload = b_reload + get_rtime();
    }
    if (b_reload >= rld_time) {
        b_reload = 0;
        b_reload = FALSE;
    }
    if (smart_reload == 1) {
        if (b_reload && !edit && (event_press(FIRE) || event_press(ADS))) {
            combo_run(c_CANCEL_RLD);
        }
    }
    if (event_release(XB1_Y) && get_ptime(XB1_Y) < 300 && wpn_holster) {
        t1_switch =! t1_switch;
        f_rumble(t1_switch);
    }
    if (record == FALSE && wpn_holster && get_val(XB1_X) && t1_switch == FALSE && get_ptime(XB1_X) > 180) {
        t1_switch = TRUE;
        f_rumble(t1_switch);
    }
    if (rapid_fire) {
        ROF = (get_val(FIRE)) / 4;
        if (ROF >= 20) ROF = 20;
        if (ROF <= 2) ROF = 2;
        hold_time = 500 / ROF;
        if (hold_time >= 125) hold_time = 125;
        if (hold_time < 25) hold_time = 25;
        if (!t1_switch && wpn_holster || !t1_switch && !wpn_holster) {
            if (get_val(FIRE) && rapid_fire) {
                combo_run(c_RAPID_FIRE);
            }
        }
        else if (combo_running(c_RAPID_FIRE)) {
            combo_stop(c_RAPID_FIRE);
        }
    }
    if (aim_sens_corrections > 0) {
        ads_grenade_sens = 111 - (in_game_menu_sens * 2);
        ads_fire_sens = 106 - (in_game_menu_sens * 2);
        long_shot_sens = 90 - (in_game_menu_sens * 2);
        if (get_val(ADS)) if (aim_sens_corrections == 2) {
            if (get_val(LETHAL)) block(LETHAL, 150);
            if (event_release(LETHAL)) {
                if (get_ptime(LETHAL) < 150 && get_val(ADS)) {
                    Zoom = TRUE;
                    f_rumble(Zoom);
                }
                else  Zoom = FALSE;
            }
        }
        if (!Zoom) {
            if (get_val(FIRE) && get_val(ADS)) {
                Sens = ads_fire_sens;
            }
            if (!get_val(FIRE) && !get_val(ADS) || get_val(FIRE) && !get_val(ADS)) {
                Sens = 100;
            }
            if (!get_val(FIRE) && get_val(ADS) || get_val(LETHAL) && !get_val(ADS) || get_val(TACTICAL) && !get_val(ADS)) {
                Sens = ads_grenade_sens;
            }
        }
        if (Zoom) {
            if (get_val(ADS)) {
                Sens = long_shot_sens;
            }
            else {
                Sens = 100;
                Zoom = FALSE;
                f_rumble(Zoom);
            }
        }
        if (Sens > 100) Sens = 100;
        sensitivity(AIM_H, NOT_USE, Sens);
        sensitivity(AIM_V, NOT_USE, Sens);
    }
    if (get_val(XB1_B) && get_val(XB1_Y)) {
        if (no_recoil && t1_switch) {
            if (event_press(XB1_UP)) {
                edit =! edit;
                f_rumble(edit);
            }
        }
        if (event_press(XB1_VIEW)) {
            in_game_menu_sens -- ;
            f_save_pvars();
        }
        if (event_press(XB1_MENU)) {
            in_game_menu_sens ++ ;
            f_save_pvars();
        }
        f_btn(XB1_B);
        f_btn(XB1_Y);
        f_btn(XB1_UP);
        f_btn(XB1_VIEW);
        f_btn(XB1_MENU);
    }
    if (smart_thumb_stick > 0) auto_run = 1;
    if (smart_thumb_stick == 2) l_stick_click = JUMP;
    if (smart_thumb_stick == 3) l_stick_click = PRONE;
    if (smart_thumb_stick == 4) l_stick_click = MELEE;
    if (smart_thumb_stick > 1 && smart_thumb_stick < 5 && get_val(XB1_LS)) if (SNIPE) {
        if (!get_val(ADS)) {
            set_val(l_stick_click, 100);
        }
    }
    else {
        set_val(l_stick_click, 100);
    }
    if (auto_run == 1) if (!b_reload && !get_val(ADS) && get_val(WALK) < (walk_tresh) && get_val(WALK) >- 99) {
        if (s) {
            combo_run(c_silent);
        }
        combo_run(c_EASY_RUN);
    }
    else if (!b_reload && !get_val(ADS) && get_val(WALK) <- 99) {
        combo_stop(c_EASY_RUN);
        combo_run(c_EASY_SPRINT);
        if (s) {
            combo_run(c_silent);
        }
    }
    if (sticky_aim_assist == 1) {
        if (get_val(ADS)) combo_run(c_STICKY_AIM);
        else  combo_stop(c_STICKY_AIM);
    }
    if (SNIPE && t1_switch) {
        if (get_val(ADS)) {
            set_val(SPRINT, 100);
        }
    }
    if (no_recoil && t1_switch) {
        if ((AR[(3 * (idx)) + (1)] + strt_v[idx]) < (AR[(3 * (idx)) + (2)] + end__v[idx])) i_val = 1;
        else  i_val =- 1;
        i_pnt = (AR[(3 * (idx)) + (0)] * 10) / (abs((AR[(3 * (idx)) + (1)] + strt_v[idx]) - (AR[(3 * (idx)) + (2)] + end__v[idx])));
        if (!get_lval(FIRE)) {
            ar_y = AR[(3 * (idx)) + (1)] + strt_v[idx];
            i_cnt = 0;
            i_num = 0;
        }
        if (get_val(FIRE)) {
            if (!f_p_complete()) ar_y = f_p_val();
            else  ar_y = AR[(3 * (idx)) + (2)] + end__v[idx];
            if (f_y_val() > 100) set_val(AIM_V, 100);
            else  set_val(AIM_V, f_y_val());
        }
        idx = WPN_1;
        if (get_val(XB1_DOWN) && !get_val(ADS)) {
            if (event_release(XB1_X) && get_ptime(XB1_X) < 500) {
                WPN_1 = 2;
                b = 4;
            }
            if (event_press(XB1_A)) {
                WPN_1 = 1;
                b = 4;
            }
            if (event_press(XB1_B)) {
                WPN_1 = 0;
                b = 4;
            }
            f_btn(XB1_Y);
            f_btn(XB1_B);
            f_btn(XB1_A);
        }
        if (edit) {
            if (get_val(ADS)) {
                if (get_val(XB1_X)) {
                    if (event_press(XB1_UP)) {
                        strt_v[idx] += 1;
                        b = 1;
                    }
                    if (event_press(XB1_DOWN)) {
                        strt_v[idx] -= 1;
                        b = 1;
                    }
                    if (event_press(XB1_RIGHT)) {
                        strt_v[idx] += 10;
                        b = 2;
                    }
                    if (event_press(XB1_LEFT)) {
                        strt_v[idx] -= 10;
                        b = 2;
                    }
                }
                if (get_val(XB1_B)) {
                    if (event_press(XB1_UP)) {
                        end__v[idx] += 1;
                        b = 1;
                    }
                    if (event_press(XB1_DOWN)) {
                        end__v[idx] -= 1;
                        b = 1;
                    }
                    if (event_press(XB1_RIGHT)) {
                        end__v[idx] += 10;
                        b = 2;
                    }
                    if (event_press(XB1_LEFT)) {
                        end__v[idx] -= 10;
                        b = 2;
                    }
                }
                f_btn(XB1_X);
                f_btn(XB1_B);
                f_btn(XB1_UP);
                f_btn(XB1_DOWN);
                f_btn(XB1_RIGHT);
                f_btn(XB1_LEFT);
            }
        }
    }
    if (b > 0) f_blink();
    if (!get_ledx()) {
        if (edit == TRUE) f_f_Led(0, 0, 0, 0);
        else if (wpn_holster && !t1_switch || !wpn_holster && rapid_fire && !t1_switch) f_f_Led(2, 2, 2, 2);
        else if (no_recoil) f_f_Led(0, 0, 2, 0);
        else  f_f_Led(2, 0, 0, 0);
    }
    if (rumble) combo_run(c_RUMBLE);
}
 
 
combo c_STICKY_AIM {
    set_val(AIM_V, f_xy_val(AIM_V, _v));
    wait(20);
    set_val(AIM_H, f_xy_val(AIM_H, _v));
    set_val(STRAFE, f_xy_val(STRAFE, _v));
    wait(20);
    set_val(AIM_V, f_xy_val(AIM_V, _v *- 1));
    wait(20);
    set_val(AIM_H, f_xy_val(AIM_H, _v *- 1));
    set_val(STRAFE, f_xy_val(STRAFE, _v *- 1));
    wait(20);
}
 
combo c_DROP {
    set_val(PRONE, 100);
    wait(1200);
    wait(800);
}
 
combo c_RAPID_FIRE {
    set_val(FIRE, 100);
    wait(hold_time);
    set_val(FIRE, 0);
    wait(hold_time);
}
 
combo c_CANCEL_RLD {
    set_val(XB1_Y, 100);
    wait(30);
    wait(20);
    set_val(XB1_Y, 100);
    wait(30);
    wait(20);
    b_reload = FALSE;
}
 
combo c_RUMBLE {
    wait(150);
    set_rumble(1, 100);
    wait(150);
    reset_rumble();
    rumble -- ;
}
 
combo c_EASY_RUN {
    set_val(SPRINT, 100);
}
 
combo c_EASY_SPRINT {
    set_val(SPRINT, 100);
    wait(30);
    wait(100);
}
 
combo c_silent {
    set_val(TACTICAL, 100);
    set_val(LETHAL, 100);
    wait(30);
    wait(30000);
}
 
 
function f_p_complete() {
    i_cnt ++ ;
    if (i_cnt > AR[(3 * (idx)) + (0)] * 10) {
        i_cnt = AR[(3 * (idx)) + (0)] * 10;
        return 1;
    }
    return 0;
}
 
function f_p_val() {
    i_num ++ ;
    if (i_num == i_pnt) {
        i_num = 0;
        ar_y += i_val;
    }
    return ar_y;
}
 
function f_rumble(pos) {
    if (pos) rumble = 1;
    else  rumble = 2;
}
 
function f_btn(f__btn) {
    if (!get_val(f__btn))
        return ;
    set_val(f__btn, 0);
}
 
function f_xy_val(f_axis, f_val) {
    if (abs(get_val(f_axis)) < aa_max)
        return f_val;
    return get_val(f_axis);
}
 
function f_y_val() {
    v = get_val(AIM_V);
    if (abs(v) < 10) v = 0;
    if (abs(v) > ar_y + 5)
        return v;
    return v + ar_y;
}
 
function f_RESET_Defaults() {
    in_game_menu_sens = 12;
    first_time = 0;
    rld_time = 1200;
    f_save_pvars();
}
 
function f_save_pvars() {
    if (edit) {
        set_pvar(SPVAR_7, strt_v[1]);
        set_pvar(SPVAR_8, strt_v[2]);
        set_pvar(SPVAR_9, strt_v[0]);
        set_pvar(SPVAR_12, end__v[1]);
        set_pvar(SPVAR_13, end__v[2]);
        set_pvar(SPVAR_14, end__v[0]);
        set_pvar(SPVAR_16, pin);
        f_rumble(1);
    }
    set_pvar(PVAR_15, in_game_menu_sens);
    set_pvar(PVAR_16, first_time);
    set_pvar(PVAR_3, rld_time);
    f_rumble(2);
}
 
function f_blink() {
    if (WPN_1 == 0) set_ledx(LED_1, b);
    if (WPN_1 == 2) set_ledx(LED_2, b);
    if (WPN_1 == 1) set_ledx(LED_4, b);
    if (b == 1 || b == 2) f_save_pvars();
    b = 0;
}
 
function f_f_Led(a, b, c, d) {
    set_led(LED_1, a);
    set_led(LED_2, b);
    set_led(LED_3, c);
    set_led(LED_4, d);
}
 


Code: Select all
#include <titanone.gph>
 
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Tuesday 5th of November, 2019 22:58 UTC 
 
    int aa_p  = 24;
    int aa_n = -24;
    int aa_delay  = 20;
    int release = 25;
 
main {
 
    if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);             
 
}
 
 
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay);
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay);
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
 

Thank you so much !
User avatar
CarlosJr
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Nov 05, 2019 4:28 pm

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

Postby Gerarkimux » Fri Nov 08, 2019 7:50 pm

And it can't be done the other way around? that is, convert from T2 to T1
User avatar
Gerarkimux
Sergeant First Class
Sergeant First Class
 
Posts: 18
Joined: Sun Jul 24, 2016 4:07 pm

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

Postby J2Kbr » Wed Nov 13, 2019 3:02 pm

Gerarkimux wrote:And it can't be done the other way around? that is, convert from T2 to T1

Depends on the script. If the script does not make use of any advanced GPC2 commands, it is possible to manually convert. :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

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

Postby Buffy » Tue Nov 26, 2019 3:36 am

I've put in a "T1 VM" experimental conversion part in the download folder. Basically it will implement the way the T1/CM ran scripts (every 10ms, or depending on what the (vm_tctrl set it as). Any feedback on how well this works would be appreciated (I've left the non-VM version in there too).
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 guko3867 » Sat Nov 30, 2019 12:51 am

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));
}
 
 
 
User avatar
guko3867
Sergeant
Sergeant
 
Posts: 9
Joined: Thu Feb 07, 2019 5:46 am

PreviousNext

Return to Tutorials and FAQs

Who is online

Users browsing this forum: No registered users and 22 guests