Custom version of Pablo's R6S

Anti-Recoil and EasySprint changes
Version1.0
Authorjayjack
Publish DateFri, 23 Sep 2016 - 15:59
Last UpdateFri, 23 Sep 2016 - 15:59
Downloads170
RATE


0

0

Code: Select all
define MOV_Y_AXIS = PS4_LY;
define MOV_X_AXIS = PS4_LX;
 
define MOV_RY_AXIS = PS4_RY;
define MOV_RX_AXIS = PS4_RX;
 
define ADS = PS4_L2;
define RELOAD = PS4_SQUARE;
define SHOOT = PS4_R2;
define SWAP = PS4_TRIANGLE;
define PRIMARY = PS4_R1;
define SECONDARY = PS4_L1;
define SPRINT = PS4_L3;
define VAULT = PS4_CROSS;
define MELEE = PS4_R3;
define CROUCH = PS4_CIRCLE;
 
define RAPID_FIRE = PS4_UP;
define CAMERA = PS4_DOWN;
define DRONE = PS4_RIGHT;
define PING = PS4_LEFT;
 
define HOME = PS4_PS;
define SHARE = PS4_SHARE;
 
int ads_toggle_flag = FALSE;
int leaning_left_flag = FALSE;
int leaning_right_flag = FALSE;
int sprint_button_flag = FALSE;
int melee_button_flag = FALSE;
int run_flag = FALSE;
int walk_flag = FALSE;
int sprint_flag = FALSE;
int primary_gadget_hold_flag = FALSE;
int primary_gadget_hold_flag_check = 0;
int primary_gadget_hold_flag_breakout = TRUE;
int tee_bag_flag = FALSE;
 
define SNIPER_MODE_SENSITIVITY = 83;       // ADJUST FROM 1-100.
define RELOAD_WAIT = 2950;                 // THIS CAN BE CUSTOMIZED ALTHOUGH I DO NOT RECOMMEND IT. IT IS OPTIMIZED FOR EVERY GUN EXCEPT FOR GLAZ'S SNIPER RIFLE AND THE TWO LMG'S (SET
                                           // IT TO 3000 TO SUPPORT ALL WEAPONS EXCEPT THE 6P41 LMG).
define SHOOT_WAIT = 300;                   // THIS CAN BE CUSTOMIZED.
define WALK_WAIT = 4000;                   // THIS CAN BE CUSTOMIZED.
define SWAP_WAIT = 950;                    // THIS CAN BE CUSTOMIZED ALTHOUGH I DO NOT RECOMMEND IT. IT IS OPTIMIZED FOR EVERY GUN EXCEPT THE G8A1 AND 6P41 LMGS (SET IT TO 900 TO SUPPORT MOST
                                           // WEAPONS, 1100 TO SUPPORT ALL WEAPONS EXCEPT THE 6P41 LMG, OR 1300 TO SUPPORT ALL WEAPONS INCLUDING IQ'S WEAPONS WHEN USING HER SENSOR).
define SWAP_WAIT_ALT = 1300;
define PRIMARY_WAIT = 1450;                // THIS CAN BE CUSTOMIZED.
define SECONDARY_WAIT = 1450;              // THIS CAN BE CUSTOMIZED.
/* define PROFILE_ONE = 3;                 // TO USE THIS, CREATE A CLONE OF THIS SCRIPT, AND CHANGE THIS SLOT NUMBER TO WHATEVER THE MAIN SLOT IS. */
/* define PROFILE_TWO = 4;                 // TO USE THIS, CREATE A CLONE OF THIS SCRIPT, AND CHANGE THIS SLOT NUMBER TO WHATEVER THE SECONDARY SLOT IS. */
 
// THESE TWO ARE BONEFISHER'S CONFIGS, TWEAKING THEM WILL AFFECT ANTI-RECOIL.
define ONLY_WITH_SCOPE = TRUE;
int AntiRecoilON = TRUE;
 
define ANTI_RECOIL_1 = 1;
define ANTI_RECOIL_2 = 2;
define ANTI_RECOIL_3 = 3;
define ANTI_RECOIL_4 = 4;
define ANTI_RECOIL_5 = 5;
int anti_tmp;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
 
int random_tee_bag;
 
int doubletap_stage_shoot = 0;
int doubletap_timing_shoot;
 
int doubletap_stage_swap = 0;
int doubletap_timing_swap;
 
int doubletap_stage_share = 0;
int doubletap_timing_share;
 
main {
 
    // Set Anti-Recoil Mode LS + DPad
    if(get_val(SECONDARY)) {
        if(event_press(RAPID_FIRE)) {
            SetAntiRecoilMode(ANTI_RECOIL_1);
        } else if(event_press(PING)) {
            SetAntiRecoilMode(ANTI_RECOIL_2);
        } else if(event_press(CAMERA)) {
            SetAntiRecoilMode(ANTI_RECOIL_3);
        } else if(event_press(DRONE)) {
            SetAntiRecoilMode(ANTI_RECOIL_4);
        } else if(event_press(VAULT)) {
            SetAntiRecoilMode(ANTI_RECOIL_5);
        }
    }
    if(!ONLY_WITH_SCOPE || get_val(SHOOT)) {combo_run(AntiRecoil);}
    if (get_val(10) < -20) { combo_stop(AntiRecoil); }
    if (get_val(9) < -20) { combo_stop(AntiRecoil); }
    if (get_val(10) > 20) { combo_stop(AntiRecoil); }
    if (get_val(9) > 20) { combo_stop(AntiRecoil); }
 
    // AIM STABILIZER
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    /* if(get_val(ADS) && get_val(SHOOT)) {
        sensitivity(MOV_RY_AXIS, NOT_USE, SNIPER_MODE_SENSITIVITY);
        sensitivity(MOV_RX_AXIS, NOT_USE, SNIPER_MODE_SENSITIVITY);
        deadzone(MOV_RY_AXIS, MOV_RX_AXIS, DZ_CIRCLE, 0);
    } */

 
    // TOGGLE LEAN
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    if(get_val(ADS)) {
        combo_run(ExtendedADS);
    }
 
    if(ads_toggle_flag) {
        combo_run(ToggleADS);
    }
 
    if(ads_toggle_flag) {
        sensitivity(MOV_RY_AXIS, NOT_USE, SNIPER_MODE_SENSITIVITY);
        sensitivity(MOV_RX_AXIS, NOT_USE, SNIPER_MODE_SENSITIVITY);
        deadzone(MOV_RY_AXIS, MOV_RX_AXIS, DZ_CIRCLE, 0);
 
        if(event_press(SPRINT)) {
            if(leaning_left_flag) {
                combo_run(LeanCompleteStop);
                combo_stop(LeanRight);
            }
            leaning_left_flag = TRUE;
            leaning_right_flag = FALSE;
        }
 
        if(event_press(MELEE)) {
            if(leaning_right_flag) {
                combo_run(LeanCompleteStop);
                combo_stop(LeanRight);
            }
            leaning_right_flag = TRUE;
            leaning_left_flag = FALSE;
        }
    }
 
    if(get_val(VAULT) || get_val(RELOAD) || get_val(PRIMARY) || get_val(SECONDARY) /*|| get_val(RAPID_FIRE) || get_val(DRONE) || get_val(CAMERA)*/) {
        ads_toggle_flag = FALSE;
        combo_run(LeanCompleteStop);
    }
 
    // LEAN PROTECT
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    // THIS ALLOWS YOU TO LEAN EVEN IF YOU ACCIDENTALLY PRESS THE SPRINT BUTTON BEFORE PRESSING ADS, MAKING IT MUCH LESS JARRING. I'VE CALLED IT "LEAN PROTECT".
    // INTERESTINGLY THERE ARE 4 DIFFERENT LEAN SCENARIOS TO CONSIDER WHICH I WAS NOT AWARE OF, SO MY ORIGINAL LEAN PROTECT CODE WAS NOT AS CONSISTENT.
    // ONCE I UNDERSTOOD ALL THE SCENARIOS I WAS ABLE TO CODE FOR THEM AND NOW LEANING IS BETTER, MORE RELIABLE AND SMOOTHER THAN IT WAS IN THE ORIGINAL GAME.
    if(get_val(SPRINT) && event_press(ADS)) {                             // SCENARIO 1 - WHEN YOU PRESS AND HOLD THE LEAN BUTTON **BEFORE** ADS.
        //combo_stop(TimedWalk);
        combo_stop(ExtendedMelee);
        combo_stop(LeanRight);
        melee_button_flag = FALSE;
        sprint_button_flag = TRUE;
        leaning_left_flag = TRUE;
    }
    if(get_val(ADS) && event_press(SPRINT)) {                             // SCENARIO 2 - WHEN YOU PRESS THE SPRINT BUTTON TOO QUICKLY. THIS IS VERY UNRELIABLE IN THE
        //combo_stop(TimedWalk);                                            // ORIGINAL GAME AND I WOULD EVEN GO AS FAR AS TO CALL IT A BUG. MY CODE FORCES A SPRINT WAIT TIME WHICH
        //combo_run(ExtendedADS);                                         // MEANS THE LEAN WILL EXECUTE 100% OF THE TIME NOW, REGARDLESS OF HOW BRIEFLY YOU TAPPED THE SPRINT BUTTON.
        combo_stop(ExtendedMelee);
        melee_button_flag = FALSE;
        combo_run(ExtendedSprint);
        sprint_button_flag = FALSE;
        ads_toggle_flag = TRUE;
        leaning_left_flag = TRUE;
 
    }
    /* if((event_press(SPRINT) || get_val(SPRINT)) && !get_val(ADS)) {       // SCENARIO 3 - WHEN YOU TAP THE LEAN BUTTON **BEFORE** ADS.
        combo_stop(TimedWalk);                                     
        combo_stop(ExtendedMelee);                                 
        melee_button_flag = FALSE;                                 
        combo_run(ExtendedSprint);             
        sprint_button_flag = TRUE;             
    } */

    if(get_val(MELEE) && event_press(ADS)) {                              // THE NEXT THREE FUNCTIONS BASICALLY MIRROR ALL OF THE ABOVE BUT FOR LEANING RIGHT (MELEE). I HAVE HOWEVER, REMOVED SCENARIO 3                   
        //combo_stop(TimedWalk);                                         // BECAUSE IT WAS POINTLESS - YOU CANNOT STOP THE MELEE ANIMATION FROM ACTIVATING.         
        combo_stop(ExtendedSprint);   
        combo_stop(LeanLeft);
        sprint_button_flag = FALSE;
        melee_button_flag = TRUE;
        leaning_right_flag = TRUE;
    }
    if(get_val(ADS) && event_press(MELEE)) {
        //combo_stop(TimedWalk);
        //combo_run(ExtendedADS);
        combo_stop(ExtendedSprint);
        sprint_button_flag = FALSE;
        combo_run(ExtendedMelee);
        melee_button_flag = FALSE;
        ads_toggle_flag = TRUE;
        leaning_right_flag = TRUE;
    }
    /* if((event_press(MELEE) || get_val(MELEE)) && !get_val(ADS)) {
        //combo_stop(TimedWalk);                                     
        combo_stop(ExtendedSprint);
        sprint_button_flag = FALSE;
        combo_run(ExtendedMelee);
        melee_button_flag = TRUE;
    } */

    if(get_val(ADS) && sprint_button_flag && !melee_button_flag) { // THIS IS THE CORE "LEAN PROTECT" CODE.
        //combo_run(ExtendedADS);
        /* combo_stop(AllowSwapping); */
        combo_stop(LeanRight);
        combo_run(LeanLeft);
        sprint_button_flag = FALSE;
        ads_toggle_flag = TRUE;
    }
    if(get_val(ADS) && melee_button_flag && !sprint_button_flag) { // THIS IS THE CORE "LEAN PROTECT" CODE.
        //combo_run(ExtendedADS);
        /* combo_stop(AllowSwapping); */
        combo_stop(LeanLeft);
        combo_run(LeanRight);
        melee_button_flag = FALSE;
        ads_toggle_flag = TRUE;
    }
 
    // EASY SPRINT
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    // THIS IS THE CORE EASY SPRINT CODE.
    if(get_val(MOV_Y_AXIS) <= -97) {
        run_flag = !run_flag;
    } else if(event_release(MOV_Y_AXIS) >= -97) {
        run_flag = !run_flag;
    }
    if(!walk_flag && run_flag && get_val(MOV_Y_AXIS) <= -97) {
        combo_run(EasySprint);
 
    // THIS IS USED TO ADD A WAIT TIME TO CERTAIN ACTIONS, TO PREVENT THEM FROM BEING CANCELLED OUT BY EASY SPRINT.
    // THE USE OF MOV_Y_AXIS IN THE FIRST "ELSE" STATEMENT IS TO PREVENT THE WAIT TIME FROM CONTINUING ON EVEN AFTER A BARRICADE HAS
    // BEEN PUT UP, WHICH MAKES IT FEEL LIKE THERE IS INPUT LAG. IT ALSO HAS THE UNINTENTIONAL BENEFIT OF ALLOWING YOU TO SPRINT-CANCEL
    // RELOAD IF YOU ARE RELOADING FORM A STATIONARY POSITION.
    } else if(!run_flag && get_val(RELOAD) && !get_val(SECONDARY) && !get_val(SPRINT) && get_val(MOV_Y_AXIS) <= -97) {
        run_flag = FALSE;
        combo_run(AllowReloading);
    } else if(!run_flag && get_val(SHOOT)) {
        run_flag = FALSE;
        combo_run(AllowShooting);
    // MOV_Y_AXIS IS USED HERE IN CONJUNCTION WITH ANOTHER FUNCTION BELOW TO PREVENT THE "AllowSwapping" WAIT TIME
    // FROM BEING APPLIED TO THE SPRINT BUTTON SO THAT YOU CAN FAST DESCENT WHILE RAPPELLING.
    /* } else if(!run_flag && get_val(SPRINT) && !get_val(ADS) && get_val(MOV_Y_AXIS) <= -97) {
        run_flag = FALSE;
        combo_run(AllowSwapping); */

    } else if(!run_flag && get_val(PRIMARY)) {
        run_flag = FALSE;
        combo_run(AllowPrimary);
    // THE DUAL MAPPING HERE ALLOWS ME TO MAP SECONDARY GADGETS TO TWO SEPARATE BUTTONS, ONE WITH A WAIT TIME AND ONE WITHOUT, WHICH IS PARTICULARLY USEFUL FOR NITRO CELLS.
    } else if(!run_flag && get_val(SECONDARY) && !get_val(RELOAD)) {
        run_flag = FALSE;
        combo_run(AllowSecondary);
    } else if(get_val(SECONDARY) && get_val(RELOAD)) {
        /* set_val(RELOAD, 0); */
        set_val(SECONDARY, 100);
        primary_gadget_hold_flag = FALSE;
        walk_flag = FALSE;
        combo_stop(PrimaryGadgetHold);
    }
 
    // THIS IS USED TO MANUALLY CANCEL OUT THE WAIT TIME THAT IS ADDED TO CERTAIN ACTIONS, ALLOWING EASY SPRINT TO KICK IN.
    if(event_press(VAULT)) {
        primary_gadget_hold_flag = FALSE;
        walk_flag = FALSE;
        sprint_button_flag = FALSE;
        melee_button_flag = FALSE;
        combo_stop(EasySprint);
        combo_stop(AllowReloading);
        combo_stop(AllowShooting);
        combo_stop(AllowSwapping);
        combo_stop(AllowPrimary);
        combo_stop(PrimaryGadgetHold);
        //combo_stop(TimedWalk);
        combo_run(HoldToWalk);
    }
 
    // WALK OPTION (HOLD).
    if(!get_val(VAULT)) {
        if(get_val(MOV_Y_AXIS) < -97) {
            sprint_flag = TRUE;
        }
    } else {
        combo_stop(EasySprint);
        if(sprint_flag) combo_run(HoldToWalk);
    }
 
    // ALTERNATIVE WALK OPTION (TOGGLE) - TAP THE RELOAD BUTTON WHILE HOLDING DOWN THE VAULT BUTTON.
    if((event_press(RELOAD) && get_val(VAULT)) || event_press(CROUCH)) {
        combo_stop(EasySprint);
        combo_stop(AllowPrimary);
        combo_stop(HoldToWalk);
        walk_flag = !walk_flag;
    }
 
    // ALTERNATIVE WALK OPTION (AUTOMATIC) - DOUBLE TAP THE SHOOT BUTTON TO ACTIVATE A TIME DELAYED "AUTOMATIC" WALK.
    /* if(doubletap_stage_shoot == 0) {
        if(get_val(SHOOT)) doubletap_stage_shoot = 1;
    } else if(doubletap_stage_shoot == 1) {
        if(!get_val(SHOOT)) { doubletap_timing_shoot = 0; doubletap_stage_shoot = 2; }
    } else if(doubletap_stage_shoot == 2) {
        if(get_val(SHOOT)) { doubletap_stage_shoot = 1; combo_stop(EasySprint); combo_stop(AllowPrimary); combo_stop(HoldToWalk); combo_run(TimedWalk); walk_flag = TRUE; }
        doubletap_timing_shoot = doubletap_timing_shoot + get_rtime();
        if(doubletap_timing_shoot > 150) doubletap_stage_shoot = 0;
    }
    if(get_val(SHOOT) && combo_running(TimedWalk)) {
        combo_restart(TimedWalk);
    } */

 
    if(get_val(MOV_Y_AXIS) <= -97) {
        if(get_val(CROUCH)) {
            set_val(CROUCH, 0);
        }
    }
 
    // PRIMARY GADGET MODES
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    // ALTERNATIVE PRIMARY GADGET OPTION - TAP THE MIDDLE MOUSE WHEEL TO AUTOMATICALLY HOLD DOWN THE PRIMARY GADGET BUTTON (FOR USE WITH OPERATORS LIKE PULSE, IQ AND MONTAGNE). 
    if(event_press(RELOAD) && event_press(VAULT)) {
        combo_run(PrimaryGadgetRefresh);
        primary_gadget_hold_flag = !primary_gadget_hold_flag;
        primary_gadget_hold_flag_breakout = TRUE;
    }
    if(primary_gadget_hold_flag) {
        combo_run(PrimaryGadgetHold);
    }
 
    // THIS ALLOWS ME TO OVERRIDE THE AUTOMATIC PRIMARY GADGET OPTION IF I HAVE ACTIVATED IT BY ACCIDENT.
    /* if(get_val(PRIMARY) && combo_running(PrimaryGadgetHold)) {
        if(primary_gadget_hold_flag_check == 0) {
            primary_gadget_hold_flag = FALSE;
            walk_flag = FALSE;
            combo_stop(PrimaryGadgetHold);
            combo_run(PrimaryGadgetRefresh);
            primary_gadget_hold_flag_check = 1;
        }   
        set_val(PRIMARY, 100);
    }   
    if(event_release(PRIMARY)) {
        combo_run(PrimaryGadgetManual);
        combo_run(AllowPrimary);
        primary_gadget_hold_flag_check = 0;
    } */

 
    // THIS ALLOWS ME TO TAP SPRINT TO PERFORM A QUICK SWAP TO MY WEAPON WHEN I AM USING THE ALTERNATIVE PRIMARY GADGET OPTION.
    /* if(primary_gadget_hold_flag_breakout && event_press(SPRINT) && !get_val(ADS) && !get_val(RELOAD) && combo_running(PrimaryGadgetHold)) {
        primary_gadget_hold_flag_breakout = FALSE;
        primary_gadget_hold_flag = FALSE;
        walk_flag = FALSE;
        combo_stop(AllowReloading);
        combo_stop(PrimaryGadgetHold);
        combo_run(AllowSwappingAlt);
        combo_run(LeanCompleteStop);
    } /* else if(primary_gadget_hold_flag_breakout && get_val(SPRINT) && get_val(ADS) && !get_val(RELOAD) && combo_running(PrimaryGadgetHold)) {
        primary_gadget_hold_flag_breakout = FALSE;
    } */

 
    // WEAPON SWAP MODES
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    // THIS ALLOWS YOU TO DOUBLE TAP THE SPRINT BUTTON IN ORDER TO SWAP WEAPONS (SPRINT ITSELF HAS BEEN REPURPOSED, THIS IS MADE POSSIBLE BECAUSE
    // IT IS NO LONGER BEING USED DUE TO EASY SPRINT).
    if(!ads_toggle_flag && (!get_val(SECONDARY) && !get_val(RELOAD))) {
        if(doubletap_stage_swap == 0) {
            if(get_val(SPRINT)) doubletap_stage_swap = 1;
        } else if(doubletap_stage_swap == 1) {
            if(!get_val(SPRINT)) { doubletap_timing_swap = 0; doubletap_stage_swap = 2; }
        } else if(doubletap_stage_swap == 2) {
            if(get_val(SPRINT)) { doubletap_stage_swap = 1; run_flag = FALSE; combo_run(AllowSwapping); combo_run(WeaponSwap); combo_run(LeanCompleteStop); }
            doubletap_timing_swap = doubletap_timing_swap + get_rtime();
            if(doubletap_timing_swap > 200) doubletap_stage_swap = 0;
        }
    }
 
    // ALTERNATIVE WEAPON SWAP OPTION - ALLOWS YOU TO SWAP WEAPONS BY HOLDING THE WALK BUTTON AND THEN PRESSING
    // SPRINT, THIS IMPROVES THE HANDLING OF IQ'S GADGET AND IS ALSO USEFUL WHEN RAPPELLING.
    if(get_val(SPRINT) && get_val(VAULT)) {
        combo_run(AllowSwappingAlt);
        combo_run(LeanCompleteStop);
    }
 
    // THIS IS AN OVERRIDE TO PREVENT THE "AllowSwapping" WAIT TIME FROM BEING APPLIED TO THE
    // SPRINT BUTTON WHEN YOU ARE USING FAST DESCENT WHILE RAPPELLING.
    /* if(get_val(SPRINT) && !get_val(VAULT) && (!sprint_button_flag || !melee_button_flag)) {
        combo_stop(AllowReloading);
        combo_stop(AllowPrimary);
        set_val(SPRINT, 100);
    } */

 
    // THIS IS AN OVERRIDE TO PREVENT THE "AllowSwapping" AND "AllowSecondary" WAIT TIMES FROM BEING APPLIED TO THE SPRINT BUTTON SO THAT I CAN DANCE.
    /* if(get_val(SPRINT) && (get_val(SECONDARY) || get_val(PRIMARY))) {
        combo_stop(AllowSwapping);
        combo_stop(AllowSecondary);
        combo_stop(AllowPrimary);
        set_val(SPRINT, 100);
        combo_run(LeanCompleteStop);
    } */

 
    // CAPITAO ALT FIRING MODE SHORTCUT.
    /* if(get_val(RELOAD) && get_val(SPRINT)) {
        set_val(RAPID_FIRE, 100);
    } */

 
    /* BUCK'S SKELETON KEY MODE - AUTO SWAPS BACK TO THE MAIN WEAPON AFTER A SINGLE USE OF THE SHOTGUN.
    if(primary_auto_toggle_flag && get_val(SHOOT) && !get_val(ADS)) {
        combo_run(PrimaryAutoToggle);
    } else if(primary_auto_toggle_flag && get_val(SHOOT) && get_val(ADS)) {
        primary_auto_toggle_flag = FALSE;
    } */

 
    // MISCELLANEOUS
    // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
    // THIS IS A HAIR TRIGGER SCRIPT THAT REDUCES THE PRESSURE REQUIRED TO ACTIVATE THE ADS BUTTON.
    /* if(get_val(ADS)){sensitivity(ADS, NOT_USE, 195); } */
 
    // ALTERNATIVE (MORE COMFORTABLE) CROUCH OPTION - HOLD RELOAD AND CROUCH TO ACTIVATE.
    /* random_tee_bag = irand(70, 100);
    if(get_val(RELOAD) && event_press(CROUCH)) {
       tee_bag_flag = TRUE;
    }
    if(get_val(RELOAD) && tee_bag_flag) {
        walk_flag = FALSE;
        combo_run(TeeBag);
    } else if(event_release(RELOAD)) {
        tee_bag_flag = FALSE;
    } */

 
    /* THIS IS USED TO TOGGLE BETWEEN THE STANDARD AND ALTERNATIVE PROFILES.
    if(event_press(CROUCH) && event_press(PING)) {
        if(get_slot() == PROFILE_ONE) {
            load_slot(PROFILE_TWO);
        } else {
            load_slot(PROFILE_ONE);
        }
    } */

 
    /* THIS ALLOWS YOU TO DOUBLE TAP THE PS HOME BUTTON IN ORDER TO OPEN THE PLAYSTATION SHARE MENU - YOU ACTUALLY NEED TO PRESS IT ONCE TO OPEN */
    /* THE PS HOME MENU, AND THEN DOUBLE TAP IT AGAIN TO ACTIVATE THE SHARE BUTTON (SO IT IS REALLY A TRIPLE TAP). */
    /* if(doubletap_stage_share == 0) {
        if(get_val(HOME)) doubletap_stage_share = 1;
    } else if(doubletap_stage_share == 1) {
        if(!get_val(HOME)) { doubletap_timing_share = 0; doubletap_stage_share = 2; }
    } else if(doubletap_stage_share == 2) {
        if(get_val(HOME)) { doubletap_stage_share = 1; combo_run(ShareButton); }
        doubletap_timing_share = doubletap_timing_share + get_rtime();
        if(doubletap_timing_share > 150) doubletap_stage_share = 0;
    } */

}
 
// COMBOS
// -----------------------------------------------------------------------------------------------------------------------------------------------------------
 
combo ExtendedADS {
    set_val(ADS, 100);
    wait(50);
}
 
combo ToggleADS {
    set_val(ADS, 100);
    run_flag = FALSE;
}
 
combo ExtendedSprint {
    set_val(SPRINT, 100);
    wait(100);
}
 
combo ExtendedMelee {
    set_val(MELEE, 100);
    wait(100);
}
 
combo LeanLeft {
    set_val(SPRINT, 0);
    wait(40);
    set_val(SPRINT, 100);
    wait(300);
}
 
combo LeanRight {
    set_val(MELEE, 0);
    wait(40);
    set_val(MELEE, 100);
    wait(300);
}
 
combo LeanCompleteStop {
    ads_toggle_flag = FALSE;
    sprint_button_flag = FALSE;
    melee_button_flag = FALSE;
    leaning_left_flag = FALSE;
    leaning_right_flag = FALSE;
    combo_stop(ExtendedADS);
    combo_stop(ExtendedSprint);
    combo_stop(ExtendedMelee);
}
 
// THERE ARE MANY DIFFERENT EASY SPRINT SCRIPTS, BUT I HAVE FOUND THAT THIS ONE IS THE MOST RELIABLE. MANY OF THEM APPEAR TO WORK AT FIRST BUT WILL FAIL 10% OF THE TIME.
combo EasySprint {
    set_val(SPRINT,100);
    wait(40);
    wait(40);
}
 
combo HoldToWalk {
    set_val(MOV_Y_AXIS, 0);
    sprint_flag = FALSE;
    wait(40);
}
 
/* combo TimedWalk {
    set_val(SPRINT, 0);
    wait(WALK_WAIT);
    walk_flag = FALSE;
} */

 
combo AllowReloading {
    set_val(SPRINT, 0);
    wait(RELOAD_WAIT);
}
 
combo AllowShooting {
    set_val(SPRINT, 0);
    wait(SHOOT_WAIT);
}
 
combo AllowSwapping {
    set_val(SPRINT, 0);
    wait(SWAP_WAIT);
}
 
combo AllowSwappingAlt {
    set_val(SWAP, 100);
    set_val(SPRINT, 0);
    wait(SWAP_WAIT_ALT);
}
 
combo AllowPrimary {
    set_val(SPRINT, 0);
    wait(PRIMARY_WAIT);
}
 
combo AllowSecondary {
    set_val(SPRINT, 0);
    wait(SECONDARY_WAIT);
}
 
combo WeaponSwap {
    set_val(SWAP, 100);
    wait(500);
    primary_gadget_hold_flag = FALSE;
    walk_flag = FALSE;
    combo_stop(PrimaryGadgetHold);
    combo_run(LeanCompleteStop);
}
 
combo PrimaryGadgetHold {
    combo_stop(EasySprint);
    combo_stop(AllowPrimary);
    combo_stop(HoldToWalk);
    set_val(PRIMARY, 100);
}
 
combo PrimaryGadgetRefresh {
    set_val(PRIMARY, 0);
    wait(100);
}
 
combo PrimaryGadgetManual {
    set_val(PRIMARY, 100);
    wait(40);
}
 
/* combo PrimaryAutoToggle {
    primary_auto_toggle_flag = FALSE;
    set_val(SHOOT, 100);
    wait(40);
    set_val(PRIMARY, 100);
    wait(40);
} */

 
/* combo TeeBag {
    set_val(CROUCH, 0);
    wait(random_tee_bag);
    set_val(CROUCH, 100);
    wait(random_tee_bag);
}
 
combo ShareButton {
    set_val(SHARE, 100);
    wait(500);
} */

 
combo AntiRecoil {
    if(get_val(SHOOT) && AntiRecoilON) {
      anti_tmp = get_val(MOV_RY_AXIS) + anti_recoil;
      if(anti_tmp > 100) anti_tmp = 100;
      else if(anti_tmp < -100) anti_tmp = -100;
      set_val(MOV_RY_AXIS, anti_tmp);
 
      anti_tmp = get_val(MOV_RX_AXIS) - anti_recoil_left;
      if(anti_tmp > 100) anti_tmp = 100;
      else if(anti_tmp < -100) anti_tmp = -100;
      set_val(MOV_RX_AXIS, anti_tmp);
 
      anti_tmp = get_val(MOV_RX_AXIS) + anti_recoil_right;
      if(anti_tmp > 100) anti_tmp = 100;
      else if(anti_tmp < -100) anti_tmp = -100;
      set_val(MOV_RX_AXIS, anti_tmp);
    }
}
 
function SetAntiRecoilMode(m) {
    if(m == ANTI_RECOIL_1) {
        anti_recoil = 25;
        anti_recoil_left = 10;
        anti_recoil_right = 0;
    } else if(m == ANTI_RECOIL_2) {
        anti_recoil = 26;
        anti_recoil_left = 10;
        anti_recoil_right = 0;
    } else if(m == ANTI_RECOIL_3) {
        anti_recoil = 27;
        anti_recoil_left = 10;
        anti_recoil_right = 0;
    } else if(m == ANTI_RECOIL_4) {
        anti_recoil = 0;
        anti_recoil_left = 0;
        anti_recoil_right = 0;
    } else if(m == ANTI_RECOIL_5) {
        anti_recoil = 0;
        anti_recoil_left = 0;
        anti_recoil_right = 0;
    }
}