Call Of Duty: Advanced Warfare

Script consisting of Auto Aim with Led indicator, Rapid Fire with Led indicator, Auto Hold Breath, Auto Reload, Auto Sprint and Dodge with on/off toggle along with rumble notifier. :- To enable Auto Aim (Campaign mode ONLY), double click L2 and to disable double click L2 again. :- To enable Rapid Fire, double click R2 and to disable double click R2 again. :- Auto Hold Breath is always active whether your using a sniper rifle or not so need to worry about holding down L3. :- Full press of left analog stick triggers Auto Sprint. :- After firing your weapon and releasing R2, Auto Reload is activated. :- Press L3 to activate Dodge for left, right and backwards dash. There will be a vibration from Rumble B initially and after every 4 seconds notifying you that Dodge is activated. Press L3 again to deactivate Dodge.
Version1.03v
AuthorBaby Cham
Publish DateTue, 4 Nov 2014 - 08:02
Last UpdateThu, 6 Nov 2014 - 13:02
Downloads3566
RATE


8

0

Release Notes: Please note: For PS3 users, the in-game controller setting is set to DEFAULT FLIPPED. Also, this script is not limited to just PS3 or PS4. It can also be used for both the XB360 and XBone. It does not matter what the controller identifiers are.
Code: Select all
/* =====================================================================================================================
 * Author:         Baby Cham
 * Game:           Call Of Duty: Advanced Warfare
 * Script Version: 1.03
 * System:         Playstation 3 & 4
 * Controller:     Dualshock 3 Or 4
 * Game Settings:  Controller Default Flipped For PS3
 * Website:        Consoletuner.com
**/

 
/* ---------------------------------------------------------------------------------------------------------------------
 *  DEFINES
**/

define AIM_BUTTON          = PS4_L2;
define SHOOT_BUTTON        = PS4_R2;
define DODGE_SPRINT_BUTTON = PS4_L3;
define RELOAD_BUTTON       = PS4_SQUARE;
define X_AXIS              = PS4_LX;
define Y_AXIS              = PS4_LY;
define INITIAL_STATE       = FALSE; // FALSE to start with Rapid Fire, Auto Aim & Dodge, TRUE otherwise.
 
define RATE_OF_FIRE        = 18;    // Range: 1 to 25 RPS (Round/s).
 
//
// No need to make changes in the code below.
/* ----------------------------------------------------------------------------------------------------------------------
*  VARIABLES
**/

int RapidFire_Is_On        = INITIAL_STATE;
int Auto_Aim               = INITIAL_STATE;
int Dodge                  = INITIAL_STATE;
 
int DbleClick_L2           = 0;
int DbleClick_R2           = 0;
int hold_time, rest_time;
 
/* ----------------------------------------------------------------------------------------------------------------------
*  INITIALIZATION
**/

init {
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
    }
 
/* ----------------------------------------------------------------------------------------------------------------------
 *  MAIN
**/

main {
    // Led indicator for Auto Aim On/Off.
    set_led(LED_1, 1);
    set_led(LED_3, 0);
 
    // Double click L2 to turn on/off Auto Aim (OPTIMIZED FOR COD GAMES CAMPAIGN MODE ONLY).
    if(DbleClick_L2 > 0) DbleClick_L2 = DbleClick_L2 - get_rtime();
    if(event_press(AIM_BUTTON) && DbleClick_L2 <= 0) {
        DbleClick_L2 = 300; }
        else if(event_press(AIM_BUTTON) && DbleClick_L2 > 0) {
        Auto_Aim = !Auto_Aim;
    }
    if(Auto_Aim) {
        set_led(LED_1, 0);
        set_led(LED_3, 1);
    }
    if(Auto_Aim && get_val(AIM_BUTTON) && get_ptime(AIM_BUTTON) > 420) {
        combo_run(AutoAim);
    } else if(combo_running(AutoAim)) {
        combo_stop(AutoAim); }
 
    // Holding L2 triggers Automatic Breath Hold.
    if(abs(get_val(AIM_BUTTON)) >= 5) {
        combo_run(AutoHoldBreath); }
 
    // Releasing R2 triggers Automatic Reload.
    if(event_release(SHOOT_BUTTON)) {
        combo_run(AutoReload); }
 
    // AutoSprint
    if(get_val(Y_AXIS) < -95) { combo_run(AutoSprint); }
    else if(get_val(Y_AXIS) > -95) { combo_stop(AutoSprint); }
 
    // Led indicator for Rapid Fire On/Off.
    set_led(LED_1, 1);
    set_led(LED_4, 0);
 
    // Double click R2 to turn on/off Rapid Fire.
    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) {
        RapidFire_Is_On = !RapidFire_Is_On;
    }
    if(RapidFire_Is_On) {
        set_led(LED_1, 0);
        set_led(LED_4, 1);
    }
    if(RapidFire_Is_On && get_val(SHOOT_BUTTON) >1) {
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire); }
 
    // Press L3 to turn on/off Dodge.
    if(event_press(DODGE_SPRINT_BUTTON)) { Dodge = !Dodge; }
    if(Dodge && get_val(X_AXIS) > 5) { combo_run(Dash_Right); }
    if(Dodge && get_val(X_AXIS) < -5) { combo_run(Dash_Left); }
    if(Dodge && get_val(Y_AXIS) > 5) { combo_run(Dash_Back); }
    if(Dodge) { combo_run(DodgeNotifier); }
    // If Dodge is TRUE and either Aim or Trigger or both buttons are press, Dodge is FALSE to not interfere with regular rumble.
    if(combo_running(DodgeNotifier) && get_val(AIM_BUTTON) || get_val(SHOOT_BUTTON)) combo_stop(DodgeNotifier);
 
    //Rumble & led indicator for battery power less than 20%.
    if(get_battery() < 2) { set_rumble(RUMBLE_B, 100); }
    if(get_battery() < 2) { set_led(LED_4, 2); }
    }
 
/* ----------------------------------------------------------------------------------------------------------------------
 *  COMBOS
**/

combo AutoAim {
    set_val(AIM_BUTTON, 100);
    wait(20);
    set_val(AIM_BUTTON, 0);
    wait(10);
    set_val(AIM_BUTTON, 0);
}
 
combo AutoHoldBreath {
    set_val(DODGE_SPRINT_BUTTON, 100);
    wait(10);
    set_val(DODGE_SPRINT_BUTTON, 100);
}
 
combo AutoReload {
    set_val(RELOAD_BUTTON, 100);
    wait(100);
    set_val(RELOAD_BUTTON, 0);
}
 
combo AutoSprint {
    set_val(DODGE_SPRINT_BUTTON, 100);
    wait(10);
    set_val(DODGE_SPRINT_BUTTON, 100);
}
 
combo RapidFire {
    set_val(SHOOT_BUTTON, 100);
    wait(hold_time);
    set_val(SHOOT_BUTTON, 0);
    wait(rest_time);
    set_val(SHOOT_BUTTON, 0);
}
 
combo Dash_Right {
    set_val(X_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 100);
    wait(100);
    set_val(X_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 0);
    wait(80);
    set_val(X_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 0);
}
 
combo Dash_Left {
    set_val(X_AXIS, -100);
    set_val(DODGE_SPRINT_BUTTON, 100);
    wait(100);
    set_val(X_AXIS, -100);
    set_val(DODGE_SPRINT_BUTTON, 0);
    wait(80);
    set_val(X_AXIS, -100);
    set_val(DODGE_SPRINT_BUTTON, 0);
}
 
combo Dash_Back {
    set_val(Y_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 100);
    wait(100);
    set_val(Y_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 0);
    wait(80);
    set_val(Y_AXIS, 100);
    set_val(DODGE_SPRINT_BUTTON, 0);
}
 
combo DodgeNotifier {
    set_rumble(RUMBLE_B, 100);
    wait(200);
    set_rumble(RUMBLE_B, 0);
    wait(4000);
}