Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

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

Moderator: antithesis

Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby TheDesertShadow » Tue Aug 14, 2018 11:56 am

Hi all
I came across this script and have been using it on BF1, it is the best AR script I have used so far, So smooth no jumps no jitters just awesome. Anyway I have been trying to add rapid fire to it but I keep getting compile errors. Would someone be so kind to add rapid fire to it Please....

Code: Select all
 
#define vertical    28.75
#define horizontal   0.00
 
fix32  noise;
init{noise = 5.0;}
 
main {
//-------------------------Remove stick noise---------------------------------//
    if(abs(get_actual(STICK_1_X)) < noise) set_val(STICK_1_X, 0.0);
    if(abs(get_actual(STICK_1_Y)) < noise) set_val(STICK_1_Y, 0.0);
    if(abs(get_actual(STICK_2_X)) < noise) set_val(STICK_2_X, 0.0);
    if(abs(get_actual(STICK_2_Y)) < noise) set_val(STICK_2_Y, 0.0);
 
    if(get_actual(BUTTON_5))combo_run(anti_recoil);
    if(is_active(STICK_1_Y))combo_stop(anti_recoil);
    if(is_active(STICK_1_X))combo_stop(anti_recoil);
}
combo anti_recoil
{
    set_val(STICK_1_Y, vertical);
    set_val(STICK_1_X, horizontal);
}
 
User avatar
TheDesertShadow
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Fri Mar 02, 2018 1:32 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby bonefisher » Tue Aug 14, 2018 1:31 pm

Code: Select all
 
#pragma METAINFO("Battlefield V MODzPACK", 1, 0, "bonefisher")
 
/* *****************************************************************************
<cfgdesc>
[BATTLEFIELD V MODzPACK]
color       = #349510
shortdesc    = Switching P=primary and S=secondary weapons enabled.
control        = info
 
[ONE CLICK CONFIGURATIONS]
color       = #349510
collapsible = 2
shortdesc    = One click predefined configurations can be incorporated in the Interactive Configuration interface.
control        = config
item        = ASSAULT:000000025800000003000000A00019333400000000000001000001C200000002000000A0000000000000000000000000000000000000000000000000000000000000A0038080030028003C
item        = MEDIC:010000016700000001000000A00018000000000000000001000001C200000002000000A000190000FFFE000000000000000000000000000000000000000000000000A0038080030028003C
item        = SUPPORT:00000001E000000003000000A00017214800000000000001000001C200000002000000A0001900000000000000000000000000000000000000000000000000000000A0038080030028003C
item        = SCOUT:0300000168000000010000009B0014000000000000000001000001C200000002000000A0001951EC0000000000000000000000000000000000000000000000000200A0030000030028003C
 
[PRIMARY WEAPONS FIRING OPTIONS]
color       = #349510
collapsible = 2
shortdesc    = Enable options on fire trigger.
byteoffset    = 0
bitsize        = 8
control        = radiobox
default        = 0
item        = Disabled for automatics
item        = Enable rapid fire for semi-automatics.
item        = Enable burst firing for automatics.
item        = Enable burst firing for semi-automatics.
 
[PRIMARY WEAPON ROUNDS PER MINUTE]
group        = true
shortdesc    = Adjust rounds per minute.
byteoffset    = 1
bitsize        = 32
control        = spinbox
default        = 360
minimum        = 60
maximum        = 1200
step        = 1
 
[PRIMARY WEAPON SHOTS PER BURST]
group        = true
shortdesc    = Apply burst shots by quick tap of fire trigger or for burst firing.
byteoffset    = 5
bitsize        = 32
control        = spinbox
default        = 1
minimum        = 1
maximum        = 20
step        = 1
 
[PRIMARY WEAPON BURST FIRE]
group        = true
shortdesc    = Adjust release time for burst firing semi-automatics or automatics.
byteoffset    = 9
bitsize        = 32
control        = spinbox
default        = 160
minimum        = 1
maximum        = 1200
step        = 1
 
[PRIMARY WEAPON ANTI-RECOIL VERTICAL SETTINGS]
group        = true
shortdesc    = Vertical compensation settings for primary weapon.
byteoffset    = 13
bitsize        = 32
control        = spinboxf
default        = 0000
minimum        = -10000
maximum        = 10000
step        = 1
decimals    = 2
 
[PRIMARY WEAPON ANTI-RECOIL HORIZONTAL SETTINGS]
group        = true
shortdesc    = Horizontal compensation settings for primary weapon.
byteoffset    = 17
bitsize        = 32
control        = spinboxf
default        = 00000
minimum        = -10000
maximum        = 10000
step        = 1
decimals    = 2
 
[PRIMARY WEAPON ADS ON FIRE TRIGGER]
group        = true
shortdesc    = Enabled ADS on FIRE trigger with primary weapons.
byteoffset    = 22
bitsize        = 1
bitoffset    = 7
control        = checkbox
default        = 0
item        = Enable ADS on FIRE trigger
 
[SECONDARY WEAPONS FIRING OPTIONS]
color       = #349510
collapsible = 2
shortdesc    = Enable options on fire trigger.
byteoffset    = 23
bitsize        = 8
control        = radiobox
default        = 0
item        = Disabled for automatics
item        = Enable rapid fire for semi-automatics.
item        = Enable burst firing for automatics.
item        = Enable burst firing for semi-automatics.
 
[SECONDARY WEAPON ROUNDS PER MINUTE]
group        = true
shortdesc    = Adjust rounds per minute.
byteoffset    = 24
bitsize        = 32
control        = spinbox
default        = 450
minimum        = 60
maximum        = 1200
step        = 1
 
[SECONDARY WEAPON SHOTS PER BURST]
group        = true
shortdesc    = Apply burst shots by quick tap of fire trigger or for burst firing.
byteoffset    = 28
bitsize        = 32
control        = spinbox
default        = 1
minimum        = 1
maximum        = 20
step        = 1
 
[SECONDARY WEAPON BURST FIRE]
group        = true
shortdesc    = Adjust release time for burst firing semi-automatics or automatics.
byteoffset    = 32
bitsize        = 32
control        = spinbox
default        = 160
minimum        = 1
maximum        = 1200
step        = 1
 
[SECONDARY WEAPON ANTI-RECOIL VERTICAL SETTINGS]
group        = true
shortdesc    = Vertical compensation settings for primary weapon.
byteoffset    = 36
bitsize        = 32
control        = spinboxf
default        = 0000
minimum        = -10000
maximum        = 10000
step        = 1
decimals    = 2
 
[SECONDARY WEAPON ANTI-RECOIL HORIZONTAL SETTINGS]
group        = true
shortdesc    = Horizontal compensation settings for primary weapon.
byteoffset    = 40
bitsize        = 32
control        = spinboxf
default        = 00000
minimum        = -10000
maximum        = 10000
step        = 1
decimals    = 2
 
[SECONDARY WEAPON ADS ON FIRE TRIGGER]
group        = true
shortdesc    = Enabled ADS on FIRE trigger with secondary weapons.
byteoffset    = 45
bitsize        = 1
bitoffset    = 7
control        = checkbox
default        = 0
item        = Enable ADS on FIRE trigger
 
[SCOPE OPTIONS]
color       = #349510
collapsible = 2
shortdesc    = Enable Scope features on the ADS trigger.
byteoffset    = 64
bitsize        = 8
control        = radiobox
default        = 0
item        = Disabled
item        = Enable hold breath.
item        = Enable quick scope and hold breath.
 
[QUICK SCOPE ADJUSTMENTS]
group        = true
shortdesc    = Adjust quick scope delay.
byteoffset    = 65
bitsize        = 16
control        = slider
default        = 160
minimum        = 0
maximum        = 500
step        = 1
 
[SPRINT OPTIONS]
color       = #349510
collapsible = 2
shortdesc    = Enable Sprint features on the left stick.
byteoffset    = 67
bitsize        = 8
control        = radiobox
default        = 0
item        = Disabled
item        = Enable any movement sprint forward.
item        = Enable easy sprint with stick forward 98 percent.
item        = Enable crouch,reload stop sprint with activate again by jump tap.
 
[SLIDE SPRINTING]
group        = true
shortdesc    = Activate left stick forward 75% and double tap crouch button.
byteoffset    = 68
bitsize        = 1
bitoffset    = 7
control        = checkbox
default        = 0
item        = Enable Slide Sprinting
 
[BUNNY HOP SPRINTING]
group        = true
shortdesc    = Activate left stick forward 75% and double tap jump button.
byteoffset    = 69
bitsize        = 1
bitoffset    = 7
control        = checkbox
default        = 0
item        = Enable Bunny Hop Sprinting
 
[SPOT OPTIONS]
color       = #349510
collapsible = 2
shortdesc    = Enable spot features.
byteoffset    = 70
bitsize        = 8
control        = radiobox
default        = 0
item        = Disabled
item        = Enable ADS only spotting.
item        = Enable hold ADS 300ms/ released has 6 seconds.
item        = Enable hold ADS 400ms to activate/ hold jump 400ms to deactivate.
 
[MINIMUM RADOM ADJUSTMENT]
group        = true
shortdesc    = Adjust minimum random spot delay.
byteoffset    = 71
bitsize        = 16
control        = slider
default        = 40
minimum        = 20
maximum        = 1000
step        = 1
 
[MAXIMUM RADOM ADJUSTMENT]
group        = true
shortdesc    = Adjust maximum random spot delay.
byteoffset    = 73
bitsize        = 16
control        = slider
default        = 60
minimum        = 30
maximum        = 2000
step        = 1
</cfgdesc>
***************************************************************************** */

 
#include <display.gph>
#define WEAPON_0   0
#define WEAPON_1   1
 
bool   fire_ads;
bool   fire_ads2;
bool   spot_u;
bool   change;
bool   slide;
bool   hop;
bool   slide_switch;
bool   hop_switch;
bool   crouch;
int    Spot_Minimum ;
int    Spot_Maximum ;
int    Spot_Time    = 0;
int    Spot_Wait    = 0;
int    quick_scope_delay;
int    t;
uint8  primary_fire;
uint8  secondary_fire;
uint8  weapon = 0;
uint8  spot;
uint8  scope;
uint8  sprint;
fix32  noise;
fix32  vertical;
fix32  horizontal;
fix32  vertical2;
fix32  horizontal2;
uint32 rpm;
uint32 rpm2;
uint32 burst;
uint32 burst2;
uint32 tap_fire;
uint32 tap_fire2;
uint32 burst_adjustment;
uint32 burst_adjustment2;
uint32    IND[] = {
    _0_,                  // 0
    _1_,                  // 1
    _2_,                  // 2
    _3_,                  // 3
    _P_,                  // 4
    _S_,                  // 5
    _A_                   // 6
};
init
{
    pmem_load();
    primary_fire = pmem_read(0);
    pmem_read(1, &rpm);
    pmem_read(5, &burst);
    pmem_read(9, &burst_adjustment);
    pmem_read(13, &vertical);
    pmem_read(17, &horizontal);
    fire_ads = (pmem_read(22) >> 7) & 0b1;
    secondary_fire = pmem_read(23);
    pmem_read(24, &rpm2);
    pmem_read(28, &burst2);
    pmem_read(32, &burst_adjustment2);
    pmem_read(36, &vertical2);
    pmem_read(40, &horizontal2);
    fire_ads2 = (pmem_read(45) >> 7) & 0b1;
 
    scope = pmem_read(64);
    pmem_read(65, &quick_scope_delay);
    sprint = pmem_read(67);
    slide = (pmem_read(68) >> 7) & 0b1;
    hop = (pmem_read(69) >> 7) & 0b1;
    spot = pmem_read(70);
    pmem_read(71, &Spot_Minimum);
    pmem_read(73, &Spot_Maximum);
 
    printf("primary_fire: %u", primary_fire);
    printf("rpm: %d", rpm);
    printf("burst: %d", burst);
    printf("burst_adjustment: %d", burst_adjustment);
    printf("vertical: %.04f", vertical);
    printf("horizontal: %.04f", horizontal);
    printf("fire_ads: %d", fire_ads);
    printf("secondary_fire: %u", secondary_fire);
    printf("rpm2: %d", rpm2);
    printf("burst2: %d", burst2);
    printf("burst_adjustment2: %d", burst_adjustment2);
    printf("vertical2: %.04f", vertical2);
    printf("horizontal2: %.04f", horizontal2);
    printf("fire_ads2: %d", fire_ads2);
 
    printf("scope: %u", scope);
    printf("quick_scope_delay: %d", quick_scope_delay);
    printf("sprint: %u", sprint);
    printf("slide: %d", slide);
    printf("hop: %d", hop);
    printf("spot: %u", spot);
    printf("Spot_Minimum: %d", Spot_Minimum);
    printf("Spot_Maximum: %d", Spot_Maximum);
 
    tap_fire = burst * (1000 / (rpm / 60));
    tap_fire2 = burst2 * (1000 / (rpm2 / 60));
    noise = 5.0;
 
    clamp(vertical, -100.00, 100.00);
    clamp(horizontal, -100.00, 100.00);
    clamp(vertical2, -100.00, 100.00);
    clamp(horizontal2, -100.00, 100.00);
}
main {
//-------------------------Remove stick noise---------------------------------//
    if(abs(get_actual(STICK_1_X)) < noise) set_val(STICK_1_X, 0.0);
    if(abs(get_actual(STICK_1_Y)) < noise) set_val(STICK_1_Y, 0.0);
    if(abs(get_actual(STICK_2_X)) < noise) set_val(STICK_2_X, 0.0);
    if(abs(get_actual(STICK_2_Y)) < noise) set_val(STICK_2_Y, 0.0);
//--------------------------WEAPON-SWITCHING----------------------------------//
    if(event_release(BUTTON_14) && time_active(BUTTON_14) < 250) {
        if(weapon == WEAPON_0) set_weapon(WEAPON_1);
        else if(weapon == WEAPON_1) set_weapon(WEAPON_0);
    }
//--------------------------RESET-WEAPON-TRACK--------------------------------//
    if(!is_active(BUTTON_12) && !is_active(BUTTON_13) &&
    event_active(BUTTON_11) && time_release(BUTTON_11) < 250) {
        set_weapon(WEAPON_0);
    }
 
    switch(weapon) {
        case WEAPON_0: {
    /* Automatic weapons */
    if(primary_fire == 0) {
    if(get_actual(BUTTON_5)) {
        set_val(BUTTON_5, 100.0);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire) {
        tap_fire = burst * (1000 / (rpm / 60));
        set_val(BUTTON_5, 100.0);
        combo_run(anti_recoil);
    }
    }
    /* Semi- Automatic weapons */
    if(primary_fire == 1) {
        set_val(BUTTON_5, 0.0);
    if(get_actual(BUTTON_5)) {
        turbo(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire) {
        turbo(BUTTON_5);
        combo_run(anti_recoil);
    }
    }
     /* Burst for Automatic weapons */
    if(primary_fire == 2) {
        set_val(BUTTON_5, 0.0);
    if(is_active(BUTTON_5)) {
        combo_run(burst_auto);
        turbo(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire) {
        turbo(BUTTON_5);
        combo_run(anti_recoil);
    }
    }
    /* Burst for Semi- Automatic weapons */
    if(primary_fire == 3) {
        set_val(BUTTON_5, 0.0);
    if(is_active(BUTTON_5)) {
        combo_run(burst_rapid);
        turbo(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire) {
        turbo(BUTTON_5);
        combo_run(anti_recoil);
    }
    }
    if(fire_ads == 1 && get_actual(BUTTON_5)){set_val(BUTTON_8,100.0);}
 
    if(get_actual(BUTTON_5))combo_run(anti_recoil);
    if(is_active(STICK_1_Y))combo_stop(anti_recoil);
    if(is_active(STICK_1_X))combo_stop(anti_recoil);
    } break;
        case WEAPON_1: {
    /* Automatic weapons */
    if(secondary_fire == 0) {
    if(get_actual(BUTTON_5)) {
        set_val(BUTTON_5, 100.0);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire2) {
        tap_fire2 = burst2 * (1000 / (rpm2 / 60));
        set_val(BUTTON_5, 100.0);
        combo_run(anti_recoil2);
    }
    }
    /* Semi- Automatic weapons */
    if(secondary_fire == 1) {
        set_val(BUTTON_5, 0.0);
    if(get_actual(BUTTON_5)) {
        turbos(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire2) {
        turbos(BUTTON_5);
        combo_run(anti_recoil2);
    }
    }
     /* Burst for Automatic weapons */
    if(secondary_fire == 2) {
        set_val(BUTTON_5, 0.0);
    if(is_active(BUTTON_5)) {
        combo_run(burst_auto2);
        turbos(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire2) {
        turbos(BUTTON_5);
        combo_run(anti_recoil2);
    }
    }
    /* Burst for Semi- Automatic weapons */
    if(secondary_fire == 3) {
        set_val(BUTTON_5, 0.0);
    if(is_active(BUTTON_5)) {
        combo_run(burst_rapid2);
        turbos(BUTTON_5);
    }else if(is_release(BUTTON_5) &&
     time_active(BUTTON_5) <= tap_fire2) {
        turbos(BUTTON_5);
        combo_run(anti_recoil2);
    }
    }
    if(fire_ads2 == 1 && get_actual(BUTTON_5)){set_val(BUTTON_8,100.0);}
 
    if(get_actual(BUTTON_5))combo_run(anti_recoil2);
    if(is_active(STICK_1_Y))combo_stop(anti_recoil2);
    if(is_active(STICK_1_X))combo_stop(anti_recoil2);
    } break;
    }
    if (get_actual(BUTTON_16) && time_active(BUTTON_16) > 500) {
        set_weapon(WEAPON_0);
    }
    if (get_actual(BUTTON_17) && time_active(BUTTON_17) > 500) {
        set_weapon(WEAPON_0);
    }
    if(scope == 1){
    if(get_actual(BUTTON_8) && time_active(BUTTON_8) > 100) {
        combo_run(breath);
    }       
    }
    if(scope ==2 ){
    if(event_release(BUTTON_8) && time_active(BUTTON_8) < 240) {
        combo_run(one_shot);
    }
    if(get_actual(BUTTON_8) && time_active(BUTTON_8) > 100) {
        combo_run(breath);
    }   
    }
    if(sprint == 1) {
    if(is_active(STICK_2_Y)) {
        combo_run(EasySprint);
    }
    if(get_actual(BUTTON_5) || get_actual(BUTTON_8) ||
       get_actual(BUTTON_4) || get_actual(BUTTON_7)) {
        combo_stop(EasySprint);
    }
    }
    if(sprint == 2) {
    if(get_val(STICK_2_Y) < -98.0) {
        combo_run(EasySprint);
    }
    if(get_actual(BUTTON_5) || get_actual(BUTTON_8) ||
       get_actual(BUTTON_4) || get_actual(BUTTON_7)) {
        combo_stop(EasySprint);
    }
    }
    if(sprint == 3){
    if(is_active(STICK_2_Y) && crouch == 0) {
        combo_run(EasySprint);
    }
    if(get_actual(BUTTON_5) || get_actual(BUTTON_8) ||
       get_actual(BUTTON_4) || get_actual(BUTTON_7)) {
        combo_stop(EasySprint);
    }
    if(event_active(BUTTON_15)) crouch = 1;
    else if(event_active(BUTTON_17)) crouch = 1;
    else if(event_active(BUTTON_16)) crouch = 0;
    }
    if(slide == 1){
    if(get_actual(STICK_2_Y) < -75.0){
        inhibit(BUTTON_15, 100);
    if(is_active(BUTTON_15) && time_release(BUTTON_15) <= 240){
        slide_switch = 1;
        crouch = 0;
    }
    }else if(get_actual(STICK_2_Y) > -75.0){
        slide_switch = 0;
    }
    if(slide_switch == 1){
        combo_run(slide_sprint);
    }
    }
    if(hop == 1){
    if(get_actual(STICK_2_Y) < -75.0){
        inhibit(BUTTON_16, 100);
    if(is_active(BUTTON_16) && time_release(BUTTON_16) <= 240){
        hop_switch = 1;
    }
    }else if(get_actual(STICK_2_Y) > -75.0){
        hop_switch = 0;
    }
    if(hop_switch == 1){
        combo_run(bunny_hop);
    }
    }
    if(spot == 1) {
    Spot_Time = Spot_Time + elapsed_time();
    if(Spot_Time >= Spot_Maximum){
        Spot_Time = Spot_Minimum;
    }
    if(!auto_spot && get_actual(BUTTON_8)){
        Spot_Wait = Spot_Time;
        combo_run(auto_spot);
    }else if(event_release(BUTTON_8)) {
        combo_stop(auto_spot);
    }
    }
    if(spot == 2) {
    if (get_actual(BUTTON_8) && time_active(BUTTON_8) > 300) {
        spot_u = 1;change = 1;
    }
    if(spot_u == 1) {
    if(event_active(BUTTON_8)
    & !change || (t > 6000)){
        t = 0,
        change = !change;
        spot_u = 0;
    }
    if (change){
        ++t;
        if (get_actual(BUTTON_8))
        { t = 0; }
        ...
    Spot_Time = Spot_Time + elapsed_time();
    if(Spot_Time >= Spot_Maximum){
        Spot_Time = Spot_Minimum;
    }
    if(!auto_spot){
        Spot_Wait = Spot_Time;
        combo_run(auto_spot);
    }else if(get_actual(BUTTON_4)) {
        combo_stop(auto_spot);
        set_val(BUTTON_4, 100.0);
    }
    }
    }
    }
    if(spot == 3){
    if (get_actual(BUTTON_8) && time_active(BUTTON_8) > 400) {
        spot_u = 1;
    }
    if (get_actual(BUTTON_16) && time_active(BUTTON_16) > 400) {
        spot_u = 0;
    }
    if(spot_u == 1) {
    Spot_Time = Spot_Time + elapsed_time();
    if(Spot_Time >= Spot_Maximum){
        Spot_Time = Spot_Minimum;
    }
    if(!auto_spot){
        Spot_Wait = Spot_Time;
        combo_run(auto_spot);
    }else if(get_actual(BUTTON_4)) {
        combo_stop(auto_spot);
        set_val(BUTTON_4, 100.0);
    }
    }
    }
}
 
combo burst_auto
{
    turbo(BUTTON_5);
    set_val(BUTTON_5, 100.0);
    wait(tap_fire);
    set_val(BUTTON_5, 0.0);
    wait(burst_adjustment);
}
 
combo burst_rapid
{
    turbo(BUTTON_5);
    wait(tap_fire);
    set_val(BUTTON_5, 0.0);
    wait(burst_adjustment);
}
 
combo burst_auto2
{
    turbos(BUTTON_5);
    set_val(BUTTON_5, 100.0);
    wait(tap_fire2);
    set_val(BUTTON_5, 0.0);
    wait(burst_adjustment2);
}
 
combo burst_rapid2
{
    turbos(BUTTON_5);
    wait(tap_fire2);
    set_val(BUTTON_5, 0.0);
    wait(burst_adjustment2);
}
 
combo anti_recoil
{
    set_val(STICK_1_Y, vertical);
    set_val(STICK_1_X, horizontal);
}
 
combo anti_recoil2
{
    set_val(STICK_1_Y, vertical2);
    set_val(STICK_1_X, horizontal2);
}
 
combo EasySprint
{
    set_val(BUTTON_9, 100.0);
    wait(60);
    set_val(BUTTON_9, 0.0);
    wait(60);
    set_val(BUTTON_9, 0.0);
}
 
combo auto_spot
{
    set_val(BUTTON_4, 100.0);
    wait(40);
    set_val(BUTTON_4, 0.0);
    wait(Spot_Wait);
    set_val(BUTTON_4, 0.0);
}
 
combo breath
{
    set_val(BUTTON_9, 100.0);
    wait(10);
    set_val(BUTTON_9, 100.0);
}
 
combo one_shot
{
    set_val(BUTTON_8, 100.0);
    set_val(BUTTON_9, 100.0);
    wait(quick_scope_delay);
    set_val(BUTTON_8, 100.0);
    set_val(BUTTON_9, 100.0);
    set_val(BUTTON_5, 100.0);
    wait(60);
    set_val(BUTTON_8, 100.0);
    wait(40);
}
 
combo slide_sprint
{
    set_val(BUTTON_15, 100.0);
    wait(50);wait(1750);
}
 
combo bunny_hop
{
    set_val(BUTTON_16, 100.0);
    wait(50);wait(1500);
}
 
void turbo(uint8 button)
{
    uint32 sps = rpm/ 60;
    uint32 rate = 1000 / sps;
    uint32 hold = rate / 2;
 
    uint32 ta = time_active(button);
    set_val(button, 100.0);
 
   while(ta > rate) {
        ta -= rate;
    }
    tap_fire = burst * (1000 / (rpm / 60));
 
    if(ta > hold) {
        set_val(button, 0.0);
    }
}
 
void turbos(uint8 button)
{
    uint32 sps2 = rpm2/ 60;
    uint32 rate2 = 1000 / sps2;
    uint32 hold2 = rate2 / 2;
 
    uint32 ta2 = time_active(button);
    set_val(button, 100.0);
 
   while(ta2 > rate2) {
        ta2 -= rate2;
    }
    tap_fire2 = burst2 * (1000 / (rpm2 / 60));
 
    if(ta2 > hold2) {
        set_val(button, 0.0);
    }
}
 
void set_weapon(uint8 new_weapon)
{
    static uint8 old_weapon;
 
    if(new_weapon == old_weapon) return;
    old_weapon = new_weapon;
    weapon = new_weapon;
 
    static uint32 timestamp;
    uint32 elapsed = system_time() - timestamp;
 
    if(!elapsed || elapsed >= 10) {
    // Set LED
    switch(weapon) {
        case WEAPON_0: { // BLUE LED
            led_set(LED_1, 100.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
            display (4);
        } break;
        case WEAPON_1: { // RED LED
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 100.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
            display (5);
        } break;
    }
    timestamp = system_time();
    }
    return;
}
 
 // Display Numbers
void display (uint8 indc)
{
    uint8 VIE;
    VIE = IND[indc];
    display_overlay(VIE, 2000 );
}
 
 
 

Use interactive configuration to set up. If you get on wrong side of switching just hold switch button to line you up back on class. Enjoy! Yes I'm liking the anti_recoil also and thanks glad you like it!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby TheDesertShadow » Tue Aug 14, 2018 11:02 pm

Thanks Bonefisher!

Mate, that script is f...ing aewsome. Thank you so much for sharing.

The TT mixed with all you talented people = AMAZING

Im 48yrs old and I used to play BF2 on PC, long story short I got back into BF1 on PS4 but was getting slaughtered. So I bought the XIM 4 and now APEX and TT. I now enjoy playing again, Its put me back on a level playing field.

Thanks again. much appreciated. :smile0202:
User avatar
TheDesertShadow
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Fri Mar 02, 2018 1:32 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby bonefisher » Wed Aug 15, 2018 1:40 am

Your welcome! Your getting close to the over the hill gang...lol! I'm 51 and over the hill :a1chill_angry1:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby UK_Wildcats » Wed Aug 15, 2018 3:49 am

I thought that I was old at 49. You're ancient. Lol
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby bonefisher » Wed Aug 15, 2018 4:06 am

lol! If you eyes are not getting bad your in the area for it is coming....I gotta have cheaters on just to play anymore.
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby TheDesertShadow » Wed Aug 15, 2018 8:25 am

Haha i love it, where all still gaming at 50.
I gave that script a good going today 4hrs on bf1, i think i was no1 about 15 times today .
I dialled in the AR to perfection, it was like a lazer beam.
I cant beleive how good the AR is! It doesnt mess with aiming at all...

One more request....if im not pushing my luck?
I have disabled son and i tried him with those scripts and he loves it
But he gets frustrated with having the wrong weapon selected ect...
Would it be possible to add rapid fire to the original simple AR script?
I have a swiftpoint z mouse and it has two stage pressure sensitive trigger buttons, so i
Could asign the second stage click to activate the rapid fire, could be heaps less
Confusing for him.
Ive been trying to add it and i got it down to one error today, cant figure it out lol

Anyway thanks again love your work
User avatar
TheDesertShadow
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Fri Mar 02, 2018 1:32 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby bonefisher » Wed Aug 15, 2018 10:05 am

Code: Select all
 
#define vertical    28.75
#define horizontal   0.00
 
fix32  noise;
init{noise = 5.0;}
 
main {
//-------------------------Remove stick noise---------------------------------//
    if(abs(get_actual(STICK_1_X)) < noise) set_val(STICK_1_X, 0.0);
    if(abs(get_actual(STICK_1_Y)) < noise) set_val(STICK_1_Y, 0.0);
    if(abs(get_actual(STICK_2_X)) < noise) set_val(STICK_2_X, 0.0);
    if(abs(get_actual(STICK_2_Y)) < noise) set_val(STICK_2_Y, 0.0);
 
    if(get_actual(BUTTON_5))combo_run(anti_recoil);
    if(is_active(STICK_1_Y))combo_stop(anti_recoil);
    if(is_active(STICK_1_X))combo_stop(anti_recoil);
 
    if(get_actual(BUTTON_5))combo_run(rapid_fire);
}
combo rapid_fire
{
    set_val(BUTTON_5, 100.0);
    wait(40);
    set_val(BUTTON_5, 0.0);
    wait(40);
    set_val(BUTTON_5, 0.0);
}
 
combo anti_recoil
{
    set_val(STICK_1_Y, vertical);
    set_val(STICK_1_X, horizontal);
}
 

here you go! if you want a toggle for rapid fire let me know. On the other big script if you get on wrong side of primary and secondary just hold weapon switch button down for 300ms to line you back up with weapon class.
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby TheDesertShadow » Wed Aug 15, 2018 10:43 pm

Thank you :smile0203:
User avatar
TheDesertShadow
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Fri Mar 02, 2018 1:32 am

Re: Bonfisher's NEW SIMPLE ANTI-RECOIL FOR ALL ROUND

Postby alanmcgregor » Tue Aug 28, 2018 10:12 pm

OMG!... just tried on Battlefront 2015 Awesome you're a genius, excellent work bonefisher as always. :joia:
User avatar
alanmcgregor
Major
Major
 
Posts: 981
Joined: Tue Mar 27, 2018 8:38 am

Next

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

Who is online

Users browsing this forum: No registered users and 59 guests