ON AND OFF Dropshot and Rapidfire and led indcler

UP To Turn on drop-shot on and to turn off Left To Turn on Rapid-fire on and to turn off and led will be on when Rapid-fire is on
Version2.00
Authormatnut1989
Publish DateFri, 2 May 2014 - 13:00
Last UpdateFri, 2 May 2014 - 13:00
Downloads254
RATE


0

0

Code: Select all
// GPC Online Library
//made by manut
define RATE_OF_FIRE = 17; // Range: 1 to 25 RPS (Round/s)
 
int rapidFireButton =PS4_R2;
int rapid_onoff = TRUE;
int color_onoff = TRUE;
int DropShotON=FALSE;
 
 
int hold_time, rest_time;
 
init {
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
 
}
 
 main {
    if(event_press(PS4_LEFT)) rapid_onoff = !rapid_onoff;
    if(event_press(PS4_LEFT)) color_onoff = !color_onoff;
    if(event_press(PS4_UP))DropShotON = !DropShotON;
    if (event_press(PS4_R2) && DropShotON && (get_val(PS4_L2))){combo_run(DROPSHOT);}
    if(color_onoff && !combo_running(led)) set_led(LED_4, 1);
    if(!color_onoff && !combo_running(RapidFire) && !combo_running(led)) reset_leds();
    if(get_val(PS4_R2) && rapid_onoff) {combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {combo_stop(RapidFire); }
 
 
}
// Combo
combo RapidFire {
    set_val(PS4_R2, 100);
    wait(hold_time);
    set_val(PS4_R2, 0);
    wait(rest_time);
    set_val(PS4_R2, 0);
 
}
combo led{ 
 
}
combo DROPSHOT {
   set_val(PS4_CIRCLE, 100);
   wait(1200);
}