Left For Dead 1 and 2

Features include: Auto-Vocalization, Turbo Melee, Automatic Reload on Switch (weapons), User-Specific Quick Config, Self-Heal, Rapid-fire, Dual Anti-Recoil settings. Note: Anti-recoil is not really necessary in L4D. I am laying foundation for future shooter scripts.
Version1.01
AuthorShadohz
Publish DateMon, 16 May 2016 - 19:21
Last UpdateTue, 7 Jun 2016 - 16:04
Downloads138
RATE


3

0

Release Notes: Added a separate variable "Reload Delay". This will allow player to alter the amount of time the script will wait after switching weapons to perform an auto-reload. May be necessary to alter value for "slow draw" weapons that repeatedly fail to reload after switching.
Code: Select all
/*
* ===============================================================================================================================================
* Author:           Shadohz
* Game:             Left For Dead 1 and 2
* System:           All
* Controller:       All   
* Game Settings:    Default
* Website:          https://www.youtube.com/user/Shadohz75
* Copyright:        Copyright � 2016 Shadohz, 5Y5T3M 0V3RL04D. All Rights Reserved.
* Restrictions:     http://www.copyrighted.com/copyrights/view/4vsm-07w7-cmds-8tl9. This source is not licensed under "open-source", "public
*                   domain", nor "source-available". Modification and redistribution requires prior approval. [email protected]
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* HOW TO USE
*
* CONFIGURATION - The following options must be set after initializing the configuration setup.
*
* Press START and BACK to initialize the configuration setup. Press START and BACK again to disable the configuration setup. You will have 2
* seconds to respond before the configuration setup automatically closes. When selecting a configuration option below, the 2-second timer will
* reset after each button press to allow you plenty of time to set your cooldowns. Raise or lower this value with "ConfigTimeout".
*
*
* Press LEFT STICK to reset defaults.
* This option only works while configuring the setup. This will reset all cooldown times to zero (0) and power priorities removed.
*
*
* Press RIGHT STICK to quick-select your own custom configuration.
* Go to "QuickClick customization" and read the notes commented in the area. Adjust the settings to your liking. Try out the setting and re-adjust
* as necessary. Read the ENTIRE How to Use section first so that you understand how to do On-The-Fly changes as well.
*
*
* Move RIGHT STICK up/down to enable or disable AutoVocalize.
* Move the right analog (camera) stick up to enable AutoVocalize. Move the right analog (camera) stick down to disable AutoVocalize.
*
*
* Press SWITCH to enable and add cooldown time to Auto-Reload after Switch.
* Each press adds one (1) second to cooldown time for automatically reloading you weapon after switching. The script automatically maxes the
* value at four (4) seconds even if you set it higher than that.
*
*
* Press FIRE to select Hip-Fire mode.
* Press FIRE to enable the basis of the script. All features are bound to this particular feature. In other words, if you do not enable this,
* the other features will not work.
*
*
* Press MELEE to enable TurboMelee.
* Press and hold MELEE to do continuous melee attacks.
*
*
* Press D-PAD UP/DOWN to add cooldown time to Fire Modes 1 and 2.
* Press D-PAD UP to add cooldown time to Fire Mode 1. Press D-PAD DOWN to add cooldown time to Fire Mode 2. Max cooldown time is four (4) seconds
* either option. Both types by default are set to 0 (rapidfire). Recommended you set one or the other to one (1). It is not generally necessary
* to have a value higher than one (1) to use the "Charge-up" effect. You will have to set value to one (1) or higher to not sputter automatic
* weapons.
*
*
* Press D-PAD LEFT/RIGHT to add more range to Anti-Recoil Modes 1 and 2.
* The script is designed to allow two different Anti-Recoil settings. One is for Fire Mode 1, the other for Fire Mode 2. Press D-PAD LEFT to add
* more range for Fire Mode 1. Press D-PAD RIGHT to add more range for Fire Mode 2. The AR range is from 0-100. Each button press increases the
* setting in multiples of 5.
*
*
* ===============================================================================================================================================
* HOW TO USE
* POST-CONFIGURATION (IN-GAME USE) - These are the features you will use after setting up your kit's configuration.
*
* Press LEFT STICK and RIGHT STICK to disable all configurations.
* This will disable all cooldowns and fire behavior. This is a quick-click in case you need to temporarily disable everything. Press Press LEFT
* STICK and RIGHT STICK to disable all configurations. again to re-enable everything.
*
*
* Press RIGHT STICK (RS) to switch between Primary and Secondary Fire modes.
* Pressing the RIGHT STICK will allow you switch between the primary and secondary fire modes that you selected earlier (i.e. switching between
* rapidfire and burst modes).
*
*
* To use other controller settings or layouts, then remove the double backslashes on the appropriate SWAP lines at the very top of the MAIN
* section.
*
*
* IMPORTANT: To add more cooldown time or to change the Fire Mode behavior, press START + BACK, then press the appropriate D-PAD, Y, LB, RB, or
* LT/RT button. If you have set the cooldown time too high on one or more powers/charge-up weapon then press START + BACK then LS to reset the
* entire setup.
*
* IMPORTANT: Also added is Anti-AFK feature. Scroll to the bottom of script and add your custom AFK/FARM. Set the timer (in seconds) in DEFINES
* section. The AAFK will not activate unless you have configured the script to run. It checks for button presses every second. If no buttons have
* been pressed by the time it reaches your set AAFK cooldown, then it will automatically been the AAFK behavior. You must press any button in
* order to make the AAFK stop performing. The script is also designed to perform self-heals. If you press First-Aid or Pills then the script will
* automatically perform the action on your character. This was added to prevent rapidfire from allowing you to heal. If you don't want this
* behavior then comment out the Self-Heal combo. Keep in mind that you will need to disable the script in order to heal yourself or someone else.
*
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* VERSION CHANGES
*
* 1.00 - First version includes my standard On-The-Fly customization. Features include: Auto-Vocalization, Turbo Melee, Automatic Reload on
* Switch (weapons), User-Specific Quick Config, Self-Heal, Rapid-fire, Dual Anti-Recoil settings. Note: Anti-recoil is not really necessary in
* L4D. I am laying foundation for future shooter scripts.
*
* 1.01 - Added a separate variable "Reload Delay". This will allow player to alter the amount of time the script will wait after switching
* weapons to perform an auto-reload. May be necessary to alter value for "slow draw" weapons that repeatedly fail to reload after switching.
*
*
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* DEFINES
* ===============================================================================================================================================
*/

define HoldTime = 50;               // Hold: How long to hold down the Combo button. Increase/decrease affects shooting speed/burst behavior.
define RestTime = 500;              // Rest: How long to wait before pressing the Combo button again.
define CdMultiplier=1;              // The number of seconds to increase between D-PAD presses for Cooldown timers.
define ConfigTimeout=2;             // Amount of time before the Configuration Setup will close automatically.
define Mode1=8;                     // Button assigned to resetting configuration.
define Mode2=5;                     // Button assigned to switching Fire Modes
define Timeout = 4000;              // Minimum time required before AutoVocalize is re-enabled.
define ReloadDelay = 500;           // Amount of time (in milliseconds) script will delay after switching weapons to trigger a reload.
define AafkCdTime = 0;              // Anti-Away From Keyboard Cooldown time (in seconds).
//define GrenadeMotion = 1;           // 1=Dead Center, 2=Free, 3=Offensive, 4=Defensive.   
define AbilityMotion = 2;           // 1=Dead Center, 2=Free, 3=Offensive, 4=Defensive.
 
// Controller Variables
define Dashboard = 0;               // XB1_XBOX    XB360_XBOX   PS4_PS           PS3_PS         WII_HOME    WII_HOME
define Status = 1;                  // XB1_VIEW    XB360_BACK   PS4_SHARE        PS3_SELECT     WII_MINUS   WII_MINUS
define Menu = 2;                    // XB1_MENU    XB360_START  PS4_OPTIONS      PS3_START      WII_PLUS    WII_PLUS
define Spin = 3;                    // XB1_RB      XB360_RB     PS4_R1           PS3_R1                     WII_RT
define Fire = 4;                    // XB1_RT      XB360_RT     PS4_R2           PS3_R2                     WII_ZR
define Aim = 5;                     // XB1_RS      XB360_RS     PS4_R3           PS3_R3         WII_ONE
define Crouch = 6;                  // XB1_LB      XB360_LB     PS4_L1           PS3_L1         WII_C       WII_LT
define Melee = 7;                   // XB1_LT      XB360_LT     PS4_L2           PS3_L2         WII_Z       WII_ZL
define Vocalize = 8;                // XB1_LS      XB360_LS     PS4_L3           PS3_L3         WII_TWO
define AnaCamSS = 9;                // XB1_RX      XB360_RX     PS4_RX           PS3_RX                     WII_RX
define AnaCamUD = 10;               // XB1_RY      XB360_RY     PS4_RY           PS3_RY                     WII_RY
define AnaMovSS = 11;               // XB1_LX      XB360_LX     PS4_LX           PS3_LX         WII_NX      WII_LX
define AnaMovUD = 12;               // XB1_LY      XB360_LY     PS4_LY           PS3_LY         WII_NY      WII_LY
define DPAD1 = 13;                  // XB1_UP      XB360_UP     PS4_UP           PS3_UP         WII_UP      WII_UP
define DPAD2 = 14;                  // XB1_DOWN    XB360_DOWN   PS4_DOWN         PS3_DOWN       WII_DOWN    WII_DOWN
define DPAD3 = 15;                  // XB1_LEFT    XB360_LEFT   PS4_LEFT         PS3_LEFT       WII_LEFT    WII_LEFT
define DPAD4 = 16;                  // XB1_RIGHT   XB360_RIGHT  PS4_RIGHT        PS3_RIGHT      WII_RIGHT   WII_RIGHT
define Switch = 17;                 // XB1_Y       XB360_Y      PS4_TRIANGLE     PS3_TRIANGLE               WII_X
define Reload = 18;                 // XB1_B       XB360_B      PS4_CIRCLE       PS3_CIRCLE     WII_B       WII_B
define Jump = 19;                   // XB1_A       XB360_A      PS4_CROSS        PS3_CROSS      WII_A       WII_A
define Use = 20;                    // XB1_X       XB360_X      PS4_SQUARE       PS3_SQUARE                 WII_Y
 
/*
* ===============================================================================================================================================
* MAPPINGS
* ===============================================================================================================================================
*/

 
 
/*
* ===============================================================================================================================================
* INITIALIZED VARIABLES
* ===============================================================================================================================================
*/

// No need to change anything else
//int CdPTime[4], CdGTime[2],CdCheck, CdWait;
int CdPTime0,CdPTime1,CdPTime2,CdPTime3,CdGTime0,CdGTime1,CdCheck,CdWait;
int led, currentled, run;
//int Power[4], PowerIsSet[4], seconds[4];
int Power0,Power1,Power2,Power3;
// int PowerIsSet0,PowerIsSet1,PowerIsSet2,PowerIsSet3;
int seconds0,seconds1,seconds2,seconds3;
int configsetup, Reset;
int timelimit=1000;//, minutes, hours;
int Start_at=FALSE;
int Finish_at=TRUE;
int refresh=FALSE;
int ConfigSelect;
int FirePrimary=TRUE,AutoVocalize;
int ConfigSeconds,position,snipe;
int AafkSeconds,AutoZoom=FALSE,AutoMelee=FALSE;
int FireSqueeze,FireRelease,AbCycle;
int ARSet1,ARSet2,ARComp;
 
init {
    led = 0;
    reset_leds();
    while(led<4){
        if(get_led(led)==1) currentled = led;
        led = led+1;
    }
} // End Initialization
 
/*
* ===============================================================================================================================================
* MAIN
* ===============================================================================================================================================
*/

main {
//swap(Fire, Melee);                                  //Controller Config 2
//swap (Jump, Melee); swap (Melee, Spin);             //Controller Config 3
//swap(Vocalize, Crouch);                             //Controller Config 4
//swap(AnaCamSS,AnaMovSS);swap(AnaCamUD,AnaMovUD);    //Controller Layout Southpaw
 
    set_val(TRACE_1,AutoVocalize);
    set_val(TRACE_2,FirePrimary);
    set_val(TRACE_3,seconds0);
    set_val(TRACE_4,seconds1);
    set_val(TRACE_5,seconds2);
    set_val(TRACE_6,seconds3);
 
    if(CdCheck == 0){Start_at=TRUE;Finish_at=FALSE;timelimit=1000;}
    if(Start_at )
    {// Timer count seconds, minutes, hour
       timelimit=timelimit- get_rtime();
        if( timelimit<=0) {
            ConfigSeconds=ConfigSeconds+1;
            seconds0=seconds0+1;
            seconds1=seconds1+1;
            seconds2=seconds2+1;
            seconds3=seconds3+1;
            AafkSeconds=AafkSeconds+1
            timelimit=1000;
        } // seconds count
    }
 
    if((event_press(Menu) && get_val(Status)) || (get_val(Menu) && event_press(Status))) {
       // configsetup=!configsetup;
        if(!configsetup) {
            set_led(currentled,2);
            configsetup = TRUE;
            CdCheck=1;
            combo_run(RumbleStrong);
            ConfigSeconds=0;
        }
    }
 
    if (configsetup == TRUE) {
        if (ConfigSeconds>=ConfigTimeout) {
            configsetup = 0;
            reset_leds();
            combo_run(RumbleWeak);
        }
 
        if(event_press(Mode1))  {
            ConfigSelect = 0;
            CdPTime0=0;
            CdPTime1=0;
            CdPTime2=0;
            CdPTime3=0;
            CdGTime0=0;
            CdGTime1=0;
            FirePrimary = TRUE;
            AutoVocalize = FALSE;
            //AutoZoom = FALSE;
            AutoMelee = FALSE;
            ConfigSeconds=0;
        }
 
// QuickClick customization
        if(event_press(Mode2))  {
            ConfigSelect = 2;       // Fire Mode: Set to 1 for Sniper mode. Set to 2 for Free Aim mode.
            CdPTime0=10;            // Active Ability: Set the amount of time script performs a check for Active Ability. Do not set this too low or else your character will constantly throw melees in combat. 60 seconds or higher should be sufficient.       
            CdPTime1=0;             // Reload: Set the amount of time to pass before script attempts to reload as you fire.
            CdPTime2=0;             // Grenade: Set the countdown time for how often the script will check if grenade is okay to throw.
            CdPTime3=1;             // Switch-reload: Set the amount of time the script will wait before it attempts to automatically reload after you switch weapons. Recommended: 2. 1 is too low. Higher than 2 will act as delayed reload.
            CdGTime0=0;             // Fire mode type 1: 0 is rapid fire. 1 or higher creates a burst delay (in seconds). Recommended: 0 for pistols, semi-autos, etc. 1 for autos and charged weapons. Recommended to leave one of these set to 0 and the other to 1.
            CdGTime1=1;             // Fire mode type 1: 0 is rapid fire. 1 or higher creates a burst delay (in seconds). Recommended: 0 for pistols, semi-autos, etc. 1 for autos and charged weapons. Recommended to leave one of these set to 0 and the other to 1.
            seconds0=120;           // Do not change
            seconds1=120;           // Do not change
            seconds2=120;           // Do not change
            seconds3=120;           // Do not change
            FirePrimary = TRUE;     // Do not change
            AutoVocalize = TRUE;    // AutoRun: Set to FALSE to disable. Set to TRUE to enable. Enabling will cause your character to automatically sprint when you press forward on the controller. AutoRun can cause infrequent animation cancels of Reload. Try raising or lowering the SprintTimeout (max 4000) in Defines to see if it makes a difference for your character.
            //AutoZoom = FALSE;       // Autozoom: Set to FALSE to disable. Set to TRUE to enable. Enabled will cause player to automatically zoom while shooting.
            AutoMelee = TRUE;       // AutoMelee: Set to FALSE to disable. Seto to TRUE to enable. Enabled will cause player to repeatedly attack while holding down Melee.
            ARSet1 = 0;             // Anti-Recoil 1: Anti-recoil value setting for Fire mode type 1.
            ARSet2 = 0;             // Anti-Recoil 2: Anti-recoil value setting for Fire mode type 2.
            ConfigSeconds=0;        // Do not change
        }
 
        if (get_val(AnaCamUD)<-90) {
            AutoVocalize = TRUE;
            ConfigSeconds=0;
        } else if (get_val(AnaCamUD)>90) {
            AutoVocalize = FALSE;
            ConfigSeconds=0;
        }
 
        if (get_val(AnaCamSS)<-90) {
            AutoZoom = TRUE;
            ConfigSeconds=0;
        } else if (get_val(AnaCamSS)>90) {
            AutoZoom = FALSE;
            ConfigSeconds=0;
        }
 
        if (event_press(Reload))  {
            CdPTime0 = CdPTime0 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Switch))  {
            CdPTime1 = CdPTime1 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Use))  {
            CdPTime2 = CdPTime2 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Jump))  {
            CdPTime3 = CdPTime3 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(DPAD1))  {
            CdGTime0 = CdGTime0 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(DPAD2))  {
            CdGTime1 = CdGTime1 + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(DPAD3))  {
            ARSet1 = ARSet1 + (CdMultiplier * 5);
            ConfigSeconds=0;
        }
        if (event_press(DPAD4))  {
            ARSet2 = ARSet2 + (CdMultiplier * 5);
            ConfigSeconds=0;
        }
/*        if (event_press(Aim))  {
            ConfigSelect = 1;
            ConfigSeconds=0;
        }
*/
        if (event_press(Fire))  {
            ConfigSelect = 2;
            ConfigSeconds=0;
        }
        if (event_press(Melee))  {
            AutoMelee = !AutoMelee;
            ConfigSeconds=0;
    }
    }
 
    if(!configsetup) {
        if((event_press(Mode1) && get_val(Mode2)) || (get_val(Mode2) && event_press(Mode1))) {
            if (ConfigSelect == 2) {
                Reset = 2;
                ConfigSelect = 0;
            } else if (ConfigSelect == 1) {
                Reset = 1;
                ConfigSelect = 0;
            } else if (Reset == 1) {
                Reset = 0;
                ConfigSelect = 1;
            } else if (Reset == 2) {
                Reset = 0;
                ConfigSelect = 2;
            }
        }
 
        if (AafkCdTime > 0 && ConfigSelect>0) {
            if (get_val(0)  || get_val(1)   || get_val(2)   || get_val(3)   ||
            get_val(4)      || get_val(5)   || get_val(6)   || get_val(7)   ||
            get_val(8)      || get_val(13)  || get_val(14)  || get_val(15)  ||
            get_val(16)     || get_val(17)  || get_val(18)  || get_val(19)  ||
            get_val(20)) {
                AafkSeconds=0;
            } else if (AafkSeconds>AafkCdTime) {
                combo_run(AAFK);
            }
        }
 
        if(event_press(Reload)) {
            seconds0=0;
        } else if(event_press(Switch)) {
            seconds1=0;
        } else if(event_press(Use)) {
            seconds2=0;
        } else if(event_press(Jump)) {
            seconds3=0;
        }
 
        if(event_press(Switch) && CdPTime3 > 0 && ConfigSelect > 0) { // Auto-reload after switching weapons
            combo_run(AutoReload);
        }
 
        if (get_val(AnaMovUD) < -90 && AutoVocalize == TRUE && ConfigSelect > 0) { // Auto-Sprint when moving forward. Triggers every 3 seconds (or SprintTimeout setting) when pressing forward.
            combo_run(AutoVocal);
        }
 
        if (get_val(Melee) > 90 && get_ptime(Melee)>= 500 && AutoMelee == TRUE && configsetup == FALSE && ConfigSelect > 0){
            combo_run(TurboMelee);
        }
 
        if (event_press(Mode2) && ConfigSelect >0 ) {
            FirePrimary=!FirePrimary
/*            if(FirePrimary == TRUE) {
                FirePrimary = FALSE;
            } else {
                FirePrimary = TRUE;
            }
*/
        }
 
        if(event_press(DPAD4) || event_press(DPAD2)) {
            combo_run(SelfHeal);
        }
 
    if (configsetup == FALSE && ConfigSelect == 1 && get_val(Aim) >90 && get_val(Fire)>90) {
        snipe=1;
        combo_run(Control);         // Does not use powers while aiming and firing in Sniper mode
    } else if (configsetup == FALSE && ConfigSelect == 1 && get_val(Aim)<90 && get_val(Fire)>90) {     // Removed from line: && AllSet == TRUE
        snipe=0;
        combo_run(Control);         // Uses powers and RF when NOT aiming in Sniper mode
    } else if (configsetup == FALSE && ConfigSelect == 2 && get_val(Fire)>90) {                 // Removed from line: && AllSet == TRUE
        snipe=0;
        combo_run(Control);         // Uses powers and RF when not using Sniper mode
    }
    }
 
}// End Main   
 
/*
* ===============================================================================================================================================
* COMBINATIONS
* ===============================================================================================================================================
*/

combo Control {
    set_led(currentled, 0);
    if (snipe==1) {
        if (seconds0 >= CdPTime0 && seconds0>0) {
            seconds0=CdPTime0-5;
        } else if (seconds1 >= CdPTime1 && seconds1>0) {
            seconds1=CdPTime1-5;
        } else if (seconds2 >= CdPTime2 && seconds2>0) {
            seconds2=CdPTime2-5;
        } else {combo_run (Control2);}
    } else if (snipe==0) {
        if ((seconds0 > CdPTime0) && (CdPTime0 > 0) && AbilityMotion == 1 && abs(get_val(AnaMovUD))<=40) {
/*            combo_run (Power0Sub); // AnaMovUD set to only activate when controller is dead center
        } else if ((seconds0 > CdPTime0) && (CdPTime0 > 0) && AbilityMotion == 2 && abs(get_val(AnaMovUD))<=100) {
            combo_run (Power0Sub); // AnaMovUD set to activate Charge regardless of controller direction
        } else if ((seconds0 > CdPTime0) && (CdPTime0 > 0) && AbilityMotion == 3 && get_val(AnaMovUD)<=-90) {
            combo_run (Power0Sub); // AnaMovUD set to activate Charge while moving forward
        } else if ((seconds0 > CdPTime0) && (CdPTime0 > 0) && AbilityMotion == 4 && get_val(AnaMovUD)>=90) {
            combo_run (Power0Sub); // AnaMovUD set to activate Charge while moving backwards   
        } else if (PowerIsSet1==1 && (seconds1 > CdPTime1) && (CdPTime1 > 0)) {
            combo_run (Power1Sub);       
        } else if ((seconds2 > CdPTime2) && (CdPTime2 > 0) && GrenadeMotion == 1 && abs(get_val(AnaMovUD))<=40) {
            combo_run (Power2Sub); // AnaMovUD set to only throw grenades when controller is dead center
        } else if ((seconds2 > CdPTime2) && (CdPTime2 > 0) && GrenadeMotion == 2 && abs(get_val(AnaMovUD))<=100) {
            combo_run (Power2Sub); // AnaMovUD set to throw grenades regardless of controller direction
        } else if ((seconds2 > CdPTime2) && (CdPTime2 > 0) && GrenadeMotion == 3 && get_val(AnaMovUD)<=-90) {
            combo_run (Power2Sub); // AnaMovUD set to only throw grenade while moving forward
        } else if ((seconds2 > CdPTime2) && (CdPTime2 > 0) && GrenadeMotion == 4 && get_val(AnaMovUD)>=90) {
            combo_run (Power2Sub); // AnaMovUD set to throw grenades while moving backwards direction
*/
        } else {combo_run (Control2);}
    }
} // End combo
 
combo Control2 {
    if (FirePrimary == TRUE) {
        //FireSqueeze=irand(150,200); FireRelease=irand(50,100);
        FireSqueeze=irand(10,200); FireRelease=irand(10,100);
        combo_run (Shoot1Sub);
    } else {
        FireSqueeze=irand(10,200); FireRelease=irand(10,100);
        combo_run (Shoot2Sub);
    }
}
 
combo Shoot1Sub {
    set_led(currentled, 1);
    if (CdGTime0 > 4) {
        CdWait=4000;
    } else if (CdGTime0 == 0) {
        CdWait=FireSqueeze;
    } else CdWait = CdGTime0 * 1000;
    //if (get_val(Fire)>90 && CdGTime0>0 && AutoZoom==TRUE) {set_val(Aim,100);}
    wait(CdWait) ;
    //if (get_val(Fire)>90 && CdGTime0==0 && AutoZoom==TRUE) {set_val(Aim,100);}
    if (get_val(Fire)>90) {set_val(Fire, 0);}
    wait (FireRelease);
    call(AntiRecoil);
} //End Combo
 
combo Shoot2Sub {
    set_led(currentled, 1);
    if (CdGTime1 > 4) {
        CdWait=4000;
    } else if (CdGTime1 == 0) {
        CdWait=FireSqueeze;
    } else CdWait = CdGTime1 * 1000;
    //if (get_val(Fire)>90 && CdGTime1>0 && AutoZoom==TRUE) {set_val(Aim,100);}
    wait(CdWait);
    //if (get_val(Fire)>90 && CdGTime1==0 && AutoZoom==TRUE) {set_val(Aim,100);}
    if (get_val(Fire)>90) {set_val(Fire, 0);}
    wait (FireRelease);
    call(AntiRecoil);
} // End Combo
 
combo Power0Sub {
    set_led(currentled, 1);
   set_val(Use, 100);
    wait(600);
    seconds0=0;
} // End Combo
 
/*
combo Power1Sub {
    set_led(currentled, 1);
    set_val(Reload, 100);
    wait(HoldTime);
    seconds1=0;
} // End Combo
*/

 
combo Power2Sub {
    set_led(currentled, 1);
    set_val(Jump, 100);
    wait(HoldTime);
    seconds2=0;
} // End Combo
 
combo AutoReload {
    wait(ReloadDelay);
    set_val(Reload,100);
    wait(HoldTime);
    seconds3=0;
} // End Combo
 
combo AAFK {
    set_val(AnaCamSS,100);
    wait(RestTime);
    set_val(AnaCamUD,100);
    wait(RestTime);
    set_val(AnaMovSS,100);
    wait(RestTime);
    set_val(AnaMovUD,100);
    wait(RestTime);
    set_val(Aim,100);
    wait(RestTime);
    set_val(Use,100);
    wait(RestTime);
    set_val(Reload,100);
    wait(RestTime);
} // End Combo
 
combo AutoVocal{
    set_val(Vocalize,100);
    block(Vocalize,Timeout);
}
 
combo TurboMelee{
    wait(HoldTime);
    set_val(Melee,0);
}
 
combo RumbleStrong {
    set_rumble(RUMBLE_A, 100);
    wait(RestTime);
    set_rumble(RUMBLE_A, 0);
}
 
combo RumbleWeak {
    set_rumble(RUMBLE_B, 100);
    wait(RestTime);
    set_rumble(RUMBLE_B, 0);
}
 
combo SelfHeal {
    set_val(Fire,100);
    wait(4000);
    set_val(Fire,100);
    wait(2000);
}
 
combo AntiRecoil {
    if (FirePrimary == TRUE) {
        ARComp = get_val(AnaCamUD) + ARSet1;
        if(ARComp > 100) ARComp = 100;
        set_val(AnaCamUD, ARComp);
 
    }
    else {
        ARComp = get_val(AnaCamUD) + ARSet2;
        if(ARComp > 100) ARComp = 100;
        set_val(AnaCamUD, ARComp);
    }
    wait(HoldTime);
 
}\0