/* ===============================================================================================================================================
* Author: Baby Cham
* Game: Destiny
* System: Playstation 4
* Controller: Dualshock 4
* Game Settings: Default
* Website: Consoletuner.com
**/
/* -----------------------------------------------------------------------------------------------------------------------------------------------
* DEFINES
**/
define SHOOT_BUTTON = PS4_R2;
define TRIGGER_BUTTON = PS4_L2;
define MELEE_BUTTON = PS4_R1;
define GRENADE_BUTTON = PS4_L1;
define SPRINT_BUTTON = PS4_L3;
define RELOAD_BUTTON = PS4_SQUARE;
define WEAPON_SWITCH_BUTTON = PS4_TRIANGLE;
define JUMP_BUTTON = PS4_CROSS;
define WAVE_BUTTON = PS4_UP;
define LY_AXIS = PS4_LY;
define LX_AXIS = PS4_LX;
define RY_AXIS = PS4_RY;
define RX_AXIS = PS4_RX;
define ONLY_WITH_SCOPE = TRUE;
define BURST_TIME = 35; // Burst fire setting.
define TIME_NEXT_BURST = 100;
define SENS_INCREASE_BY = 100; // Increase sensitivity by 100%.
define SENS_REDUCE_BY = 3; // Reduce sensitivity by 3%.
define ANTI_RECOIL = 35; // Anti-recoil strongness, value range from 0 to 100. Each weapon may need a specific value.
/* -----------------------------------------------------------------------------------------------------------------------------------------------
* VARIABLES
**/
int BurstFireOff = TRUE;
int BurstFireOn = FALSE;
int ButtonHold = TRUE;
int DbleClick_R2 = 0;
int DbleClick_L2 = 0;
int Anti_Recoil;
/* -----------------------------------------------------------------------------------------------------------------------------------------------
* MAIN SCRIPT
**/
main {
// Double click R2 to turn on/off BurstFire.
if(DbleClick_R2 > 0) DbleClick_R2 = DbleClick_R2 - get_rtime();
if(event_press(SHOOT_BUTTON) && DbleClick_R2 <= 0) {
DbleClick_R2 = 300; }
else if(event_press(SHOOT_BUTTON) && DbleClick_R2 > 0) {
BurstFireOn = !BurstFireOn;
}
if(BurstFireOn && get_val(SHOOT_BUTTON)) {
combo_run(BurstFire); combo_run(AntiRecoil); set_val(SHOOT_BUTTON, 0); set_val(TRIGGER_BUTTON, 100);
} else combo_stop(BurstFire); reset_leds();
if(BurstFireOn) { combo_run(BurstFireNotifier); colorled(0,3,0,0);
if(combo_running(BurstFireNotifier) && get_val(TRIGGER_BUTTON) || get_val(SHOOT_BUTTON)) combo_stop(BurstFireNotifier); }
// Press R2 to run NormalFire.
if(BurstFireOff && !BurstFireOn && get_val(SHOOT_BUTTON)) {
combo_run(NormalFire); }
else if(combo_running(NormalFire)) {
combo_stop(NormalFire); reset_leds(); }
if(BurstFireOff && !BurstFireOn) { combo_stop(BurstFireNotifier); colorled(3,3,3,3); }
// Sensitivity increase to 100% on L2 & R2 for quickest aim or shoot.
if(get_val(TRIGGER_BUTTON) || get_val(SHOOT_BUTTON)) {
sensitivity(TRIGGER_BUTTON, NOT_USE, 100 + SENS_INCREASE_BY);
sensitivity(SHOOT_BUTTON, NOT_USE, 100 + SENS_INCREASE_BY); }
// Sensitivity reduce by 5% on RIGHT analog stick when either trigger buttons are pressed.
if(get_val(TRIGGER_BUTTON) || get_val(SHOOT_BUTTON)) { // For personal preference ONLY.
sensitivity(RX_AXIS, NOT_USE, 100 - SENS_REDUCE_BY);
sensitivity(RY_AXIS, NOT_USE, 100 - SENS_REDUCE_BY);
// Increase sensitivity when moving either LEFT or RIGHT analog sticks.
} else if(!get_val(TRIGGER_BUTTON) || !get_val(SHOOT_BUTTON)) {
sensitivity(LX_AXIS, NOT_USE, 100 + SENS_INCREASE_BY);
sensitivity(LY_AXIS, NOT_USE, 100 + SENS_INCREASE_BY);
sensitivity(RX_AXIS, NOT_USE, 100 + SENS_INCREASE_BY);
sensitivity(RY_AXIS, NOT_USE, 100 + SENS_INCREASE_BY); }
// Press Dpad down button for one button click for Super Ability.
if(event_press(WAVE_BUTTON)) combo_run(SuperAbility);
// Turbo Super Melee.
if(get_val(MELEE_BUTTON)) combo_run(TurboMelee);
// AutoSprint
if(get_val(LY_AXIS) < -95) { combo_run(AutoSprint); }
else if(get_val(LY_AXIS) > -95) { combo_stop(AutoSprint); }
// Do not send events related to the button DOWN to the PS3.
set_val(WAVE_BUTTON, 0);
//Rumble & led indicator for battery power less than 20%.
if(get_battery() < 2) { set_rumble(RUMBLE_B, 100); }
}
/* -----------------------------------------------------------------------------------------------------------------------------------------------
* COMBOS
**/
combo BurstFire {
// 1st shot
set_val(SHOOT_BUTTON, 100);
wait(BURST_TIME);
set_val(SHOOT_BUTTON, 0);
wait(BURST_TIME);
// 2nd shot
set_val(SHOOT_BUTTON, 100);
wait(BURST_TIME);
set_val(SHOOT_BUTTON, 0);
wait(BURST_TIME);
// 3rd shot
set_val(SHOOT_BUTTON, 100);
wait(BURST_TIME);
set_val(SHOOT_BUTTON, 0);
wait(BURST_TIME);
// time for the next burst sequence
wait(TIME_NEXT_BURST);
}
combo NormalFire {
set_val(SHOOT_BUTTON, 100);
wait(10);
set_val(SHOOT_BUTTON, 100);
}
combo BurstFireNotifier {
set_led(LED_3, 2);
wait(200);
set_led(LED_3, 0);
wait(4000);
}
combo SuperAbility {
set_val(GRENADE_BUTTON, 100);
set_val(MELEE_BUTTON, 100);
wait(100);
set_val(GRENADE_BUTTON, 0);
set_val(MELEE_BUTTON, 0);
}
combo TurboMelee {
set_val(MELEE_BUTTON, 100);
wait(40);
set_val(MELEE_BUTTON, 0);
wait(20);
set_val(MELEE_BUTTON, 0);
}
combo AutoSprint {
set_val(SPRINT_BUTTON, 100);
wait(10);
set_val(SPRINT_BUTTON, 100);
}
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------
* ANTI RECOIL
**/
combo AntiRecoil { // This combo must be the last one
Anti_Recoil = get_val(PS4_RY) + ANTI_RECOIL;
if(Anti_Recoil > 100) Anti_Recoil = 100;
else if(Anti_Recoil < -100) Anti_Recoil = -100;
set_val(PS4_RY, Anti_Recoil); }
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------
* FUNCTIONS
**/
function colorled(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d); }
/* -----------------------------------------------------------------------------------------------------------------------------------------------------------
* END
**/