Mass Effect 3

This script allows players to execute their powers while they are firing their weapons. The configuration options allow you to make on-the-fly changes to firing behavior and cooldown times for powers and weapons (both standard and charge-up types). You can prioritize your power execution to setup combos or most effective order. This script is designed for Mass Effect 3 multiplayer but is compatible with the singleplayer version as well. You may want to comment out RS execution for singleplayer but it is not necessary since LS can disable/re-enable all script functions.
Version3.10
AuthorShadohz
Publish DateTue, 30 Jun 2015 - 21:44
Last UpdateTue, 7 Jun 2016 - 15:52
Downloads90
RATE


1

0

Release Notes: Cleaned up script. Changed default HoldTime to 75ms from 50ms to fix issue with charged weapons not correctly discharging. Added Auto-Sprint. Note that Auto-Sprint was not tested in MP. Due to the game mechanics done by BioWare, the feature may not function in manner you desire. Fixed an error in an array that did not account for a cooldown.
Code: Select all
/*
* ===============================================================================================================================================
* Author:           Shadohz
* Game:             Mass Effect 3
* System:           All
* Controller:       All
* Game Settings:    Default
* Website:          https://www.youtube.com/user/Shadohz75
* Copyright:        Copyright � 2015, 2016 Shadohz, 5Y5T3M 0V3RL04D. All Rights Reserved.
* Restrictions:     http://www.copyrighted.com/copyrights/view/dhnm-7t23-sezv-xbbo. 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 10
* seconds to respond before the configuration setup automatically closes. When selecting a configuration options below, the 10 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 use Quick-Click Customization
* Read this entire HOW TO first to understand how this script works overall. Scroll down in script to this area. Read the notes and make the
* changes you want. Save the script and move it to your device.
*
* Press LEFT BUTTON (LB), Y, and RIGHT BUTTON (RB) to prime the power priorities.
* This script triggers the powers in an order from variables (Power[0], Power[1], Power[2]). You must select LB, Y, and RB in the order that you
* want these powers to trigger. For example, if you were using the Salarian Infilitrator you could press Y, RB, LB. This would prime your
* character so that powers would prioritize in this order Y=Tactical Cloak, RB=Proxy Mine, then lastly LB=Energy Drain. You CAN simplify the
* prioritization by pressing LB, Y, RB without regard for priority, but you may have to manipulate the cooldowns high/low to get the preferred
* behavior you want.
* IMPORTANT: Prior script versions required you to "prime" the powers. This has been removed. You only need to set the cooldown for the powers
* activated while shooting.
*
*
* Press D-PAD UP or DOWN to set the Primary Fire and Secondary Fire cooldown times.
* This option only works while configuring the setup. The default setting is Primary Fire. You can set two different cooldown times if you are
* using two different charge-up weapons. Press D-PAD UP to add time to Primary and/or D-PAD DOWN to add time to Secondary cooldown. Adding time
* to Primary/Secondary Fire is only necessary for charge-up weapons: Acolyte, Arc Pistol, Reegar Carbine, Geth Plasma Shotgun, Graal Spike
* Thrower, Venom Shotgun, Geth Plasma SMG, Geth Spitfire, N7 Typhoon, Particle Rifle, Striker Assault Rifle, Javelin, and Kishock. 
* IMPORTANT: If a power has a very low cooldown (i.e. you are spamming the power) that is lower than the fire cooldown, then it may cause the
* gun to mis-fire (fire too early). Try increasing the lowest power cooldown or decreasing Fire cooldown.
* Example 1: Press UP two times (2x) only will create a Primary of 2 seconds. This could be useful for a kit with only one weapon available and
* it is a charge-up type.
* Example 2: Press UP three times (3x), then DOWN five times (5x) would create Primary with 3 seconds and Secondary with 5 seconds. This could
* be useful for a setup such as Acolyte and GPSMG.
* Example 3: Press DOWN three times (3x) would create a Primary with 0 seconds and a Secondary with 3 seconds. This could be useful for a kit
* with a standard weapon and charge-up weapon.
*
*
* Press LEFT TRIGGER or RIGHT TRIGGER for fire mode.
* Press LEFT TRIGGER if you only want to powers to be triggered when pressing the LEFT TRIGGER and RIGHT TRIGGER (i.e. when you aim and fire).
* Press RIGHT TRIGGER if you want the powers to be triggered any time you are firing (i.e. powers go off whenever you press the fire button).
*
*
* Press CAMERA UP/DOWN/LEFT/RIGHT to assign squad rally command.
* UP will cause both teammates to attack the target that you are shooting at. DOWN will cause teammates to regroup to you. LEFT will cause
* Teammate #1 to attack the target you are shooting. RIGHT will cause Teammate #2 to attack the target you are shooting.
*
*
* Press SPRINT to enable or disable Auto-sprint.
* Press SPRINT button to enable or disable Auto-Sprint. Due the game mechanics, Auto-sprint may not have a desired effect. Mass Effect 3 is
* design to make the character hug walls and duck for cover with the SPRINT button. Also tapping SPRINT is required to leap over cover.
* Auto-sprint may cause you to routinely stick to cover while moving or prevent cover-leaping. You may have to repeatedly quick-disable while it
* is active. Fair warning.
*
* ===============================================================================================================================================
* 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 (LS) to disable all configurations.
* This will disable all cooldowns and fire behavior. This is a quick-click in case you need to temporarilty disable everything. Press LEFT
* STICK 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.
*
*
* Press LEFT TRIGGER (LT) and RIGHT TRIGGER (RT) or just RIGHT TRIGGER (RT) to perform powers while shooting.
* Press LT+RT (aimed firing) or just RT (aimless firing or "hip-fire") to have your powers trigger as you're shooting. This is activated based on
* which option you set during the configuration setup-fire mode. "Aim and Fire" (LT + RT) setting is useful for sniper-rifle builds and some
* standard weapons. "Aimless/hip fire" (RT) is the setting you are most likely to use on other kits.
*
*
* IMPORTANT: To add more cooldown time or to change the Fire Mode behavior, press START + BACK, then press the appropiate 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.
*
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* VERSION CHANGES
*
* 2.00 - After priming the powers you must now set the cooldowns by using their corresponding buttons LB, Y, RB (DPAD LEFT, UP, and RIGHT were
* removed). The default value for each power is zero (0). Do NOT add time to a power that you do not want to trigger (i.e. you want to manually
* run it). This will cause the script to skip over the power while active, even though it is primed.
* Example: Using the Salarian Infiltrator again, you could press Y, RB, then LB to prime the powers. Afterwards you can press Y ten more times
* (10x) for 10 sec Tactical Cloak, RB 5 times (5x) for 5 sec Proxy Mine and LB zero times (0x) for 0 sec Energy Drain cooldown times. Tactical
* Cloak will only go off after 10 seconds has passed and has highest priority, Prox Mine will only go off after 5 seconds has passed. Energy
* Shield will not go off because it has no cooldown value assigned.
*
* 2.10 - Fixed blinking light issue. Increased fire requirement to 90% to decrease accidental power spamming. Removed redundant WAIT times.
* Fixed ConfigSetup to force PrimaryFire back to TRUE if it is reset by player.
*
* 3.00 - Now compatible with all consoles. New features: Squad rallying allows you to automatically command your squad as you shoot. This feature
* is intended for single-player. Quick-click customization now allows you to set up your favorite configuration and assign it for use. Now you no
* longer to reconfigure this for single-player either. The PRIME requirement has been removed. You can now set up the skills independently while
* still maintaining the priority feature.
*
* 3.10 - Cleaned up script. Changed default HoldTime to 75ms from 50ms to fix issue with charged weapons not correctly discharging. Added
* Auto-Sprint. Note that Auto-Sprint was not tested in MP. Due to the game mechanics done by BioWare, the feature may not function in manner you
* desire. Fixed an error in an array that did not account for a cooldown.
*

* ===============================================================================================================================================
*/

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

//unmap Fire;
 
define HoldTime = 75;               // Hold: How long to hold down the Combo button.
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.
 
// Controller Variables
define Dashboard = 0;               // Button assigned to Dashboard (e.g. XB360_XBOX)
define Status = 1;                  // Button assinged to Game Status (e.g. XB360_BACK)
define Menu = 2;                    // Button assigned to Menu (e.g. XB360_START)
define Skill3 = 3;                  // Button assinged to Skill 3 (e.g. XB360_RB)
define Fire = 4;                    // Button assigned to Firing (e.g. XB360_RT)
define AnaRClick = 5;               // Button assigned to Right analog click (e.g. XB360_RS)
define Skill1 = 6;                  // Button assigned to Skill 1 (e.g. XB360_LB)
define Aim = 7;                     // Button assigned to Aim (e.g. XB360_LT)
define AnaLClick = 8;               // Button assigned to Left analog click (e.g. XB360_LS)
define AnaCamSS = 9;                // Button assigned to Camera left and right (e.g. XB360_RX)     (Left=-100, Right=100)
define AnaCamUD = 10;               // Button assinged to Camera up and down (e.g. XB360_RY)        (Up=-100, Down=100)
define AnaMovSS = 11;               // Button assigned to Moving left and right (e.g. XB360_LX)     (Left=-100, Right=100)
define AnaMovUD = 12;               // Button assigned to Moving forward and back (e.g. XB360_LY)   (Up=-100, Down=100)
define DPad1 = 13;                  // Button assigned to D-Pad Up (e.g. XB360_UP)
define DPad2 = 14;                  // Button assigned to D-Pad Down (e.g. XB360_DOWN)
define DPad3 = 15;                  // Button assigned to D-Pad Left (e.g. XB360_LEFT)
define DPad4 = 16;                  // Button assigned to D-Pad Right (e.g. XB360_RIGHT)
define Skill2 = 17;                 // Button assigned as Skill 2 (e.g. XB360_Y)
define Melee = 18;                  // Button assigned as Melee (e.g. Melee)
define Sprint = 19;                 // Button assigned as Sprint (e.g. XB360_A)
define Reload = 20;                 // Button assigned to Reload weapons (e.g. XB360_X)
 
/*
* ===============================================================================================================================================
* INITIALIZED VARIABLES
* ===============================================================================================================================================
*/

// No need to change anything else
int CdPTime[3], CdGTime[2], CdCheck, CdWait;
int led, currentled, run;
int Power[3], PowerIsSet[3];
int configsetup, Reset;
int timelimit=1000, seconds[3];
int Start_at=FALSE;
int Finish_at=TRUE;
int refresh=FALSE;
int ConfigSelect=FALSE;
int FirePrimary=TRUE;
int ConfigSeconds;
int SquadRally=FALSE,SquadPoint,SquadSeconds=10;
int AutoRun;
 
init {
    led = 0;
    reset_leds();
    while(led<4){
        if(get_led(led)==1) currentled = led;
        led = led+1;
    }
} // End Initialization
 
/*
* ===============================================================================================================================================
* MAIN
* ===============================================================================================================================================
*/

main {
    //swap(AnaLClick,AnaRClick);    // Target mode is disabled and swapped for Sprint to Right Stick.
 
    set_val(TRACE_1,CdPTime[0])
    set_val(TRACE_2,CdPTime[1])
    set_val(TRACE_3,CdPTime[2])
    set_val(TRACE_4,seconds[0])
    set_val(TRACE_5,seconds[1])
    set_val(TRACE_6,seconds[2])
 
    if(CdCheck == 0){Start_at=TRUE;Finish_at=FALSE;timelimit=1000;}
    //if(Start_at)//refresh=TRUE; 
    else refresh=FALSE;
    if(Start_at)
        {
       timelimit=timelimit- get_rtime();
        if( timelimit<=0) {
            ConfigSeconds=ConfigSeconds+1;
            seconds[0]=seconds[0]+1;
            seconds[1]=seconds[1]+1;
            seconds[2]=seconds[2]+1;
            seconds[3]=seconds[3]+1;
            timelimit=1000;
        } // seconds count
 
    }
   if((event_press(Menu) && get_val(Status)) || (get_val(Menu) && event_press(Status))) {
        if(!configsetup) {
            set_led(currentled,2);
            configsetup = TRUE;
            CdCheck=1;
            ConfigSeconds=0;
        }
    }
 
    if (configsetup == TRUE) {
        if (ConfigSeconds>=ConfigTimeout) {
            configsetup = FALSE;
            reset_leds();
        }
 
        if(event_press(AnaLClick))  {
            ConfigSelect = 0;
            CdPTime[0]=0;
            CdPTime[1]=0;
            CdPTime[2]=0;
            CdGTime[0]=0;
            CdGTime[1]=0;
            Power[0]=0;
            Power[1]=0;
            Power[2]=0;
            PowerIsSet[0]=0;
            PowerIsSet[1]=0;
            PowerIsSet[2]=0;
            ConfigSeconds=0;
            FirePrimary = TRUE;
            SquadRally = FALSE;
            AutoRun = FALSE;
        }
 
// QUICK-CLICK CUSTOMIZATION   
        if(event_press(AnaRClick))  {
            ConfigSelect = 2;   // 1=Sniper mode, 2=Free Aim
            Power[0]=Skill1;    // Enter "Skill1", "Skill2", or "Skill3". The order these are put in is important.
            Power[1]=Skill2;    // Enter "Skill1", "Skill2", or "Skill3". The order these are put in is important.
            Power[2]=Skill3;    // Enter "Skill1", "Skill2", or "Skill3". The order these are put in is important.
            PowerIsSet[0]=1;    // 0=Inactive, 1=Active. Must be set with corresponding Skill.
            PowerIsSet[1]=1;    // 0=Inactive, 1=Active. Must be set with corresponding Skill.
            PowerIsSet[2]=1;    // 0=Inactive, 1=Active. Must be set with corresponding Skill.
            CdPTime[0]=10;       // Cooldown time for corresponding Skill. Zero (0) will not register.
            CdPTime[1]=5;       // Cooldown time for corresponding Skill. Zero (0) will not register.
            CdPTime[2]=0;       // Cooldown time for corresponding Skill. Zero (0) will not register.
            CdGTime[0]=0;       // Cooldown time for Fire Mode 1. 0=Rapid Fire, 1 to 4=Burst/Charge Up. 1 sufficient for full-autos. 2 to 4 typically required for charge or ramp-up weapons.
            CdGTime[1]=1;       // Cooldown time for Fire Mode 1. 0=Rapid Fire, 1 to 4=Burst/Charge Up. 1 sufficient for full-autos. 2 to 4 typically required for charge or ramp-up weapons.
            ConfigSeconds=0;    // Do not change
            FirePrimary = TRUE; // TRUE=Begin with CdGTime0, FALSE=Begin with CdGTime1
            SquadRally = FALSE// TRUE=Squad follow your selected command as you shoot, FALSE=Inactive
            SquadPoint = 13;    // Up=13, Down=14, Left=15, Right=16
            AutoRun = FALSE;     // False = No sprint. True = Sprint when pressing full foward.
        }
 
        if (get_val(AnaCamUD)<-90) {
            SquadRally = TRUE;
            SquadPoint = 13;
            ConfigSeconds=0;
        } else if (get_val(AnaCamUD)>90) {
            SquadRally = TRUE;
            SquadPoint = 14;
            ConfigSeconds=0;
        } else if (get_val(AnaCamSS)<-90) {
            SquadRally = TRUE;
            SquadPoint = 15;
            ConfigSeconds=0;
        } else if (get_val(AnaCamSS)>90) {
            SquadRally = TRUE;
            SquadPoint = 16;
            ConfigSeconds=0;
        } //Up=13, Down=14, Left=15, Right=16
 
/*      if (PowerIsSet[0] == 0 && configsetup == TRUE && event_press(Skill1)) {
            Power[0]=Skill1;
            PowerIsSet[0]=1;
            ConfigSeconds=0;
            set_ledx(LED_2, 10);
        } else if (PowerIsSet[0] == 0 && configsetup == TRUE && event_press(Skill2)) {
            Power[0]=Skill2;
            PowerIsSet[0]=1;
            ConfigSeconds=0;
            set_ledx(LED_2, 10);
        } else if(PowerIsSet[0] == 0 && configsetup == TRUE && event_press(Skill3)) {
            Power[0]=Skill3;
            PowerIsSet[0]=1;
            ConfigSeconds=0;
            set_ledx(LED_2, 10);
        } else if (PowerIsSet[1] == 0 && configsetup == TRUE && event_press(Skill1)) {
            Power[1]=Skill1;
            PowerIsSet[1]=1;
            ConfigSeconds=0;
            set_ledx(LED_3, 10);
        } else if (PowerIsSet[1] == 0 && configsetup == TRUE && event_press(Skill2)) {
            Power[1]=Skill2;
            PowerIsSet[1]=1;
            ConfigSeconds=0;
            set_ledx(LED_3, 10);
        } else if(PowerIsSet[1] == 0 && configsetup == TRUE && event_press(Skill3)) {
            Power[1]=Skill3;
            PowerIsSet[1]=1;
            ConfigSeconds=0;
            set_ledx(LED_3, 10);
        } else if (PowerIsSet[2] == 0 && configsetup == TRUE && event_press(Skill1)) {
            Power[2]=Skill1;
            PowerIsSet[2]=1;
            ConfigSeconds=0;
            set_ledx(LED_4, 10);
        } else if (PowerIsSet[2] == 0 && configsetup == TRUE && event_press(Skill2)) {
            Power[2]=Skill2;
            PowerIsSet[2]=1;
            ConfigSeconds=0;
            set_ledx(LED_4, 10);
        } else if(PowerIsSet[2] == 0 && configsetup == TRUE && event_press(Skill3)) {
            Power[2]=Skill3;
            PowerIsSet[2]=1;
            ConfigSeconds=0;
            set_ledx(LED_4, 10);
        } else if (PowerIsSet[0] == 1 && Power[0]==Power[1] && configsetup == TRUE) {
            CdPTime[0]=0;
            CdPTime[1]=0;
            CdPTime[2]=0;
            PowerIsSet[1]=0;
            Power[1]=0;
            ConfigSeconds=0;
        } else if (PowerIsSet[0] == 1 && Power[0]==Power[2] && configsetup == TRUE) {
            CdPTime[0]=0;
            CdPTime[1]=0;
            CdPTime[2]=0;
            PowerIsSet[2]=0;
            Power[2]=0;
            ConfigSeconds=0;
        } else if (PowerIsSet[1] == 1 && Power[0]==Power[1] && configsetup == TRUE) {
            CdPTime[0]=0;
            CdPTime[1]=0;
            CdPTime[2]=0;
            PowerIsSet[1]=0;
            Power[1]=0;
            ConfigSeconds=0;
        } else if (PowerIsSet[1] == 1 && Power[1]==Power[2] && configsetup == TRUE) {
            CdPTime[0]=0;
            CdPTime[1]=0;
            CdPTime[2]=0;
            PowerIsSet[2]=0;
            Power[2]=0;
            ConfigSeconds=0;
        } else if (PowerIsSet[0] ==1 && PowerIsSet[1] == 1 && PowerIsSet[2] == 1) {
            AllSet = TRUE;
        }//END IF
*/

 
        if (event_press(Skill1)) {
            if (PowerIsSet[0] == 0 && Power[1]!= 6 && Power[2] != 6) {
                Power[0]=Skill1;
                PowerIsSet[0]=1;
                ConfigSeconds=0;
                set_ledx(LED_2, 10);           
            } else if (PowerIsSet[1] == 0 && Power[0]!= 6 && Power[2] != 6) {
                Power[1]=Skill1;
                PowerIsSet[1]=1;
                ConfigSeconds=0;
                set_ledx(LED_2, 10);
            } else if (PowerIsSet[2] == 0 && Power[0]!= 6 && Power[1] != 6) {
                Power[2]=Skill1;
                PowerIsSet[2]=1;
                ConfigSeconds=0;
                set_ledx(LED_2, 10);
            }
        } else if (event_press(Skill2)) {
            if (PowerIsSet[0] == 0 && Power[1]!= 17 && Power[2] != 17) {
                Power[0]=Skill2;
                PowerIsSet[0]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            } else if (PowerIsSet[1] == 0 && Power[0]!= 17 && Power[2] != 17) {
                Power[1]=Skill2;
                PowerIsSet[1]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            } else if (PowerIsSet[2] == 0 && Power[0]!= 17 && Power[1] != 17) {
                Power[2]=Skill2;
                PowerIsSet[2]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            }
        } else if(event_press(Skill3)) {
            if (PowerIsSet[0] == 0 && Power[1]!= 3 && Power[2] != 3) {
                Power[0]=Skill3;
                PowerIsSet[0]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            } else if (PowerIsSet[1] == 0 && Power[0]!= 3 && Power[2] != 3) {
                Power[1]=Skill3;
                PowerIsSet[1]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            } else if (PowerIsSet[2] == 0 && Power[0]!= 3 && Power[1] != 3) {
                Power[2]=Skill3;
                PowerIsSet[2]=1;
                ConfigSeconds=0;
                set_ledx(LED_3, 10);
            }
        }
 
        if (event_press(Power[0]) && PowerIsSet[0]==1)  {
            CdPTime[0] = CdPTime[0] + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Power[1]) && PowerIsSet[1]==1)  {
            CdPTime[1] = CdPTime[1] + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Power[2]) && PowerIsSet[2]==1)  {
            CdPTime[2] = CdPTime[2] + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(DPad1))  {
            CdGTime[0] = CdGTime[0] + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(DPad2))  {
            CdGTime[1] = CdGTime[1] + CdMultiplier;
            ConfigSeconds=0;
        }
        if (event_press(Aim))  {
            ConfigSelect = 1;
            ConfigSeconds=0;
            set_ledx(LED_1, 10);
        }
        if (event_press(Fire))  {
            ConfigSelect = 2;
            ConfigSeconds=0;
            set_ledx(LED_1, 10);
        }
        if (event_press(Sprint)) {
            AutoRun = !AutoRun;
            ConfigSeconds=0;
        }
    } // End of Configuration Setup
 
    if(configsetup == FALSE) {
        if(event_press(AnaLClick))  {
            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 (get_val(AnaMovUD) < -90 && AutoRun== TRUE && ConfigSelect > 0) {
            combo_run(AutoSprint);
        }
 
        if (event_press(AnaRClick)) {
            FirePrimary=!FirePrimary
        }
 
        if(event_press(Power[0])) {
            seconds[0]=0;
        }
        if(event_press(Power[1])) {
            seconds[1]=0;
        }
        if(event_press(Power[2])) {
            seconds[2]=0;
        }
 
        if (get_val(Aim)>90 && get_val(Fire)>90 && ConfigSelect == 1) {
            combo_run(Control);
        } else if (get_val(Fire)>90 && ConfigSelect == 2) {
            combo_run(Control);
        }
    } // End of Realtime
 
}// End Main   
 
/*
* ===============================================================================================================================================
* COMBINATIONS
* ===============================================================================================================================================
*/

combo Control {
    set_led(currentled, 0);
    set_val(Sprint, 0);    // Deactivates Sprint to start combos.
    if ((seconds[0] > CdPTime[0]) && (CdPTime[0] > 0)) {
        combo_run (Power1Sub);
    } else if ((seconds[1] > CdPTime[1]) && (CdPTime[1] > 0)) {
        combo_run (Power2Sub);       
    } else if ((seconds[2] > CdPTime[2]) && (CdPTime[2] > 0)) {
        combo_run (Power3Sub);
    } else if (seconds[3] > SquadSeconds && SquadPoint > 0 && SquadRally == TRUE) {
        set_val(SquadPoint,100);    //Up=13, Down=14, Left=15, Right=16
        seconds[3]=0;
    } else if (FirePrimary == TRUE) {
        combo_run (Shoot1Sub);
    } else {
        combo_run (Shoot2Sub);
    }
} // End combo
 
combo Shoot1Sub {
    set_led(currentled, 1);
    if (CdGTime[0] > 4) {
        CdWait=4000;
    } else if (CdGTime[0] == 0) {
        CdWait=10;
    } else CdWait = CdGTime[0] * 1000;
    wait(CdWait) ;
    if (get_val(Fire)>90) {set_val(Fire, 0);}
    wait (HoldTime);
} //End Combo
 
combo Shoot2Sub {
    set_led(currentled, 1);
    if (CdGTime[1] > 4) {
        CdWait=4000;
    } else if (CdGTime[1] == 0) {
        CdWait=10;
    } else CdWait = CdGTime[1] * 1000;
    wait(CdWait);
    if (get_val(Fire)>90) {set_val(Fire, 0);}
    wait (HoldTime);
} //End Combo
 
combo Power1Sub {
    set_led(currentled, 1);
    set_val(Power[0],100);
    wait(HoldTime);
    set_val(Power[0],0);
    seconds[0]=0;
} //End Combo
 
combo Power2Sub {
    set_led(currentled, 1);
    set_val(Power[1],100);
    wait(HoldTime);
    set_val(Power[1],0);
    seconds[1]=0;
} //End Combo
 
combo Power3Sub {
    set_led(currentled, 1);
    set_val(Power[2],100);
    wait(HoldTime);
    set_val(Power[2],0);
    seconds[2]=0;
} //End Combo
 
combo AutoSprint {
    set_val(Sprint,100);
    wait(50);
}\0