Page 1 of 13

T1/CM to Titan Two Script Converter [v0.28r6 - 11/30/2020]

PostPosted: Wed Mar 13, 2019 12:52 am
by Buffy
Due to an influx of script conversion requests, I have create a java program that converts legacy scripts to be compatible with the T2. There are still some scenarios I'm working on to make the converter have more compatibility. I choose Java for compatibility reasons (JVM runs on Windows/Mac/Linux).

Click here to download

Java download

Install Java first, then to convert a script extract the folder and run the GPC-Converter jar file (Java required). Then select the GPC file to convert. Reload the file to get the converted script. The original script will be renamed to have " - Original" at the end of the file name.

External Tools setup
To setup the converter with GtunerIV's external tools, extract the folder (GPC-Converter) into the GtunerIV directory
Open GtunerIV ->
Tools-> Preferences-> External Tools-> Paste the following line into the box:
Code: Select all
GPC Converter, $DATA_DIR$\GPC-Converter\launcher.bat, "$CURR_FILE$"


After this, just open the GPC file you want to convert with Gtuner, then click the external tool GPC-Converter

NOTE: The script must be able to compile with the T1 or CM software before converting.
Because some scripts contain directions for them inside comment blocks, I advise you keep the old scripts to view the comments and such (in a future update I will set it to keep comments)


Feel free to message me on Discord about any non-working scripts so I can look over them.

GitHub repository: https://github.com/AJSinc/GPC-Converter

Credits to:
DontAtMe and J2Kbr

Info on how to convert your own scripts manually: viewtopic.php?f=26&t=7591

Re: Titan One to Titan Two Script Converter

PostPosted: Wed Mar 13, 2019 1:48 am
by UK_Wildcats
Very cool. Thank you.

Re: Titan One to Titan Two Script Converter

PostPosted: Wed Mar 13, 2019 10:05 am
by teddy18
Thank you

Re: Titan One to Titan Two Script Converter

PostPosted: Wed Mar 13, 2019 9:28 pm
by JayP
Thanks, But how do i download this?

Re: Titan One to Titan Two Script Converter

PostPosted: Wed Mar 13, 2019 10:58 pm
by Buffy
JayP wrote:Thanks, But how do i download this?


Sorry, I had the wrong link. Main post has been updated.

Re: Titan One to Titan Two Script Converter

PostPosted: Thu Mar 14, 2019 2:00 am
by alanmcgregor
Awesome job Buffy! thanks for share.

I need help for convert script

PostPosted: Thu Mar 14, 2019 8:19 am
by maury92
hello
who knows how to convert this script to titan two?

thank you


Code: Select all
//LAYOUT\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    define FIRE_BTN = XB1_RT;
    define ADS_BTN = XB1_LT;
    define TACTICAL = XB1_LB;
    define LETHAL = XB1_RB;
    define RX = XB1_RX;
    define RY = XB1_RY;
    define LX = XB1_LX;
    define LY = XB1_LY;
    define CROUCH_BTN = XB1_RS;
    define SPRINT_BTN = XB1_LS;
    define RELOAD_BTN = XB1_X
    define JUMP_BTN = XB1_A;
    define MELEE_BTN = XB1_B;
    define SWAP_BTN = XB1_Y;
    define UP = XB1_UP;
    define LEFT = XB1_LEFT;
    define RIGHT = XB1_RIGHT;
    define DOWN = XB1_DOWN;
 
int    ADS_SENS, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS, Use_sens;
int    IN_GAME_SENS=8;
int    ZOOM_SENS;
//Aim Assist:
 
    int AimAssist = TRUE;
    int value   = 0;
    int value2  = 2;
    int delay   = 0;
 
//Rapid Fire:
 
    int RapidFire = TRUE;
    define SPEED = 25;
 
//Dropshot:
 
    int Dropshot = FALSE;
 
//Jumpshot:
 
    int Jumpshot = FALSE
 
//Hold Breath (Snipers):
 
    int HoldBreath = TRUE;
 
//AutoRun:
 
    int AutoRun = TRUE;
 
//AUTOheal
define FIRE__AND_HEAL=TRUE;
 
int    NO__RECOIL__Y;
int    anti_recoil;
int       b_reload;
int    A__R;
int Jitter = FALSE;
int a; int b;   
int rumble_type = RUMBLE_A;                                             
int Notify = TRUE 
init {
 
//--ANTI RECOIL /--------------------------------------
NO__RECOIL__Y = get_pvar(SPVAR_1,-100,100, 35);
ADS_SENS=105-(IN_GAME_SENS*2);
ADS_FIRE_SENS=100-(IN_GAME_SENS*2);
ZOOM_SENS=95-(IN_GAME_SENS*2);
}
 
//MAIN\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

main {
//AutoHeal
if(FIRE__AND_HEAL && event_release (FIRE_BTN))combo_run(Fire_and_Heal);
 
//Anti recoil
if (get_val(ADS_BTN)&& get_val(FIRE_BTN) && A__R) combo_run(no___recoil);    
if (AimAssist)
if(get_val(ADS_BTN)) {
combo_run(LT_C);
}
if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
combo_stop(LT_C);
combo_run(RT_C);}
 
//Rapidfire       
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);}
}
 
//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(get_val(XB1_RT) > 99){
combo_run(DROPSHOT);
}
//JumbShot
if(get_val(ADS_BTN) && event_press(DOWN)){
Jumpshot=! Jumpshot;
if(Jumpshot == TRUE){combo_run(Notify);a=0;b=2;}
if(Jumpshot == FALSE){combo_run(Notify);a=2;b=0;}
}
if (Jumpshot) 
        if(get_val(XB1_RT) > 99){
             combo_run(JUMPSHOT);
        }
 
if (HoldBreath)
if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100)
}
 
//Autorun
if(get_val(ADS_BTN) && event_press(UP)){
AutoRun =!AutoRun;
if(AutoRun == TRUE){combo_run(Notify);a=0;b=2;}
if(AutoRun == FALSE){combo_run(Notify);a=2;b=0;}
}
if(AutoRun)
if(get_val(LY) <= -20){set_val(XB1_LS, 100);
}
 
//Aim assist
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}         
}
//COMBOS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
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 Fire_and_Heal {
    wait(10);
    if (!get_val (ADS_BTN)|| !get_val (FIRE_BTN))
    set_val(TACTICAL,100);
    wait(40);
}
 
combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
combo Jitter {                                
    set_val(LETHAL, 100);
    set_val(FIRE_BTN,100);
    wait(70);
    wait(20);
    set_val(LETHAL, 100);
    set_val(TACTICAL, 100);
    wait(30);
    set_val(TACTICAL, 100);
    wait(10);
    wait(10);
    }
 
   combo LT_C {
       set_val(RY, -25);         
       wait(delay)
       set_val(RX, 25);
       set_val(RY, 15);
       wait(delay)
       set_val(RY, 15);
       wait(delay)                 
       set_val(RX, -25);
       set_val(RY, 15);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, -35);             
       wait(delay)
       set_val(RX, 35);
       set_val(RY, 25);
       wait(delay)
       set_val(RY, 25);
       wait(delay)                 
       set_val(RX, -35);
       set_val(RY, 25);
       wait(delay)
    }
 
    combo Rapidfire {
       set_val(XB1_RT,100);
       wait(SPEED);
       set_val(XB1_RT,0);
       wait(SPEED);
    }
 
    combo DROPSHOT {
   set_val(XB1_RS, 100);
   wait(800);
    }
 
    combo JUMPSHOT {
   set_val(XB1_A, 100);
   wait(100);
   wait(300);   
    }
 
    combo no___recoil {
        anti_recoil = get_val(10) + NO__RECOIL__Y;     
        if (anti_recoil > 100) anti_recoil = 100;     
        set_val(10, anti_recoil);
}
 
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
}

Re: I need help for convert script

PostPosted: Thu Mar 14, 2019 9:35 am
by Scachi
Fixed
Code: Select all
#include <titanone.gph> 
#define wait(a) wait(a);
//LAYOUT
 
define FIRE_BTN = XB1_RT;
define ADS_BTN = XB1_LT;
define TACTICAL = XB1_LB;
define LETHAL = XB1_RB;
define RX = XB1_RX;
define RY = XB1_RY;
define LX = XB1_LX;
define LY = XB1_LY;
define CROUCH_BTN = XB1_RS;
define SPRINT_BTN = XB1_LS;
define RELOAD_BTN = XB1_X
define JUMP_BTN = XB1_A;
define MELEE_BTN = XB1_B;
define SWAP_BTN = XB1_Y;
define UP = XB1_UP;
define LEFT = XB1_LEFT;
define RIGHT = XB1_RIGHT;
define DOWN = XB1_DOWN;
 
int ADS_SENS, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS, Use_sens;
int IN_GAME_SENS=8;
int ZOOM_SENS;
//Aim Assist:
 
int AimAssist = TRUE;
int value = 0;
int value2 = 2;
int delay = 0;
 
//Rapid Fire:
 
int RapidFire = TRUE;
define SPEED = 25;
 
//Dropshot:
 
int Dropshot = FALSE;
 
//Jumpshot:
 
int Jumpshot = FALSE;
 
//Hold Breath (Snipers):
 
int HoldBreath = TRUE;
 
//AutoRun:
 
int AutoRun = TRUE;
 
//AUTOheal
define FIRE__AND_HEAL=TRUE;
 
int NO__RECOIL__Y;
int anti_recoil;
int b_reload;
int A__R;
int Jitter = FALSE;
int a; int b;
int rumble_type = RUMBLE_A;
int Notify = TRUE;
 
init {
 
//--ANTI RECOIL
NO__RECOIL__Y = get_pvar(SPVAR_1,-100,100, 35);
ADS_SENS=105-(IN_GAME_SENS*2);
ADS_FIRE_SENS=100-(IN_GAME_SENS*2);
ZOOM_SENS=95-(IN_GAME_SENS*2);
}
 
//MAIN
 
main {
//AutoHeal
if(FIRE__AND_HEAL && event_release (FIRE_BTN))combo_run(Fire_and_Heal);
 
//Anti recoil
if (get_val(ADS_BTN)&& get_val(FIRE_BTN) && A__R) combo_run(no___recoil);
if (AimAssist)
if(get_val(ADS_BTN)) {
combo_run(LT_C);
}
if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
combo_stop(LT_C);
combo_run(RT_C);}
 
//Rapidfire
if(get_val(ADS_BTN) && event_press(RIGHT)){
RapidFire =! RapidFire;
if(RapidFire == TRUE){combo_run(cNotify);a=0;b=2;}
if(RapidFire == FALSE){combo_run(cNotify);a=2;b=0;}
}
if(RapidFire){
if(get_val(FIRE_BTN)){
combo_run(Rapidfire);}
}
 
//Dropshot
if(get_val(ADS_BTN) && event_press(RELOAD_BTN)){
Dropshot =! Dropshot;
if(Dropshot == TRUE){combo_run(cNotify);a=0;b=2;}
if(Dropshot == FALSE){combo_run(cNotify);a=2;b=0;}
}
if (Dropshot)
if(get_val(XB1_RT) > 99){
combo_run(DROPSHOT);
}
//JumbShot
if(get_val(ADS_BTN) && event_press(DOWN)){
Jumpshot=! Jumpshot;
if(Jumpshot == TRUE){combo_run(cNotify);a=0;b=2;}
if(Jumpshot == FALSE){combo_run(cNotify);a=2;b=0;}
}
if (Jumpshot)
if(get_val(XB1_RT) > 99){
combo_run(JUMPSHOT);
}
 
if (HoldBreath)
if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100);
}
 
//Autorun
if(get_val(ADS_BTN) && event_press(UP)){
AutoRun =!AutoRun;
if(AutoRun == TRUE){combo_run(cNotify);a=0;b=2;}
if(AutoRun == FALSE){combo_run(cNotify);a=2;b=0;}
}
if(AutoRun)
if(get_val(LY) <= -20){set_val(XB1_LS, 100);
}
 
//Aim assist
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}
}
 
//COMBOS
combo cNotify {
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 Fire_and_Heal {
wait(10);
if (!get_val (ADS_BTN)|| !get_val (FIRE_BTN))
set_val(TACTICAL,100);
wait(40);
}
 
combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
combo cJitter {
set_val(LETHAL, 100);
set_val(FIRE_BTN,100);
wait(70);
wait(20);
set_val(LETHAL, 100);
set_val(TACTICAL, 100);
wait(30);
set_val(TACTICAL, 100);
wait(10);
wait(10);
}
 
combo LT_C {
set_val(RY, -25);
wait(delay)
set_val(RX, 25);
set_val(RY, 15);
wait(delay)
set_val(RY, 15);
wait(delay)
set_val(RX, -25);
set_val(RY, 15);
wait(delay)
}
 
combo RT_C {
set_val(RY, -35);
wait(delay)
set_val(RX, 35);
set_val(RY, 25);
wait(delay)
set_val(RY, 25);
wait(delay)
set_val(RX, -35);
set_val(RY, 25);
wait(delay)
}
 
combo Rapidfire {
set_val(XB1_RT,100);
wait(SPEED);
set_val(XB1_RT,0);
wait(SPEED);
}
 
combo DROPSHOT {
set_val(XB1_RS, 100);
wait(800);
}
 
combo JUMPSHOT {
set_val(XB1_A, 100);
wait(100);
wait(300);
}
 
combo no___recoil {
anti_recoil = get_val(10) + NO__RECOIL__Y;
if (anti_recoil > 100) anti_recoil = 100;
set_val(10, anti_recoil);
}
 
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
}

Re: Titan One to Titan Two Script Converter

PostPosted: Thu Mar 14, 2019 10:49 am
by J2Kbr
I checked your java code and you are doing lot more than firstly expected. Great work, thank you for sharing. :joia: :smile0517:

Re: Titan One to Titan Two Script Converter

PostPosted: Fri Mar 15, 2019 6:32 am
by Buffy
I've updated the app to fix semicolon related errors, and some "garbage code" fixing (a lot of legacy scripts seemed to have gotten by even with these syntax errors).

If you find any regressions/unexpected functionality in the script due to this change, please message me.

EDIT: I've also changed the app to omit unused combos/functions, as some may cause compile errors.