Help! Cod WW2 Script Xbox One
3 posts
• Page 1 of 1
Help! Cod WW2 Script Xbox One
Hi All,
Would someone please help me convert/correct this attached script for my Titan 2? I cannot seem to compile this script.
This is the error code i receive when trying to compile:
GPC error: cod_ww2_best.gpc(196): syntax error, unexpected IDENTIFIER 'define'.
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s).
kind regards,
Thegame
Would someone please help me convert/correct this attached script for my Titan 2? I cannot seem to compile this script.
This is the error code i receive when trying to compile:
GPC error: cod_ww2_best.gpc(196): syntax error, unexpected IDENTIFIER 'define'.
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s).
kind regards,
Thegame
-
Thegame - Sergeant First Class
- Posts: 16
- Joined: Thu Jun 21, 2018 3:28 pm
Re: Help! Cod WW2 Script Xbox One
Errors fixed:
- Code: Select all
#include <titanone.gph>
define FIRE_BTN = XB1_RT;
define ADS_BTN = XB1_LT;
define SPRINT_BTN = XB1_LS;
define MELEE_BTN = XB1_B;
define JUMP_BTN = XB1_A;
define RELOAD_BTN = XB1_X;
define PRONE_BTN = XB1_RS;
define SW_WEAPON_BTN = XB1_Y;
define TACTICAL = XB1_LB;
define LETHAL = XB1_RB;
define UP = XB1_UP;
define RIGHT = XB1_RIGHT;
define DOWN = XB1_DOWN;
define LEFT = XB1_LEFT;
define LY = XB1_LY;
define LX = XB1_LX;
define RY = XB1_RY;
define RX = XB1_RX;
define R_T = XB1_RT;
define L_T = XB1_LT;
define R_X = XB1_RX;
define R_Y = XB1_RY;
define L_X = XB1_LX;
define L_Y = XB1_LY;
define save = 2;
define reset = 1;
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
);
//--------------------------------------------------------------------------------
int Col_ind;
int ShotMode_KS = FALSE;
int hold_time = 35;
int rest_time = 35;
int hold1_time1;
int rest1_time1;
int RATE_OF_FIRE = 14; //Range: 1 to 25 RPS (Round/s)
//int PrimaryWeapon = TRUE;
int RF_KS = FALSE;
int R2F_K2S = FALSE;
// Aim Assist values below can be adjusted to find settings that match your preference
//------------------------------------START AIM ASSIST VALUES-------------------------------------------------------------------------------
int ads_assist = TRUE; // AIM ASSIST / ON by default - optimised for assault riffles and sensitivity 5 -14
int value = 28;
int value2 = -28;
int negative_value_lt_first = -25;
int positive_value_lt_first = 25;
int positive_value_lt_second = 25;
int negative_value_rt_first = -34;
int positive_value_rt_first = 34;
int positive_value_rt_second = 23;
int delay = 11;
//----------------------------------END AIM ASSIST VALUES-----------------------------------------------------------------------------------
int easy_run = TRUE ;
int easy_run_KS;
int hair_trigger = TRUE;
int EASYMELEE = TRUE;
int QuickScope = FALSE;
int akimbo_onoff = FALSE;
int RAPIDoff = TRUE;
int KS_time = 2500;
int ADS_SENS;
int MIDPOINT;
int ads_sens = FALSE;
int PS4_Compatible= FALSE; //ELITE CONTROLLER ON PS4 --> CHANGE "FALSE;" TO "TRUE;"
init{
MIDPOINT = get_pvar (SPVAR_2, 0, 100, 50);
ADS_SENS = get_pvar (SPVAR_5, 0, 327, 100);
}
//------------------------------------------------------------------------------
//============================= MAIN BLOCK ===============================
main { // begin of main block
set_val(TRACE_1,R2F_K2S);
set_val(TRACE_2,akimbo_onoff);
set_val(TRACE_3,RF_KS);
set_val(TRACE_4,RAPIDoff);
set_val(TRACE_5,ads_sens);
set_val(TRACE_6,ads_assist);
///////////////////////////////////////////////////////////////
/// MENU SYSTEM / HOLD ADS + ///////////////////////////////
/////////////////////////////////////////////////////////////
if(get_val(ADS_BTN)){// hold ADS button + D pad buttons
////////////////////////////////
// SAVE TO EPROM
if(event_press(save)){ // XB1 MENU / PS4 OPTIONS
save_pvars();
combo_run(STANDARD_ON);
set_val(2, 0);
}
////////////////////////////////
// RESET EPROM TO DEFAULT
if(event_press(reset)){ // XB1 VIEW / PS4 SHARE
MIDPOINT = 50;
ADS_SENS = 100;
set_pvar (SPVAR_2, MIDPOINT);
set_pvar (SPVAR_5, ADS_SENS);
set_val(1, 0);
}
}
///////////////////////////////////////////////////////////////
/// MENU SYSTEM HOLD MENU / OPTIONS + TAP /////////////////
/////////////////////////////////////////////////////////////
if(get_val(2)){// HOLD MENU / OPTIONS + TAP
////////////////////////////////
// EASY DROP
if (event_press(PRONE_BTN)) { // PRONE
ShotMode_KS = !ShotMode_KS;
}
set_val(PRONE_BTN,0);
////////////////////////////////
// EASY MELEE
if (event_press(MELEE_BTN)) { // MELEE
EASYMELEE = !EASYMELEE;
}
set_val(MELEE_BTN,0);
////////////////////////////////
// EASY SPRINT
if (event_press(SPRINT_BTN)) { // SPRINT
easy_run = !easy_run;
}
set_val(SPRINT_BTN,0);
////////////////////////////////
// AIM ASSIST
if(event_press(ADS_BTN)) { // ADS
ads_assist = !ads_assist;
}
set_val(ADS_BTN,0);
////////////////////////////////
// ADS SENS
if(event_press(SW_WEAPON_BTN)) { // SW_WEAPON_BTN
ads_sens = !ads_sens;
}
}
if (get_val(RELOAD_BTN)){
// PROFILE 1 : 2000
if(event_press(LEFT)) {KS_time = 2000;}
// PROFILE 2: 2500
if(event_press(RIGHT)) {KS_time = 2500;}
// PROFILE 3: 1500
if(event_press(DOWN)) {KS_time = 1500;}
// PROFILE 4 : 5000
if(event_press(UP)) {KS_time = 5000;}
}
if(get_val(JUMP_BTN)){ // hold JUMP button +
if(event_press(RIGHT)){
MIDPOINT = MIDPOINT + 2; // RIGHT
}
if(event_press(LEFT)) {
MIDPOINT = MIDPOINT - 2; // LEFT
}
set_val(RIGHT,0); set_val(LEFT,0);
if(event_press(UP)){
ADS_SENS = ADS_SENS + 2; // UP
}
if(event_press(DOWN)){
ADS_SENS = ADS_SENS - 2; // DOWN
}
set_val(UP,0); set_val(DOWN,0);
}
if(event_press(RIGHT) && !get_val (RELOAD_BTN) && !get_val (JUMP_BTN)){// D pad RIGHT
RF_KS = FALSE;
R2F_K2S = FALSE;
akimbo_onoff = FALSE;
RAPIDoff = FALSE;
QuickScope = TRUE;
}
////////////////////////////////
// AKIMBO SET UP
if(event_press(DOWN) && !get_val (RELOAD_BTN) && !get_val (JUMP_BTN)) {// D pad DOWN
RF_KS = FALSE;
R2F_K2S = FALSE;
akimbo_onoff = TRUE;
RAPIDoff = FALSE;
QuickScope = FALSE;
}
////////////////////////////////
// RAPID FIRE SET UP
if(event_press(UP) && !get_val (RELOAD_BTN) && !get_val (JUMP_BTN)) {// D pad UP
RF_KS = TRUE;
R2F_K2S = TRUE;
akimbo_onoff = FALSE;
RAPIDoff = FALSE;
QuickScope = FALSE;
}
////////////////////////////////
// RAPID FIRE OFF
if(event_press(LEFT) && !get_val (RELOAD_BTN) && !get_val (JUMP_BTN)) {// LEFT
RF_KS = FALSE;
R2F_K2S = FALSE;
akimbo_onoff = FALSE;
RAPIDoff = TRUE;
QuickScope = FALSE;
}
////////////////////////////////
// KILL SWITCHES
if (event_press (TACTICAL)) {combo_run(SwitchOFF);}
if (event_press (ADS_BTN)) {combo_stop(STOP_SPRINT); easy_run_KS =FALSE;}
if (event_press (FIRE_BTN)) {combo_stop(STOP_SPRINT); easy_run_KS =FALSE;
}
///////////////////////////////////////////////////////////////////
//////////////////////////////////////////////// HAIR TRIGGERS ///
/////////////////////////////////////////////////////////////////
if(hair_trigger) {
if(get_val(FIRE_BTN) >= 5) set_val(FIRE_BTN,100);
if(get_val(ADS_BTN) >= 5) set_val(ADS_BTN,100);
}
///////////////////////////////////////////////////////////////////
////////////////////////////////////////////////EASY DROP/////////
/////////////////////////////////////////////////////////////////
if(!ShotMode_KS){
if(get_val(PRONE_BTN)) combo_run(DROP_SHOT);
}
///////////////////////////////////////////////////////////////////
// QUICK SCOPE////////////////////////////////////QUICK SCOPE/////
/////////////////////////////////////////////////////////////////
if(QuickScope){
if(get_val(ADS_BTN)) combo_run(BREATH);
else combo_stop(BREATH);
if(event_release(ADS_BTN) && get_ptime(ADS_BTN)< 200)combo_run(QUICK_SHOT);
}
///////////////////////////////////////////////////////////////////
// AKIMBO ////////////////////////////////////AKIMBO//////////
/////////////////////////////////////////////////////////////////
if(akimbo_onoff) {
if(get_val(FIRE_BTN) && !get_val(ADS_BTN)){
combo_run (RAPID_AKIMBO);}
if(get_val(ADS_BTN) && !get_val(FIRE_BTN)){
combo_run (RAPID_AKIMBO);}
}
///////////////////////////////////////////////////////////////////
// EASY MELEE ////////////////////////////////////EASYMELEE///
/////////////////////////////////////////////////////////////////
if (EASYMELEE) {
if (get_val(XB1_LS)) set_val(XB1_B, 100);
}
///////////////////////////////////////////////////////////////////
//EASY RUN //////////////////////////////////////EASY RUN////////
/////////////////////////////////////////////////////////////////
if(easy_run && !easy_run_KS){
if(get_val(LY) < -5) combo_run(EASY_RUN);
}
if(event_release (RELOAD_BTN)&& get_ptime(RELOAD_BTN)< 200) combo_run(STOP_SPRINT);
///////////////////////////////////////////////////////////////////
// ADS SENS //////////////////////////////////// ADS SENS ////////
/////////////////////////////////////////////////////////////////
if(ads_sens){
if (get_val(ADS_BTN) ) {
sensitivity( 9, MIDPOINT, ADS_SENS);
sensitivity(10, MIDPOINT, ADS_SENS);
}//end
}
/////////////////////////////////////////////////////////////////////
/////////////////////////////////// RAPID FIRE 1 ON THE FLY/////////
///////////////////////////////////////////////////////////////////
if (RF_KS && get_val(FIRE_BTN))
combo_run (RAPID1_FIRE1);
else if(combo_running(RAPID1_FIRE1)) {combo_stop(RAPID1_FIRE1);}
hold1_time1 = 500 / RATE_OF_FIRE;
rest1_time1 = hold1_time1 - 20;
if(rest1_time1 < 0) rest1_time1 = 0;
///////////////////////////////////////////////////////////////////
// LED COLOURS /////////////////////////// LED COLOURS //////////
/////////////////////////////////////////////////////////////////
if(RAPIDoff) colourled (Blue);
if (R2F_K2S) colourled (Red);
if(akimbo_onoff) colourled(SkyBlue);
if(QuickScope)colourled(White);
if(ads_assist && get_val (ADS_BTN)) colourled(Yellow);
if(ads_sens && get_val (FIRE_BTN)) colourled(Green);
//////////////////////////////////////////////////////////////////////
////////////////////////////////////////// PS4 Compatible ///////////
////////////////////////////////////////////////////////////////////
if(PS4_Compatible){
// XBOX ELITE Paddle Left down PL2
if(get_val(PS4_TOUCH)) set_val(PS4_TOUCH,0);
if(get_val(PS4_SHARE)) {
if(!get_val(PS4_R3)) {
set_val(PS4_TOUCH, 100);
set_val(PS4_SHARE, 0);
}
set_val(PS4_R3, 0);
}
}
//////////////////////////////////////////////////////////////////////
////////////////////////////////////////// AIM ASSIST ///////////////
////////////////////////////////////////////////////////////////////
if(ads_assist){
if(get_val(L_T)) {
combo_run(LT_C);
}
if(get_val(L_T) && get_val(R_T)) {
combo_stop(LT_C);
combo_run(RT_C);
}
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(LT_C);
combo_stop(RT_C);
}
}
}
//------------------------------------------------------------------------------
// end of main block
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// COMBO BLOCKS
//------------------------------------------------------------------------------
combo LT_C {
set_val(R_Y, negative_value_lt_first);
wait(delay);
set_val(R_X, positive_value_lt_first);
set_val(R_Y, positive_value_lt_second);
wait(delay) ;
set_val(R_Y, positive_value_lt_second);
wait(delay) ;
set_val(R_X, negative_value_lt_first);
set_val(R_Y, positive_value_lt_second);
wait(delay);
}
combo RT_C {
set_val(R_Y, negative_value_rt_first);
wait(delay);
set_val(R_X, positive_value_rt_first);
set_val(R_Y, positive_value_rt_second);
wait(delay) ;
set_val(R_Y, positive_value_rt_second);
wait(delay) ;
set_val(R_X, negative_value_rt_first);
set_val(R_Y, positive_value_rt_second);
wait(delay);
}
combo STOP_SPRINT {
easy_run_KS = TRUE;
wait(KS_time);
easy_run_KS = FALSE;
}
combo RAPID1_FIRE1 {
set_val(FIRE_BTN, 100);
wait(hold1_time1);
set_val(FIRE_BTN, 0);
wait(rest1_time1);
}
combo BREATH {
wait(140);
set_val(SPRINT_BTN,100);
wait(4000);
}
combo SwitchOFF {
set_rumble(RUMBLE_A,100);
wait(200);
reset_rumble();
ShotMode_KS = TRUE;
wait(30000);
set_rumble(RUMBLE_A,100);
wait(200);
reset_rumble();
ShotMode_KS = FALSE;
}
combo DROP_SHOT{
set_val(PRONE_BTN,100);
wait(500);
}
combo RAPID_AKIMBO {
set_val(FIRE_BTN,100);
set_val( ADS_BTN,100);
wait(hold_time);
set_val( ADS_BTN,0);
set_val(FIRE_BTN,0);
wait(rest_time);
}
combo QUICK_SHOT {
set_val(ADS_BTN, 100);
set_val(SPRINT_BTN,100);
set_val(FIRE_BTN, 0);
wait(300);
set_val(ADS_BTN, 100);
set_val(SPRINT_BTN,100);
set_val(FIRE_BTN, 100);
wait(60);
}
combo EASY_RUN {
set_val(SPRINT_BTN,100);
wait(30);
wait(100);
}
combo STANDARD_ON {
set_rumble(RUMBLE_A,100);
wait(200);
reset_rumble();
wait(200);
}
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
function save_pvars(){
set_pvar(SPVAR_2, MIDPOINT);
set_pvar(SPVAR_5, ADS_SENS);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Help! Cod WW2 Script Xbox One
J2Kbr, You DA MAN!
Thank you so much
Thank you so much
-
Thegame - Sergeant First Class
- Posts: 16
- Joined: Thu Jun 21, 2018 3:28 pm
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 74 guests