T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/2019]

GPC script programming for Titan Two device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher

Re: converting script

Postby Darkness » Sat May 04, 2019 7:30 pm

Thank you!
User avatar
Darkness
Sergeant
Sergeant
 
Posts: 6
Joined: Sat Jul 28, 2018 10:45 am

Re: converting script

Postby STEELES » Fri May 10, 2019 6:37 pm

has this been published for t1 yet?
User avatar
STEELES
Master Sergeant
Master Sergeant
 
Posts: 27
Joined: Sat Mar 23, 2019 2:00 pm

Re: converting script

Postby Buffy » Sat May 11, 2019 2:37 am

STEELES wrote:has this been published for t1 yet?


I haven't tested but you can try this:

Code: Select all

//Posted by JQuest313, a member of the community in the device Forums - https://device.com/forums
//Posted : Saturday 4th of May, 2019 14:53 UTC 
// Geras By Fwak. V.1.0.
// Big Thanks To Batts <3.
/*---------------------------------------------------------------------------------
Infinite Warden|
----------------
 
RB Adjust = Spends a Meter
RT Adjust = Spends a Second Meter
LT Adjust = Uses Fatal during Combo (Can be used during RB/RT's combo adjust)
 
---------------------------------------------------------------------------------
IF YOU WANT TO USE SECOND BAR OF METER DURING THE FIRST BAR, PRESS RT/R2 AS SOON
AS YOU SEE THE FIRST BAR GO OFF/USED.
---------------------------------------------------------------------------------
IF YOU WANT TO USE Fatal DURING FIRST METER, PRESS LT/L2 AFTER THE DASH.
---------------------------------------------------------------------------------
 
There is quite a few check points in this one (checks if it should change Combos
mid Combo), so go in practice and get the timings down.
---------------------------------------------------------------------------------
 
RS UP --------
RS Down ------    (RS DOWN + UP are same Combo)
Hold X    ------ = All 5 can use RB and RT and LT
RS Right -----
RS Left ------
 
LS Up = Easy Fatal
 
LT + R3 to changes to corner combos which there's four of and all use 2 Meters.
 
Fatality on R3.
 
-----------------------------------------------------------------------------------**/// TRIANGLE, Y
// CIRCLE, B 
// CROSS, A
// SQUARE, X
// R1, RB   
// R2, RT   
// L1, LB   
// L2, LT   
// TOUCH PAD   
// DPAD UP   
// DPAD DOWN
// DPAD LEFT 
// DPAD RIGHT 
// LEFT ANALOG X
// LEFT ANALOG Y
// BACK FLAG   
// FORWARD FLAG
// End Flags. 253, 254 and 255 should never be used in the
// data segment for other purposes.                 
//-----------------------------------------------------
// check for transition to another combo
// End of Combo     
// End of Data Segment
//-----------------------------------------------------
//Define Combos
//--------------------------------------
//--------------------------------------
//Define Combo Adjusters
//--------------------------------------
//
//
//
//
//--------------------------------------
// Combo Data
//--------------------------------------
//--------------------------------------
//--------------------------------------
//--------------------------------------
//--------------------------------------
//--------------------------------------
// Hold X/Square
//--------------------------------------
//--------------------------------------
// Right Stick RIGHT
//--------------------------------------
//--------------------------------------
// Right Stick LEFT
//--------------------------------------
//--------------------------------------
// Right Stick UP
//--------------------------------------
//--------------------------------------
// Right Stick DOWN
//--------------------------------------
//--------------------------------------
// Left Stick RIGHT
//--------------------------------------
//--------------------------------------
// Left Stick LEFT
//--------------------------------------
//--------------------------------------
//Left Stick Up
//--------------------------------------
//--------------------------------------
//Left Stick Down
//--------------------------------------
//--------------------------------------
// Right Stick RIGHT *SWITCHED*
//--------------------------------------
//--------------------------------------
//Right Stick Up *SWITCHED*
//--------------------------------------
//--------------------------------------
// Right Stick LEFT *SWITCHED*
//--------------------------------------
//--------------------------------------
// Right Stick DONW *SWITCHED*
//--------------------------------------
//--------------------------------------
//--------------------------------------
//End Of Combo Data
//--------------------------------------
//Unmaps
//--block button
//--switch XB1_LT + press XB1_RS
//--block button
//--block button until release
//--toggle
//--rumble controller
//--BACK and FORWARD       
//--EXECUTE COMBOS
//--check for activator button press
// execute combo step-by-step     
//--end of combo
// RS X / Y are in rest = cancel the combo
// block user input (does not interfere in the combo)
//--no combo running                         
//--reset activator button and led
//------------------
// Right Stick RIGHT
//--------------------
//-----------------
// Right Stick LEFT
//-------------------
//---------------
// Right Stick UP
//-----------------
//-----------------
// Right Stick DOWN
//-------------------
//-------------
// hold LS / L3
//---------------
//-------------
// hold RS / R3
//---------------
//--switch (default)                             
//---------------
//Hold X/Square.
//----------------
//---------------------------
//Right Stick RIGHT.
//---------------------------
//---------------------------
// Right Stick LEFT.
//---------------------------
//---------------
// Right Stick UP
//-----------------
//-----------------
// Right Stick DOWN
//-------------------
//--end of switch
//--end of combo run
//--block btns
//--end of main
// This combo will run a step with wait           
// This combo will run a step without wait       
// Returns the starting index of a combo
//-----------------------       
//====================           
//#     
//#                                 
//=============================         
//-----------------------------------       
// Set the buttons, values and wait time of a step
//--get value from data segment
//--look for CHK_PNT
//--RT_PRESS combo
//--RB_PRESS combo
//--LT_PRESS combo
//--LB_PRESS combo
//--no activator pressed
//--check for activator button pressed
//--new combo
// If the step has FORWARD and BACK buttons, set the correct value.
// Set the buttons and values, function used on the combos.
//--BLOCK BUTTONS
 
 
 
 
define Y = 17;
define B = 18;
define A = 19;
define X = 20;
define RB = 3;
define RT = 4;
define LB = 6;
define LT = 7;
define TOUCH = 27;
define UP = 13;
define DOWN = 14;
define LEFT = 15;
define RIGHT = 16;
define MOVE_X = 11;
define MOVE_Y = 12;
define BACK = 128;
define FORWARD = 129;
define CHK_PNT = 253;
define EOC = 254;
define EOD = 255;
define Combo1 = 10;
define Combo2 = 11;
define Combo3 = 12;
define Combo4 = 13;
define Combo5 = 14;
define Combo6 = 15;
define Combo7 = 16;
define Combo8 = 17;
define Combo9 = 18;
define Combo10 = 19;
define Combo11 = 26;
define Combo12 = 30;
define Punish = 31;
define Fatality1 = 24;
define Fatality2 = 25;
define LB_PRESS = 20;
define LT_PRESS = 21;
define RB_PRESS = 22;
define RT_PRESS = 23;
 
data(
RT_PRESS,
1, FORWARD, 100,
10, 0, 8,
1, FORWARD, 100,
10, 0, 4,
1, FORWARD, 100,
4, 0, 8,
2, FORWARD, 100,
A, 100,
8,
1, BACK, 100,
8,
2, FORWARD, 100,
X, 100,
10, 0, 20,
1, RB, 100,
10, 0, 73,
1, DOWN, 100,
10,
2, DOWN, 100,
Y, 100,
20,
1, DOWN, 100,
80,
2, DOWN, 100,
Y, 100,
10, 0, 55,
1, FORWARD, 100,
4, 0, 4,
1, FORWARD, 100,
4, 0, 43,
2, FORWARD, 100,
A, 100,
4, CHK_PNT,
1, BACK, 100,
4,
2, FORWARD, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
RB_PRESS,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10, 0, 80,
1, RB, 100,
10, 0, 185, CHK_PNT,
1, FORWARD, 100,
4, 0, 4,
1, FORWARD, 100,
10, 0, 18,
1, B, 100,
8, CHK_PNT,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
LT_PRESS,
2, RT, 100,
LT, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
LB_PRESS,
EOC,
Punish,
1, X, 100,
10, 0, 10,
1, X, 100,
10, 0, 30, CHK_PNT,
1, X, 100,
10, 0, 20,
2, X, 100,
A, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo1,
2, BACK, 100,
Y, 100,
10, 0, 10,
1, Y, 100,
50, CHK_PNT,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo2,
2, FORWARD, 100,
Y, 100,
10, 0, 20,
1, X, 100,
10, 0, 20, CHK_PNT,
1, Y, 100,
10, 0, 20,
1, DOWN, 100,
10, 0, 20,
2, BACK, 100,
Y, 100,
10, 0, 20,
1, X, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo3,
1, Y, 100,
10, 0, 18,
1, B, 100,
10, 0, 25, CHK_PNT,
1, X, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo4,
1, Y, 100,
10, 0, 18,
1, B, 100,
10, 0, 25, CHK_PNT,
1, X, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo5,
EOC,
Combo6,
EOC,
Combo7,
2, LT, 100,
RT, 100,
200, 0, 200,
EOC,
Combo8,
EOC,
Combo9,
2, BACK, 100,
Y, 100,
10, 0, 20,
1, Y, 100,
10, 0, 8,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10, 0, 120,
1, RB, 100,
10, 0, 210,
2, FORWARD, 100,
Y, 100,
10, 0, 4,
1, X, 100,
10, 0, 4,
1, Y, 100,
10, 0, 4,
1, BACK, 100,
4, 0, 4,
2, FORWARD, 100,
X, 100,
10, 0, 90,
1, RB, 100,
10, 0, 80,
2, DOWN, 100,
Y, 100,
10,
1, DOWN, 100,
90,
2, DOWN, 100,
Y, 100,
10, 0, 30,
1, BACK, 100,
75,
2, BACK, 100,
X, 100,
8,
1, FORWARD, 100,
8,
2, BACK, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo10,
1, X, 100,
10, 0, 10,
1, X, 100,
10, 0, 8,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10, 0, 110,
1, RB, 100,
10, 0, 223,
2, FORWARD, 100,
Y, 100,
10, 0, 4,
1, X, 100,
10, 0, 4,
1, Y, 100,
10, 0, 4,
1, BACK, 100,
4, 0, 4,
2, FORWARD, 100,
X, 100,
10, 0, 90,
1, RB, 100,
10, 0, 80,
2, DOWN, 100,
Y, 100,
10,
1, DOWN, 100,
90,
2, DOWN, 100,
Y, 100,
10, 0, 30,
1, BACK, 100,
85,
2, BACK, 100,
X, 100,
8,
1, FORWARD, 100,
8,
2, BACK, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo11,
2, FORWARD, 100,
Y, 100,
10, 0, 20,
1, X, 100,
10, 0, 20,
1, Y, 100,
10, 0, 95,
1, B, 100,
10, 0, 8,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10, 0, 80,
1, RB, 100,
10, 0, 220,
2, BACK, 100,
Y, 100,
10, 0, 4,
1, Y, 100,
10, 0, 4,
1, BACK, 100,
4, 0, 4,
2, FORWARD, 100,
X, 100,
10, 0, 50,
1, RB, 100,
10, 0, 80,
2, DOWN, 100,
Y, 100,
10,
1, DOWN, 100,
90,
2, DOWN, 100,
Y, 100,
10, 0, 30,
1, BACK, 100,
102,
2, BACK, 100,
X, 100,
8,
1, FORWARD, 100,
8,
2, BACK, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Combo12,
1, Y, 100,
10, 0, 10,
1, B, 100,
10, 0, 8,
1, BACK, 100,
8,
2, FORWARD, 100,
Y, 100,
10, 0, 110,
1, RB, 100,
10, 0, 223,
2, FORWARD, 100,
Y, 100,
10, 0, 4,
1, X, 100,
10, 0, 4,
1, Y, 100,
10, 0, 4,
1, BACK, 100,
4, 0, 4,
2, FORWARD, 100,
X, 100,
10, 0, 90,
1, RB, 100,
10, 0, 80,
2, DOWN, 100,
Y, 100,
10,
1, DOWN, 100,
90,
2, DOWN, 100,
Y, 100,
10, 0, 30,
1, BACK, 100,
80,
2, BACK, 100,
X, 100,
8,
1, FORWARD, 100,
8,
2, BACK, 100,
Y, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
Fatality1,
1, RT, 100,
10, 0, 20,
1, FORWARD, 100,
10, 0, 4,
1, DOWN, 100,
10, 0, 4,
1, DOWN, 100,
10, 0, 4,
1, A, 100,
10,
0, 200,
0, 200,
0, 200,
0, 200,
0, 200,
EOC,
EOD );
 
unmap PS4_RX;
unmap PS4_RY;
unmap PS4_LX;
unmap PS4_LY;
unmap PS4_L3;
unmap PS4_R3;
 
int c,  idx,  i =- 1,  btn,  v;
int back = LEFT,  forward = RIGHT;
int button,  button_1,  button_2,  button_3,  button_4,  button_5;
int value,  value_1,  value_2,  value_3,  value_4,  value_5;
int lt_press,  lb_press,  rt_press,  rb_press;
int wait_time;
int t1_switch, flash;
int b, bb, bb_array[3];
 
main {
    if (get_val(XB1_LT)) {
        bb = f_bb(XB1_LT);
        if (event_press(XB1_RS)) {
            bb = f_bb(XB1_RS);
            t1_switch =! t1_switch;
            combo_run(c_RUMBLE_NOTIFY);
        }
    }
    if (get_val(RIGHT)) {
        back = LEFT;
        forward = RIGHT;
    }
    else if (get_val(LEFT)) {
        back = RIGHT;
        forward = LEFT;
    }
    if (i != - 1) {
        if (event_press(XB1_RT)) rt_press = TRUE;
        if (event_press(XB1_RB)) rb_press = TRUE;
        if (event_press(XB1_LT)) lt_press = TRUE;
        if (event_press(XB1_LB)) lb_press = TRUE;
        if (!combo_running(c_EXECUTE_STEP)) {
            if (f_get_step_values()) if (wait_time == 0) combo_run(c_EXECUTE_STEP_NO_WAIT);
            else  combo_run(c_EXECUTE_STEP);
            else {
                i =- 1;
                flash = FALSE;
            }
        }
        if ((abs(get_val(9)) <= 20 && abs(get_val(10)) <= 20 && abs(get_val(11)) <= 20 && abs(get_val(12)) <= 20) && (!get_val(5) && !get_val(8)) && (!get_val(XB1_X)) && (!get_val(XB1_Y))) {
            i =- 1;
            combo_stop(c_EXECUTE_STEP);
        }
        btn = 3
        while(btn <= 20) {
            set_val(btn, 0);
            btn = btn + 1;
        }
    }
    else {
        rt_press = FALSE;
        rb_press = FALSE;
        lt_press = FALSE;
        lb_press = FALSE;
        flash = FALSE;
        if (t1_switch) {
            if (get_val(9) >= 60) {
                i = f_get_combo_index(Combo9);
            }
            if (get_val(9) <= - 60) {
                i = f_get_combo_index(Combo11);
            }
            if (get_val(10) <= - 60) {
                i = f_get_combo_index(Combo10);
            }
            if (get_val(10) >= 60) {
                i = f_get_combo_index(Combo12);
            }
            if (get_val(8)) {
                i = f_get_combo_index(0);
            }
            if (get_val(5)) {
                i = f_get_combo_index(Fatality1);
            }
        }
        else {
            if (get_val(XB1_X) && !get_val(forward) && !get_val(XB1_DOWN)) {
                set_val(XB1_X, 0);
                if (get_lval(XB1_X)) i = f_get_combo_index(Punish);
            }
            if (get_val(9) >= 60) {
                i = f_get_combo_index(Combo1);
            }
            if (get_val(9) <= - 60) {
                i = f_get_combo_index(Combo2);
            }
            if (get_val(10) <= - 60) {
                i = f_get_combo_index(Combo3);
            }
            if (get_val(10) >= 60) {
                i = f_get_combo_index(Combo4);
            }
        }
    }
    if (bb) f_block_btn();
}
 
 
combo c_RUMBLE_NOTIFY {
    set_rumble(t1_switch, 100);
    wait(300);
    reset_rumble();
}
 
combo c_EXECUTE_STEP {
    f_set_buttons_values();
    wait(wait_time);
    f_set_buttons_values();
}
 
combo c_EXECUTE_STEP_NO_WAIT {
    f_set_buttons_values();
}
 
 
function f_get_combo_index(combo_id) {
    i = 0;
    while (TRUE) {
        v = dbyte(i);
        if (v == combo_id) {
            return (i + 1);
        }
        else {
            while (v != EOC && v != EOD) {
                i = i + 1;
                v = dbyte(i);
            }
            if (v == EOD) break;
            else  i = i + 1;
        }
    }
    return -1;
}
 
function f_get_step_values() {
    btn = dbyte(i);
    if (btn == CHK_PNT) {
        if (f_check_point(rt_press, RT_PRESS)) rt_press = FALSE;
        else if (f_check_point(rb_press, RB_PRESS)) rb_press = FALSE;
        else if (f_check_point(lt_press, LT_PRESS)) lt_press = FALSE;
        else if (f_check_point(lb_press, LB_PRESS)) lb_press = FALSE;
        else {
            i = i + 1;
            btn = dbyte(i);
        }
    }
    i = i+1;
    if (btn >= 1) {
        button_1 = f_convert_back_forward(dbyte(i));
        i = i + 1;
        value_1 = dbyte(i);
        i = i + 1;
    }
    else {
        button_1 =- 1;
        value_1 = 0;
    }
    if (btn >= 2) {
        button_2 = f_convert_back_forward(dbyte(i));
        i = i + 1;
        value_2 = dbyte(i);
        i = i + 1;
    }
    else {
        button_2 =- 1;
        value_2 = 0;
    }
    if (btn >= 3) {
        button_3 = f_convert_back_forward(dbyte(i));
        i = i + 1;
        value_3 = dbyte(i);
        i = i + 1;
    }
    else {
        button_3 =- 1;
        value_3 = 0;
    }
    if (btn >= 4) {
        button_4 = f_convert_back_forward(dbyte(i));
        i = i + 1;
        value_4 = dbyte(i);
        i = i + 1;
    }
    else {
        button_4 =- 1;
        value_4 = 0;
    }
    if (btn >= 5) {
        button_5 = f_convert_back_forward(dbyte(i));
        i = i + 1;
        value_5 = dbyte(i);
        i = i + 1;
    }
    else {
        button_5 =- 1;
        value_5 = 0;
    }
    wait_time = dbyte(i);
    i = i + 1;
    wait_time = (wait_time - 1) * 10;
    if (wait_time < 0) wait_time = 0;
    return (TRUE);
}
 
function f_check_point(f_bool, f_combo) {
    if (f_bool) {
        i = f_get_combo_index(f_combo);
        btn = dbyte(i);
        return TRUE;
    }
    return FALSE;
}
 
function f_convert_back_forward(button) {
    if (button == FORWARD)
        return forward;
    if (button == BACK)
        return back;
    return (button);
}
 
function f_set_buttons_values() {
    idx = 1;
    while(idx <= 5) {
        if (button[idx] != -1) set_val(button[idx], value[(idx)]);
        idx = idx + 1;
    }
}
 
function f_bb(f_btn) {
    b = 0;
    while(b <= 2) {
        if (!bb_array[b]) {
            bb_array[b] = f_btn;
            return TRUE;
        }
        if (bb_array[b] == f_btn)
            return TRUE;
           
        b = b+1;
    }
    return FALSE;
}
 
function f_block_btn() {
    bb = FALSE;
    b = 0;
    while(b <= 2) {
        if (bb_array[b]) {
            if (event_release(bb_array[b])) {
                bb_array[b] = 0;
            }
            else {
                set_val(bb_array[b], 0);
                bb = TRUE;
            }
        }
        b = b +1;
    }
}
 
/* function f_led_color(f_color) {
    for (c = 0; c <= 3; c ++ ) {
        set_led(c, dbyte((f_color * 4) + c));
    }
}
*/
 
User avatar
Buffy
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 278
Joined: Wed Jul 20, 2016 5:23 am

T1 to T2 conversion ?

Postby brayden321 » Sun May 12, 2019 9:26 am

Can someone make this T2 ??

Code: Select all
 
 
- New Player
- PG
- Defending/Slasher
- Skip Hieght, Weight & Wingspan
- Skip to NBA
- Choose Thunder
- Negotiate 745 VC, 2 Mins, No Bonus & Max Years
- Press Y to Nav Menu and hover over your first game and click D Pad down
 
int onoff;
main{
if(event_press(PS4_DOWN)){onoff = !onoff;}
if(onoff){combo_run(farmvc);}
}
combo farmvc {
        set_val(PS4_CROSS, 100);
        wait(2000);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CIRCLE, 100);
        wait(120);
        set_val(PS4_CIRCLE, 0);
        wait(60);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CIRCLE, 100);
        wait(120);
        set_val(PS4_CIRCLE, 0);
        wait(60);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
        set_val(PS4_CROSS, 100);
        wait(100);
        set_val(PS4_CROSS, 0);
        wait(500);
 
        set_val(PS4_TRIANGLE, 100);
        wait(60);
        set_val(PS4_TRIANGLE, 0);
        wait(40);
        set_val(PS4_LY, -100);
        wait(1000);
        set_val(PS4_LY, 0);
        wait(1000);
        set_val(PS4_CROSS, 100);
        wait(500);
        set_val(PS4_CROSS, 0);
        wait(2000);
        set_val(PS4_CROSS, 100);
        wait(500);
        set_val(PS4_CROSS, 0);
        wait(1000);
        set_val(PS4_LX, 100);
        wait(1000);
        set_val(PS4_CROSS, 100);
        wait(500);
        set_val(PS4_CROSS, 0);
        wait(1000);
 
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);           
}
User avatar
brayden321
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Tue Oct 23, 2018 2:17 am

Re: T1 to T2 conversion ?

Postby Buffy » Tue May 14, 2019 3:59 am

Code: Select all
 
#pragma METAINFO("this.gpc", 1, 0, "Buffy's GPC Converter v0.24r3")
#include <titanone.gph>
 
 
/*
- New Player
- PG
- Defending/Slasher
- Skip Hieght, Weight & Wingspan
- Skip to NBA
- Choose Thunder
- Negotiate 745 VC, 2 Mins, No Bonus & Max Years
- Press Y to Nav Menu and hover over your first game and click D Pad down
**/

 
 
 
int onoff;
 
main {
    if (event_press(PS4_DOWN)) {
        onoff =! onoff;
    }
    if (onoff) {
        combo_run(c_farmvc);
    }
}
 
 
combo c_farmvc {
    set_val(PS4_CROSS, 100);
    wait(2000);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(120);
    set_val(PS4_CIRCLE, 0);
    wait(60);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(120);
    set_val(PS4_CIRCLE, 0);
    wait(60);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_CROSS, 100);
    wait(100);
    set_val(PS4_CROSS, 0);
    wait(500);
    set_val(PS4_TRIANGLE, 100);
    wait(60);
    set_val(PS4_TRIANGLE, 0);
    wait(40);
    set_val(PS4_LY, - 100);
    wait(1000);
    set_val(PS4_LY, 0);
    wait(1000);
    set_val(PS4_CROSS, 100);
    wait(500);
    set_val(PS4_CROSS, 0);
    wait(2000);
    set_val(PS4_CROSS, 100);
    wait(500);
    set_val(PS4_CROSS, 0);
    wait(1000);
    set_val(PS4_LX, 100);
    wait(1000);
    set_val(PS4_CROSS, 100);
    wait(500);
    set_val(PS4_CROSS, 0);
    wait(1000);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
    wait(500);
    set_val(PS4_CIRCLE, 100);
    wait(200);
    set_val(PS4_CIRCLE, 0);
}
 


viewtopic.php?f=26&t=12027
User avatar
Buffy
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 278
Joined: Wed Jul 20, 2016 5:23 am

Re: converting script

Postby STEELES » Wed May 15, 2019 12:14 pm

Cheers that worked, how did you do it? I want to convert the erron script
User avatar
STEELES
Master Sergeant
Master Sergeant
 
Posts: 27
Joined: Sat Mar 23, 2019 2:00 pm

Re: converting script

Postby STEELES » Wed May 15, 2019 12:19 pm

Weird how you cant do geras fatal , you have to combo into it using the script
User avatar
STEELES
Master Sergeant
Master Sergeant
 
Posts: 27
Joined: Sat Mar 23, 2019 2:00 pm

Need some help converting script. Coded for device

Postby bt1740 » Thu Jun 13, 2019 11:17 pm

Need help converting this script, would appreciate any help I can get, thanks. Getting a couple errors. Originally coded for the device.

Code: Select all
 
 
 
 
 
    #define    Starting_Anti_Recoil_Value  = 20;
    #define    Ending_Anti_Recoil_Value    = 19;
    #define    Total_Anti_Recoil_Time      = 1500;  //-- 10ms increments
     int aa_p  = 17;
    int aa_n = -17;
    int aa_delay  = 20;
    int release = 19;
    int i_val;
    int i_pnt;
    int i_num;
    int i_cnt;
 
    int v,ar_y;
 
init {
    //--adding or subtracting
    if(Starting_Anti_Recoil_Value < Ending_Anti_Recoil_Value)
        i_val = 1;
    else
        i_val = -1;
    //--iteration point for progression
    i_pnt = (Total_Anti_Recoil_Time / 10) / (abs(Starting_Anti_Recoil_Value - Ending_Anti_Recoil_Value));
}
 
 
main {
 
 
 
 
    if(get_val(PS4_CIRCLE) > 0 ) {
 
        if(get_val(PS4_L2) < 100 || get_val(PS4_R2) < 100) {
 
            set_val(PS4_L3, 100);
 
            set_val(PS4_LY, -100);
 
 
            //set_val(PS4_CIRCLE, 100);
        }
 
 
    }
 
    if(get_val(PS4_R3) > 0)
    {
        set_val(PS4_R3, 0);   
    combo_run(test);
    }
 if(get_val(7)  && !get_val(4)) combo_run(AA_XY);
        else combo_stop(AA_XY);
 
    //--reset counters/pointers
    if(!get_lval(4)) {
       ar_y = Starting_Anti_Recoil_Value;
       i_cnt = 0;
       i_num = 0;
    }
 
    //--RT
    if(get_val(4)) {
        if(!p_complete()) 
            ar_y = p_val();
        else
            ar_y = Ending_Anti_Recoil_Value;
        //--set RY to anti recoil value
        set_val(10,y_val());
    }   
}
combo test {
    set_val(PS4_R2, 0);
    set_val(PS4_R3, 100);
 
 
 
}
combo AA_XY {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay)
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay)
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
function p_complete() {
    i_cnt++;
    if (i_cnt > Total_Anti_Recoil_Time / 10) {
        //--avoid stack overflow
        i_cnt = Total_Anti_Recoil_Time / 10;
        //--progression complete
        return 1;
    }
    //--progression not complete
    return 0;
}       
function p_val() {
    i_num++;
    if(i_num == i_pnt) {
        //--reset counter
        i_num = 0;
        //--adjust ar_y
        ar_y += i_val;
    }
    return ar_y;
}
function y_val() {
    v = get_val(10);
    if(abs(v) < 10)
        v = 0;
    if(abs(v) > ar_y + 5)
        return v;
    return v + ar_y;         
}




The errors i got are
GPC error: melee-antirecoily-aimassist-reloadcancel.gpc(27): syntax error, unexpected ASSIGN '='.
GPC error: melee-antirecoily-aimassist-reloadcancel.gpc(11): syntax error, unexpected IDENTIFIER 'define'.
User avatar
bt1740
Private First Class
Private First Class
 
Posts: 3
Joined: Thu Jun 13, 2019 11:13 pm

Re: Need some help converting script. Coded for device

Postby Buffy » Fri Jun 14, 2019 12:05 am

Code: Select all
 
#pragma METAINFO("this.gpc", 1, 0, "Buffy's GPC Converter v0.25")
#include <titanone.gph>
 
 
//-- 10ms increments
//--adding or subtracting
//--iteration point for progression
//set_val(PS4_CIRCLE, 100);
//--reset counters/pointers
//--RT
//--set RY to anti recoil value
//--avoid stack overflow
//--progression complete
//--progression not complete
//--reset counter
//--adjust ar_y
 
 
 
 
define Starting_Anti_Recoil_Value = 20;
define Ending_Anti_Recoil_Value = 19;
define Total_Anti_Recoil_Time = 1500;
 
int aa_p = 17;
int aa_n =- 17;
int aa_delay = 20;
int release = 19;
int i_val;
int i_pnt;
int i_num;
int i_cnt;
int v, ar_y;
 
init {
    if (Starting_Anti_Recoil_Value < Ending_Anti_Recoil_Value) i_val = 1;
    else  i_val =- 1;
    i_pnt = (Total_Anti_Recoil_Time / 10) / (abs(Starting_Anti_Recoil_Value - Ending_Anti_Recoil_Value));
}
 
 
main {
    if (get_val(PS4_CIRCLE) > 0) {
        if (get_val(PS4_L2) < 100 || get_val(PS4_R2) < 100) {
            set_val(PS4_L3, 100);
            set_val(PS4_LY, - 100);
        }
    }
    if (get_val(PS4_R3) > 0) {
        set_val(PS4_R3, 0);
        combo_run(c_test);
    }
    if (get_val(7) && !get_val(4)) combo_run(c_AA_XY);
    else  combo_stop(c_AA_XY);
    if (!get_lval(4)) {
        ar_y = Starting_Anti_Recoil_Value;
        i_cnt = 0;
        i_num = 0;
    }
    if (get_val(4)) {
        if (!f_p_complete()) ar_y = f_p_val();
        else  ar_y = Ending_Anti_Recoil_Value;
        set_val(10, f_y_val());
    }
}
 
 
combo c_test {
    set_val(PS4_R2, 0);
    set_val(PS4_R3, 100);
}
 
combo c_AA_XY {
    set_val(10, f_xy_val(10, aa_p));
    wait(aa_delay);
    set_val(9, f_xy_val(9, aa_p));
    set_val(11, f_xy_val(11, aa_p));
    wait(aa_delay);
    set_val(10, f_xy_val(10, aa_n));
    wait(aa_delay);
    set_val(9, f_xy_val(9, aa_n));
    set_val(11, f_xy_val(11, aa_n));
    wait(aa_delay);
}
 
 
function f_xy_val(f_axis, f_val) {
    if (abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
 
function f_p_complete() {
    i_cnt ++ ;
    if (i_cnt > Total_Anti_Recoil_Time / 10) {
        i_cnt = Total_Anti_Recoil_Time / 10;
        return 1;
    }
    return 0;
}
 
function f_p_val() {
    i_num ++ ;
    if (i_num == i_pnt) {
        i_num = 0;
        ar_y += i_val;
    }
    return ar_y;
}
 
function f_y_val() {
    v = get_val(10);
    if (abs(v) < 10) v = 0;
    if (abs(v) > ar_y + 5)
        return v;
    return v + ar_y;
}
 


Please check this thread out: viewtopic.php?f=26&t=12027
User avatar
Buffy
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 278
Joined: Wed Jul 20, 2016 5:23 am

Please Help

Postby Warsai » Sun Jun 23, 2019 8:12 pm

Hi can someone please help me fix this keep giving me error, i use the gpc converter to convert it

Code: Select all
 
#pragma METAINFO("Skill Paddle.gpc", 1, 0, "Buffy's GPC Converter v0.25r2")
#include <titanone.gph>
 
 
int run_combo = 0;
int yachse;
int xachse;
int nachRechts;
int firstpress;
int shootpower = 220;
int tempshotpower = 220;
int finesseshootpower = 210;
int lowdrivenshootpower = 200;
int TimedFinesseWait = 185;
int TimedFinesseShotpower = 210;
int TimedLowDrivenFinesseShotpower = 290;
int TimedLowDrivenWait = 440;
int TimeForDoubleTap = 300;
 
main {
    if (get_val(XB1_RB) && get_val(XB1_LB)) {
        firstpress = FALSE;
    }
    if (event_press(XB1_PL1)) {
        nachRechts = 0;
        f_direction();
        combo_run(c_LaCroqueta);
    }
    if (event_press(XB1_PL2)) {
        nachRechts = 0;
        f_direction();
        combo_run(c_TurnSpin);
    }
    if (event_press(XB1_PR1)) {
        nachRechts = 1;
        f_direction();
        combo_run(c_LaCroqueta);
    }
    if (event_press(XB1_PR2)) {
        nachRechts = 1;
        f_direction();
        combo_run(c_ThreeTouchRoulette);
    }
    if (event_press(XB1_LB) && !firstpress) {
        combo_run(c_getsetDoppelklick);
    }
    else if (event_press(XB1_LB) && firstpress) {
        combo_run(c_block_Btn2);
        firstpress = FALSE;
        combo_run(c_FakeShot);
    }
    if (event_press(XB1_RB) && !firstpress) {
        combo_run(c_getsetDoppelklick);
    }
    else if (event_press(XB1_RB) && firstpress) {
        combo_run(c_block_Btn);
        firstpress = FALSE;
        combo_run(c_RFakeShot);
    }
}
 
 
combo c_LaCroqueta {
    set_val(XB1_LB, 100);
    set_val(XB1_RY, xachse);
    set_val(XB1_RX, yachse);
    wait(500);
    yachse = 0;
    xachse = 0;
}
 
combo c_TurnSpin {
    set_val(XB1_RY, get_val(XB1_LY));
    set_val(XB1_RX, get_val(XB1_LX));
    wait(60);
    wait(30);
    set_val(XB1_RY, xachse);
    set_val(XB1_RX, yachse);
    wait(60);
    yachse = 0;
    xachse = 0;
}
 
combo c_ThreeTouchRoulette {
    combo_run(c_OptionLT);
    set_val(XB1_RX, inv(get_val(XB1_LX)));
    set_val(XB1_RY, inv(get_val(XB1_LY)));
    wait(40);
    wait(60);
    set_val(XB1_RX, yachse);
    set_val(XB1_RY, xachse);
    wait(40);
    wait(60);
    yachse = 0;
    xachse = 0;
}
 
combo c_FakeShot {
    combo_run(c_OptionLB);
    set_val(XB1_B, 100);
    wait(40);
    set_val(XB1_A, 100);
    wait(40);
}
 
combo c_RFakeShot {
    set_val(XB1_B, 100);
    wait(40);
    set_val(XB1_A, 100);
    wait(40);
}
 
combo c_OptionLB {
    set_val(XB1_LB, 100);
    wait(350);
}
 
/* combo c_OptionRB {
    set_val(XB1_RB, 100);
    wait(350);
}
*/

 
 combo c_OptionLT {
    set_val(XB1_LT, 100);
    wait(350);
}
 
combo c_block_Btn {
    set_val(XB1_RB, 0);
    set_val(XB1_LB, 0);
    wait(300);
}
 
combo c_block_Btn2 {
    set_val(XB1_RB, 0);
    wait(300);
}
 
combo c_getsetDoppelklick {
    firstpress = TRUE;
    wait(TimeForDoubleTap);
    firstpress = FALSE;
}
 
/* function f_GetLXY() {
    xachse = get_val(XB1_LX);
    yachse = get_val(XB1_LY);
}
*/

 
 function f_direction() {
    xachse = get_val(XB1_LX);
    yachse = get_val(XB1_LY);
    if ((get_val(XB1_LX) >= 0) && (get_val(XB1_LY) >= 0)) {
        if (nachRechts > 0) {
            yachse = inv(yachse);
        }
        else {
            xachse = inv(xachse);
        }
    }
    if ((get_val(XB1_LX) <= 0) && (get_val(XB1_LY) >= 0)) {
        if (nachRechts > 0) {
            yachse = inv(yachse);
        }
        else {
            xachse = inv(xachse);
        }
    }
    if ((get_val(XB1_LX) <= 0) && (get_val(XB1_LY) <= 0)) {
        if (nachRechts > 0) {
            yachse = inv(yachse);
        }
        else {
            xachse = inv(xachse);
        }
    }
    if ((get_val(XB1_LX) >= 0) && (get_val(XB1_LY) <= 0)) {
        if (nachRechts > 0) {
            yachse = inv(yachse);
        }
        else {
            xachse = inv(xachse);
        }
    }
}
 
 
 
User avatar
Warsai
Staff Sergeant
Staff Sergeant
 
Posts: 12
Joined: Thu Jun 20, 2019 2:24 am
Location: LONDON

PreviousNext

Return to GPC Script Programming (Titan Two)

Who is online

Users browsing this forum: Albirewind, tatoforever and 7 guests