Xpert_aim_AR&RF(T1)

//----------------------------------------------------------------------------- // ANTIRECOIL(vertical) and RAPIDFIRE. // Both adjustable on the fly with rumble notify. //----------------------------------------------------------------------------- // INSTRUCTIONS: // // RAPID FIRE (OFF by default - Start value: 6) // Hold RT and Press MENU to Enable or Disable rapid fire. // Hold LT + RIGH STICK and tap D-PAD RIGH to increase rate of fire. // Hold LT + RIGH STICK and tap D-PAD LEFT to decrease rate of fire. // // ANTI RECOIL (ON by default - Start value: 30) // Hold LT and Press VIEW to Enable or Disable Antirecoil. // Hold LT + RIGH STICK and tap D-PAD DOWN to increase Antirecoil. // Hold LT + RIGH STICK and tap D-PAD UP to decrease Antirecoil. //----------------------------------------------------------------------------- int recoil_onoff = TRUE; int rapid_onoff = FALSE; int RATE_OF_FIRE = 6; int ANTI_RECOIL = 30; int anti_recoil; int hold_time; int rest_time; //----------------------------------------------------------------------------- main{ if(get_lval(XB1_LT)) { // On/Off anti-recoil if(event_press(XB1_VIEW)) {recoil_onoff=!recoil_onoff; combo_run(vibrate_onoff);} set_val(XB1_VIEW, 0); } if(get_lval(XB1_LT)) { // On/Off rapid fire if(event_press(XB1_MENU)) {rapid_onoff=!rapid_onoff; combo_run(vibrate_onoff);} set_val(XB1_MENU, 0); } if(rapid_onoff) {if(get_lval(XB1_RT)) // Rapid fire function {combo_run(RAPID_FIRE);}} if(recoil_onoff) {if(get_val(XB1_LT) && get_val(XB1_RT) && get_val(XB1_RY) > -9){// Anti recoil function combo_run(AntiRecoil); if(get_lval(XB1_RY)>-10 && get_lval(XB1_RY)<10) set_val(XB1_RY,0);} } if(get_lval(XB1_LT) && get_lval(XB1_RS)){ //Set rate of fire if(event_press(XB1_RIGHT)) {RATE_OF_FIRE = RATE_OF_FIRE +1; combo_run(vibrate);} if(event_press(XB1_LEFT)) {RATE_OF_FIRE = RATE_OF_FIRE -1; combo_run(vibrate);} set_val(XB1_RIGHT,0); set_val(XB1_LEFT,0); } if(get_lval(XB1_LT) && get_lval(XB1_RS)){ //Set recoil if(event_press(XB1_DOWN)){ANTI_RECOIL = ANTI_RECOIL + 5; combo_run(vibrate);} if(event_press(XB1_UP)) {ANTI_RECOIL = ANTI_RECOIL - 5; combo_run(vibrate);} set_val(XB1_DOWN,0); set_val(XB1_UP,0); } } //----------------------------------------------------------------------------- combo vibrate { set_rumble(RUMBLE_B, 100); wait(100); reset_rumble(); } combo vibrate_onoff { set_rumble(RUMBLE_A, 100); wait(300); reset_rumble(); } combo RAPID_FIRE { set_val(XB1_RT, 100); wait(hold_time); set_val(XB1_RT, 0); wait(50); set_val(XB1_RT, 0); hold_time = 600 / RATE_OF_FIRE; if(RATE_OF_FIRE <= 2) RATE_OF_FIRE = 2; set_val(XB1_RT, RATE_OF_FIRE); if(RATE_OF_FIRE >= 8) RATE_OF_FIRE = 8; set_val(XB1_RT, RATE_OF_FIRE); } combo AntiRecoil { set_val(XB1_RY,(get_val(XB1_RY)) + ANTI_RECOIL); if(ANTI_RECOIL < 10) ANTI_RECOIL = 10; if(ANTI_RECOIL > 50) ANTI_RECOIL = 50; }
Version4.5
Authorrafaehll
Publish DateWed, 17 Jul 2024 - 01:10
Last UpdateWed, 17 Jul 2024 - 01:10
Downloads478
RATE


3

0

Release Notes: Optimized combination of buttons to change de parameters without interfering in the game commands.
Code: Select all
//-----------------------------------------------------------------------------
//  ANTIRECOIL(vertical) and RAPIDFIRE.
//  Both adjustable on the fly with rumble notify.
//-----------------------------------------------------------------------------
// INSTRUCTIONS:
//
// RAPID FIRE (OFF by default - Start value: 4)
// Hold RT and Press RIGH STICK to Enable or Disable rapid fire.
// Hold LT and tap D-PAD RIGH to increase rate of fire.
// Hold LT and tap D-PAD LEFT to decrease rate of fire.
//
// ANTI RECOIL (ON by default - Start value: 30)
// Hold LT and Press LEFT STICK to Enable or Disable Antirecoi.
// Hold LT and tap D-PAD DOWN to increase Antirecoil.
// Hold LT and tap D-PAD UP to decrease Antirecoil.
//-----------------------------------------------------------------------------
int recoil_onoff = TRUE;
int rapid_onoff  = FALSE;
int RATE_OF_FIRE = 4;
int ANTI_RECOIL = 30;
int anti_recoil;
int hold_time;
int rest_time;
//-----------------------------------------------------------------------------
main{
if(get_lval(XB1_LT)) { // On/Off anti-recoil
    if(event_press(XB1_LS)) {recoil_onoff=!recoil_onoff; combo_run(vibrate_onoff);}
    set_val(XB1_LS, 0);
}
if(get_lval(XB1_RT)) { // On/Off rapid fire   
    if(event_press(XB1_RS)) {rapid_onoff=!rapid_onoff;   combo_run(vibrate_onoff);}
    set_val(XB1_RS, 0);
}
if(rapid_onoff) {if(get_lval(XB1_RT)) // Rapid fire function         
    {combo_run(RAPID_FIRE);}}     
if(recoil_onoff) {if(get_val(XB1_LT) && get_val(XB1_RT)) {// Anti recoil function
    combo_run(AntiRecoil);
    if(get_lval(XB1_RY)>-10 && get_lval(XB1_RY)<10) set_val(XB1_RY,0);}
}
if(get_lval(XB1_LT)){ //Rate of fire
    if(event_press(XB1_RIGHT))  {RATE_OF_FIRE = RATE_OF_FIRE +1; combo_run(vibrate);}
    if(event_press(XB1_LEFT))   {RATE_OF_FIRE = RATE_OF_FIRE -1; combo_run(vibrate);}
        set_val(XB1_RIGHT,0);
        set_val(XB1_LEFT,0);
}
if(get_lval(XB1_LT)){ //Set recoil
 
    if(event_press(XB1_DOWN)){ANTI_RECOIL = ANTI_RECOIL + 5; combo_run(vibrate);}
    if(event_press(XB1_UP))  {ANTI_RECOIL = ANTI_RECOIL - 5; combo_run(vibrate);}
        set_val(XB1_DOWN,0);
        set_val(XB1_UP,0);
}
}
//-----------------------------------------------------------------------------
combo vibrate {
    set_rumble(RUMBLE_B, 100);
    wait(100);
    reset_rumble();
}
combo vibrate_onoff {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
}
combo RAPID_FIRE {
    set_val(XB1_RT, 100);
    wait(hold_time);
    set_val(XB1_RT, 0);
    wait(40);
    set_val(XB1_RT, 0);
    hold_time = 500 / RATE_OF_FIRE;
    if(RATE_OF_FIRE <= 2) RATE_OF_FIRE = 2;
    set_val(XB1_RT, RATE_OF_FIRE);
    if(RATE_OF_FIRE >= 8) RATE_OF_FIRE = 8;
    set_val(XB1_RT, RATE_OF_FIRE);
}
combo AntiRecoil {
    set_val(XB1_RY,(get_val(XB1_RY)) + ANTI_RECOIL);
    if(ANTI_RECOIL < 10) ANTI_RECOIL = 10;
    if(ANTI_RECOIL > 50) ANTI_RECOIL = 50;
}