Combine this please

GPC1 script programming for Titan One. Code examples, questions, requests.

Combine this please

Postby sebascu » Wed Oct 16, 2019 10:50 pm

Code: Select all
//                                        Made by JewFire aka JewishLuck
//                     Thanks to Baby Cham for helping me put this together and fixing a few things.
//                                   Tested With TLOU-Remastered and PS4 Controller
 
// colorled(0,0,0,0); // Off / No LED light
// colorled(1,0,0,0); // Dim Blue
// colorled(0,1,0,0); // Dim Red
// colorled(0,0,1,0); // Dim Lime/Green
// colorled(0,0,0,1); // Dim Fuchsia/Pink
// colorled(1,0,1,0); // Dim SkyBlue
// colorled(0,1,1,0); // Dim Yellow
// colorled(1,1,1,1); // Dim White
// colorled(2,0,0,0); // Blue 
// colorled(0,2,0,0); // Red
// colorled(0,0,2,0); // Lime/Green
// colorled(0,0,0,2); // Fuchsia/Pink
// colorled(2,0,2,0); // SkyBlue
// colorled(0,2,2,0); // Yellow
// colorled(2,2,2,2); // White
// colorled(3,0,0,0); // Bright Blue
// colorled(0,3,0,0); // Bright Red
// colorled(0,0,3,0); // Bright Lime/Green
// colorled(0,0,0,3); // Bright Fuchsia/Pink
// colorled(3,0,3,0); // Bright SkyBlue
// colorled(0,3,3,0); // Bright Yellow
// colorled(3,3,3,3); // Bright white
// ColorLed (1) Dim light
// ColorLed (2) Normal/Medium
// ColorLed (3) Bright light
 
    //##########################################################################################################################################
    //############## WEAPON TYPE ###############################################################################################################
    //                                                                                                  ########################################
    define SEMI         = TRUE//SEMI AUTOMATIC GUNS ex. SHEIVA                                      ########################################
    define SMG          = FALSE//SUB MACHINE GUNS ex. VMP                                            ########################################
    define AR           = TRUE//AUSSAULT RIFLES ex. MAN O WAR                                       ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //############## SENSITIVITY ###############################################################################################################
    //                                                                                                  ########################################
    define SENSE_LOW    = FALSE//SENSITIVITY 1 - 4                                                   ########################################
    define SENSE_MID    = TRUE//SENSITIVITY 5 - 14                                                  ########################################
    define SENSE_MOUSE  = FALSE//SENSITIVITY 14 MOUSE                                                ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //############## DEADZONE ##################################################################################################################
    //                                                                                                  ########################################
    define RECOMMENDED  = FALSE; //Recommended Settings                                                 ########################################
    define STRONGER     = FALSE; //Stronger than Recommended                                            ########################################
    define INSANE       = TRUE//Strongest Assist possible                                           ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //######################## C O N F I G U R A T I O N - ENDS HERE ###########################################################################
    //##########################################################################################################################################
    //##########################################################################################################################################
    //################# !!! ## GPC CODE DO NOT CHANGE ANYTHING ## !!! ##########################################################################
    //##########################################################################################################################################
    //                                                                                                                                        ##
    define RT   = PS4_R1;
    define LT   = PS4_L1;
    define RX   = XB1_RX;                             
    define RY   = XB1_RY;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
    int delay       = 11;
    int value       = 75;
    int value2      = 75;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
    int negative_value_rt_first     = 0;
    int positive_value_rt_first     = 0;
    int positive_value_rt_second    = 0;
 
    int negative_value_lt_first     = 0;
    int positive_value_lt_first     = 0;
    int positive_value_lt_second    = 0;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
//DECLARARATIONS
//--------------------------------------------------------------
define SHOOT_BUTTON      = PS4_R2;
define RAPIDFIRE_BUTTON = PS4_L2;
define RATE_OF_FIRE       = 180; // Range: 1 to 25 RPS (Round/s)
define AUTOSPOT_BUTTON  = PS4_L2;
define SPOT_BUTTON      =PS4_R3;
//VARIABLES
//--------------------------------------------------------------
//             *DO NOT EDIT/DELETE THIS SECTION*
int hold_time;
int rest_time;
int Attack                   = FALSE;
 
int Timeout_Melee            = 0;
int DbleClick_Square         = 0;
 
//INITIALIZATION - init
//--------------------------------------------------------------
init {
     hold_time = 5450 / RATE_OF_FIRE;
     rest_time = hold_time - 5450;
     if(rest_time < 23) rest_time = 0;
}
 
//MAIN BLOCK RUTINES
//--------------------------------------------------------------
main { 
    // COLOR INDICATION FOR the RAPID FIRE ON / OFF
    if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) {
        colorled(0,0,1,0)// OFF (Dim Lime/Green) *you can edit here*
        colorled(3,3,3,3); // (White) *you can edit here*
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
        reset_leds(); }
 
    // COLOR INDICATION FOR the RAPID SPOT ON / OFF
    if(get_val(RAPIDFIRE_BUTTON)) {
        combo_run(RapidSpot);
    } else if(combo_running(RapidSpot)) {
        combo_stop(RapidSpot);
        reset_leds(); }
 
  // Double click Square to turn off/on Melee.
    if(DbleClick_Square > 0) DbleClick_Square = DbleClick_Square - get_rtime();
    if(event_press(PS4_SQUARE) && DbleClick_Square <= 0) {
        DbleClick_Square = 300; }
        else if(event_press(PS4_SQUARE) && DbleClick_Square > 0) {
        Attack = !Attack;
        Timeout_Melee = 0;
    }
    if(Attack) {
        set_val(TRACE_1, Timeout_Melee);
        Timeout_Melee = Timeout_Melee + get_rtime();
        if(Timeout_Melee <= 350) combo_run(Brawl);
        else combo_run(StrongAttack);
    } else if(combo_running(Brawl)) {
        combo_stop(Brawl);
        reset_leds(); }
 
   // Rapid fire on Square button.
    if(get_val(PS4_SQUARE)) { combo_run(Action); }
    else if(combo_running(Action)) { combo_stop(Action); }
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -16;
            positive_value_lt_first     = 16;
            positive_value_lt_second    = 16;
 
            negative_value_rt_first     = -24;
            positive_value_rt_first     = 24;
            positive_value_rt_second    = 14;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -14;
            positive_value_lt_first     = 14;
            positive_value_lt_second    = 14;
 
            negative_value_rt_first     = -16;
            positive_value_rt_first     = 16;
            positive_value_rt_second    = 6;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -22;
            positive_value_lt_first     = 22;
            positive_value_lt_second    = 12;
 
            negative_value_rt_first     = -32;
            positive_value_rt_first     = 32;
            positive_value_rt_second    = 22;
        }
 
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -22;
            positive_value_lt_first     = 22;
            positive_value_lt_second    = 22;
 
            negative_value_rt_first     = -32;
            positive_value_rt_first     = 32;
            positive_value_rt_second    = 22;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -20;
            positive_value_lt_first     = 20;
            positive_value_lt_second    = 20;
 
            negative_value_rt_first     = -24;
            positive_value_rt_first     = 24;
            positive_value_rt_second    = 13;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -30;
            positive_value_lt_first     = 30;
            positive_value_lt_second    = 20;
 
            negative_value_rt_first     = -40;
            positive_value_rt_first     = 40;
            positive_value_rt_second    = 30;
        }
 
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -17;
            positive_value_lt_first     = 17;
            positive_value_lt_second    = 17;
 
            negative_value_rt_first     = -27;
            positive_value_rt_first     = 27;
            positive_value_rt_second    = 17;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -16;
            positive_value_lt_first     = 16;
            positive_value_lt_second    = 16;
 
            negative_value_rt_first     = -19;
            positive_value_rt_first     = 19;
            positive_value_rt_second    = 10;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -25;
            positive_value_lt_first     = 25;
            positive_value_lt_second    = 15;
 
            negative_value_rt_first     = -35;
            positive_value_rt_first     = 35;
            positive_value_rt_second    = 25;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
        if(INSANE == TRUE && STRONGER == FALSE && RECOMMENDED == FALSE) {
            value  = 45;
            value2 = -45;
        }
 
        if(INSANE == FALSE && STRONGER == TRUE && RECOMMENDED == FALSE) {
            value  = 39;
            value2 = -39;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
        if(SENSE_LOW == FALSE && SENSE_MID == TRUE && SENSE_MOUSE == FALSE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 33;
            value2  = -33;
        }
 
        if(SENSE_LOW == TRUE && SENSE_MID == FALSE && SENSE_MOUSE == FALSE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 33;
            value2  = -33;
        }
 
        if(SENSE_LOW == FALSE && SENSE_MID == FALSE && SENSE_MOUSE == TRUE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 20;
            value2  = -20;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ## 
        if(get_val(LT) && (SEMI == TRUE || AR == TRUE || SMG == TRUE)) {
            combo_run(LT_C);
        }
 
        if(get_val(RT) && get_val(LT) && (SEMI == TRUE || AR == TRUE || SMG == TRUE)) {
            combo_stop(LT_C);
            combo_run(RT_C);
        }
 
        if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value
        || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value){
            combo_stop(LT_C);
            combo_stop(RT_C);
        }
}
 
//COMBO BLOCKS
//--------------------------------------------------------------
combo RapidFire {
    set_val(SHOOT_BUTTON, 100);
    wait(hold_time);
    set_val(SHOOT_BUTTON, 0);
    wait(rest_time);
    set_val(SHOOT_BUTTON, 0);
}
 
combo RapidSpot {
    set_val(SPOT_BUTTON, 100);
    wait(hold_time);
    set_val(SPOT_BUTTON, 0);
    wait(rest_time);
    set_val(SPOT_BUTTON, 0);
}
 
combo Brawl {
    set_val(PS4_SQUARE, 100);
    set_led(LED_4, 2);
    wait(80);
    set_val(PS4_SQUARE, 0);
    set_led(LED_2, 0);
    wait(60);
    set_val(PS4_SQUARE, 0);
    set_led(LED_4, 0);
}   
 
combo StrongAttack {
    set_val(PS4_TRIANGLE, 100);
    wait(100);
    set_val(PS4_TRIANGLE, 0);
    Timeout_Melee = 0;
}
 
combo Action {
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 0);
    wait(20);
    set_val(PS4_SQUARE, 0);
}
 
    combo LT_C {
       set_val(RY, negative_value_lt_first);         
       wait(delay)
       set_val(RX, positive_value_lt_first);
       set_val(RY, positive_value_lt_second);
       wait(delay)
       set_val(RY, positive_value_lt_second);
       wait(delay)                 
       set_val(RX, negative_value_lt_first);
       set_val(RY, positive_value_lt_second);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, negative_value_rt_first);             
       wait(delay)
       set_val(RX, positive_value_rt_first);
       set_val(RY, positive_value_rt_second);
       wait(delay)
       set_val(RY, positive_value_rt_second);
       wait(delay)                 
       set_val(RX, negative_value_rt_first);
       set_val(RY, positive_value_rt_second);
       wait(delay)
    }
 
// COLOR LED INDICATION for PS4 *NO NEED TO EDIT BELOW*
//--------------------------------------------------------------
function colorled(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
//Anti Recoil
//Maximum 10+ Higher than Anti Recoil
 
 
 
 
int AP = 22;
int AM =- 22;
int Delay = 20;
int ARelease = 23;
int AR = 24;
int Release = 34;
int ARS;
 
main {
    if (get_val(7)) set_val(5, 100);
    if (get_val(7) && get_val(4)) combo_run(c_RF);
    if (get_val(7)) combo_run(c_AS);
    if (get_val(7) && get_val(4)) {
        combo_run(c_AR);
    }
    if (abs(get_val(10)) > Release || abs(get_val(9)) > Release) {
        combo_stop(c_AR);
    }
}
 
 
combo c_AR {
    ARS = get_val(10) + AR;
    if (ARS > 100) ARS = 100;
    set_val(10, ARS);
}
 
combo c_RF {
    set_val(4, 100);
    wait(40);
    set_val(4, 0);
    wait(40);
}
 
combo c_AS {
    set_val(10, f_a_f(10, AP));
    wait(Delay);
    set_val(9, f_a_f(9, AP));
    wait(Delay);
    set_val(10, f_a_f(10, AM));
    wait(Delay);
    set_val(9, f_a_f(9, AM));
    wait(Delay);
}
 
 
function f_a_f(p, m) {
    if (abs(get_val(p)) < ARelease)
        return m;
    return get_val(p);
}
 
 
 
User avatar
sebascu
Sergeant Major
Sergeant Major
 
Posts: 68
Joined: Sat Aug 03, 2019 5:32 pm

Re: Combine this please

Postby Mad » Thu Oct 17, 2019 1:19 am

Code: Select all
//                                        Made by JewFire aka JewishLuck
//                     Thanks to Baby Cham for helping me put this together and fixing a few things.
//                                   Tested With TLOU-Remastered and PS4 Controller
 
// colorled(0,0,0,0); // Off / No LED light
// colorled(1,0,0,0); // Dim Blue
// colorled(0,1,0,0); // Dim Red
// colorled(0,0,1,0); // Dim Lime/Green
// colorled(0,0,0,1); // Dim Fuchsia/Pink
// colorled(1,0,1,0); // Dim SkyBlue
// colorled(0,1,1,0); // Dim Yellow
// colorled(1,1,1,1); // Dim White
// colorled(2,0,0,0); // Blue 
// colorled(0,2,0,0); // Red
// colorled(0,0,2,0); // Lime/Green
// colorled(0,0,0,2); // Fuchsia/Pink
// colorled(2,0,2,0); // SkyBlue
// colorled(0,2,2,0); // Yellow
// colorled(2,2,2,2); // White
// colorled(3,0,0,0); // Bright Blue
// colorled(0,3,0,0); // Bright Red
// colorled(0,0,3,0); // Bright Lime/Green
// colorled(0,0,0,3); // Bright Fuchsia/Pink
// colorled(3,0,3,0); // Bright SkyBlue
// colorled(0,3,3,0); // Bright Yellow
// colorled(3,3,3,3); // Bright white
// ColorLed (1) Dim light
// ColorLed (2) Normal/Medium
// ColorLed (3) Bright light
 
    //##########################################################################################################################################
    //############## WEAPON TYPE ###############################################################################################################
    //                                                                                                  ########################################
    define SEMI         = TRUE//SEMI AUTOMATIC GUNS ex. SHEIVA                                      ########################################
    define SMG          = FALSE//SUB MACHINE GUNS ex. VMP                                            ########################################
    define AR           = TRUE//AUSSAULT RIFLES ex. MAN O WAR                                       ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //############## SENSITIVITY ###############################################################################################################
    //                                                                                                  ########################################
    define SENSE_LOW    = FALSE//SENSITIVITY 1 - 4                                                   ########################################
    define SENSE_MID    = TRUE//SENSITIVITY 5 - 14                                                  ########################################
    define SENSE_MOUSE  = FALSE//SENSITIVITY 14 MOUSE                                                ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //############## DEADZONE ##################################################################################################################
    //                                                                                                  ########################################
    define RECOMMENDED  = FALSE; //Recommended Settings                                                 ########################################
    define STRONGER     = FALSE; //Stronger than Recommended                                            ########################################
    define INSANE       = TRUE//Strongest Assist possible                                           ########################################
    //                                                                                                  ########################################
    //##########################################################################################################################################
    //######################## C O N F I G U R A T I O N - ENDS HERE ###########################################################################
    //##########################################################################################################################################
    //##########################################################################################################################################
    //################# !!! ## GPC CODE DO NOT CHANGE ANYTHING ## !!! ##########################################################################
    //##########################################################################################################################################
    //                                                                                                                                        ##
    define RT   = PS4_R1;
    define LT   = PS4_L1;
    define RX   = XB1_RX;                             
    define RY   = XB1_RY;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
    int delay       = 11;
    int value       = 75;
    int value2      = 75;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
    int negative_value_rt_first     = 0;
    int positive_value_rt_first     = 0;
    int positive_value_rt_second    = 0;
 
    int negative_value_lt_first     = 0;
    int positive_value_lt_first     = 0;
    int positive_value_lt_second    = 0;
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
//DECLARARATIONS
//--------------------------------------------------------------
define SHOOT_BUTTON      = PS4_R2;
define RAPIDFIRE_BUTTON = PS4_L2;
define RATE_OF_FIRE       = 180; // Range: 1 to 25 RPS (Round/s)
define AUTOSPOT_BUTTON  = PS4_L2;
define SPOT_BUTTON      =PS4_R3;
//VARIABLES
//--------------------------------------------------------------
//             *DO NOT EDIT/DELETE THIS SECTION*
int hold_time;
int rest_time;
int Attack                   = FALSE;
 
int Timeout_Melee            = 0;
int DbleClick_Square         = 0;
 
int AP = 22;
int AM =- 22;
int Delay = 20;
int ARelease = 23;
int iAR = 24;
int Release = 34;
int ARS;
 
//INITIALIZATION - init
//--------------------------------------------------------------
init {
     hold_time = 5450 / RATE_OF_FIRE;
     rest_time = hold_time - 5450;
     if(rest_time < 23) rest_time = 0;
}
 
//MAIN BLOCK RUTINES
//--------------------------------------------------------------
main {
    if (get_val(7)) combo_run(c_AS);
    if (get_val(7) && get_val(4)) {
        combo_run(c_AR);
    }
    if (abs(get_val(10)) > Release || abs(get_val(9)) > Release) {
        combo_stop(c_AR);
    }
    // COLOR INDICATION FOR the RAPID FIRE ON / OFF
    if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) {
        colorled(0,0,1,0)// OFF (Dim Lime/Green) *you can edit here*
        colorled(3,3,3,3); // (White) *you can edit here*
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
        reset_leds(); }
 
    // COLOR INDICATION FOR the RAPID SPOT ON / OFF
    if(get_val(RAPIDFIRE_BUTTON)) {
        combo_run(RapidSpot);
    } else if(combo_running(RapidSpot)) {
        combo_stop(RapidSpot);
        reset_leds(); }
 
  // Double click Square to turn off/on Melee.
    if(DbleClick_Square > 0) DbleClick_Square = DbleClick_Square - get_rtime();
    if(event_press(PS4_SQUARE) && DbleClick_Square <= 0) {
        DbleClick_Square = 300; }
        else if(event_press(PS4_SQUARE) && DbleClick_Square > 0) {
        Attack = !Attack;
        Timeout_Melee = 0;
    }
    if(Attack) {
        set_val(TRACE_1, Timeout_Melee);
        Timeout_Melee = Timeout_Melee + get_rtime();
        if(Timeout_Melee <= 350) combo_run(Brawl);
        else combo_run(StrongAttack);
    } else if(combo_running(Brawl)) {
        combo_stop(Brawl);
        reset_leds(); }
 
   // Rapid fire on Square button.
    if(get_val(PS4_SQUARE)) { combo_run(Action); }
    else if(combo_running(Action)) { combo_stop(Action); }
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -16;
            positive_value_lt_first     = 16;
            positive_value_lt_second    = 16;
 
            negative_value_rt_first     = -24;
            positive_value_rt_first     = 24;
            positive_value_rt_second    = 14;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -14;
            positive_value_lt_first     = 14;
            positive_value_lt_second    = 14;
 
            negative_value_rt_first     = -16;
            positive_value_rt_first     = 16;
            positive_value_rt_second    = 6;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -22;
            positive_value_lt_first     = 22;
            positive_value_lt_second    = 12;
 
            negative_value_rt_first     = -32;
            positive_value_rt_first     = 32;
            positive_value_rt_second    = 22;
        }
 
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -22;
            positive_value_lt_first     = 22;
            positive_value_lt_second    = 22;
 
            negative_value_rt_first     = -32;
            positive_value_rt_first     = 32;
            positive_value_rt_second    = 22;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -20;
            positive_value_lt_first     = 20;
            positive_value_lt_second    = 20;
 
            negative_value_rt_first     = -24;
            positive_value_rt_first     = 24;
            positive_value_rt_second    = 13;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == FALSE && SENSE_LOW == TRUE) {
 
            negative_value_lt_first     = -30;
            positive_value_lt_first     = 30;
            positive_value_lt_second    = 20;
 
            negative_value_rt_first     = -40;
            positive_value_rt_first     = 40;
            positive_value_rt_second    = 30;
        }
 
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
 
        if(SEMI == FALSE && SMG == FALSE && AR == TRUE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -17;
            positive_value_lt_first     = 17;
            positive_value_lt_second    = 17;
 
            negative_value_rt_first     = -27;
            positive_value_rt_first     = 27;
            positive_value_rt_second    = 17;
        }
 
        if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -16;
            positive_value_lt_first     = 16;
            positive_value_lt_second    = 16;
 
            negative_value_rt_first     = -19;
            positive_value_rt_first     = 19;
            positive_value_rt_second    = 10;
        }
 
        if(SEMI == FALSE && SMG == TRUE && AR == FALSE && SENSE_MOUSE == FALSE && SENSE_MID == TRUE && SENSE_LOW == FALSE) {
 
            negative_value_lt_first     = -25;
            positive_value_lt_first     = 25;
            positive_value_lt_second    = 15;
 
            negative_value_rt_first     = -35;
            positive_value_rt_first     = 35;
            positive_value_rt_second    = 25;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
        if(INSANE == TRUE && STRONGER == FALSE && RECOMMENDED == FALSE) {
            value  = 45;
            value2 = -45;
        }
 
        if(INSANE == FALSE && STRONGER == TRUE && RECOMMENDED == FALSE) {
            value  = 39;
            value2 = -39;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ##
        if(SENSE_LOW == FALSE && SENSE_MID == TRUE && SENSE_MOUSE == FALSE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 33;
            value2  = -33;
        }
 
        if(SENSE_LOW == TRUE && SENSE_MID == FALSE && SENSE_MOUSE == FALSE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 33;
            value2  = -33;
        }
 
        if(SENSE_LOW == FALSE && SENSE_MID == FALSE && SENSE_MOUSE == TRUE && RECOMMENDED == TRUE && STRONGER == FALSE && INSANE == FALSE) {
 
            value   = 20;
            value2  = -20;
        }
    //                                                                                                                                        ##
    //##########################################################################################################################################
    //                                                                                                                                        ## 
        if(get_val(LT) && (SEMI == TRUE || AR == TRUE || SMG == TRUE)) {
            combo_run(LT_C);
        }
 
        if(get_val(RT) && get_val(LT) && (SEMI == TRUE || AR == TRUE || SMG == TRUE)) {
            combo_stop(LT_C);
            combo_run(RT_C);
        }
 
        if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value
        || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value){
            combo_stop(LT_C);
            combo_stop(RT_C);
        }
}
 
//COMBO BLOCKS
//--------------------------------------------------------------
combo RapidFire {
    set_val(SHOOT_BUTTON, 100);
    wait(hold_time);
    set_val(SHOOT_BUTTON, 0);
    wait(rest_time);
    set_val(SHOOT_BUTTON, 0);
}
 
combo RapidSpot {
    set_val(SPOT_BUTTON, 100);
    wait(hold_time);
    set_val(SPOT_BUTTON, 0);
    wait(rest_time);
    set_val(SPOT_BUTTON, 0);
}
 
combo Brawl {
    set_val(PS4_SQUARE, 100);
    set_led(LED_4, 2);
    wait(80);
    set_val(PS4_SQUARE, 0);
    set_led(LED_2, 0);
    wait(60);
    set_val(PS4_SQUARE, 0);
    set_led(LED_4, 0);
}   
 
combo StrongAttack {
    set_val(PS4_TRIANGLE, 100);
    wait(100);
    set_val(PS4_TRIANGLE, 0);
    Timeout_Melee = 0;
}
 
combo Action {
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 0);
    wait(20);
    set_val(PS4_SQUARE, 0);
}
 
    combo LT_C {
       set_val(RY, negative_value_lt_first);         
       wait(delay)
       set_val(RX, positive_value_lt_first);
       set_val(RY, positive_value_lt_second);
       wait(delay)
       set_val(RY, positive_value_lt_second);
       wait(delay)                 
       set_val(RX, negative_value_lt_first);
       set_val(RY, positive_value_lt_second);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, negative_value_rt_first);             
       wait(delay)
       set_val(RX, positive_value_rt_first);
       set_val(RY, positive_value_rt_second);
       wait(delay)
       set_val(RY, positive_value_rt_second);
       wait(delay)                 
       set_val(RX, negative_value_rt_first);
       set_val(RY, positive_value_rt_second);
       wait(delay)
    }
 
combo c_AR {
    ARS = get_val(10) + iAR;
    if (ARS > 100) ARS = 100;
    set_val(10, ARS);
}
 
combo c_AS {
    set_val(10, f_a_f(10, AP));
    wait(Delay);
    set_val(9, f_a_f(9, AP));
    wait(Delay);
    set_val(10, f_a_f(10, AM));
    wait(Delay);
    set_val(9, f_a_f(9, AM));
    wait(Delay);
}
 
 
function f_a_f(p, m) {
    if (abs(get_val(p)) < ARelease)
        return m;
    return get_val(p);
}
 
// COLOR LED INDICATION for PS4 *NO NEED TO EDIT BELOW*
//--------------------------------------------------------------
function colorled(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 86 guests