please could someone add aim assist to this script please

GPC1 script programming for Titan One. Code examples, questions, requests.

please could someone add aim assist to this script please

Postby clockworkbullets » Sun Feb 25, 2018 9:22 am

Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(!get_val(ADS_BTN) && get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Re: please could someone add aim assist to this script pleas

Postby J2Kbr » Mon Feb 26, 2018 12:04 pm

Added, it will trigger with the L2 press.
Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
    if(get_val(PS4_L2)) {
        combo_run(AimAssist);
    } else combo_stop(AimAssist);
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(!get_val(ADS_BTN) && get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
combo AimAssist {
    wait(240);
    set_val(PS4_L2, 0);
    wait(50);
}
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: please could someone add aim assist to this script pleas

Postby clockworkbullets » Mon Feb 26, 2018 9:14 pm

J2Kbr wrote:Added, it will trigger with the L2 press.
Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
    if(get_val(PS4_L2)) {
        combo_run(AimAssist);
    } else combo_stop(AimAssist);
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(!get_val(ADS_BTN) && get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
combo AimAssist {
    wait(240);
    set_val(PS4_L2, 0);
    wait(50);
}
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End

I aim down sight with L1..
wouldn’t that not work ?
is there a hipfire aim assist?
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Re: please could someone add aim assist to this script pleas

Postby clockworkbullets » Mon Feb 26, 2018 9:32 pm

J2Kbr wrote:Added, it will trigger with the L2 press.
Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
    if(get_val(PS4_L2)) {
        combo_run(AimAssist);
    } else combo_stop(AimAssist);
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(!get_val(ADS_BTN) && get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
combo AimAssist {
    wait(240);
    set_val(PS4_L2, 0);
    wait(50);
}
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End

Any chance the aim assist could be hipfire ?
also I noticed that anti recoil isn’t in effect when aiming down sight and shooting any ideas on a fix for that
Thanks for your help :smile0517:
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Re: please could someone add aim assist to this script pleas

Postby J2Kbr » Tue Feb 27, 2018 9:53 am

To trigger the game aim assist ADSing is needed. For HIP firing do you want the script to auto ADS?
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: please could someone add aim assist to this script pleas

Postby clockworkbullets » Tue Feb 27, 2018 10:00 am

J2Kbr wrote:To trigger the game aim assist ADSing is needed. For HIP firing do you want the script to auto ADS?

no thats fine but could you fix the anti recoil when aiming down sight i noticed that it stops working when aiming down sight with the weapons i use on starwars battlefront.
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Re: please could someone add aim assist to this script pleas

Postby J2Kbr » Tue Feb 27, 2018 10:01 am

Done ;)
Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
    if(get_val(PS4_L2)) {
        combo_run(AimAssist);
    } else combo_stop(AimAssist);
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
combo AimAssist {
    wait(240);
    set_val(PS4_L2, 0);
    wait(50);
}
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: please could someone add aim assist to this script pleas

Postby clockworkbullets » Tue Feb 27, 2018 10:05 am

J2Kbr wrote:Done ;)
Code: Select all
//Posted : Friday 16th of February, 2018 22:26 UTC  
 
//-------------------------------------------------------------------------------------------//  Version   : 1.0                                                         
//  Game      : Starwars battlefront (EE3)                             
//  Author    : 737                                                                                               
//-------------------------------------------------------------------------------------------
define AR_Release = 70;      // change this value to set when antirecoil stops working (min: antirecoil value + 10)
//------------------------------------------------------------------------------------------- 
define UP         = 13;                                                           
define DOWN       = 14;                                                           
define LEFT       = 15;                                                           
define RIGHT      = 16;                                                           
//-------------------------------------------------------------------------------------------
define Blue       =  1;                                                                       
define Red        =  2;                                                                       
define Green      =  3;                                                                       
define Pink       =  4;                                                                       
define SkyBlue    =  5;                                                                       
define Yellow     =  6;                                                                       
define White      =  7;                                                                       
//-------------------------------------------------------------------------------------------
data(1,                                                                                   
  2,0,0,0, //1. Blue                                                                     
  0,2,0,0, //2. Red                                                                     
  0,0,2,0, //3. Lime/Green                                                               
  0,0,0,2, //4. Fuchsia/Pink                                                             
  2,0,2,0, //5. SkyBlue                                                                 
  0,2,2,0, //6. Yellow                                                                 
  2,2,2,2  //7. White                                                                   
);                                                                                     
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int                                                                       
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int rapid_onoff   = TRUE; // if TRUE Rapidfire is ON by default - if FALSE, OFF by default   
////////////////////////////////
int ANTI_RECOIL   = 28//  change this value for vertical recoil                                                               
int ANTI_RECOIL_H =  0;                                                                 
int anti_recoil;                                                                         
int anti_recoil_H;                                                                       
int Col_ind;                                                                                                                                                                         
 
 
////////////////////////////////////////
//  change to TRUE if you want flipped R2 --> R1 & L2 --> L1
int flipped = TRUE;
int easy_run = FALSE;
 
int FIRE_BTN   = PS4_R2;                                                                           
int ADS_BTN    = PS4_L2;   
//-------------------------------------------------------------------------------------------
 
 
//-------------------------------------------------------------------------------------------
//MAIN BLOCK ROUTINES                                                             
 
main {                                               
 
 
     if(easy_run){
 
         if(get_val(PS4_LY) < -90) combo_run(SPRINT);
 
     }
 
     ////////////////////////////////////////////////
     // FLIPPED
     if(flipped){
         swap(PS4_R2,PS4_R1);
         swap(PS4_L2,PS4_L1);
     }
      if(get_val(FIRE_BTN)) {
        combo_run(Turbo_1);
    }
 
    if(flipped) colourled(Green);
    else            colourled(Pink);
 
 
    if(get_val(PS4_L2)) {
        combo_run(AimAssist);
    } else combo_stop(AimAssist);
 
   /////////////////////////////////////////////////
   // ANTI RECOIL
    if(get_val(FIRE_BTN )) {   
      combo_run(AntiRecoil);                                     
    }                                                               
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) {
       combo_stop (AntiRecoil);                                       
    }                                                                   
}                                                                       
//-------------------------------------------------------------------------------------------
//COMBO BLOCKS 
combo SPRINT {
    set_val(PS4_L3,100);
    wait(40);
    wait(100);
    }
 
 
combo Turbo_1 {
    set_val(FIRE_BTN, 100);
    wait(60);
    set_val(FIRE_BTN, 0);
    wait(20);
    set_val(FIRE_BTN, 0);
 
}                                                     
 
combo AimAssist {
    wait(240);
    set_val(PS4_L2, 0);
    wait(50);
}
 
combo AntiRecoil {                                   
    if(recoil_onoff) {                               
        anti_recoil = get_val(10) + ANTI_RECOIL;       
        if(anti_recoil > 100) anti_recoil = 100;       
        set_val(10, anti_recoil);                       
        anti_recoil_H = get_val(9) + ANTI_RECOIL_H;     
        if(anti_recoil_H > 100) anti_recoil_H = 100;   
        set_val(9, anti_recoil_H);                     
    }                                               
}                                                   
// COLOR LED function                               
//--------------------------------------------------------------
function colourled(Colour) {                         
    Col_ind=(Colour*4)- 3;                           
    set_led(LED_1,dbyte(Col_ind  ));                 
    set_led(LED_2,dbyte(Col_ind+ 1));               
    set_led(LED_3,dbyte(Col_ind+ 2));               
    set_led(LED_4,dbyte(Col_ind+ 3));               
}// End
 

i use flipped layout so presume i change the aim assist aim down sight to L1?
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Re: please could someone add aim assist to this script pleas

Postby J2Kbr » Tue Feb 27, 2018 10:38 am

The script have a flipped option, which is set to TRUE, so the changes made will work with L1 was you want. ;)
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: please could someone add aim assist to this script pleas

Postby clockworkbullets » Tue Feb 27, 2018 10:54 am

J2Kbr wrote:The script have a flipped option, which is set to TRUE, so the changes made will work with L1 was you want. ;)

i notice the recoil still has alot of kick, is it because its a 3rd person shooter?
User avatar
clockworkbullets
First Sergeant
First Sergeant
 
Posts: 56
Joined: Thu Sep 22, 2016 10:24 am

Next

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 75 guests