Destiny Script With Shade Step Glitch

Script by request, allows for full auto, anti-recoil, and Shade Step glitch in Destiny. Instructions within the script, should work on all consoles.
Version1.00
AuthorThe_Rabid_Taco
Publish DateSun, 3 Apr 2016 - 19:00
Last UpdateSun, 3 Apr 2016 - 19:00
Downloads403
RATE


2

0

Code: Select all
/*******************************************************************************
*                                                                              *
*  Script by request, allows for full auto, anti-recoil, and shadestep glitch  *
*  in Destiny.                                                                 *
*                                                                              *
*  This script tracks weapons so that you can set anti-recoil and rate of fire *
*  for individual weapons.                                                     *
*                                                                              *
*  Holding down the crouch button for 1/4 of a second will allow for the       *
*  shadestep glitch to be used.  The script attempts to see what console the   *
*  Titan One is plugged into since the ghost command is different on the PS4   *
*  from other consoles.  This should work on any console.  Please let me know  *
*  if it does not.                                                             *
*                                                                              *
*  Pressing up on D-Pad while firing decreases the anti-recoil.                *
*  Pressing down on the D-Pad while firing increases the anti-recoil.          *
*  Pressing left on the D-Pad while firing decreases the time between shots.   *
*  Pressing right on the D-Pad while firing increases the time between shots.  *
*  Holding the right stick down (click) for more than .5 seconds turns the     *
*  script on and off.                                                          *
*  A quick press on the right stick re-sets the primary weapon.  Please make   *
*  sure the primary is equiped when doing this.                                *
*                                                                              *
*******************************************************************************/

 
define Left_X_Axis = 11;
define Left_Y_Axis = 12;
define Right_X_Axis = 9;
define Right_Y_Axis = 10;
 
define Script_On_Off = 5;
 
int Shoot = 4;
int ADS = 7;
int Mele = 3;
int Grenade = 6;
 
int Auto_Fire_Enabled = TRUE;
int Auto_Fire_Check_Time;
int ShadeStep_Check_Time;
int Selected_Weapon = 1;
int Right_Stick = 0;
int Auto_Fire_Hold_Time = 40;
int Weapon_Switch_Check_Time = 0;
int Primary_Auto_Fire_Delay, Secondary_Auto_Fire_Delay, Heavy_Auto_Fire_Delay;
int Primary_Anti_Recoil, Secondary_Anti_Recoil, Heavy_Anti_Recoil;
int Primary_Weapon, Secondary_Weapon, Heavy_Weapon;
 
init {
    Primary_Auto_Fire_Delay = get_pvar(SPVAR_1, 0, 4000, 40);
    Secondary_Auto_Fire_Delay = get_pvar(SPVAR_2, 0, 4000, 40);
    Heavy_Auto_Fire_Delay = get_pvar(SPVAR_3, 0, 4000, 40);
    Primary_Anti_Recoil = get_pvar(SPVAR_5, 01000);
    Secondary_Anti_Recoil = get_pvar(SPVAR_6, 01000);
    Heavy_Anti_Recoil = get_pvar(SPVAR_7, 01000);
 
    Primary_Weapon = 1;
    Secondary_Weapon = 2;
    Heavy_Weapon = 3;
}
 
main {
    // Check to see if reseting to primary weapon or turning off script.
    if (get_val(Script_On_Off)) {
        combo_run (Reset_Button_Timer);
    }
 
    // Check to see if reseting to primary weapon or turning off script.
    if (event_release(Script_On_Off) && Auto_Fire_Check_Time > 500) {
        combo_run(Auto_Fire_Togle);
    } else if (event_release(Script_On_Off) && Auto_Fire_Check_Time < 500) {
        Selected_Weapon = 1;
    }
 
    // Checks the amount of time the crouch button was held for.
    if(get_val(18)) {
        combo_run(ShadeStepTimer);
    }
 
    // If it was held for more than half a second run the combo for shadestep.
    if ((event_release(18)) && (ShadeStep_Check_Time > 250)) {
        if(get_console() == PIO_PS4) {
            combo_run(ShadeStepGlitchPS4);
        } else {
            combo_run(ShadeStepGlitch);
        }
    }
 
    // Measures the amount of time the button was pressed to switch weapons. 
    // This is used to track which weapon is equiped.
    if (get_val(17)) {
        combo_run(Get_Weapon_Switch_Time);
    }
 
    // Uses the time recorded and checks to see what weapon was switched to.
    if (event_release(17) && !combo_running(Check_Heavy_Weapon_Change)){
        combo_run(Check_Heavy_Weapon_Change);
    }
 
    // Checks to see what weapon is equiped and runs the rapid fire / anti recoil
    // for that weapon if script is enabled.
    if (get_val(Shoot) && !combo_running(Primary_Rapid_Fire) && !combo_running(Secondary_Rapid_Fire) && !combo_running(Heavy_Rapid_Fire)) {
        if ((Selected_Weapon == Primary_Weapon) && (Auto_Fire_Enabled)) {
            combo_run (Primary_Rapid_Fire);
        } else if ((Selected_Weapon == Secondary_Weapon) && (Auto_Fire_Enabled)) {
            combo_run (Secondary_Rapid_Fire);
        } else if ((Selected_Weapon == Heavy_Weapon) && (Auto_Fire_Enabled)) {
            combo_run (Heavy_Rapid_Fire);
        }
    }
 
    // Pressing left on the D-Pad while shooting adds to the delay between
    // shots.  For every time the left D-Pad is pressed while shooting we
    // increase the delay time by 10 miliseconds.  This value is then stored in
    // a persistent variable that is automatically loaded nex time the script
    // is ran.
    if (event_press(15) && get_val(Shoot)) {
        if ((Selected_Weapon == Primary_Weapon) && (Auto_Fire_Enabled)) {
            Primary_Auto_Fire_Delay = Primary_Auto_Fire_Delay + 10;
            set_pvar(SPVAR_1, Primary_Auto_Fire_Delay);
        }
        if ((Selected_Weapon == Secondary_Weapon) && (Auto_Fire_Enabled)) {
            Secondary_Auto_Fire_Delay = Secondary_Auto_Fire_Delay + 10;
            set_pvar(SPVAR_2, Secondary_Auto_Fire_Delay);
        }
    }
 
    // Pressing right on the D-Pad while shooting shortens the delay between
    // shots.  For every time the right D-Pad is pressed while shooting we
    // decrease the delay time by 10 miliseconds.  This value is then stored in
    // a persistent variable that is automatically loaded nex time the script
    // is ran.
    if (event_press(16) && get_val(Shoot)) {
        if ((Selected_Weapon == Primary_Weapon) && (Primary_Auto_Fire_Delay >= 10) && (Auto_Fire_Enabled)) {
            Primary_Auto_Fire_Delay = Primary_Auto_Fire_Delay - 10;
            set_pvar(SPVAR_1, Primary_Auto_Fire_Delay);
        }
        if ((Selected_Weapon == Secondary_Weapon) && (Secondary_Auto_Fire_Delay >= 10) && (Auto_Fire_Enabled)) {
            Secondary_Auto_Fire_Delay = Secondary_Auto_Fire_Delay - 10;
            set_pvar(SPVAR_2, Secondary_Auto_Fire_Delay);
        }
    }
 
    // Pressing down on the D-Pad while shooting strengthens the anti recoil
    // setting.  For every time the down D-Pad is pressed while shooting we
    // increase the amount of anti recoil by 2.  This value is then stored in
    // a persistent variable that is automatically loaded nex time the script
    // is ran.
    if (event_press(14) && get_val(Shoot)) {
        if ((Selected_Weapon == Primary_Weapon) && (Primary_Anti_Recoil <= 98) && (Auto_Fire_Enabled)) {
            Primary_Anti_Recoil = Primary_Anti_Recoil + 2;
            set_pvar(SPVAR_5, Primary_Anti_Recoil);
        }
        if ((Selected_Weapon == Secondary_Weapon) && (Secondary_Anti_Recoil <= 98) && (Auto_Fire_Enabled)) {
            Secondary_Anti_Recoil = Secondary_Anti_Recoil + 2;
            set_pvar( SPVAR_6, Secondary_Anti_Recoil);
        }
        if ((Selected_Weapon == Heavy_Weapon) && (Heavy_Anti_Recoil <= 98) && (Auto_Fire_Enabled)) {
            Heavy_Anti_Recoil = Heavy_Anti_Recoil + 2;
            set_pvar(SPVAR_7, Heavy_Anti_Recoil);
        }
    }
 
    // Pressing up on the D-Pad while shooting weakens the anti recoil
    // setting.  For every time the up D-Pad is pressed while shooting we
    // decrease the amount of anti recoil by 2.  This value is then stored in
    // a persistent variable that is automatically loaded nex time the script
    // is ran.
    if (event_press(13) && get_val(Shoot)) {
        if ((Selected_Weapon == Primary_Weapon) && (Primary_Anti_Recoil >= 2) && (Auto_Fire_Enabled)) {
            Primary_Anti_Recoil = Primary_Anti_Recoil - 2;
            set_pvar(SPVAR_5, Primary_Anti_Recoil);
        }
        if ((Selected_Weapon == Secondary_Weapon) && (Secondary_Anti_Recoil >= 2) && (Auto_Fire_Enabled)) {
            Secondary_Anti_Recoil = Secondary_Anti_Recoil - 2;
            set_pvar(SPVAR_6, Secondary_Anti_Recoil);
        }
        if ((Selected_Weapon == Heavy_Weapon) && (Heavy_Anti_Recoil >= 2) && (Auto_Fire_Enabled)) {
            Heavy_Anti_Recoil = Heavy_Anti_Recoil - 2;
            set_pvar(SPVAR_7, Heavy_Anti_Recoil);
        }
    }
}
 
combo ShadeStepTimer {
    ShadeStep_Check_Time = get_ptime(18);
}
 
combo ShadeStepGlitch {
    set_val(18, 100);
    wait(110);
    set_val(18, 0);
    wait(80);
    set_val(18, 100);
    wait(70);
    set_val(18, 0);
 
    set_val(1, 0);
    wait(450);
    set_val(1, 100);
    wait(60);
    set_val(1, 100);
}
 
combo ShadeStepGlitchPS4 {
    set_val(18, 100);
    wait(110);
    set_val(18, 0);
    wait(80);
    set_val(18, 100);
    wait(70);
    set_val(18, 0);
 
    set_val(27, 0);
    wait(450);
    set_val(27, 100);
    wait(60);
    set_val(27, 100);
}
 
combo Reset_Button_Timer {
    Auto_Fire_Check_Time = get_ptime(Script_On_Off);
}
 
// If pressed for a half second or longer then enable / disable the script.
combo Auto_Fire_Togle {
    if (Auto_Fire_Enabled) {
        Auto_Fire_Enabled = FALSE;
        set_led(LED_1, 0);
        set_led(LED_2, 1);
        set_led(LED_3, 0);
        set_led(LED_4, 0);
    } else if (!Auto_Fire_Enabled) {
        Auto_Fire_Enabled = TRUE;
        set_led(LED_1, 0);
        set_led(LED_2, 0);
        set_led(LED_3, 1);
        set_led(LED_4, 0);
    }
}
 
// Runs the primary rapid fire & anti-recoil using the settings stored.  Can
// be fine tuned to different weapons.
combo Primary_Rapid_Fire {
    set_val(Shoot, 100);
 
    if ((get_val(Right_Y_Axis) < 70) && (get_val(Right_Y_Axis) > -70)) {
        Right_Stick = get_val(Right_Y_Axis) + Primary_Anti_Recoil;
 
        if (Right_Stick > 100) {
            Right_Stick = 100;
        }
 
        set_val(Right_Y_Axis, Right_Stick);
    }
 
    wait (Auto_Fire_Hold_Time);
    set_val(Shoot, 0);
    wait (Primary_Auto_Fire_Delay);
}
 
// Runs the secondary rapid fire & anti-recoil using the settings stored.  Can
// be fine tuned to different weapons.
combo Secondary_Rapid_Fire {
    set_val(Shoot, 100);
 
    if ((get_val(Right_Y_Axis) < 70) && (get_val(Right_Y_Axis) > -70)) {
        Right_Stick = get_val(Right_Y_Axis) + Secondary_Anti_Recoil;
 
        if (Right_Stick > 100) {
            Right_Stick = 100;
        }
 
        set_val(Right_Y_Axis, Right_Stick);
    }
 
    wait (Auto_Fire_Hold_Time);
    set_val(Shoot, 0);
    wait (Secondary_Auto_Fire_Delay);
}
 
// Runs the heavy anti-recoil using the settings stored.  Can
// be fine tuned to different weapons.
combo Heavy_Rapid_Fire {
    set_val(Shoot, 100);
    set_val(18, 100);
    if ((get_val(Right_Y_Axis) < 70) && (get_val(Right_Y_Axis) > -70)) {
        Right_Stick = get_val(Right_Y_Axis) + Heavy_Anti_Recoil;
 
        if (Right_Stick > 100) {
            Right_Stick = 100;
        }
 
        set_val(Right_Y_Axis, Right_Stick);
    }
}
 
// Combo records the time that the change weapon button was pressed to be used
// to determine what weapon is equiped.
combo Get_Weapon_Switch_Time {
    Weapon_Switch_Check_Time = get_ptime(17);
}
 
// Combo checks the time the change weapon button was pressed.  If greater than
// .2 seconds then it was a switch to heavy, if not then it was a switch to
// either primary or secondary.
combo Check_Heavy_Weapon_Change {   
    if (Weapon_Switch_Check_Time <= 200) {
        if (Selected_Weapon == Primary_Weapon){ Selected_Weapon = Secondary_Weapon; }
        else if (Selected_Weapon == Heavy_Weapon){ Selected_Weapon = Primary_Weapon; }
        else { Selected_Weapon = Primary_Weapon; }
    } else { Selected_Weapon = Heavy_Weapon; }
 
    wait (10);
    Weapon_Switch_Check_Time = 0;
}