Adjustable anti recoil and burst fire for rainbow Six siege

Forum to discuss the scripts, configs and connection of XIM with the Titan devices.

Moderator: antithesis

Adjustable anti recoil and burst fire for rainbow Six siege

Postby Frashbrang » Sat Jul 30, 2016 3:25 pm

Hi all,

So I've tried anti recoil with rainbow Six siege and it's good for close quarters combat. I've tried burst fire and this is better for medium to long range fire.

I'd like to combine the two scripts into one that does the following.:-
LT + DPAD up =more recoil
LT +DPAD down =less recoil
LT +DPAD right =more bullets in each burst
LT +DPAD left =less bullets in each burst
The adjustments above should allow the user to change setting on the fly.

Anti recoil needs to last as long as the burst.
Anti recoil should use the xim4 compatible version.
Each burst should be activated by tapping the right trigger, you should not need to hold down the RT for the burst or anti recoil to work.
I feel that bursting and anti recoil will work well with rainbow Six. siege

Could someone please script this for me?

Many thanks
User avatar
Frashbrang
Command Sergeant Major
Command Sergeant Major
 
Posts: 153
Joined: Sat Jul 16, 2016 4:02 pm

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby bonefisher » Sat Jul 30, 2016 9:55 pm

Code: Select all

define ADS_BUTTON    = XB1_LT;
define FIRE_BUTTON   = XB1_RT;
define D_PAD_LEFT    = XB1_LEFT;
define D_PAD_RIGHT   = XB1_RIGHT;
define D_PAD_UP      = XB1_UP;
define D_PAD_DOWN    = XB1_DOWN;
define SPRINT_BUTTON = XB1_LS;
define JUMP          = XB1_A;
define RELOAD        = XB1_X;
define MOV_Y_AXIS    = XB1_LY;
define RX            = XB1_RX;
define RY            = XB1_RY;
define XIM4_MIN_VAL  = 20;
define SENSITIVITY   = 130;

int RapidRate        = 0;
int RecoilAmount     = 0;
int HoldTime;
int run = FALSE;
int ActualRecoilAmount;
int tmp, rsf, xcmp;

main {
// Run the GPC Virtual Machine every 5ms (10 - 5)
    vm_tctrl(-5);
//  On/Off toggle for Rapid Fire hold ADS and click D-Pad Left
    if((get_val(ADS_BUTTON)) && (event_press(D_PAD_LEFT))) {
        if((get_val(TRACE_1)) == 0) {
            set_val(TRACE_1, 1);
        } else {
            set_val(TRACE_1, 0);
        }
    }
//  On/Off toggle for Anti Recoil hold ADS and click D-Pad Right
    if((get_val(ADS_BUTTON)) && (event_press(D_PAD_RIGHT))) {
        if((get_val(TRACE_2)) == 0) {
            set_val(TRACE_2, 1);
        } else {
            set_val(TRACE_2, 0);
        }
    }
    if((get_val(FIRE_BUTTON)) && (get_val(TRACE_1)) == 1) {
        if(get_val(FIRE_BUTTON)) {
            combo_run(BurstFire);
        }
    }
//  To Adjust Rapid Fire hold Fire trigger and click D-Pad Up
//  for increasing speed and D-Pad Down decreasing speed.
//  Don't hold ADS while adjusting or will not adjust.
    if (!get_val(ADS_BUTTON) && get_val(FIRE_BUTTON)) {
        if (event_press(D_PAD_LEFT)) {RapidRate = RapidRate - 5; }
        if (event_press(D_PAD_RIGHT)) {RapidRate = RapidRate + 5; }
       
        if (RapidRate > 1000) { RapidRate = 1000; }
        if (RapidRate < 60) { RapidRate = 60; }
       
        set_val(TRACE_3, RapidRate);
        HoldTime = RapidRate;
    // When adjusting this keeps it from showing up pressed.
        set_val(D_PAD_LEFT, 0); set_val(D_PAD_RIGHT, 0);
    }
    if (event_press(JUMP)) {
        run = FALSE;
    }
    if (event_press(RELOAD)) {
        run = FALSE;
    }
    if (event_press(SPRINT_BUTTON)) {
        run = TRUE;
    }
        if(run && get_val(MOV_Y_AXIS) < -97 && get_ptime(MOV_Y_AXIS) >= 1000) {
            sensitivity(RX, NOT_USE, SENSITIVITY);
            sensitivity(RY, NOT_USE, SENSITIVITY);
            combo_run(EasySprint);
        }else {
            run = FALSE;
    }
    if (get_val(ADS_BUTTON) && get_val(TRACE_2) == 1) {
        // AIM down side + aiming and shooting but not moving - enable antirecoil
        // AIM down side + aiming and shooting AND moving left or right (i mean aiming) - not walking left or right - disable the antirecoil?
        if(get_val(ADS_BUTTON) && get_val(FIRE_BUTTON) && isqrt(pow(get_val(RX), 2) + pow(get_val(RY), 2)) <= 30) {
      //if(get_val(PS4_R2) && (get_ptime(PS4_R2) <= 50 || get_ptime(PS4_R2) >= 100)) {
            if(abs(RX) < 25) {
                // Rescale XIM4 aim Y axis
                if(get_val(RY) >= XIM4_MIN_VAL) {
                    set_val(RY, get_val(RY)-XIM4_MIN_VAL);
                    sensitivity(RY, NOT_USE, rsf);
                } else if(get_val(RY) <= -XIM4_MIN_VAL) {
                    set_val(RY, get_val(RY)+XIM4_MIN_VAL);
                    sensitivity(RY, NOT_USE, rsf);
                } else set_val(RY, 0);

                // Rescale XIM4 aim X axis
                if(get_val(RX) >= XIM4_MIN_VAL) {
                    set_val(RX, get_val(RX)-XIM4_MIN_VAL);
                    sensitivity(RX, NOT_USE, rsf);
                } else if(get_val(RX) <= -XIM4_MIN_VAL) {
                    set_val(RX, get_val(RX)+XIM4_MIN_VAL);
                    sensitivity(RX, NOT_USE, rsf);
                } else set_val(RX, 0);
               
                // X movements compensation
                tmp = ActualRecoilAmount - 3 * abs(get_val(RX));

                // Re-apply deadzone;
                deadzone(RX, RY, XIM4_MIN_VAL, XIM4_MIN_VAL);
                }
            }
        }
    //  To Adjust Recoil Amount hold ADS trigger and click D-Pad Up
    //  for decreasing down pull and D-Pad Down increasing down pull.
    //  Don't hold Fire button while adjusting this or will not adjust.
    if ((get_val(ADS_BUTTON)) && (!get_val(FIRE_BUTTON))) {
        if (event_press(D_PAD_UP)) {RecoilAmount = RecoilAmount - 1; }
        if (event_press(D_PAD_DOWN)) {RecoilAmount = RecoilAmount + 1; }
       
        if (RecoilAmount > 30) { RecoilAmount = 30; }
        if (RecoilAmount < 0) { RecoilAmount = 0; }
       
        set_val(TRACE_4, RecoilAmount);
        ActualRecoilAmount = RecoilAmount;
    // When adjusting this keeps it from showing up pressed.
        set_val(D_PAD_UP, 0); set_val(D_PAD_DOWN, 0);
    }
}

combo         EasySprint           {
        set_val(SPRINT_BUTTON, 100);
    wait(40);              wait(40);
}
combo         BurstFire            {
        set_val  (FIRE_BUTTON, 100);
    if(tmp <= 0)            tmp = 1;
        tmp =     get_val(RY) + tmp;
    if(tmp > 100)         tmp = 100;
    else if(tmp < -100)  tmp = -100;
        set_val           (RY, tmp);
    wait                 (HoldTime);
        set_val    (FIRE_BUTTON, 0);
}

Give this a try!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby bonefisher » Sun Jul 31, 2016 6:47 am

Built the anti-recoil down for more pull instead of less pull so if you want you can change it. Also usually I put a adjustable delay in my burst so I could hold down RT to get a loop of what I want out of the burst. This one is just like you want a tap of the trigger for how many shots comes out with the anti-recoil. Let me know how it works for you!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby Frashbrang » Sun Jul 31, 2016 7:56 am

Cheerrrrssss bonefish! I'll try it as soon as get back to my beloved xbox :)
User avatar
Frashbrang
Command Sergeant Major
Command Sergeant Major
 
Posts: 153
Joined: Sat Jul 16, 2016 4:02 pm

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby jayjack » Sun Aug 14, 2016 7:40 pm

Frashbrang wrote:Cheerrrrssss bonefish! I'll try it as soon as get back to my beloved xbox :)


Have you checked this? Does it work well?
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby jayjack » Mon Aug 15, 2016 3:52 pm

To get this to work with PS4, is all I have to do is change the button DEFINE statements?

Can someone separate out the burst mode?
I'd like to try to add burst to pablogroup's script, but space will be real tight.
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby bonefisher » Mon Aug 15, 2016 4:22 pm

Next time I can help out is Friday because I'll be round the clock at work. Maybe someone will help you out here if not I'll help Friday!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby jayjack » Sun Aug 21, 2016 5:06 pm

bonefisher wrote:Next time I can help out is Friday because I'll be round the clock at work. Maybe someone will help you out here if not I'll help Friday!


No pressure, but did you get to look at this at all.

thanks
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby pablosscripts » Wed Aug 24, 2016 7:37 am

Ok I'll see if I can integrate it into my script now. I know exactly which bits are not often used which I can safely sacrifice. I'll post my results soon.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Adjustable anti recoil and burst fire for rainbow Six si

Postby jayjack » Wed Aug 24, 2016 7:49 am

pablogroup wrote:Ok I'll see if I can integrate it into my script now. I know exactly which bits are not often used which I can safely sacrifice. I'll post my results soon.


Fantastic.
I appreciate your this and await your results.

Are you putting in both? Adjustable burst and XIM anti-recoil?
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Next

Return to XIM Apex, XIM4, XIM Edge with Titan devices

Who is online

Users browsing this forum: No registered users and 102 guests