Pls help error gpc

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

Pls help error gpc

Postby OpGreece » Fri Nov 23, 2018 11:05 am

Code: Select all
 
//------------------------------MODS-------------------------------------------
//-Aim Abuse: *Hold ADS all the way* | If you don't press the ADS Trigger all |                                                                           
//-100% Accuracy: *ADS + RB/R1* No way to disable. You may tap or hold RB/R1. |   
//-Dropshot: *ADS + RELOAD_BTN*                                               |                                    |
//-Anti-Recoil: *Always On* | No way to disable.                              | 
//-Rapid Fire: *ADS + Dpad Right*                                             |             
//                                                                            |
//----------------------------------------------------------------------------|
 
 
 
//Dropshot
int Dropshot = FALSE;
int DefenseMode = FALSE;
int AttackMode = TRUE
 
 
//Rapid Fire
int RapidFire = FALSE;
 
//Anti Recoil
int AntiRecoil = TRUE;
int antirecoil
int antirecoilA = 24;
int antirecoilB = 31;
int delayA = 14;                               
 
//Aim Assist -- Always on
int AimAssist = TRUE;
int lerd  = 19;// AIM ASSIST VALUES
int camp = 19;//AIM ASSIST VALUES
 
int value  = 20;
int value2 =-20;
int delay  = 19;
 
//Aim Abuse
int AimAbuse = TRUE;
int AimAbuse_HOLD =457; //How long you HOLD ADS Button-Perfect
int AimAbuse_RELEASE = 65;//How long you release ADS Button
 
//AutoRun
int AutoRun = TRUE;
 
//100% Accuracy
int PerfectAccuracy  = TRUE;
 
//Rumble
int rumble_type = RUMBLE_A;
int Notify = TRUE
 
//Rapid Fire [Settings]
int shoot_rate         = 6;
int rapidfire;
 
//LED
int a; int b;
 
//Layout
define FIRE_BTN = 4;//PS4_R2
define ADS_BTN = 7;//PS4_L2
define CROUCH_BTN = 5;//PS4_R3
define RELOAD_BTN = 20;//PS4_SQAURE
define SPRINT_BTN = 8;//PS4_L3
define JUMP_BTN = 19;//PS4_CROSS
define NEXT_PIECE = 3;//PS4_R1
define RIGHT_BUMP = 3;//PS4_R1
define LEFT_BUMP = 6;//PS4_L1
define SWAP_BTN = 17;//PS4_TRIANGLE
define BUILD_BTN = 18;//PS4_CIRCLE
define R_X = 9;//PS4_R_X
define R_Y = 10;//PS4_R_Y
define L_X = 11;//PS4_L_X
define L_Y = 12;//PS4_L_Y
define UP = 13;//PS4_UP
define DOWN = 14;//PS4_DOWN
define LEFT = 15;//PS4_LEFT
define RIGHT = 16;//PS4_RIGHT
 
 main {
 
 
//AIM ASSIST
if (AimAssist) {
   if (get_val(ADS_BTN)) {
   combo_run(AimAssist);}}
   if (get_val(R_X)<value2||get_val(R_X)>value||get_val(R_Y)<value2||get_val(R_Y)>value||get_val(R_X)<value2||get_val(R_X)>value||get_val(R_Y)<value2||get_val(R_Y)>value){
         combo_stop(AimAssist);}
 
 
//RAPID FIRE
   if(get_val(ADS_BTN) && event_press(RIGHT)){
   RapidFire =! RapidFire;
   if(RapidFire == TRUE){combo_run(Notify);a=0;b=2;}
   if(RapidFire == FALSE){combo_run(Notify);a=2;b=0;}
   }
   if(RapidFire){
     if(get_val(FIRE_BTN)){
        combo_run(Rapidfire);                                         
       }
     }
 
//ANTI-RECOIL     
if(AntiRecoil){
  if(get_val(FIRE_BTN)){combo_run(Antirecoil);}
  if(get_rumble(RUMBLE_A) <= 50){antirecoil = antirecoilA;}
  if(get_rumble(RUMBLE_A) > 50){antirecoil = antirecoilB;}
  if(abs(get_val(R_Y)) >= antirecoil+ 3){combo_stop(Antirecoil);}}
 
//100% ACCURACY
if (get_val(ADS_BTN) && get_val(RIGHT_BUMP)) {
  combo_run(PerfectAccuracy);
  combo_run(Notify);a=4;b=2;
set_val(RIGHT_BUMP, 0);
      } else {
  combo_stop(PerfectAccuracy);
}
 
//AIM ABUSE
if(get_val(ADS_BTN) && event_press(LEFT)){
   AimAbuse =! AimAbuse;
   if(AimAbuse == TRUE){combo_run(Notify);a=0;b=2;}
   if(AimAbuse == FALSE){combo_run(Notify);a=2;b=0;}
    rumble_A_if_true(AimAbuse);
}
 
if(AimAbuse){
   if(get_val(ADS_BTN)> 75){
      combo_run(AimAbuse);}
   if(event_release(ADS_BTN)){ combo_stop(AimAbuse);
}
 
//AutoRun
if(AutoRun){if(get_val(L_Y) <= -20){set_val(SPRINT_BTN, 100);
}
 
//Dropshot
if(get_val(ADS_BTN) && event_press(RELOAD_BTN)){
   Dropshot =! Dropshot;
   if(Dropshot == TRUE){combo_run(Notify);a=0;b=2;}
   if(Dropshot == FALSE){combo_run(Notify);a=2;b=0;}
   }
   if(Dropshot){
      if(DefenseMode){if(get_val(FIRE_BTN)==0&&get_rumble(RUMBLE_A)||get_rumble(RUMBLE_B)){combo_run(Dropshot);}}
      if(AttackMode){if(get_val(ADS_BTN)&&get_val(FIRE_BTN)){combo_run(Dropshot);}}
      }
   }}
}
 
 
//LEDs.
// If the LED flashes Green, you have enabled a modification.
// If the LED flashes Red, you have disabled a modification.
// If the LED flashes Yellow, you are using an un-togglable modification.
combo Notify {
if(Notify){set_rumble(RUMBLE_B,65);}
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(550);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
reset_leds();
}
combo Dropshot{
set_val(CROUCH_BTN,100);
wait(40);
wait(60);
set_val(CROUCH_BTN,100);
}
combo AimAssist {
set_val(R_Y, (lerd));
wait(delay)
set_val(R_X, (lerd));
wait(delay)
set_val(R_Y, (camp));
wait(delay)
set_val(R_X, (camp));
wait(delay)
set_val(R_Y, (lerd));
wait(delay)
set_val(R_X, (lerd));
wait(delay)
set_val(R_Y, (camp));
wait(delay)
set_val(R_X, (camp));
wait(delay)
 
}
combo PerfectAccuracy {
set_val(FIRE_BTN,100);
wait(100);
wait(250);
set_val(FIRE_BTN,100);
}
 
combo AimAbuse {
set_val(ADS_BTN, 100);
wait(AimAbuse_HOLD);
set_val(ADS_BTN, 0);
wait(AimAbuse_RELEASE);
}
 
combo Rapidfire {
      set_val(FIRE_BTN, 100);
      wait(rapidfire);
      set_val(FIRE_BTN, 0);
}
 
  combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
 
combo Antirecoil {
set_val(R_Y, antirecoil);
wait(delayA);
set_val(R_Y, antirecoil);
wait(delayA);
}
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
} :whatever:
User avatar
OpGreece
First Sergeant
First Sergeant
 
Posts: 45
Joined: Thu Nov 15, 2018 2:30 pm

Re: Pls help error gpc

Postby J2Kbr » Fri Nov 23, 2018 11:50 am

Fixed:
Code: Select all
 
//------------------------------MODS-------------------------------------------
//-Aim Abuse: *Hold ADS all the way* | If you don't press the ADS Trigger all |                                                                           
//-100% Accuracy: *ADS + RB/R1* No way to disable. You may tap or hold RB/R1. |   
//-Dropshot: *ADS + RELOAD_BTN*                                               |                                    |
//-Anti-Recoil: *Always On* | No way to disable.                              | 
//-Rapid Fire: *ADS + Dpad Right*                                             |             
//                                                                            |
//----------------------------------------------------------------------------|
 
 
 
//Dropshot
int Dropshot = FALSE;
int DefenseMode = FALSE;
int AttackMode = TRUE;
 
 
//Rapid Fire
int RapidFire = FALSE;
 
//Anti Recoil
int AntiRecoil = TRUE;
int antirecoil;
int antirecoilA = 24;
int antirecoilB = 31;
int delayA = 14;                               
 
//Aim Assist -- Always on
int AimAssist = TRUE;
int lerd  = 19;// AIM ASSIST VALUES
int camp = 19;//AIM ASSIST VALUES
 
int value  = 20;
int value2 =-20;
int delay  = 19;
 
//Aim Abuse
int AimAbuse = TRUE;
int AimAbuse_HOLD =457; //How long you HOLD ADS Button-Perfect
int AimAbuse_RELEASE = 65;//How long you release ADS Button
 
//AutoRun
int AutoRun = TRUE;
 
//100% Accuracy
int PerfectAccuracy  = TRUE;
 
//Rumble
int rumble_type = RUMBLE_A;
int Notify = TRUE;
 
//Rapid Fire [Settings]
int shoot_rate         = 6;
int rapidfire;
 
//LED
int a; int b;
 
//Layout
define FIRE_BTN = 4;//PS4_R2
define ADS_BTN = 7;//PS4_L2
define CROUCH_BTN = 5;//PS4_R3
define RELOAD_BTN = 20;//PS4_SQAURE
define SPRINT_BTN = 8;//PS4_L3
define JUMP_BTN = 19;//PS4_CROSS
define NEXT_PIECE = 3;//PS4_R1
define RIGHT_BUMP = 3;//PS4_R1
define LEFT_BUMP = 6;//PS4_L1
define SWAP_BTN = 17;//PS4_TRIANGLE
define BUILD_BTN = 18;//PS4_CIRCLE
define R_X = 9;//PS4_R_X
define R_Y = 10;//PS4_R_Y
define L_X = 11;//PS4_L_X
define L_Y = 12;//PS4_L_Y
define UP = 13;//PS4_UP
define DOWN = 14;//PS4_DOWN
define LEFT = 15;//PS4_LEFT
define RIGHT = 16;//PS4_RIGHT
 
 main {
 
 
//AIM ASSIST
if (AimAssist) {
   if (get_val(ADS_BTN)) {
   combo_run(AimAssist_Combo);}}
   if (get_val(R_X)<value2||get_val(R_X)>value||get_val(R_Y)<value2||get_val(R_Y)>value||get_val(R_X)<value2||get_val(R_X)>value||get_val(R_Y)<value2||get_val(R_Y)>value){
         combo_stop(AimAssist_Combo);}
 
 
//RAPID FIRE
   if(get_val(ADS_BTN) && event_press(RIGHT)){
   RapidFire =! RapidFire;
   if(RapidFire == TRUE){combo_run(Notify_Combo);a=0;b=2;}
   if(RapidFire == FALSE){combo_run(Notify_Combo);a=2;b=0;}
   }
   if(RapidFire){
     if(get_val(FIRE_BTN)){
        combo_run(Rapidfire);                                         
       }
     }
 
//ANTI-RECOIL     
if(AntiRecoil){
  if(get_val(FIRE_BTN)){combo_run(Antirecoil);}
  if(get_rumble(RUMBLE_A) <= 50){antirecoil = antirecoilA;}
  if(get_rumble(RUMBLE_A) > 50){antirecoil = antirecoilB;}
  if(abs(get_val(R_Y)) >= antirecoil+ 3){combo_stop(Antirecoil);}}
 
//100% ACCURACY
if (get_val(ADS_BTN) && get_val(RIGHT_BUMP)) {
  combo_run(PerfectAccuracy_Combo);
  combo_run(Notify_Combo);a=4;b=2;
set_val(RIGHT_BUMP, 0);
      } else {
  combo_stop(PerfectAccuracy_Combo);
}
 
//AIM ABUSE
if(get_val(ADS_BTN) && event_press(LEFT)){
   AimAbuse =! AimAbuse;
   if(AimAbuse == TRUE){combo_run(Notify_Combo);a=0;b=2;}
   if(AimAbuse == FALSE){combo_run(Notify_Combo);a=2;b=0;}
    rumble_A_if_true(AimAbuse);
}
 
if(AimAbuse){
   if(get_val(ADS_BTN)> 75){
      combo_run(AimAbuse_Combo);}
   if(event_release(ADS_BTN)){ combo_stop(AimAbuse_Combo);
}
 
//AutoRun
if(AutoRun){if(get_val(L_Y) <= -20){set_val(SPRINT_BTN, 100);
}
 
//Dropshot
if(get_val(ADS_BTN) && event_press(RELOAD_BTN)){
   Dropshot =! Dropshot;
   if(Dropshot == TRUE){combo_run(Notify_Combo);a=0;b=2;}
   if(Dropshot == FALSE){combo_run(Notify_Combo);a=2;b=0;}
   }
   if(Dropshot){
      if(DefenseMode){if(get_val(FIRE_BTN)==0&&get_rumble(RUMBLE_A)||get_rumble(RUMBLE_B)){combo_run(Dropshot_Combo);}}
      if(AttackMode){if(get_val(ADS_BTN)&&get_val(FIRE_BTN)){combo_run(Dropshot_Combo);}}
      }
   }}
}
 
 
//LEDs.
// If the LED flashes Green, you have enabled a modification.
// If the LED flashes Red, you have disabled a modification.
// If the LED flashes Yellow, you are using an un-togglable modification.
combo Notify_Combo {
if(Notify){set_rumble(RUMBLE_B,65);}
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(550);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
reset_leds();
}
combo Dropshot_Combo {
set_val(CROUCH_BTN,100);
wait(40);
wait(60);
set_val(CROUCH_BTN,100);
}
combo AimAssist_Combo {
set_val(R_Y, (lerd));
wait(delay)
set_val(R_X, (lerd));
wait(delay)
set_val(R_Y, (camp));
wait(delay)
set_val(R_X, (camp));
wait(delay)
set_val(R_Y, (lerd));
wait(delay)
set_val(R_X, (lerd));
wait(delay)
set_val(R_Y, (camp));
wait(delay)
set_val(R_X, (camp));
wait(delay)
 
}
combo PerfectAccuracy_Combo {
set_val(FIRE_BTN,100);
wait(100);
wait(250);
set_val(FIRE_BTN,100);
}
 
combo AimAbuse_Combo {
set_val(ADS_BTN, 100);
wait(AimAbuse_HOLD);
set_val(ADS_BTN, 0);
wait(AimAbuse_RELEASE);
}
 
combo Rapidfire {
      set_val(FIRE_BTN, 100);
      wait(rapidfire);
      set_val(FIRE_BTN, 0);
}
 
  combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
 
combo Antirecoil {
set_val(R_Y, antirecoil);
wait(delayA);
set_val(R_Y, antirecoil);
wait(delayA);
}
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
}
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: Pls help error gpc

Postby OpGreece » Fri Nov 23, 2018 12:38 pm

thanks you
User avatar
OpGreece
First Sergeant
First Sergeant
 
Posts: 45
Joined: Thu Nov 15, 2018 2:30 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: Google [Bot] and 61 guests