The Division (POW)

Info inside. Enjoy!
Version1.1
Authorbonefisher
Publish DateSun, 10 Apr 2016 - 15:47
Last UpdateTue, 12 Apr 2016 - 20:47
Downloads1538
RATE


8

0

Release Notes: Turned burst fire into what ever you want. Rapid Fire or Burst Fire it is all in how you adjust it.
Code: Select all
/*******************************************************************************************************************
*                     The Division by bonefisher and a Special Thanks to The_Rabid_Taco.                           *
/*******************************************************************************************************************
*   If needing adjusting any Rapid/Burst Fires or Anti-Recoil just hold fire trigger which blocks the D-Pad keys   *
*   to allow easy adjustments without equipment coming out. Only pad isn't blocked for turning on the rapid fire.  *
*   Rapid Fire and Burst Fire even on same adjusting mod are seperate adjustments whatever which one your on       *
*   adjusts separately from the other and goes for the Anti-Recoil long as you follow sequence of button presses.  *
*   Auto slide down ladder is with the auto sprint mod and when your in downward movement going down ladder just   *
*   hold ADS and it will slide down. For switching to pistol with its own rapid fire hold Y xbox or TRIANGLE PS4   *
*   for 250ms and will automatically switch to pistol and rapid fire. When switching back to primary weapon just   *
*   tap quick and it will shut down rapid fire for pistol. It automactically goes back to what you were using.     *
*   Instead of shutting your sprint on/off when in menu use D-Pad for scrolling around.
/*******************************************************************************************************************
*                           TURNS MODS ON/OFF:  RUMBLE ON  /  NO RUMBLE OFF                                        *
*  MOD:            RUMBLE:       COMBINATION OF BUTTON PRESSES OF TURNING ON/OFF MODS AND ADJUSTING:               *
*  Rapid Fire      Single        PS: L2 + D-Pad Left                       X-Box: LT + D-Pad Left                  *
*  Burst Fire      Double        PS: L2 + D-Pad Left                       X-Box: LT + D-Pad Left                  *
*  Adjusting Fires Rapid/Burst   PS: HOLD R2 + Click D-Pad Left for Decrease and D-Pad Right for Increase Fire     *
*  Adjusting Fires Rapid/Burst   XB: HOLD RT + Click D-Pad Left for Decrease and D-Pad Right for Increase Fire     * 
*  Adjust Burst Delay            PS: HOLD R2 + Click D-Pad DOWN for Decrease and D-Pad UP for Increase Delay       *
*  Adjust Burst Delay            XB: HOLD RT + Click D-Pad DOWN for Decrease and D-Pad UP for Increase Delay       * 
*  Anti-Recoil     Single        PS: L2 + D-Pad Down                       X-Box: LT + D-Pad Down                  * 
*  Anti-Recoil LT  Double        PS: L2 + D-Pad Down                       X-Box: LT + D-Pad Down                  *
*  Adjusting Anti Recoil         PS: HOLD L2 + R2 then click the direction on D-Pad for what pull is needed by one *
*  Adjusting Anti Recoil         XB: HOLD LT + RT then click the direction on D-Pad for what pull is needed by one *
*  Auto Sprint     Single        PS: L2 + L3                               X-Box: LT + LS                          *
*  Pistol Switch   Single        PS: D-Pad UP + TRIANGLE                   X-Box: D-Pad Up + Y                     *
*  AimAssistStrafe Single        PS: D-Pad UP + SQUARE                     X-Box: D-Pad UP + X                     *
*  AutoMarkTarget  Single        PS: D-Pad UP + CROSS                      X-Box: D-Pad UP + A                     *
*  Scope Auto      Single        PS: D-Pad UP + CIRCLE                     X-Box: D-Pad UP + B                     *
********************************************************************************************************************/

 
int BurstDelay, HoldTime3;
int AutoRunOnOff;
int HoldTime, RateOfFire;
int HoldTime2, BurstOfFire;
int ToggleAntiRecoil;
int ToggleFireMods;
int scope_auto_onoff;
int AimAssistOnOff;
int SwitchFireOnOff;
int AutoMarkingTargetON;
int run_flag   = FALSE;
int ads_flag   = FALSE;
int AutoFire   = FALSE;
int anti_recoil, anti_recoil_left, anti_recoil_right;
int ANTI_RECOIL, ANTI_RECOIL_LEFT, ANTI_RECOIL_RIGHT;
 
init {
    AutoRunOnOff = get_pvar(SPVAR_1, 1, 2, 2);
    RateOfFire = get_pvar(SPVAR_2, 0, 25, 20);
    HoldTime = get_pvar(SPVAR_3, 0, 500, 25);
    BurstOfFire = get_pvar(SPVAR_5, 20, 125, 40);
    BurstDelay = get_pvar(SPVAR_6, 1, 125, 40);
    ToggleAntiRecoil = get_pvar(SPVAR_7, 1, 3, 1);
    ANTI_RECOIL = get_pvar(SPVAR_8, 0, 100, 30);
    ANTI_RECOIL_LEFT = get_pvar(SPVAR_9, 0, 100, 2);
    ANTI_RECOIL_RIGHT = get_pvar(SPVAR_10, 0, 100, 0);
    ToggleFireMods = get_pvar(SPVAR_11, 1, 3, 1);
    scope_auto_onoff = get_pvar(SPVAR_12, 1, 2, 2);
    AimAssistOnOff = get_pvar(SPVAR_14, 1, 1, 2);
    SwitchFireOnOff = get_pvar(SPVAR_15, 1, 2, 1);
    AutoMarkingTargetON = get_pvar(SPVAR_16, 1, 2, 2);
}
 
main {
 
    vm_tctrl(-8);
 
    // Set hair triggers
    if (get_val(4)) set_val(4, 100);
    if (get_val(7)) set_val(7, 100);
 
    if (get_val(7) && event_press(15) && !get_val(4)) {
        if (ToggleFireMods == 3) {
            ToggleFireMods = 1;
            set_pvar(SPVAR_11, ToggleFireMods);
        } else if (ToggleFireMods == 1) {
            ToggleFireMods = 2;
            set_pvar(SPVAR_11, ToggleFireMods);
            combo_run(RumbleNotifier);
        } else if (ToggleFireMods == 2) {
            ToggleFireMods = 3;
            set_pvar(SPVAR_11, ToggleFireMods);
            combo_run(DoubleRumbleNotifier);
        }
    }
    if (ToggleFireMods == 2 && get_val(4)) {
        combo_run(RapidFire);
    } else if (ToggleFireMods == 3 && get_val(4)) {
        combo_run(BurstFire);
    }   if(event_release(4)) { combo_stop(BurstFire);
    }
    // This portion of the script allows for fine tune adjustment of the fire
    // rate.  Pressing right on the dpad will increase the rate of fire by one,
    // and pressing left on the dpad while shooting will decrease the rate of
    // fire by one.  Do not use ADS while adjusting rate of fire or it will
    // adjust the anti recoil settings instead.  Again these are stored in
    // persistent variables and will be stored across sessions.
    if (ToggleFireMods == 2 && get_val(4) && !get_val(7)) {
        if (event_press(16)) {
            if (RateOfFire < 25) {
                RateOfFire = RateOfFire + 1;
            } else if (RateOfFire >= 25) {
                RateOfFire = 25;
            }
            set_pvar(SPVAR_2, RateOfFire);
        }
        if (event_press(15)) {
            if (RateOfFire > 0) {
                RateOfFire = RateOfFire - 1;
            } else if (RateOfFire <= 0) {
                RateOfFire = 0;
            }
            set_pvar(SPVAR_2, RateOfFire);
        }
        HoldTime = 500 / RateOfFire;
        set_pvar(SPVAR_3, HoldTime);
    }
    if (ToggleFireMods == 3 && get_val(4) && !get_val(7)) {
        if (event_press(16)) {
            if (BurstOfFire < 125) {
                BurstOfFire = BurstOfFire + 1;
            } else if (BurstOfFire >= 125) {
                BurstOfFire = 125;
            }
            set_pvar(SPVAR_5, BurstOfFire);
        }
        if (event_press(15)) {
            if (BurstOfFire > 0) {
                BurstOfFire = BurstOfFire - 1;
            } else if (BurstOfFire <= 0) {
                BurstOfFire = 0;
            }
            set_pvar(SPVAR_5, BurstOfFire);
        }
        HoldTime2 = 5 * BurstOfFire;
    }
    if (ToggleFireMods == 3 && get_val(4) && !get_val(7)) {
        if (event_press(13)) {
            if (BurstDelay < 125) {
                BurstDelay = BurstDelay + 1;
            } else if (BurstDelay >= 125) {
                BurstDelay = 125;
            }
            set_pvar(SPVAR_6, BurstDelay);
        }
        if (event_press(14)) {
            if (BurstDelay > 0) {
                BurstDelay = BurstDelay - 1;
            } else if (BurstDelay <= 0) {
                BurstDelay = 0;
            }
            set_pvar(SPVAR_6, BurstDelay);
        }
        HoldTime3 = 5 * BurstDelay;
    }
 
    // This checks to see if ADS is on and down is pressed on the D-Pad.  This
    // actually has multiple functions, the first being an always on anti recoil
    // with the second being a ADS only anti recoil.  A rumble notification is
    // used to distinguish which one is being used.  A single rumble is always
    // use anti recoil.  A double rumble is used for ADS only anti recoil. 
    // Pressing down while in ADS a third time disables this function.
    if (get_val(7) && event_press(14) && !get_val(4)) {                                 
        if (ToggleAntiRecoil == 3) {
            ToggleAntiRecoil = 1;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
        } else if (ToggleAntiRecoil == 1) {
            ToggleAntiRecoil = 2;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
            combo_run(RumbleNotifier);
        } else if (ToggleAntiRecoil == 2) {
            ToggleAntiRecoil = 3;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
            combo_run(DoubleRumbleNotifier);
        }
    }
    // This checks to see which (if any) anti recoil is turned on and runs the
    // appropriate combo for that anti recoil.
    if (ToggleAntiRecoil == 2 && get_val(4)) {
        combo_run(AntiRecoil);
    } else if (ToggleAntiRecoil == 3 && get_val(7) && get_val(4)) {
        combo_run(AntiRecoil);
    }
    // This section is used to fine tune the anti recoil if it is set to on.
    // So while shooting and having ADS up pressing up on the dpad will reduce
    // anti recoil by one, pressing down on the dpad will increase the down pull
    // by one, pressing right on the dpad will increase right pull by one, while
    // pressing left on the dpad will increase the left pull by one.  These
    // values are stored in persistent variable allowing them to be used every
    // time a new session is started, the script is reloaded, or even if the
    // Titan One looses power.
    if ((ToggleAntiRecoil == 2 || ToggleAntiRecoil == 3) && get_val(4) && get_val(7)) {
        if (event_press(13)) {
            ANTI_RECOIL = ANTI_RECOIL - 1;
 
            if (ANTI_RECOIL < 0) {
                ANTI_RECOIL = 0;
            }
            set_pvar(SPVAR_8, ANTI_RECOIL);
        }
        if (event_press(14)) {
            ANTI_RECOIL = ANTI_RECOIL + 1;
 
            if (ANTI_RECOIL > 100) {
                ANTI_RECOIL = 100;
            }
            set_pvar(SPVAR_8, ANTI_RECOIL);
        }
        if (event_press(15)) {
            if (ANTI_RECOIL_RIGHT > 0) {
                ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT - 1;
                ANTI_RECOIL_LEFT = 0;
            } else if (ANTI_RECOIL_RIGHT <= 0 && ANTI_RECOIL_LEFT < 100) {
                ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT + 1;
                ANTI_RECOIL_RIGHT = 0;
            } else if (ANTI_RECOIL_LEFT >= 100) {
                ANTI_RECOIL_LEFT = 100;
                ANTI_RECOIL_RIGHT = 0;
            }
            set_pvar(SPVAR_9, ANTI_RECOIL_LEFT);
            set_pvar(SPVAR_10, ANTI_RECOIL_RIGHT);
        }
        if (event_press(16)) {
            if (ANTI_RECOIL_LEFT > 0) {
                ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT - 1;
                ANTI_RECOIL_RIGHT = 0;
            } else if (ANTI_RECOIL_LEFT <= 0 && ANTI_RECOIL_RIGHT < 100) {
                ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT + 1;
                ANTI_RECOIL_LEFT = 0;
            } else if (ANTI_RECOIL_RIGHT >= 100) {
                ANTI_RECOIL_RIGHT = 100;
                ANTI_RECOIL_LEFT = 0;
            }
            set_pvar(SPVAR_9, ANTI_RECOIL_LEFT);
            set_pvar(SPVAR_10, ANTI_RECOIL_RIGHT);
        }
    }
    if ((event_press(7) && get_val(8)) || (event_press(8) && get_val(7))) {
        if (AutoRunOnOff == 1) {
            AutoRunOnOff = 2;
        } else if (AutoRunOnOff == 2) {
            AutoRunOnOff = 1;
        }
        set_pvar(SPVAR_1, AutoRunOnOff);
 
        if (AutoRunOnOff == 1) {
            combo_run(RumbleNotifier);
        }
    }
    // When scoped in flick stick forward to switch sides
    if (AutoRunOnOff == 1) {
    if(!run_flag && get_val(12) < -97) {
        run_flag = TRUE;
        combo_run(AutoSprint);
    } else if(get_val(12) > -97) {
        run_flag = FALSE;
    }
    // When climbing down ladder downward movement + ADS it automatically slide down.
    if(get_val(12) > 99) {
        combo_run(SlideDownLadder); }
      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(13) && get_val(18)) || (event_press(18) && get_val(13))){         
        if (scope_auto_onoff == 1) {
            scope_auto_onoff = 2;
        } else if (scope_auto_onoff == 2) {
            scope_auto_onoff = 1;
        }
        set_pvar(SPVAR_12, scope_auto_onoff);
 
        if (scope_auto_onoff == 1) {
            combo_run(RumbleNotifier);
        }
    }
    if (scope_auto_onoff == 1) {
        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(13) && get_val(20)) || (event_press(20) && get_val(13))){         
        if (AimAssistOnOff == 1) {
            AimAssistOnOff = 2;
        } else if (AimAssistOnOff == 2) {
            AimAssistOnOff = 1;
        }
        set_pvar(SPVAR_14, AimAssistOnOff);
 
        if (AimAssistOnOff == 1) {
            combo_run(RumbleNotifier);
        }
    }
    if (AimAssistOnOff == 1 && get_val(4)) {
        combo_run(Strafe);
    }
    if ((event_press(17) && get_val(13)) || (event_press(13) && get_val(17))){         
        if (SwitchFireOnOff == 1) {
            SwitchFireOnOff = 2;
        } else if (SwitchFireOnOff == 2) {
            SwitchFireOnOff = 1;
        }
        set_pvar(SPVAR_15, SwitchFireOnOff);
 
        if (SwitchFireOnOff == 1) {
            combo_run(RumbleNotifier);
        }
    }
    // Tap Y(XBOX) TRIANGLE(PS4)quick for back and forth with primary weapons.
    // Hold Y button 250ms to switch to pistol and activate AutoFireMAX set for all pistols.
    // When you want to go back to primary just quick tap once it will shut down rapid fire
    // for pistol and reactivate the regular fire, rapid fire or burst that you choosed.
    if (SwitchFireOnOff == 1 && get_val(17)) {
        AutoFire = FALSE;
        if(get_ptime(17) >= 150){
            set_val(17, 0); }
        if(get_ptime(17) >= 250){
            combo_run(Y_hold); AutoFire = TRUE;
        }
    }
    if(AutoFire && get_val(4)) {combo_run(AutoFireMAX); }
 
    if ((event_press(13) && get_val(19)) || (event_press(19) && get_val(13))) {
        if (AutoMarkingTargetON == 1) {
            AutoMarkingTargetON = 2;
        } else if (AutoMarkingTargetON == 2) {
            AutoMarkingTargetON = 1;
        }
        set_pvar(SPVAR_16, AutoMarkingTargetON);
 
        if (AutoMarkingTargetON == 1) {
            combo_run(RumbleNotifier);
        }
    }
    if (AutoMarkingTargetON == 1 && get_val(7)) {
        combo_run(MarkTargets); }
 
    if (get_val(4)) {
            block(13, 1000); block(14, 1000); block(15, 1000); block(16, 1000);
    }
}
 
combo RumbleNotifier {
    set_rumble(RUMBLE_A, 100);
    wait(200);
    reset_rumble();
}
combo DoubleRumbleNotifier {
    set_rumble(RUMBLE_A, 100);
    wait(200);
    set_rumble(RUMBLE_A, 0);
    wait(200);
    set_rumble(RUMBLE_A, 100);
    wait(200);
    reset_rumble();
}
combo RapidFire {
    set_val(4, 100);
    wait(HoldTime);
    set_val(4, 0);
    wait(HoldTime);
    set_val(4, 0);
}
combo BurstFire {
    set_val(4, 100);
    wait(HoldTime2);
    set_val(4, 0);
    wait(HoldTime3);
    set_val(4, 0);
}
combo AutoSprint {
    set_val(8, 0);
    wait(100);
    set_val(8, 100);
    wait(200);
}
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 Y_hold {
    set_val(17, 100);
    wait(100);
}
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 MarkTargets {
    set_val(13, 100);
    wait(50);
    set_val(13, 0);
    wait(1000);
}
combo AntiRecoil {
    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);
}