can someone tell he how to use this thanks

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

can someone tell he how to use this thanks

Postby Jono7110 » Wed Jan 13, 2021 11:56 pm

Code: Select all
#pragma METAINFO("fifa perfect shot and skills", 1, 0, "norge")
#include <titanone.gph>
 
//--------------------------------------------------------------
// DECLARATIONS                                                 
//--------------------------------------------------------------
define DOnotUSE      =   1;
define DelayNormal   =  80;
define DelayRnbwHOLD = 160;
define DelayRest     = 200;
define DelayLeft_move= 500;
define timelimit      300 // Time to Double click
define ShootPower    = 220; // Shot Power     
//////////////////////////////////////////////////////////////////
// YOUR BUTTON LAYOUT
define PaceCtrol     = XB1_LT; // Pace Control
define FinesseShot   = XB1_RB; // Finesse Shot
define PlayerRun     = XB1_LB; // Player Run 
define ShotBtn       = XB1_B; // Shot Btn 
define SprintBtn     = XB1_RT; // Sprint Btn
define MOVE_X        = PS4_LX;       
define MOVE_Y        = PS4_LY;       
define SKILL_STICK_X = PS4_RX;       
define SKILL_STICK_Y = PS4_RY;
 
define Best_SKILL               = 1// BestFIFAmove           
define StepOver_SKILL           = 2// STEPOVER_DIRECTION     
define ReversStepOver_SKILL     = 3// REVERS_STEPOVER         
define DoubleTouch_EXIT_SKILL   = 4// REVERS_STEPOVER and EXIT 
define Advanced_Elastico_SKILL  = 5// dob=97; Elastico=TRUE; TURNandSPIN_ELASTICO 
define Elastico_SKILL           = 6// dob=97; Elastico=TRUE; TURNandSPIN_ELASTICO 
define Turn_AND_Spin_SKILL      = 7//                       
define HocusPocus_SKILL         = 8// HOCUS_POCUS                                 
define Spin_NEW_SKILL           = 9// Elastico=0;dob=100;combo_run(TURNandSPIN_ELASTICO);
define Feint_L_R_SKILL          =10// FEINT_SKILL                                   
define Roulette_SKILL           =11// ROULETTE                                     
define Ball_Roll_Flick          =12// BalRollFlick                                 
define OP_Skill                 =13// OP Skill                     
define Ball_Roll_Rock_and_Roll  =14// Ball Roll Rock and Roll                     
define Bolasie_Flick_SKILL      =15// Bolasie Flick   dob=97; Elastico=FALSE;         
define Fake_Shot_SKILL          =16// Fake Shot                                   
define HeelFlickTurn_SKILL      =17// Heel Flick Turn                             
define Heel_to_Heel_SKILL       =18// HEELtoHEEL                                   
define Rainbow_SKILL            =19// RAINBOW                                     
define RonaldoHeelChop          =20// Ronaldo Heel Chop                           
define Fake_Pass_SKILL          =21// Fake Pass                                   
define In_Air_Rainbow           =22// standing = InAirRainbow / running = RAINBOW 
define In_Air_Elastico          =23// InAirElastico                               
define Sombrero_Flick           =24// standing =Sombrero Flick / running = Heel to Heel
define Juggling_Ball            =25// Juggling Ball                               
define Chest_Flick_Skill        =26// Juggling Ball + Chest Flick                 
define V_DragBack_Skill         =27// V Drag Back                                 
define Body_Feint_Universal     =28//               
define Ball_Roll                =29//                   
define Ball_Roll_SpeedBoost     =30//                   
define Cruyff_Turn              =31//                         
//--------------------------------------------------------------                     
// DATA SEGMENT                                                                       
//--------------------------------------------------------------                     
data(DOnotUSE,
//  1   2   3   4    5   6   7   8    9 10  11   12   13  14  15  16  17  18  19   20  21   22  23   24  25  26    27   28    29    30   31    32
    0,-100,50,-100,100,-100,100,-50,100, 0, 100, 50, 100,100, 50,1000,100, -50,100,-100,100,-100, 50,-100, 0, -100, -50, -100, -100, -50, -100,
// 33   34 35   36  37   38  39  40  41 42   43  44   45  46  47  48  49  50   51  52   53  54   55  56   57 58    59   60    61    62   63    64   
    0,-100,50,-100,100,-100,100,-50,100, 0, 100, 50, 100,100, 50,1000,100, -50,100,-100,100,-100, 50,-100, 0, -100, -50, -100, -100, -50, -100,
// 65   66 67   68  69   70  71  72  73 74   75  76   77  78  79  80  81  82   83  84   85  86   87  88   89 90    91   92    93    94   95    96
    0,-100,50,-100,100,-100,100,-50,100, 0, 100, 50, 100,100, 50,1000,100, -50,100,-100,100,-100, 50,-100, 0, -100, -50, -100, -100, -50, -100,
// 97  98  99  100                       
    4, 126, 10   //                   
 
);// end of data                         
 
int ZX, ZY;                                     
int LX, LY;          // Direction of Left Stick         
int RightON           =FALSE;                           
int Elastico          =FALSE;                           
int IndL=0;         // IndL for LEFT ANALOG we use with dbyte(Ind+ ..);
int IndR_L=0;       // IndR_L for LEFT ANALOG we use with dbyte(Ind+ ..);
int Ind=0;          // Ind we use with dbyte(Ind+ ..);                 
int Zone;           //
int temp_Zone;                                               
int mX,mY;                                     
int btn_tap;   
int tap;       
int OnOffMods;
int OneDirectSkill; 
int SKill ;
int IsRightON=FALSE;       
int RS_zone; 
int RX,RY;   
int RA_X,RA_Y;
int flick_up;
int flick_d; 
int flick_l; 
int flick_r;
int Points             =0;                                 
int dob;                                       
int w_AdvancedElastico =10;                   
int Repeat;                                       
int OnOff ;   
int b_Standing;
 
/* *****************************************************************************
<shortdesc>
Simple script to produce a gradient rainbow effect with the Titan Two's lightbar
(also works with the Dualshock 4 lightbar). Requires firmware 0.77 or higher.
</shortdesc>
***************************************************************************** */

 
#define SPEED   16
 
fix32 rgbColour[] = { 100.0, 0.0, 0.0 };
uint8 decColour = 0, incColour = 1;
 
 
//--------------------------------------------------------------
// MAIN BLOCK                                                   
//--------------------------------------------------------------
main {
        if(event_active(BUTTON_16)) {
        printf("SPEECH:Rainbow Effect");
    }
                combo_run(RainbowEffect);
        if(get_val(ShotBtn) && get_ptime(ShotBtn)>= ShootPower) {  // Shot Power   
              set_val(ShotBtn,  0);   
      }
     if(OnOff){//-------------------------------------------------
         if(abs(get_val(MOVE_X))< 60 && abs(get_val(MOVE_Y))< 60){ 
             b_Standing = TRUE;                                   
         }else{                                                     
             LX = get_val(MOVE_X);                               
             LY = get_val(MOVE_Y);                               
             b_Standing = FALSE;                                 
             get_Zone(LX,LY);                                     
 
 
         }                                                         
     }//----------------------------------------------------------
 
 
     if(event_press(XB1_LB) && !btn_tap){ 
              combo_run(dbl_tap);             
              btn_tap = TRUE;                   
      }else if( event_press(XB1_LB) && btn_tap){
              if(tap){                           
                     OnOffMods = !OnOffMods;   
               }else{                         
                        btn_tap = FALSE;     
               }                       
      }                           
   if(OnOffMods) { // all Skills mode               
 
          //  Right Stick -->  UP                         
          if( get_val(PS4_RY) < -70  && !flick_up ) {   
                  flick_up = TRUE;                         
                  direction( 0 );                           
                  OnOff = FALSE;                             
                   combo_run(BestFIFAmove);                               
          }                                             
          //  Right Stick -->  DOWN                               
          if( get_val(PS4_RY)70  && !flick_d ) {     
                  flick_d = TRUE;                           
                  direction( 1 );                           
                  OnOff = FALSE;                             
                    SKill = 7; dob = 97; Elastico=FALSE;combo_run(TURNandSPIN_ELASTICO);//7. Turn and Spin
          }                                               
 
          //  Right Stick --> LEFT                               
          if( get_val(PS4_RX) < -70  && !flick_l ) {     
                  flick_l = TRUE;                             
                  direction( 0 );                           
                  OnOff = FALSE;                             
                   combo_run(REVERS_STEPOVER);                           
          }                                               
 
          // Right Stick --> RIGHT                                   
          if( get_val(PS4_RX)70  && !flick_r ) {     
                  flick_r = TRUE;                             
                  direction( 1 );                           
                  OnOff = FALSE;                             
                    SKill = 5; dob = 97; Elastico =TRUE;combo_run(TURNandSPIN_ELASTICO); //5. Advanced Elastico
          }                                               
 
 
     if(abs(get_val(PS4_RY))<20  && abs(get_val(PS4_RX))<20){ 
                 flick_up = 0;                                 
                 flick_d  = 0;                                 
                 flick_l  = 0;                                 
                 flick_r  = 0;                                 
 
     }                                             
   }// all Skills mode       
 }   
////////////////////////////////////////////////////////////////
// COMBO BLOCKS   //////////////////////////////////////////////
////////////////////////////////////////////////////////////////
combo dbl_tap{         
   tap = TRUE;         
   wait(timelimit);         
   tap = FALSE;         
   btn_tap = FALSE;     
}                     
//////////////////////////////////////////////////////////////
// 1. BEST FIFA MOVE  ////////////////////////////////////////
//////////////////////////////////////////////////////////////
combo BestFIFAmove {                           
    RA_CW(ZX,ZY);       
    wait(150);//                     
    RA_CW(0,0);                               
    wait(150);//                                 
    LA_CW(ZX,ZY);       
    wait(200);                                 
    OnOff=TRUE;                         
}                                             
 
 
//////////////////////////////////////////////////////////////
// 3. REVERS STEP OVER  //////////////////////////////////////
//////////////////////////////////////////////////////////////
combo REVERS_STEPOVER {                       
 
  if(RightON){                                 
    Ind=(Zone + 4)* 2; //Zone= 5                 
    IndR_L = ((Zone + 2)* 2)- 1;                   
    }else{                                     
    Ind=((Zone + 12) * 2)- 1; //Zone= 13           
    IndR_L = ((Zone + 14)* 2)- 1;                 
    }                                         
    Points = 3;                                 
    combo_run(MimicCircle);                   
 
}                                             
// 5. Advanced Elastico 
// 7. Turn and Spin 
///////////////////////////////////////////////////////////////////
// MIMIC CIRCLE  //////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
combo MimicCircle {                                     
   if(Points>=1){                                       
      if (RightON){RA_CCW(dbyte(Ind),dbyte(Ind - 1));} 
      else {RA_CW(dbyte(Ind),dbyte(Ind + 1));}         
   }                                                     
      wait(40);                                         
   if(Points>=3){                                       
      if (RightON){RA_CCW(dbyte(Ind - 8),dbyte(Ind - 9));} 
      else {RA_CW(dbyte(Ind + 8),dbyte(Ind + 9));}         
   }                                                     
      wait(40);                                         
   if(Points>=5){                                       
      if (RightON){RA_CCW(dbyte(Ind - 16),dbyte(Ind - 17));} 
      else {RA_CW(dbyte(Ind + 16),dbyte(Ind + 17));}         
   }                                                     
      wait(40);                             
      OnOff=TRUE;                         
}   
///////////////////////////////////////////////////////////////////
/// Turn & Spin OR Elastico  //////////////////////////////////////
//dob=97 /if Elastico=FALSE => Turn and Spin / if Elastico=TRUE => Elastico Chop
// NEW SPIN  dob=100; Elastico=FALSE; 
// 97  98  99  100
//  4, 12,  6, 10   //           
 
combo TURNandSPIN_ELASTICO {         
 
   if(SKill==Bolasie_Flick_SKILL){// 16 
     f_RB_LT_RT(1,0,0);                 
      w_AdvancedElastico=100;           
   }else if(SKill==Advanced_Elastico_SKILL){
     f_RB_LT_RT(0,1,0);             
      w_AdvancedElastico=400;           
   }else{                             
      w_AdvancedElastico=10;         
   }                                 
   wait(w_AdvancedElastico);         
   if(SKill==Bolasie_Flick_SKILL){f_RB_LT_RT(1,0,0);}// 16 
   if(SKill==Advanced_Elastico_SKILL){f_RB_LT_RT(0,1,0);}
   if (RightON){Ind=((Zone + dbyte(dob))*2)- 1;}         
    else{Ind=((Zone + dbyte(dob + 1))*2)- 1;}               
    if(dob==97){//-------------------------------------------
                if (Elastico){ RA_CW(inv(mX), inv(mY));}     
                else {RA_CW( mX , mY);}      // RS go forvard
               }//-------------------------------------------
    if(dob==99){                                             
    RA_CW(dbyte(Ind),dbyte(Ind + 1));                 
    }                                                 
    wait(40);                                         
    if(SKill==Bolasie_Flick_SKILL){f_RB_LT_RT(1,0,0);}// 16 
    if(SKill==Advanced_Elastico_SKILL){f_RB_LT_RT(0,1,0);}
    RA_CW(0,0);                                       
    wait(40);                                         
    if(SKill==Bolasie_Flick_SKILL){f_RB_LT_RT(1,0,0);}// 16 
    if(SKill==Advanced_Elastico_SKILL){f_RB_LT_RT(0,1,0);}
    RA_CW(dbyte(Ind),dbyte(Ind + 1));                 
    wait(40);   
    OnOff=TRUE;                         
}     
 
function get_Zone (X,Y) {                                                     
 
        if ((Y < -80        )&& (X>= -20 && X<   20 ))    {Zone= 1;} // LS==>1
   else if ((Y < -80        )&& (X>=  20 && X<=  70 ))    {Zone= 2;} // LS==>2
   else if ( Y<  -70         &&  X>   70             )    {Zone= 3;} // LS==>2
   else if ((X >  80        )&& (Y>= -70 && Y<= -20 ))    {Zone= 4;} // LS==>2
   else if ((X >  80        )&& (Y>  -20 && Y<   20 ))    {Zone= 5;} // LS==>2
   else if ((X >  80        )&& (Y>=  20 && Y<=  70 ))    {Zone= 6;} // LS==>2
   else if ((X >  70        )&& (           Y>   70 ))    {Zone= 7;} // LS==>2
   else if ((X<  70 && X> 20)&& (           Y== 100 ))    {Zone= 8;} // LS==>2
   else if ((Y >  80        )&& (X>= -20 && X<=  20 ))    {Zone= 9;} // LS==>2
   else if ((Y >  80        )&& (X<  -20 && X>  -70 ))    {Zone=10;} // LS==>2
   else if ((Y >  70        )&& (           X<  -70 ))    {Zone=11;} // LS==>2
   else if ((X < -80        )&& (Y>=  20 && Y<=  70 ))    {Zone=12;} // LS==>2
   else if ((X < -80        )&& (Y>  -20 && Y<   20 ))    {Zone=13;} // LS==>2
   else if ((X < -80        )&& (Y<  -20 && Y>  -70 ))    {Zone=14;} // LS==>2
   else if ((X < -70        )&& (           Y<  -70 ))    {Zone=15;} // LS==>2
   else if ((Y < -80        )&& (X<  -20 && X>  -70 ))    {Zone=16;} // LS==>2
   temp_Zone=Zone;                                                     
     IndL = (Zone * 2)- 1;                 
 
     mX = dbyte(IndL);                       
     mY = dbyte(IndL + 1);                   
}// func end                                             
function direction (dir) {         
   if(dir){                         
      RightON = TRUE;                   
      ZX = inv(LY); ZY = LX; // Zone 3   
    }else {                               
      RightON = FALSE;                     
      ZX =      LY; ZY = inv(LX); // Zone 7 
    }                                     
 
   block(SprintBtn,500);                 
   block(MOVE_X,1000);block(MOVE_Y,1000);
}                                     
//--------------------------------------------------------------
//Right Analog Functions                                       
//--------------------------------------------------------------
function RA_CW(X,Y) {   
    set_val(SKILL_STICK_X,X );     
    set_val(SKILL_STICK_Y,Y);     
}                       
function RA_CCW(Y,X) { 
    set_val(SKILL_STICK_Y,Y );     
    set_val(SKILL_STICK_X,X);       
}                       
function LA_CW(X,Y) {   
    set_val(MOVE_X,X );     
    set_val(MOVE_Y,Y);     
}// func end                       
function f_RB_LT_RT (a,b,c){   
     if(a) set_val(FinesseShot,100); //RB
     if(b) set_val(PaceCtrol,100); //LT
     if(c) set_val(SprintBtn,100); //RT
}// func end                   
function Null_Directional_btns (){
   set_val(13,0);               
   set_val(16,0);           
   set_val(14,0);       
   set_val(15,0);     
}               
// double click   
function calc_90degree (){   
   if(RightON){               
       ZX=inv(LY);ZY=LX; // Zone 3
   }else {                       
       ZX=LY;ZY=inv(LX); // Zone 7
   }                     
}
 
combo RainbowEffect {
    wait(SPEED);
 
    led_set(LED_1, rgbColour[2], 0);
    led_set(LED_2, rgbColour[0], 0);
    led_set(LED_3, rgbColour[1], 0);
 
    --rgbColour[decColour];
    ++rgbColour[incColour];
 
    if(rgbColour[decColour] <= 0.0) {
        if(++decColour == 3) decColour = 0;
        if(++incColour == 3) incColour = 0;
    }
}
User avatar
Jono7110
Command Sergeant Major
Command Sergeant Major
 
Posts: 164
Joined: Sun Nov 08, 2015 12:09 pm

Re: can someone tell he how to use this thanks

Postby J2Kbr » Thu Jan 14, 2021 11:07 am

XB1_LB toggles on/off the mods on this script.

With the toggle on, you can use:

Right Stick --> UP
Right Stick --> DOWN
Right Stick --> LEFT
Right Stick --> RIGHT

to start/run the combo skills.
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: can someone tell he how to use this thanks

Postby jasp90 » Thu Jan 14, 2021 12:50 pm

Hi thanks but There is about 20 skills in the script how do I change between each skin thank you
User avatar
jasp90
Command Sergeant Major
Command Sergeant Major
 
Posts: 125
Joined: Wed Nov 26, 2014 4:06 pm

Re: can someone tell he how to use this thanks

Postby J2Kbr » Thu Jan 14, 2021 2:52 pm

I am not familiarized with FIFA games. Please try PM norge for more details on how this script works. Thanks.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 118 guests