need help fixing

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

need help fixing

Postby bmpt guard » Sun Dec 09, 2018 1:57 am

not sure whats wrong 0 warning 1 error

Code: Select all
#pragma METAINFO("fifa perfect shot and timed", 1, 0, "norge")
 
//
// DECLARATIONS
//----------------------------------------------------------------
#define ShootPower      220         // Shot Power   
#define timelimit     = 300; // Time to Double click     
 
//////////////////////////////////////////////////////////////////
// YOUR BUTTON LAYOUT
#define PaceCtrol       BUTTON_8    // Pace Control
#define FinesseShot     BUTTON_4    // Finesse Shot
#define PlayerRun       BUTTON_7    // Player Run 
#define ShotBtn         BUTTON_15   // Shot Btn 
#define SprintBtn       BUTTON_5    // Sprint Btn
#define MOVE_X          STICK_2_X       
#define MOVE_Y          STICK_2_Y 
#define time_to_dblclick  = 300; // Time to Double click     
 
int ShootPower    = 130; // Shot Power   
int TempShotPower;
 
int btn_tap;
int tap;
int dbl_w  = 300;
 
init { 
    ShootPower = 130 ;
    colorled(2,0,0,0);   //  clBlue
     TempShotPower = ShootPower ;
}
int Points             =0;
 
main {
    if(get_val(ShotBtn) && time_active(ShotBtn) >= ShootPower) {
        set_val(ShotBtn, 0.0); // Shot Power
    }
}
    if(get_val(FinesseShot) )  {                   
         ShootPower = 150;                         
     }else ShootPower  = TempShotPower;
 
    if(get_val(ShotBtn) && get_ptime(ShotBtn)>= ShootPower) {  // Shot Power Restriction       
              set_val(ShotBtn,  0);                                               
      }                                                                         
    if(get_val(ShotBtn)) set_val(SprintBtn,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);                                     
 
             ZX = LY; ZY = inv(LX);//  90 degre                   
         }                                                         
     }
 
    combo dbl_tap{
 
 
   tap = TRUE;
   wait(dbl_w);
   tap = FALSE;
   btn_tap = FALSE;
}
 
User avatar
bmpt guard
Command Sergeant Major
Command Sergeant Major
 
Posts: 142
Joined: Thu May 12, 2016 9:33 pm

Re: need help fixing

Postby Scachi » Tue Dec 11, 2018 3:12 pm

Multiple use of the same name: "int ShootPower" and "define ShootPower"
Wrong syntax of "#define timelimit" ..remove the = and ;
Function "colorled" is not declared
..
looks like incomplete / mixed T1/T2 code
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: need help fixing

Postby bmpt guard » Wed Dec 12, 2018 1:42 am

Scachi wrote:Multiple use of the same name: "int ShootPower" and "define ShootPower"
Wrong syntax of "#define timelimit" ..remove the = and ;
Function "colorled" is not declared
..
looks like incomplete / mixed T1/T2 code

thanks man looks like it checks out. havent tested but i will.
i also got this pubg script i put together awhile ago, i added a ping bind to fire trigger like siege script has.
i get a error looks like only one line can you take a look and tell me how to fix? thanks
Code: Select all
#pragma METAINFO("pubg with jitter", 1, 0, "norge")
#include <titanone.gph>
 
//
// Sat Dec 23 2017 17:23:26
// Script generated by Visual to GPC
//----------------------------------------
 
define ONLY_WITH_SCOPE = TRUE;// Use Anti-recoil only when scoping
define ANTI_RECOIL = 80;       //change "0" to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 80//change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 80; //change this value to compensate to the right (0 - 100)
define INSTA_FIRE                = 95;   // The % at which it boosts the SHOOT button when pressed - i.e. 95% means when pressed 5%
define INSTA_AIM                 = 95;   // The % at which it boosts the ADS button when pressed - i.e. 95% means when pressed 5%
define ADS_SPEED                 = 20;   // The % at which it boosts your aiming speed when using ADS   
define PING_BTN = XB1_RS; // PING
 
// VARIABLES
// ---------------------------------------------------------
 
int AutoSpotOnOff;
int toggle;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
 
 
 
/* ----------------------------------------------------------------------------------------------------------------------
 *  MAIN
**/

main {
    // If RT is pressed, jitter will run//
    if(get_val(XB1_RT)){combo_run(jitter);
    }
    if(get_val(XB1_RT)) {
        combo_run(rapidfire);
    }   
    if(get_val(XB1_LT)) {
        if(get_val(XB1_LT)) {
            combo_run(quickscope);
        } else {
            combo_run(quickscope2);
        }
    }
    if (get_val(XB1_RIGHT)) toggle =  TRUE; // Turn it on when you press DPAD LEFT
    if (get_val(XB1_A)) toggle = FALSE; // turn it off when you press DPAD LEFT
    if (toggle) {
    }else combo_stop(jitter);
    if (toggle) {
    }else combo_stop(rapidfire);
    if (toggle) {
    }else combo_stop(quickscope);
    if (toggle) {
    }else combo_stop(quickscope2);
    if(get_val(AIM_BTN) && event_press(SHOOT_BTN))
    combo_run(LOCATION_MARKER);
}
 
combo    RumbleNotifier      {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
 
combo jitter{
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 0);
}
 
combo rapidfire {
    set_val(XB1_RT, 40);
    wait(40);
    set_val(XB1_RT, 0);
}
 
combo FastReloadIMR {
    set_val(XB1_X, 100);
    wait(40);
    set_val(XB1_X, 0);
    wait(500); // << Adjustable timing
    set_val(XB1_X, 0);
    set_val(XB1_LX, 0);
    set_val(XB1_LY, -100);
    wait(40);
}
 
combo quickscope {
    set_val(XB1_LT, 100);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo quickscope2 {
    set_val(XB1_LT, 100);
    wait(20);
    set_val(XB1_LT, 0);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo LOCATION_MARKER {
set_val(PING_BTN, 100);
wait(100);
}
 
combo AntiRecoil { // This combo must be the last one
    // Look Inversion Enabled
      anti_recoil = get_val(XB1_RY) - ANTI_RECOIL;            // SUBTRACT anti_recoil when LOOK INVERSION is ENABLED
      if(anti_recoil > 100) anti_recoil = 100;
      set_val(XB1_RY, anti_recoil);
      anti_recoil_left = get_val(XB1_RX) - ANTI_RECOIL_LEFT;
      if(anti_recoil_left < -100) anti_recoil_left = -100;
      set_val(XB1_RX, anti_recoil_left);
      anti_recoil_right = get_val(XB1_RX) + ANTI_RECOIL_RIGHT;
      if(anti_recoil_right > 100) anti_recoil_right = 100;
      set_val(XB1_RX, anti_recoil_right);
    if(get_val(XB1_RT)) {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(10, anti_recoil);
    anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
    if(anti_recoil_left > 100) anti_recoil_left = 100;
    set_val(9, anti_recoil_left);
    anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
    if(anti_recoil_right > 100) anti_recoil_right = 100;
    set_val(9, anti_recoil_right);
    }
 }
User avatar
bmpt guard
Command Sergeant Major
Command Sergeant Major
 
Posts: 142
Joined: Thu May 12, 2016 9:33 pm

Re: need help fixing

Postby bmpt guard » Wed Dec 12, 2018 2:03 am

norge1 wrote:
Scachi wrote:Multiple use of the same name: "int ShootPower" and "define ShootPower"
Wrong syntax of "#define timelimit" ..remove the = and ;
Function "colorled" is not declared
..
looks like incomplete / mixed T1/T2 code

thanks man looks like it checks out. havent tested but i will.
i also got this pubg script i put together awhile ago, i added a ping bind to fire trigger like siege script has.
i get a error looks like only one line can you take a look and tell me how to fix? thanks

edit: you can ignore second request.
i did fix
Code: Select all
#pragma METAINFO("pubg with jitter with ping binded", 1, 0, "norge")
#include <titanone.gph>
 
//
// Sat Dec 23 2017 17:23:26
// Script generated by Visual to GPC
//----------------------------------------
 
define SHOOT_BTN = PS4_R2;
define AIM_BTN = PS4_L2;
define ONLY_WITH_SCOPE = TRUE;// Use Anti-recoil only when scoping
define ANTI_RECOIL = 80;       //change "0" to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 80//change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 80; //change this value to compensate to the right (0 - 100)
define INSTA_FIRE                = 95;   // The % at which it boosts the SHOOT button when pressed - i.e. 95% means when pressed 5%
define INSTA_AIM                 = 95;   // The % at which it boosts the ADS button when pressed - i.e. 95% means when pressed 5%
define ADS_SPEED                 = 20;   // The % at which it boosts your aiming speed when using ADS   
define PING_BTN = XB1_RS; // PING
 
// VARIABLES
// ---------------------------------------------------------
 
int AutoSpotOnOff;
int toggle;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
 
 
 
/* ----------------------------------------------------------------------------------------------------------------------
 *  MAIN
**/

main {
    // If RT is pressed, jitter will run//
    if(get_val(XB1_RT)){combo_run(jitter);
    }
    if(get_val(XB1_RT)) {
        combo_run(rapidfire);
    }   
    if(get_val(XB1_LT)) {
        if(get_val(XB1_LT)) {
            combo_run(quickscope);
        } else {
            combo_run(quickscope2);
        }
    }
    if (get_val(XB1_RIGHT)) toggle =  TRUE; // Turn it on when you press DPAD LEFT
    if (get_val(XB1_A)) toggle = FALSE; // turn it off when you press DPAD LEFT
    if (toggle) {
    }else combo_stop(jitter);
    if (toggle) {
    }else combo_stop(rapidfire);
    if (toggle) {
    }else combo_stop(quickscope);
    if (toggle) {
    }else combo_stop(quickscope2);
    if(get_val(AIM_BTN) && event_press(SHOOT_BTN))
    combo_run(LOCATION_MARKER);
}
 
combo    RumbleNotifier      {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
 
combo jitter{
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 0);
}
 
combo rapidfire {
    set_val(XB1_RT, 40);
    wait(40);
    set_val(XB1_RT, 0);
}
 
combo FastReloadIMR {
    set_val(XB1_X, 100);
    wait(40);
    set_val(XB1_X, 0);
    wait(500); // << Adjustable timing
    set_val(XB1_X, 0);
    set_val(XB1_LX, 0);
    set_val(XB1_LY, -100);
    wait(40);
}
 
combo quickscope {
    set_val(XB1_LT, 100);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo quickscope2 {
    set_val(XB1_LT, 100);
    wait(20);
    set_val(XB1_LT, 0);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo LOCATION_MARKER {
set_val(PING_BTN, 100);
wait(100);
}
 
combo AntiRecoil { // This combo must be the last one
    // Look Inversion Enabled
      anti_recoil = get_val(XB1_RY) - ANTI_RECOIL;            // SUBTRACT anti_recoil when LOOK INVERSION is ENABLED
      if(anti_recoil > 100) anti_recoil = 100;
      set_val(XB1_RY, anti_recoil);
      anti_recoil_left = get_val(XB1_RX) - ANTI_RECOIL_LEFT;
      if(anti_recoil_left < -100) anti_recoil_left = -100;
      set_val(XB1_RX, anti_recoil_left);
      anti_recoil_right = get_val(XB1_RX) + ANTI_RECOIL_RIGHT;
      if(anti_recoil_right > 100) anti_recoil_right = 100;
      set_val(XB1_RX, anti_recoil_right);
    if(get_val(XB1_RT)) {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(10, anti_recoil);
    anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
    if(anti_recoil_left > 100) anti_recoil_left = 100;
    set_val(9, anti_recoil_left);
    anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
    if(anti_recoil_right > 100) anti_recoil_right = 100;
    set_val(9, anti_recoil_right);
    }
 }
User avatar
bmpt guard
Command Sergeant Major
Command Sergeant Major
 
Posts: 142
Joined: Thu May 12, 2016 9:33 pm

Re: need help fixing

Postby bmpt guard » Wed Dec 12, 2018 2:22 am

norge1 wrote:
norge1 wrote:
Scachi wrote:Multiple use of the same name: "int ShootPower" and "define ShootPower"
Wrong syntax of "#define timelimit" ..remove the = and ;
Function "colorled" is not declared
..
looks like incomplete / mixed T1/T2 code

thanks man looks like it checks out. havent tested but i will.
i also got this pubg script i put together awhile ago, i added a ping bind to fire trigger like siege script has.
i get a error looks like only one line can you take a look and tell me how to fix? thanks

edit: ok it seems i fixed compile errors but for some reason the script isnt working as intended. suppose to just fire and will press r3 and ping on compass if someone can fix thanks ill republish when working

Code: Select all
#pragma METAINFO("pubg with jitter with ping binded", 1, 0, "norge")
#include <titanone.gph>
 
//
// Sat Dec 23 2017 17:23:26
// Script generated by Visual to GPC
//----------------------------------------
 
define SHOOT_BTN = XB1_RT;
define ONLY_WITH_SCOPE = TRUE;// Use Anti-recoil only when scoping
define ANTI_RECOIL = 80;       //change "0" to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 80//change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 80; //change this value to compensate to the right (0 - 100)
define INSTA_FIRE                = 95;   // The % at which it boosts the SHOOT button when pressed - i.e. 95% means when pressed 5%
define INSTA_AIM                 = 95;   // The % at which it boosts the ADS button when pressed - i.e. 95% means when pressed 5%
define ADS_SPEED                 = 20;   // The % at which it boosts your aiming speed when using ADS   
define PING_BTN = XB1_RS; // PING
 
// VARIABLES
// ---------------------------------------------------------
 
int AutoSpotOnOff;
int toggle;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
 
 
 
/* ----------------------------------------------------------------------------------------------------------------------
 *  MAIN
**/

main {
    // If RT is pressed, jitter will run//
    if(get_val(XB1_RT)){combo_run(jitter);
    }
    if(get_val(XB1_RT)) {
        combo_run(rapidfire);
    }   
    if(get_val(XB1_LT)) {
        if(get_val(XB1_LT)) {
            combo_run(quickscope);
        } else {
            combo_run(quickscope2);
        }
    }
    if (get_val(XB1_RIGHT)) toggle =  TRUE; // Turn it on when you press DPAD LEFT
    if (get_val(XB1_A)) toggle = FALSE; // turn it off when you press DPAD LEFT
    if (toggle) {
    }else combo_stop(jitter);
    if (toggle) {
    }else combo_stop(rapidfire);
    if (toggle) {
    }else combo_stop(quickscope);
    if (toggle) {
    }else combo_stop(quickscope2);
    if(get_val(XB1_RS) && event_press(XB1_RT))
    combo_run(LOCATION_MARKER);
}
 
combo    RumbleNotifier      {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
 
combo jitter{
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 40);
wait (20);
set_val(XB1_RT, 0);
}
 
combo rapidfire {
    set_val(XB1_RT, 40);
    wait(40);
    set_val(XB1_RT, 0);
}
 
combo FastReloadIMR {
    set_val(XB1_X, 100);
    wait(40);
    set_val(XB1_X, 0);
    wait(500); // << Adjustable timing
    set_val(XB1_X, 0);
    set_val(XB1_LX, 0);
    set_val(XB1_LY, -100);
    wait(40);
}
 
combo quickscope {
    set_val(XB1_LT, 100);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo quickscope2 {
    set_val(XB1_LT, 100);
    wait(20);
    set_val(XB1_LT, 0);
    wait(10);
    set_val(XB1_LT, 0);
}
 
combo LOCATION_MARKER {
set_val(PING_BTN, 100);
wait(100);
}
 
combo AntiRecoil { // This combo must be the last one
    // Look Inversion Enabled
      anti_recoil = get_val(XB1_RY) - ANTI_RECOIL;            // SUBTRACT anti_recoil when LOOK INVERSION is ENABLED
      if(anti_recoil > 100) anti_recoil = 100;
      set_val(XB1_RY, anti_recoil);
      anti_recoil_left = get_val(XB1_RX) - ANTI_RECOIL_LEFT;
      if(anti_recoil_left < -100) anti_recoil_left = -100;
      set_val(XB1_RX, anti_recoil_left);
      anti_recoil_right = get_val(XB1_RX) + ANTI_RECOIL_RIGHT;
      if(anti_recoil_right > 100) anti_recoil_right = 100;
      set_val(XB1_RX, anti_recoil_right);
    if(get_val(XB1_RT)) {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(10, anti_recoil);
    anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
    if(anti_recoil_left > 100) anti_recoil_left = 100;
    set_val(9, anti_recoil_left);
    anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
    if(anti_recoil_right > 100) anti_recoil_right = 100;
    set_val(9, anti_recoil_right);
    }
 }
User avatar
bmpt guard
Command Sergeant Major
Command Sergeant Major
 
Posts: 142
Joined: Thu May 12, 2016 9:33 pm

Re: need help fixing

Postby TheSaint » Sun Dec 16, 2018 10:54 am

A couple if quick questions:
- Will this work on PUBG PS4?
- Is it possible to make ping toggelable during game (switch on and off) as pinging after each shot looks very fishy :)
You Want to ping only in certain situations.
User avatar
TheSaint
Command Sergeant Major
Command Sergeant Major
 
Posts: 148
Joined: Sun Jun 24, 2018 1:43 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 43 guests