Toggable turbo for all buttons

This mod allows you to have turbo for all buttons!
Version1.00
AuthorDarkKiritoV
Publish DateSun, 6 Nov 2022 - 01:26
Last UpdateSun, 6 Nov 2022 - 01:26
Downloads216
RATE


0

0

Code: Select all
/*
Script Made By DarkKiritoV
turboallxb1.gpc
 
Intructions:
 
Press view/select to toggle the mod.
 
Extra info:
If you want to change the time between button presses then change the "waittime" below (10 - 4000).
ONLY ONE turbo can be activated at once!
 
IMPORTANT!!:
MAKE SURE TO DISABLE THE MOD BEFORE YOU ARE DONE USING!!
*/

 
int waittime = 10;
 
int mode = 0;
int currentlyheld;
int curbutton;
main {
 
    if (get_val(XB1_VIEW) && currentlyheld == FALSE)
    {
        currentlyheld = TRUE;
        mode++;
        if (mode >= 2) mode = 0;
    }
    if (!get_val(XB1_VIEW)) currentlyheld = FALSE;
    if(mode >= 1) combo_run(Turbo_1);
    set_val(TRACE_1, mode);
    set_val(TRACE_2, currentlyheld);
 
}
 
combo Turbo_1 {
    curbutton = 21; // unused
    if (get_val(0)) curbutton = 0; //XB1_XBOX
    if (get_val(1)) curbutton = 1; //XB1_VIEW
    if (get_val(2)) curbutton = 2; //XB1_MENU
    if (get_val(3)) curbutton = 3; //XB1_RB
    if (get_val(4)) curbutton = 4; //XB1_RT
    if (get_val(5)) curbutton = 5; //XB1_RS
    if (get_val(6)) curbutton = 6; //XB1_LB
    if (get_val(7)) curbutton = 7; //XB1_LT
    if (get_val(8)) curbutton = 8; //XB1_LS
    if (abs(get_val(9)) >= 20) curbutton = 9;    //RX
    if (abs(get_val(10)) >= 20) curbutton = 10//RY
    if (abs(get_val(11)) >= 20) curbutton = 11//LX
    if (abs(get_val(12)) >= 20) curbutton = 12//LY
    if (get_val(13)) curbutton = 13; //XB1_UP
    if (get_val(14)) curbutton = 14; //XB1_DOWN
    if (get_val(15)) curbutton = 15; //XB1_LEFT
    if (get_val(16)) curbutton = 16; //XB1_RIGHT
    if (get_val(17)) curbutton = 17; //XB1_Y
    if (get_val(18)) curbutton = 18; //XB1_B
    if (get_val(19)) curbutton = 19; //XB1_A
    if (get_val(20)) curbutton = 20; //XB1_X
    if (curbutton != 21 && curbutton != 9 && curbutton != 10 && curbutton != 11 && curbutton != 12) set_val(curbutton, 100);
    if (curbutton >= 9 && curbutton <= 12) set_val(curbutton, get_val(curbutton))
    wait(waittime);
    set_val(curbutton, 0);
}