Titan one + XIM problem (Recoil)

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

Moderator: antithesis

Re: Titan one + XIM problem (Recoil)

Postby yahya » Fri Sep 22, 2017 10:00 am

antithesis wrote:Just a note gents - please don't re-post my code, I've pulled it down for a reason and the copyright notice should be honoured.

Firstly, our collective Titan One code continues to pop up on the opposition's site without permission and without credit. If you want a script, PM me and I'll see what I can do, keeping in mind that I'm tied up with work and have limited time.
Secondly, there's a bug in the rapid-fire function that I need to fix.

I'm not going to reupload the scripts I've pulled down, instead the plan is to release Interactive Config-based scripts moving forward. It's easy to do on Titan Two and I've spoken to J2K about making gamepacks out of some Titan One scripts. That means we protect our code and make the scripts more user-friendly...win-win for everyone.


Hello antithesis,

I´m new here and will become my Titan One tomorrow.
I want to play BF1 with anti-recoil, auto-spot etc. with XIM4 + T1.

Can you please send me your anti-recoil script? Thanks :smile0201:

Best regards,
yahya
User avatar
yahya
Private
Private
 
Posts: 1
Joined: Fri Sep 22, 2017 9:57 am

Re: Titan one + XIM problem (Recoil)

Postby Vincecarter123456789 » Thu Oct 19, 2017 8:04 am

Hello Guys,

let me explain my Problem. If i shoot straight it works just fine with that script. If move the mouse fast in long ways to left and right its pulling the trigger down, in that case i changed pow(get_val(PS4_RX), 10) + pow(get_val(PS4_RY), 10)) <= 10) in the script, somtimes it works, sometimes it doesnt. But anyways, so if I move the mouse while aiming in really short ways from left to right or right to left the tripper pulls up ! and this is what i dont understand and i dont see any solution for this and cant change any numbers for this problem. Maybe you guys can help me.


Code: Select all
define RAPIDFIRE_ENABLE  = FALSE;    // TRUE or FALSE
define ANTIRECOIL_ENABLE = TRUE;    // TRUE or FALSE
 
// --
 
define SPEED = 100;
define TIME = 250;
define BUTTON = PS4_TOUCH;
 
define XIM4_MIN_VAL = 21;
// The force needed is different when ADS or hip firing
define ANTIRECOIL_FORCE = 6;
define RAPIDFIRE_BUTTON = PS4_R2;
define RATE_OF_FIRE = 25;   // Range: 1 to 25 RPS (Round/s)
                            // Values higher than 25 would be so fast that the
                            // game probably will not detect 100% of the events.
int tmp, rsf, xcmp;
int hold_time, rest_time;
 
init {
    block_rumble();
    rsf = 10000 / (100^^^^^^^^^^^^^^^^^^ - XIM4_MIN_VAL);
 
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 10;
    if(rest_time < 0) rest_time = 0;
}
 
main {
    if(ANTIRECOIL_ENABLE) {
        // 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(PS4_L2) && get_val(PS4_R2) && isqrt(pow(get_val(PS4_RX), 10) + pow(get_val(PS4_RY), 10)) <= 10) {
      //if(get_val(PS4_R2) && (get_ptime(PS4_R2) <= 50 || get_ptime(PS4_R2) >= 100)) {
            if(abs(PS4_RX) < 10) {
                // Rescale XIM4 aim Y axis
                if(get_val(PS4_RY) >= XIM4_MIN_VAL) {
                    set_val(PS4_RY, get_val(PS4_RY)-XIM4_MIN_VAL);
                    sensitivity(PS4_RY, NOT_USE, rsf);
                } else if(get_val(PS4_RY) <= -XIM4_MIN_VAL) {
                    set_val(PS4_RY, get_val(PS4_RY)+XIM4_MIN_VAL);
                    sensitivity(PS4_RY, NOT_USE, rsf);
                } else set_val(PS4_RY, 0);
 
                // Rescale XIM4 aim X axis
                if(get_val(PS4_RX) >= XIM4_MIN_VAL) {
                    set_val(PS4_RX, get_val(PS4_RX)-XIM4_MIN_VAL);
                    sensitivity(PS4_RX, NOT_USE, rsf);
                } else if(get_val(PS4_RX) <= -XIM4_MIN_VAL) {
                    set_val(PS4_RX, get_val(PS4_RX)+XIM4_MIN_VAL);
                    sensitivity(PS4_RX, NOT_USE, rsf);
                } else set_val(PS4_RX, 0);
 
                // X movements compensation
                tmp = ANTIRECOIL_FORCE - 5 * abs(get_val(PS4_RX));
 
                // Apply the anti-recoil
                if(tmp <= 0) tmp = 1;
                tmp = get_val(PS4_RY) + tmp;
                if(tmp > 100) tmp = 100;
                else if(tmp < -100) tmp = -100;
                set_val(PS4_RY, tmp);
 
                // Re-apply deadzone;
                deadzone(PS4_RX, PS4_RY, XIM4_MIN_VAL, XIM4_MIN_VAL);
            }
        }
    }
 
    // RAPIDFIRE
    if(RAPIDFIRE_ENABLE) {
        if(get_val(RAPIDFIRE_BUTTON)) {
            combo_run(RapidFire);
        } else if(combo_running(RapidFire)) {
            combo_stop(RapidFire);
        }
    }
 
    // HOLD BREATH
    if(get_val(PS4_L2) >= 95) {
        set_val(PS4_L3, 100);
    }
 
    // AUTO SPOT WHEN ADSING (SCOPING)
    if(get_val(PS4_L2)) {
        combo_run(AutoSpot);
    } else combo_stop(AutoSpot);
 
    // ROTATION 180
    if(event_press(BUTTON)) {
        combo_run(Rotation180);
    }
    block(BUTTON, 500);
}
 
combo AutoSpot {
    set_val(PS4_R1, 100);
    wait(40); wait(240);
}
 
combo RapidFire {
    set_val(RAPIDFIRE_BUTTON, 100);
    wait(hold_time);
    set_val(RAPIDFIRE_BUTTON, 0);
    wait(rest_time);
    set_val(RAPIDFIRE_BUTTON, 0);
}
 
combo Rotation180 {
    set_val(PS4_RX, SPEED);
    wait(TIME);
}
 
 
combo Turbo_1 {
    set_val(PS4_L3, 100);
    wait(40);
    set_val(PS4_L3, 0);
    wait(30);
    set_val(PS4_L3, 0);
}
User avatar
Vincecarter123456789
Private First Class
Private First Class
 
Posts: 3
Joined: Fri Sep 01, 2017 1:42 pm

Previous

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

Who is online

Users browsing this forum: No registered users and 63 guests