// GPC Online Library
// the_division_ultimate.gpc
define ANTI_RECOIL_1 = 1; //
define ANTI_RECOIL_2 = 2; //
define ANTI_RECOIL_3 = 3; // Anti-Recoils are all adjustable in the functions area at the bottom of script.
define ANTI_RECOIL_4 = 4; //
define ANTI_RECOIL_5 = 5; //
define ONLY_WITH_SCOPE = TRUE; // Anti-recoil will only be applied with ADS
data (
// second fire/first fire // If you ADS it fires first rapid fire and release ADS to ingage second rapid fire or spam ADS quick for second one.
// HOL REL HOS RES
5, 5, 5, 5, // Class 1 // This is actually two rapid fires at 20 sps. The adjustments is times 5 of what number you put here. slot 1&2 is the second fire slot 3&4 is first fire.
50, 0, 105, 25, // Class 2 // This will fire burst for most automatic weapons with delay which you can adjust and also fires full auto if you release ADS
50, 0, 110, 25, // Class 3 // This will fire burst. Release ADS to fire full auto. Adjust how you like and how gun reacts.
50, 0, 115, 25, // Class 4 // This will fire burst. Release ADS to fire full auto. Adjust how you like and how gun reacts.
50, 0, 120, 25, // Class 5 // This will fire burst. Release ADS to fire full auto. Adjust how you like and how gun reacts.
50, 0, 125, 25 // Class 6 // This will fire burst. Release ADS to fire full auto. Adjust how you like and how gun reacts.
);
define AUTO_SHOT = 0;
int rapid_onoff = FALSE;
int rapid2_onoff = FALSE;
int AntiRecoilON = FALSE;
int scope_auto_onoff = FALSE;
int run_flag = FALSE;
int aim_assist = FALSE;
int ads_flag = FALSE;
int AutoMarkingTargetON = FALSE;
int Sprint_SlideOnOff = FALSE;
int Medical_onoff = FALSE;
int asHOL, asREL, asHOS, asRES;
int ashold, asrelease;
int autoShotMode = AUTO_SHOT;
int anti_tmp;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
int Switch_Time = 150;
int Switch_Time2 = 250;
init {
LoadAutoShot(autoShotMode * 4);
ashold = asHOL;
asrelease = asREL;
}
main {
vm_tctrl(-8);
if (get_val(4)) set_val(4, 100);
if (get_val(7)) set_val(7, 100);
if((event_press(7) && get_val(15)) || (event_press(15) && get_val(7))){ // Hold LT + D-Pad LEFT (XBOX ONE) PS4_L2 + PS4_LEFT (PS) turns Rapid Fire ON/OFF
rapid_onoff = !rapid_onoff;
if(rapid_onoff) combo_run(RumbleNotifier); }
if(rapid_onoff) {
if(event_press(0)) { // Tap XBOX BUTTON/ PS4_PS BUTTON to change rapid fires will rumble letting you know.
autoShotMode = autoShotMode + 1;combo_run(RumbleNotifier);
if(autoShotMode > 5) autoShotMode = 0;
LoadAutoShot(autoShotMode * 4);
if(get_val(7)) { ashold = asHOS; asrelease = asRES; }
else { ashold = asHOL; asrelease = asREL; }
} block(0, 1000); // Blocks XBOX BUTTON/ PS4_PS BUTTON for 1000ms then goes to normal function.
// Remember to shut off rapid fire if having problems using button for normal use.
set_val(TRACE_6, autoShotMode);
/* Auto Fire */
if(event_press(4)) { ashold = asHOS; asrelease = asRES; }
else if(event_release(7)) { ashold = asHOL; asrelease = asREL; }
if(get_val(4)) {
combo_run(AutoFire); }
else {
combo_stop(AutoFire); }
if(get_val(4)) { set_val(4, 100); }
}
if(get_val(17)){ // Tap Y(XBOX) TRIANGLE(PS4)quick for back and forth with primary weapons.
rapid_onoff = TRUE; rapid2_onoff = FALSE;
if(get_ptime(17) >= Switch_Time){ // Hold Y button 250ms to switch to pistol and activate AutoFireMAX set for all pistols.
set_val(17, 0); } // When you want to go back to primary just quick tap once it will shut down rapid fire
if(get_ptime(17) >= Switch_Time2){ // for pistol and reactivate the cycling rapid fire on the XBOX BUTTON.
combo_run(Y_hold); rapid2_onoff = TRUE;
rapid_onoff = FALSE; }
}
if(rapid2_onoff && get_val(4)) {combo_run(AutoFireMAX); }
if((event_press(7) && get_val(8)) || (event_press(8) && get_val(7))){ // Turns ON/OFF Sprint & SlideDownLadder
Sprint_SlideOnOff = !Sprint_SlideOnOff; // LT + LS click turns on/off
if(Sprint_SlideOnOff) combo_run(RumbleNotifier);
}
if(Sprint_SlideOnOff) {
if(!run_flag && get_val(12) < -97) { // When scoped in flick stick forward to switch sides
run_flag = TRUE;
combo_run(AutoSprint);
} else if(get_val(12) > -97) {
run_flag = FALSE;
}
if(get_val(12) > 99) {
combo_run(SlideDownLadder); } // When climbing down ladder downward movement + ADS it automatically slide down.
else if(get_val(12) < 99) {
combo_stop(SlideDownLadder);}
}
if(get_val(11) < -15) { combo_stop(SlideDownLadder);}
if(get_val(11) > 15) { combo_stop(SlideDownLadder);}
if((event_press(7) && get_val(16)) || (event_press(16) && get_val(7))){ // When applying ADS this auto scopes in.
scope_auto_onoff = !scope_auto_onoff; // LT + D-Pad RIGHT turns on/off
if(scope_auto_onoff) combo_run(RumbleNotifier);
}
if(scope_auto_onoff) {
if(!ads_flag && get_val(7)) {
ads_flag = TRUE;
combo_run(scope);
} else if(!get_val(7)) {
ads_flag = FALSE;
combo_stop(scope);}
}
if((event_press(7) && get_val(13)) || (event_press(13) && get_val(7))){ // AutoMarkingTarget ON/OFF LT + D-Pad UP
AutoMarkingTargetON = !AutoMarkingTargetON;
if(AutoMarkingTargetON) combo_run(RumbleNotifier);
}
if(AutoMarkingTargetON && get_val(7)) { // When ADS is activated is when auto marking will start.
combo_run(MarkTargets); }
if((event_press(7) && get_val(19)) || (event_press(19) && get_val(7))){ // aim assist strafe on/off LT + A button.
aim_assist = !aim_assist;
if(aim_assist) combo_run(RumbleNotifier);
}
if(aim_assist && get_val(4)) {combo_run(strafe); }
// Turn On and Off Anti-Recoil LT + D-Pad DOWN
if(get_val(7) && event_press(14)) {
AntiRecoilON = !AntiRecoilON;
if(AntiRecoilON) combo_run(RumbleNotifier);
}
// Set Anti-Recoil on the fly. HOLD A button + D-Pad LEFT, UP, RIGHT, DOWN and B button
if(get_val(19)) {
if(event_press(15)) {
SetAntiRecoilMode(ANTI_RECOIL_1);
combo_run(RumbleNotifier);
} else if(event_press(13)) {
SetAntiRecoilMode(ANTI_RECOIL_2);
combo_run(RumbleNotifier);
} else if(event_press(16)) {
SetAntiRecoilMode(ANTI_RECOIL_3);
combo_run(RumbleNotifier);
} else if(event_press(14)) {
SetAntiRecoilMode(ANTI_RECOIL_4);
combo_run(RumbleNotifier);
} else if(event_press(18)) {
SetAntiRecoilMode(ANTI_RECOIL_5);
combo_run(RumbleNotifier);
}
}
if(!ONLY_WITH_SCOPE || get_val(7)) {combo_run(AntiRecoil);}
}
combo AutoFire {
set_val(4, 100);
wait(ashold);
set_val(4, 0);
wait(asrelease);
set_val(4, 0);
}
combo AutoFireMAX { // You can adjust the wait time for pistols but no need to I tested them all.
set_val(4, 100);
wait(40);
set_val(4, 0);
wait(20);
set_val(4, 0);
}
combo Y_hold {
set_val(17, 100);
wait(100);
}
combo AutoSprint {
set_val(8, 0);
wait(100);
set_val(8, 100);
wait(200);
}
combo MarkTargets {
set_val(13, 100);
wait(50);
set_val(13, 0);
wait(1000);
}
combo SlideDownLadder {
set_val(8, 0);
wait(400);
set_val(8, 100);
wait(4000);
}
combo scope {
set_val(5, 0);
wait(100);
set_val(5, 100);
wait(200);
}
combo strafe {
set_val(11, 100);
wait(300);
set_val(11, 0);
wait(100);
set_val(11, -100);
wait(300);
set_val(11, 0);
wait(100);
}
combo RumbleNotifier {
set_rumble(RUMBLE_A, 100);
wait(200);
reset_rumble();
}
combo AntiRecoil {
if(get_val(4) && AntiRecoilON) {
anti_tmp = get_val(10) + anti_recoil;
if(anti_tmp > 100) anti_tmp = 100;
else if(anti_tmp < -100) anti_tmp = -100;
set_val(10, anti_tmp);
anti_tmp = get_val(9) - anti_recoil_left;
if(anti_tmp > 100) anti_tmp = 100;
else if(anti_tmp < -100) anti_tmp = -100;
set_val(9, anti_tmp);
anti_tmp = get_val(9) + anti_recoil_right;
if(anti_tmp > 100) anti_tmp = 100;
else if(anti_tmp < -100) anti_tmp = -100;
set_val(9, anti_tmp);
}
}
function SetAntiRecoilMode(m) {
if(m == ANTI_RECOIL_1) {
anti_recoil = 35; // Change this value to compensate to the vertical recoil
anti_recoil_left = 2; // Change this value to compensate to the left
anti_recoil_right = 0; // Change this value to compensate to the right
} else if(m == ANTI_RECOIL_2) {
anti_recoil = 45; // Change this value to compensate to the vertical recoil
anti_recoil_left = 0; // Change this value to compensate to the left
anti_recoil_right = 2; // Change this value to compensate to the right
} else if(m == ANTI_RECOIL_3) {
anti_recoil = 48; // Change this value to compensate to the vertical recoil
anti_recoil_left = 2; // Change this value to compensate to the left
anti_recoil_right = 0; // Change this value to compensate to the right
} else if(m == ANTI_RECOIL_4) {
anti_recoil = 52; // Change this value to compensate to the vertical recoil
anti_recoil_left = 2; // Change this value to compensate to the left
anti_recoil_right = 0; // Change this value to compensate to the right
} else if(m == ANTI_RECOIL_5) {
anti_recoil = 64; // Change this value to compensate to the vertical recoil
anti_recoil_left = 2; // Change this value to compensate to the left
anti_recoil_right = 0; // Change this value to compensate to the right
}
}
function LoadAutoShot(idx) {
asHOL = dbyte(idx) * 5;
asREL = dbyte(idx+1) * 5;
asHOS = dbyte(idx+2) * 5;
asRES = dbyte(idx+3) * 5;
}