help change rapid fire from first script to second script

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

help change rapid fire from first script to second script

Postby sebascu » Sun Oct 13, 2019 4:48 pm

PRIMER SCRIPT:

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);
}


SEGUNDO SCRIPT:

Code: Select all
//Posted : Friday 11th of October, 2019 1:36 UTC  
 
 
 
 define RECOIL_POWER=25;// Range: 1 to 25 RPS (Rounds)
 define RT=XB1_RT;
 define LT=XB1_LT;
 define R_X=XB1_RX;
 define R_Y=XB1_RY;
 define L_X=XB1_LX;
 define L_Y=XB1_LY;
 define RIGHT_STICK_VERTIKAL=XB1_RY;
 define RIGHT_STICK_HORIZONTAL=XB1_RX;
 define TWENTY=20;
 define ZERO=0;
 define FIVEH=500;
 define SHOOT_BUTTON=PS4_R2;
 define RAPIDFIRE_BUTTON=PS4_L2;
 define RATE_OF_FIRE=180;
 define AUTOSPOT_BUTTON=PS4_L2;
 define SPOT_BUTTON=PS4_R3;
 
 
 
 
 int hold=0;
 int rest=0;
 int hold_time=0;
 int rest_time=0;
 int Attack=FALSE;
 int Timeout_Melee=0;
 int DbleClick_Square=0;
init{
 
 
     hold_time = 5450 / RATE_OF_FIRE;
     rest_time = hold_time - 5450;
     if(rest_time < 23) rest_time = 0;
 
 
            hold = FIVEH;
            rest = hold - TWENTY;
            if(rest < ZERO) rest = ZERO;
}
main{
//s1-Main
 
 
 
            if(get_val(RT) && get_val(LT)) {
                combo_run(AR_C);
            }
 
 
            if(get_val(LT)) {
                combo_run(Auto_Aimm);
            }
 
            else if(combo_running(Auto_Aimm)) {   
                combo_stop (Auto_Aimm);
            }
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm);
            }
 
            if (get_val(R_X)) {
                combo_run(Auto_Aimm1);
            }
 
            else if(combo_running(Auto_Aimm)) {   
                combo_stop (Auto_Aimm1);
            }
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm1);
            }
 
            if (get_val(LT)>0 && get_val(RT)>0) {
                combo_run(Auto_Aimm2);
            }   
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm2);
            }
 
            if (get_val(LT)&& get_val(R_X)< -45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_X)> +45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_Y)< -45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_Y)> +45) {
                combo_stop(Auto_Aimm)
            }
 
            if ( get_val(R_X)< -45) {
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_X)> +45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_Y)< -45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_Y)> +45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_X)< -45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_X)> +45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_Y)< -45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_Y)> +45){
                combo_stop(Auto_Aimm2)
            }
 
//s2-Main
 
 
 
 
    // 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(); }
 
   // Rapid fire on Square button.
    if(get_val(PS4_SQUARE)) { combo_run(Action); }
    else if(combo_running(Action)) { combo_stop(Action); }
}
//s1-combos
 
 
        combo Auto_Aimm {     
           set_val(R_Y,-25);           
           wait(25)
           set_val(R_X,+25);
           set_val(R_Y,+15);
           wait(25)
           set_val(R_Y,+15);
           wait(25)                 
           set_val(R_X,-25);
           set_val(R_Y,+15);
           wait(25)
        }
 
        combo Auto_Aimm1 {     
           set_val(R_Y,-20);               
           wait(25)
           set_val(R_X,+20);
           set_val(R_Y,+10);
           wait(25)
           set_val(R_Y,+10);
           wait(25)                 
           set_val(R_X,-20);
           set_val(R_Y,+10);
           wait(25)
        }
 
        combo Auto_Aimm2 {     
           set_val(R_Y,-25);             
           wait(25)
           set_val(R_X,+25);
           set_val(R_Y,+25);
           wait(25)
           set_val(R_Y,+25);
           wait(25)                 
           set_val(R_X,-25);
           set_val(R_Y,+25);
           wait(25)
        }
 
 
        combo AR_C {
            if(get_val(RIGHT_STICK_HORIZONTAL) > -50 && get_val(RIGHT_STICK_HORIZONTAL) < 50 && get_val(RIGHT_STICK_VERTIKAL) > -15 && get_val(RIGHT_STICK_VERTIKAL) < 15) {
                set_val(RIGHT_STICK_VERTIKAL, RECOIL_POWER);
            }
        }
//s2-combos
 
 
 
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 Action {
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 0);
    wait(20);
    set_val(PS4_SQUARE, 0);
}
 
// COLOR LED INDICATION for PS4 *NO NEED TO EDIT BELOW*
//--------------------------------------------------------------
//s1-funcs
 
 
//s2-funcs
 
 
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);
}
User avatar
sebascu
Sergeant Major
Sergeant Major
 
Posts: 68
Joined: Sat Aug 03, 2019 5:32 pm

Re: help change rapid fire from first script to second scrip

Postby Mad » Sun Oct 13, 2019 5:05 pm

Code: Select all
//Posted : Friday 11th of October, 2019 1:36 UTC  
 
 
 
 define RECOIL_POWER=25;// Range: 1 to 25 RPS (Rounds)
 define RT=XB1_RT;
 define LT=XB1_LT;
 define R_X=XB1_RX;
 define R_Y=XB1_RY;
 define L_X=XB1_LX;
 define L_Y=XB1_LY;
 define RIGHT_STICK_VERTIKAL=XB1_RY;
 define RIGHT_STICK_HORIZONTAL=XB1_RX;
 
 define SHOOT_BUTTON=PS4_R2;
 define RAPIDFIRE_BUTTON=PS4_L2;
 define RATE_OF_FIRE=180;
 define AUTOSPOT_BUTTON=PS4_L2;
 define SPOT_BUTTON=PS4_R3;
 
 int hold_time;
 int rest_time;
 int Attack=FALSE;
 int Timeout_Melee=0;
 int DbleClick_Square=0;
 
init{
     hold_time = 5450 / RATE_OF_FIRE;
     rest_time = hold_time - 5450;
     if(rest_time < 23) rest_time = 0;
}
main{
//s1-Main
 
 
 
            if(get_val(RT) && get_val(LT)) {
                combo_run(AR_C);
            }
 
 
            if(get_val(LT)) {
                combo_run(Auto_Aimm);
            }
 
            else if(combo_running(Auto_Aimm)) {   
                combo_stop (Auto_Aimm);
            }
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm);
            }
 
            if (get_val(R_X)) {
                combo_run(Auto_Aimm1);
            }
 
            else if(combo_running(Auto_Aimm)) {   
                combo_stop (Auto_Aimm1);
            }
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm1);
            }
 
            if (get_val(LT)>0 && get_val(RT)>0) {
                combo_run(Auto_Aimm2);
            }   
 
            else if(combo_running(Auto_Aimm2)) {   
                combo_stop (Auto_Aimm2);
            }
 
            if (get_val(LT)&& get_val(R_X)< -45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_X)> +45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_Y)< -45) {
                combo_stop(Auto_Aimm)
            }
 
            if (get_val(LT)&& get_val(R_Y)> +45) {
                combo_stop(Auto_Aimm)
            }
 
            if ( get_val(R_X)< -45) {
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_X)> +45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_Y)< -45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_Y)> +45){
                combo_stop(Auto_Aimm1)
            }
 
            if ( get_val(R_X)< -45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_X)> +45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_Y)< -45){
                combo_stop(Auto_Aimm2)
            }
 
            if ( get_val(R_Y)> +45){
                combo_stop(Auto_Aimm2)
            }
 
//s2-Main
 
 
 
 
    // 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(); }
 
   // Rapid fire on Square button.
    if(get_val(PS4_SQUARE)) { combo_run(Action); }
    else if(combo_running(Action)) { combo_stop(Action); }
 
    if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) {
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
    }
}
//s1-combos
 
 
        combo Auto_Aimm {     
           set_val(R_Y,-25);           
           wait(25)
           set_val(R_X,+25);
           set_val(R_Y,+15);
           wait(25)
           set_val(R_Y,+15);
           wait(25)                 
           set_val(R_X,-25);
           set_val(R_Y,+15);
           wait(25)
        }
 
        combo Auto_Aimm1 {     
           set_val(R_Y,-20);               
           wait(25)
           set_val(R_X,+20);
           set_val(R_Y,+10);
           wait(25)
           set_val(R_Y,+10);
           wait(25)                 
           set_val(R_X,-20);
           set_val(R_Y,+10);
           wait(25)
        }
 
        combo Auto_Aimm2 {     
           set_val(R_Y,-25);             
           wait(25)
           set_val(R_X,+25);
           set_val(R_Y,+25);
           wait(25)
           set_val(R_Y,+25);
           wait(25)                 
           set_val(R_X,-25);
           set_val(R_Y,+25);
           wait(25)
        }
 
 
        combo AR_C {
            if(get_val(RIGHT_STICK_HORIZONTAL) > -50 && get_val(RIGHT_STICK_HORIZONTAL) < 50 && get_val(RIGHT_STICK_VERTIKAL) > -15 && get_val(RIGHT_STICK_VERTIKAL) < 15) {
                set_val(RIGHT_STICK_VERTIKAL, RECOIL_POWER);
            }
        }
//s2-combos
 
 
 
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 Action {
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 0);
    wait(20);
    set_val(PS4_SQUARE, 0);
}
 
combo RapidFire {
    set_val(SHOOT_BUTTON, 100);
    wait(hold_time);
    set_val(SHOOT_BUTTON, 0);
    wait(rest_time);
    set_val(SHOOT_BUTTON, 0);
}
 
// COLOR LED INDICATION for PS4 *NO NEED TO EDIT BELOW*
//--------------------------------------------------------------
//s1-funcs
 
 
//s2-funcs
 
 
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: 4532
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 87 guests