// GPC Online Library
// rapidfire.gpc
/* Simple Rapid Fire
by renfrozodiac
-Contact: [email protected]
-Hold d-pad down, L2, and press cross to activate rapid fire
-Automatic ADS: When R2 is pressed, L2 will also be pressed.
Activate by holding d-pad down and L2, and pressing R3. I made
it R3 so you wouldn't have to take your thumb off of the stick to
enable/disable the mod.
***Both mods CAN be used at once.
*/
define INITIAL_STATE = FALSE;
int RF = INITIAL_STATE;
int AIM = INITIAL_STATE;
main {
if (get_val(PS4_DOWN) && get_val(PS4_L2) && event_press(PS4_CROSS)) {
RF = !RF;
}
if (get_val(PS4_DOWN) && get_val(PS4_L2) && event_press(PS4_R3)) {
AIM = !AIM;
}
if (RF && get_val(PS4_R2)) combo_run(RapidFire);
else combo_run(BlueNoRF);
if (AIM && get_val(PS4_R2)) combo_run(AutomaticADS);
else if (combo_running(AutomaticADS)){
combo_stop(AutomaticADS);
}
}
combo BlueNoRF {
set_led(LED_1, 1);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
combo RapidFire {
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
set_val(PS4_R2, 100);
wait(35);
set_val(PS4_R2, 0);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 1);
set_led(LED_4, 0);
wait(35);
}
combo AutomaticADS {
set_val(PS4_L2, 100);
}