define Blue = 1;
define Red = 2;
define Green = 3;
define Pink = 4;
define SkyBlue = 5;
define Yellow = 6;
define White = 7;
//-------------------------------------------------------------------------------------------
data(1,
2, 0, 0, 0, //1. Blue
0, 2, 0, 0, //2. Red
0, 0, 2, 0, //3. Lime/Green
0, 0, 0, 2, //4. Fuchsia/Pink
2, 0, 2, 0, //5. SkyBlue
0, 2, 2, 0, //6. Yellow
2, 2, 2, 2 //7. White
);
define ONLY_WITH_SCOPE = TRUE; // if TRUE Antirecoil IS ON only when scoping - if FALSE, is always ON
int FIRE_BTN = PS4_R2;
int ADS_BTN = PS4_L2;
int SG_AIM_ASSIST_onoff = FALSE;
int AR_AIM_ASSIST_onoff = TRUE;
int recoil_onoff = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
define ANTI_RECOIL = 8; //change "0" to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 2; //change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 2; //change this value to compensate to the right (0 - 100)
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
int Col_ind;
int fire_button = 4;
int scope_button = 7;
main {
if (get_val(12))
if (!get_val(11)) set_val(11,21);
else if (get_val(11) && !get_val(12)) set_val(12,23);
if (event_press(PS4_LEFT)) {
SG_AIM_ASSIST_onoff = TRUE;
AR_AIM_ASSIST_onoff = FALSE;
}
if (event_press(PS4_RIGHT)) {
AR_AIM_ASSIST_onoff = TRUE;
SG_AIM_ASSIST_onoff = FALSE;
}
if (AR_AIM_ASSIST_onoff) colourled(Blue);
else colourled(Red);
/////////////////////////////////////////////////////////////////////////////////
//AR AIM ASSIST
if (AR_AIM_ASSIST_onoff) {
if (get_val(ADS_BTN) && get_val(FIRE_BTN)) {
combo_run(AR_AIM_ASSIST);
} else if (combo_running(AR_AIM_ASSIST)) {
combo_stop(AR_AIM_ASSIST);
}
}
//SG AIM ASSIST
if (SG_AIM_ASSIST_onoff) {
if (get_val(ADS_BTN) && get_val(FIRE_BTN)) {
combo_run(SG_AIM_ASSIST);
} else if (combo_running(AR_AIM_ASSIST)) {
combo_stop(SG_AIM_ASSIST);
}
}
/////////////////////////////////////////////////////////////////////////////////
// ANTI RECOIL
if (!ONLY_WITH_SCOPE || get_val(scope_button)) {
combo_run(AntiRecoil);
}
/////////////////////////////////////////////////////////////////////////////////
} //END
combo SG_AIM_ASSIST { //Shotgun Auto Aim
set_val(ADS_BTN, 100);
wait(150);
set_val(ADS_BTN, 0);
wait(20);
} //end
combo AR_AIM_ASSIST { //AR Auto Aim
set_val(ADS_BTN, 100);
wait(55);
set_val(ADS_BTN, 0);
wait(17);
} //end
combo AntiRecoil { // This combo must be the last one
if (get_val(fire_button)) {
anti_recoil = get_val(10) + ANTI_RECOIL;
if (anti_recoil > 100) anti_recoil = 100;
set_val(10, anti_recoil);
anti_recoil_left = get_val(9) - ANTI_RECOIL_LEFT;
if (anti_recoil_left > 100) anti_recoil_left = 100;
set_val(9, anti_recoil_left);
anti_recoil_right = get_val(9) + ANTI_RECOIL_RIGHT;
if (anti_recoil_right > 100) anti_recoil_right = 100;
set_val(9, anti_recoil_right);
}
}
// COLOR LED function
//--------------------------------------------------------------
function colourled(Colour) {
Col_ind = (Colour * 4) - 3;
set_led(LED_1, dbyte(Col_ind));
set_led(LED_2, dbyte(Col_ind + 1));
set_led(LED_3, dbyte(Col_ind + 2));
set_led(LED_4, dbyte(Col_ind + 3));
} // End