The Division Xbox One Elite Controller

A set of scripts compiled by Bonefisher and myself for the Xbox One Elite Controller. All Instructions are in the script. A special Thank You to Bonefisher for his help, without him this would not have been possible.
Version1.00
AuthorStealthfyter
Publish DateSun, 20 Mar 2016 - 02:32
Last UpdateSun, 20 Mar 2016 - 02:32
Downloads447
RATE


4

0

Code: Select all
/* *
* The Division
* For Xbox One Elite Controller
*  Coded by Stealthfyter & Bonefisher
*
*A special Thank You to Bonefisher! without you this wouldn't have happened.
* _____ _             _ _   _      __       _           
 / ____| |           | | | | |    / _|     | |           
| (___ | |_ ___  __ _| | |_| |__ | |_ _   _| |_ ___ _ __
 \___ \| __/ _ \/ _` | | __| '_ \|  _| | | | __/ _ \ '__|
 ____) | ||  __/ (_| | | |_| | | | | | |_| | ||  __/ |   
|_____/ \__\___|\__,_|_|\__|_| |_|_|  \__, |\__\___|_|   
                                       __/ |             
                                      |___/           
--------------------------------------------------------------------------------
Pack Contents:
Rapid Fire-Completely Adjustable
Anti-Recoil-Completely Adjustable
Auto-Sprint and Ladder Slide/Climb
Auto Target Marking
Assignments for Elite Controller Paddles
--------------------------------------------------------------------------------
 
* Paddle 1 - Quick Switch to Pistol
* Paddle 2 - Quick Roll
* Paddle 3 - Heal Pack
* Paddle 4 - Grenade----Tap to arm Grenade and RT to throw--Hold to select
* Grenade and RT to throw.
* *********************************************************** */

 
define FIRE_BUTTON               = 4;
 
define RATE_OF_FIRE              = 20;      // Range: 1 to 25 SPS. Rapid Fire
define SHOTS_PER_BURST           = 5;       // Shots per Burst. May have to adjust below depending on weapons RPM.
 
define ANTI_RECOIL               = 50;      // Change this value to compensate to the vertical recoil
define ANTI_RECOIL_LEFT          = 2;       // Change this value to compensate to the left
define ANTI_RECOIL_RIGHT         = 0;       // Change this value to compensate to the right
define ONLY_WITH_SCOPE           = TRUE;    // Anti-recoil will only be applied with ADS
 
int Reset_Time                   = 300;
 
int hold_time, rest_time;
int hold_time2, rest_time2;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
 
int AntiRecoilON                 = FALSE;
int rapid_onoff                  = FALSE;
int rapid2_onoff                 = 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;
 
 
init {
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time;
    if(rest_time < 0) rest_time = 0;
 
    hold_time2 = 65 * SHOTS_PER_BURST;      // Adjust this number depending on RPM of the weapon to match shots per burst in define section..
    rest_time2 = 160;                       // Adjust this number on how much delay you want.
    if(rest_time2 < 0) rest_time2 = 0;
}
 
main {
 
    vm_tctrl(-8);
 
    if((event_press(7) && get_val(15)) || (event_press(15) && get_val(7))){         // Turns ON/OFF Rapid Fire  LT + D-Pad LEFT
        rapid_onoff = !rapid_onoff;                                                 // Change RATE_OF_FIRE2 in define section.
        if(rapid_onoff) combo_run(RumbleNotifier);
            rapid2_onoff = FALSE;
    }
 
    if(rapid_onoff && get_val(4)) {combo_run(RapidFire); }
 
    if((event_press(7) && get_val(16)) || (event_press(16) && get_val(7))){         // Turns ON/OFF Rapid Fire  LT + D-Pad RIGHT
        rapid2_onoff = !rapid2_onoff;                                               // Change SHOTS PER BURST in define section.
        if(rapid2_onoff) combo_run(RumbleNotifier);
            rapid_onoff = FALSE;
    }
    if(rapid2_onoff && get_val(4)) {combo_run(RapidFire2); }
 
    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 it will automatically slide down when applying down movement.
    }
 
    if((event_press(7) && get_val(18)) || (event_press(18) && get_val(7))){         // When applying ADS this auto scopes in.
        scope_auto_onoff = !scope_auto_onoff;                                       // LT + B button 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; }
    }
    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); }
 
    if(get_val(7) && event_press(14)) {                                             // This turns on/off Anti-Recoil. LT+ D-Pad DOWN
        AntiRecoilON = !AntiRecoilON;
        if(AntiRecoilON) combo_run(RumbleNotifier);
    }
    if(!ONLY_WITH_SCOPE || get_val(7)) {combo_run(AntiRecoil); }
 
    if((event_press(7) && get_val(1)) || (event_press(1) && get_val(7))){           // Turns OFF All MODS  LT + VIEW Button
        AntiRecoilON = FALSE;rapid_onoff = FALSE;rapid2_onoff = FALSE;
        scope_auto_onoff = FALSE;aim_assist = FALSE;
        AutoMarkingTargetON = FALSE;Sprint_SlideOnOff = FALSE; }
 
//Quick Roll
if(get_val(XB1_P2)) {
 combo_run(roll);
 }
 //Pistol Quick Switch
if(get_val(XB1_P1)) {
 combo_run(Pistol);
 }
//Heal
if(get_val(XB1_P3)) {
 swap(XB1_P3, XB1_RIGHT);
 }
//Grenade
if(get_val(XB1_P4)) {
 swap(XB1_P4, XB1_LEFT);
 }
 
}
 
combo RapidFire {
    set_val(FIRE_BUTTON, 100);
    wait(hold_time);
    set_val(FIRE_BUTTON, 0);
    wait(rest_time);
    set_val(FIRE_BUTTON, 0);
}
 
combo RapidFire2 {
    set_val(FIRE_BUTTON, 100);
    wait(hold_time2);
    set_val(FIRE_BUTTON, 0);
    wait(rest_time2);
    set_val(FIRE_BUTTON, 0);
}
 
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, 100);
}
 
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();
}
 
//Roll
combo roll {
 set_val(XB1_A, 100);
 wait(100);
 set_val(XB1_A, 0);
 wait(70);
 set_val(XB1_A, 100);
 wait(100);
 set_val(XB1_A, 0);
}
//Pistol
combo Pistol {
 set_val(XB1_Y, 100);
 wait(100);
 set_val(XB1_Y, 0);
 wait(70);
 set_val(XB1_Y, 100);
 wait(110);
 set_val(XB1_Y, 0);
}
 
combo AntiRecoil {
    if(get_val(FIRE_BUTTON) && AntiRecoilON) {
      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);
    }
}