// GPC Online Library
define RATE_OF_FIRE = 13; // Range: 1 to 25 RPS (Round/s)
int rapidFireButton =PS4_R2;
int rapid_onoff = TRUE;
int color_onoff = TRUE;
int DROPSHOT_onoff =TRUE;
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(color_onoff && !combo_running(led)) set_led(LED_4, 2);
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{
set_led(LED_4, 1);
wait(180);
set_led(LED_4, 3);
wait(180);
}