Ayuda aim assist The last of us

GPC2 script programming for Titan Two. Code examples, questions, requests.

Ayuda aim assist The last of us

Postby BrianRoby » Tue Aug 13, 2019 5:23 pm

Hola chicos tengo este script de aim assist The Last of Us de device quisiera pasarlo a Titan2 para ver si funciona y después agregarle otras cosas.

Code: Select all
//Posted by ItzSnack, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Tuesday 13th of August, 2019 17:15 UTC 
 
 
 
    int aa_p  = 24;
    int aa_n = -24;
    int aa_delay  = 20;
    int release = 25;
 
main {
 
    if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);   
 
        if(get_val(PS4_R2))
  combo_run(Rapid_Fire);}
 
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay)
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay)}
 
 
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);}
 
combo Rapid_Fire {
 set_val(PS4_R2,100);
 wait(40);
 set_val(PS4_R2,0);
 wait(80);}
User avatar
BrianRoby
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Tue Aug 06, 2019 12:46 am

Re: Ayuda aim assist The last of us

Postby Prototype » Tue Aug 13, 2019 5:52 pm

Fixed:
Code: Select all
//Posted by ItzSnack, a member of the community in the device Forums - https://device.com/forums
#include <titanone.gph>
//Posted : Tuesday 13th of August, 2019 17:15 UTC 
 
 
 
    int aa_p  = 24;
    int aa_n = -24;
    int aa_delay  = 20;
    int release = 25;
 
main {
 
    if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);   
 
        if(get_val(PS4_R2))
  combo_run(Rapid_Fire);}
 
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay);
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay);
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay);}
 
 
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);}
 
combo Rapid_Fire {
 set_val(PS4_R2,100);
 wait(40);
 set_val(PS4_R2,0);
 wait(80);}
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3250
Joined: Sun Dec 16, 2012 1:43 pm

Re: Ayuda aim assist The last of us

Postby BrianRoby » Tue Aug 13, 2019 11:57 pm

Tengo este guion de fornite mejorado para The last of us, tengo un problema el autospot no me funciona en el R1, y quisiera saber si se puede subir la velocidad del rapid fire

Code: Select all
 
#include <titanone.gph>
//Posted by LEX LOST, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Saturday 3rd of August, 2019 18:43 UTC 
 
 
 
/**********************************************************************
   ______  _____   _____  _______  _     _  _______  _______  ______   
  (______)(_____) (_____)(__ _ __)(_)   (_)(_______)(__ _ __)(______) 
  (_)__  (_)   (_)(_)__(_)  (_)   (__)_ (_)   (_)      (_)   (_)__     
  (____) (_)   (_)(_____)   (_)   (_)(_)(_)   (_)      (_)   (____)   
  (_)    (_)___(_)( ) ( )   (_)   (_)  (__) __(_)__    (_)   (_)____   
  (_)     (_____) (_)  (_)  (_)   (_)   (_)(_______)   (_)   (______) 
 
**********************************************************************/

 
/*********************************************************************
    FORTNITE BATTLE ROYALE                                             
 
    Game    : FORTNITE                                                   
 
    Authors : Excalibur & WalterHMartinez                             
 
**********************************************************************/

///////////////////////////////////////////////////////////////////////
//                                                                     
//  BUTTON LAYOUT    : STANDARD
//                                                                     
//  CONSOLE          : PS4
//                                                                     
//  Bumpers/Triggers : DEFAULT
//                                                                     
///////////////////////////////////////////////////////////////////////
//                                                                     
//---------------------------------------------------------------------
//    TOGGLE SWITCHES                                                   
//   Turn Rapid Fire OFF/ON     
//   ---------------------------------
//                                                                             
//  hold : PS4_SHARE and then press : PS4_PS
//                                                                             
//   Turn AIM ASSIST OFF/ON     
//   ---------------------------------
//                                                                             
//  in X-AIM plugin bind button EXTRA_INPU3 to some of your keyboard button
//                                                                             
//   Turn ANTI RECOIL OFF/ON     
//   ---------------------------------
//                                                                             
//  hold : PS4_SHARE and then press : PS4_PS
//                                                                             
//                 
 
 
//---------------------------------------------------------------------
//                                                                     
define FIRE_BTN   = PS4_R1;
define ADS_BTN    = PS4_L1;
define CROUCH_BTN = PS4_CIRCLE;
define SPRINT_BTN = PS4_L3;
define JUMP_BTN   = PS4_CROSS;
define NEXT_PIECE = PS4_R2;
define LEFT_BUMP  = PS4_L2;
define SWAP_BTN   = PS4_SHARE;
define BUILD_BTN  = PS4_PS;
define RELOAD_BTN = PS4_SQUARE;
define SPOT = 900;              //auto-spot modifier
define SPOT_BUTTON = PS4_L1;         //tap RB to turn on/off AutoSpot
//_____________________________________________________________________|
//########## VARIABLES BELOW USED BY SCRIPT (DO NOT TOUCH) #############|
//----------------------------------------------------------------------|
//--------------------------------------   
// use the name of the color               
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. Green                 
  0,0,0,2 , //4. Pink                 
  2,0,2,0 , //5. SkyBlue               
  0,2,2,0 , //6. Yellow               
  2,2,2,2   //7. White                 
); // end of data segment--------------   
 
///////////////////////////////////////   
// variables                               
bool RF_onoff         = FALSE;               
bool AimAssist_onoff  = TRUE;               
int shake            = 38;
bool AntiRecoil_onoff = TRUE;             
int ANTI_RECOIL      = 5;               
int ANTI_RECOIL_H    =  0;               
int anti_recoil;                         
int anti_recoil_H;                       
//--------------------------------------------------------------------------------------
//  MAIN BLOCK BEGIN                                 
main {   
 
 
       if(RF_onoff) LED_CM (Red);
       else         LED_CM (Blue);
    /////////////////////////////////////////////////////////////////////////////////
    // HAIR TRIGGER                                                                 
    if(get_val(ADS_BTN))  set_val(ADS_BTN, 100);                                     
    if(get_val(FIRE_BTN)) set_val(FIRE_BTN,100);                                   
 
    //////////////////////////////////////////////////////////////////////
    // DEAD ZONE CORECTION : RIGHT STICK                                 
    if(abs(get_val(PS4_RY)) < 0 && abs(get_val(PS4_RX)) < 0 ){         
        set_val(PS4_RY,0);                                                 
        set_val(PS4_RX,0);                                               
    }                                                           
    if(get_val(PS4_SHARE)){ 
        if(event_press(PS4_PS)){
              RF_onoff = !RF_onoff;       
        }
        set_val(PS4_PS, 0);
 
    }
    if(get_val(PS4_L3)){ set_val(PS4_CIRCLE, 100); } 
 
         // AUTOSPOT
         if (get_val(7)) combo_run(AutoSpot);
 
    /////////////////////////////////////////////////////////////////////////////////
    //Rapid Fire                                       
    if(event_press(BUILD_BTN) || event_press(SWAP_BTN)) {   
         RF_onoff = !RF_onoff;   
    }                                         
    if (RF_onoff) {                                   
        if (get_val(FIRE_BTN) && get_val(ADS_BTN)) {                       
            combo_run(RAPID_FIRE);                     
        }                                             
    }                                                 
    if(get_val(PS4_SHARE)){ 
        if(event_press(PS4_PS)){
              AimAssist_onoff = !AimAssist_onoff;       
        }
        set_val(PS4_PS, 0);
    }   
 
 
    /////////////////////////////////////////////////////////////////////////////////
    //Aim Assist V 2                                     
    if (AimAssist_onoff) {                           
        if (get_val(ADS_BTN))                       
            combo_run(Auto_Aimm);                     
        else       
            combo_stop(Auto_Aimm);                   
 
 
        if (get_val(ADS_BTN)) {                       
            if (abs(get_val(9)) > 21 || abs(get_val(10)) > 21){
                combo_stop(Auto_Aimm);                 
            }                                         
        }                                             
    }//-------------------------------------------------------------------------------
    if(get_val(PS4_SHARE)){ 
        if(event_press(PS4_PS)) {
              AntiRecoil_onoff = !AntiRecoil_onoff;       
        }
        set_val(PS4_SHARE, 0);
    }//-----------------------------------------------------------
 
    /////////////////////////////////////////////////////////////////////////////////
    // ANTI RECOIL                                   
    if(AntiRecoil_onoff){                             
        if (get_val(ADS_BTN)&& get_val(FIRE_BTN)) {     
            combo_run(AntiRecoil);                     
        }                                               
    }                                                 
 
}//  MAIN BLOCK END   
//--------------------------------------------------------------------------------------
 
//--------------------------------------------------------------------------------------
// COMBO BLOCK                                                                   
 
combo RAPID_FIRE {           
    set_val(FIRE_BTN, 100);   
    wait(18);
    set_val(FIRE_BTN, 0);     
    wait(12);
}
    //Autospot
    combo AutoSpot {//begin
        set_val(SPOT_BUTTON, 100);
        wait(50);
        set_val(SPOT_BUTTON, 0);
        wait(SPOT);
    }//end
combo Auto_Aimm {         
    set_val(10, shake * -1); //1 
    wait(20);               
    set_val(9,  shake); //1 
    wait(20);             
    set_val(10, shake); //1 
    wait(20);               
    set_val(9,  shake * -1); //1 
    wait(20);               
}                         
combo AntiRecoil { // This combo must be the last one
        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 LED_CM(Colour) {           
    set_led(LED_1,dbyte(( Colour * 4)- 3     ));
    set_led(LED_2,dbyte(((Colour * 4)- 3) + 1));
    set_led(LED_3,dbyte(((Colour * 4)- 3) + 2));
    set_led(LED_4,dbyte(((Colour * 4)- 3) + 3));
}
 
User avatar
BrianRoby
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Tue Aug 06, 2019 12:46 am

Re: Ayuda aim assist The last of us

Postby Prototype » Wed Aug 14, 2019 8:24 am

The autospot is enabled with L2 and works:
Code: Select all
         // AUTOSPOT
         if (get_val(7)) combo_run(AutoSpot);

Change it to ADS button:
Code: Select all
         // AUTOSPOT
         if (get_val(ADS_BTN)) combo_run(AutoSpot);
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3250
Joined: Sun Dec 16, 2012 1:43 pm

Re: Ayuda aim assist The last of us

Postby BrianRoby » Fri Aug 16, 2019 11:39 pm

Hola chicos, tengo este script de device para convertir a TITAN2, quisiera saber como hago para asignarle los valores a L y R 1, ademas quisiera agregarle rapid fire y auto spot que tengo en otro script


Code: Select all
//Posted by ItzSnack, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Friday 16th of August, 2019 23:25 UTC 
 
 
 
    int HOLD = 80;
    int RELEASE = 12;
 
    int AP = 22//Decrease if shake
    int AM = -22; //Decrease if shake
    int Delay = 20
    int ARelease = 23; //1+ Higher than AP & AM
 
    int AR = 24; //Anti Recoil
    int Release = 34; //Maximum 10+ Higher than Anti Recoil
    int ARS;
 
    main {
 
    if(get_val(7)> 90){combo_run(AimAbuse);}
    if(event_release(7)){ combo_stop(AimAbuse);}
 
    if(get_val(7)) combo_run(AS);
 
    if(get_val(7) && get_val(4)) {
    combo_run(AR);}
 
 
    if(abs(get_val(10)) > Release || abs(get_val(9)) > Release) {
    combo_stop (AR);}}
 
    combo AR {
    ARS = get_val(10) + AR;
    if(ARS > 100) ARS = 100;
    set_val(10,ARS);}       
 
    combo AS {
    set_val(10,a_f(10,AP));
    wait(Delay)
    set_val(9,a_f(9,AP));
    wait(Delay)
    set_val(10,a_f(10,AM));
    wait(Delay)
    set_val(9,a_f(9,AM));
    wait(Delay)}
 
 
    function a_f(p,m) {
    if(abs(get_val(p)) < ARelease)
    return m;
    return get_val(p);}
 
    combo AimAbuse {
    set_val(7, 100);
    wait(HOLD);
    set_val(7, 0);
    wait(RELEASE);}
 
User avatar
BrianRoby
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Tue Aug 06, 2019 12:46 am

Re: Ayuda aim assist The last of us

Postby Prototype » Sat Aug 17, 2019 9:04 am

To convert a script to the Titan Two you just need to add the Titan One backward compatibility header file:
Code: Select all
#include <titanone.gph>


Or use Buffy's converter: viewtopic.php?f=26&t=12027#p81370
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3250
Joined: Sun Dec 16, 2012 1:43 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: alanmcgregor and 38 guests