ADJUSTABLE RAPID FIRE on the FLY!

info inside!
Version1.0
Authorbonefisher
Publish DateSun, 3 Jul 2016 - 20:33
Last UpdateSun, 3 Jul 2016 - 20:33
Downloads375
RATE


0

0

Code: Select all
 
/*********************************************************
*                 ADJUSTABLE RAPID FIRE                  *
*  HOLD ADS AND CLICK D-PAD LEFT TURN ON/OFF RAPID FIRE  *
*  ON TITAN ONE WHEN LED IS BLUE RAPID FIRE IS OFF AND   *
*    WHEN LED IS RED ON TITAN ONE RAPID FIRE IS ON.      *
*                                                        *
*  HOLD FIRE BUTTON AND CLICK D-PAD UP FOR INCREASING    *
*  RAPID FIRE AND D-PAD DOWN FOR DECREASING RAPID FIRE   *
*********************************************************/

 
define FIRE  = 4;
define ADS   = 7;
define UP    = 13;
define DOWN  = 14;
define LEFT  = 15;
define RIGHT = 16;
 
int PrimaryFire;
int RateOfFire;
int HoldTime;
 
init {
    PrimaryFire    = get_pvar(SPVAR_1, 1, 2, 1);
    RateOfFire = get_pvar(SPVAR_4, 25, 250, 62);
}
 
main {
 
    if (get_val(ADS) && event_press(LEFT)) {
        if (PrimaryFire == 2) {
            PrimaryFire = 1;
            set_pvar(SPVAR_1, PrimaryFire);
            set_led (LED_2, 0);
        } else if (PrimaryFire == 1) {
            PrimaryFire = 2;
            set_pvar(SPVAR_1, PrimaryFire);
            set_led (LED_2, 1);
        }
    }
    if (PrimaryFire == 2 && get_val(FIRE)){
        combo_run(RapidFire);
    }
    if (PrimaryFire == 2 && get_val(FIRE)) {
        if (get_val(UP)) {RateOfFire = RateOfFire - 1; }
        if (get_val(DOWN)) {RateOfFire = RateOfFire + 1; }
 
        if (RateOfFire > 250) { RateOfFire = 250; }
        if (RateOfFire < 25) { RateOfFire = 25; }
 
        set_pvar(SPVAR_4, RateOfFire);
        HoldTime = RateOfFire;
        set_val(UP, 0); set_val(DOWN, 0);
    }
}
combo          RapidFire         {
        set_val       (FIRE, 100);
        wait           (HoldTime);
        set_val         (FIRE, 0);
        wait           (HoldTime);
}