GTAOnline "No Lose/Quit Game" Script

****PC & XBOX ONE SCRIPT**** ****GTAOnline "NoLoseQuitGame" SCRIPT****
Version1.0
AuthorZanzo
Publish DateMon, 16 Sep 2019 - 06:41
Last UpdateMon, 16 Sep 2019 - 06:41
Downloads19
RATE


1

0

Release Notes: NOTE: This is my first script ever, so don't criticize my code too much lol Works as expected, but I plan on updating this script to clean the code up a bit as well as adjust the timings to make it a bit faster.
Code: Select all
/*
                   ****PC & XBOX ONE SCRIPT****
             ****GTAOnline-"NoLoseQuitGame"-SCRIPT****
*/

 
define speed=120;            // This number denotes both how long the button is held as well as how long of a pause is in-between button presses.
                            // Larger numbers slow the speed of turbo whereas smaller numbers increase the speed.
 
define waitSpeed=500;       // Wait time between button presses.
 
define turboButton=XB1_A;       // Button used for turbofire() combo.
define button=XB1_LS;           // Button used to activate the NoLoseQuitGame.
 
int loop;                   // Initialize keyword for our switch to turn this script on and off at will.
 
main {
 
    if (event_press(XB1_LS)) {combo_run(switch);}       // Press LS/L3 (identifier 8) to enable/disable this combo.
}
 
combo switch {                             // This runs the combo whenever the button (LT/L3 in this case) is pressed.
 
    combo_run(NoLoseQuit);   
 
}
 
combo NoLoseQuit {                         // Disconnect Internet and then call ExitGame() combo
    set_val(XB1_XBOX,100);
    wait (speed);
    set_val(XB1_XBOX,0);
    wait (waitSpeed);
    set_val(XB1_RB,100);
    wait (speed);
    set_val(XB1_RB,0);
    wait (waitSpeed);
    set_val(XB1_RB,100);
    wait (speed);
    set_val(XB1_RB,0);
    wait (waitSpeed);
    set_val(XB1_RB,100);
    wait (speed);
    set_val(XB1_RB,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (1000);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (2000);
    set_val(XB1_A,100);
    wait (1500);
    set_val(XB1_A,0);
    wait (2000);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (1000);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (4000);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (3000);
    set_val(XB1_B,100);
    wait (speed);
    set_val(XB1_B,0);
    wait (waitSpeed);
    set_val(XB1_B,100);
    wait (speed);
    set_val(XB1_B,0);
    wait (3000);
    combo_run(ExitGame);
}
 
combo ExitGame {                           // Exit the currently running game, then restart it.
    set_val(XB1_XBOX,100);
    wait (speed);
    set_val(XB1_XBOX,0);
    wait (3000);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_MENU,100);
    wait (speed);
    set_val(XB1_MENU,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (3000);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (1000);
}
 
combo QuitGame {                           // Alternate Exit/Restart Game Combo
    set_val(XB1_XBOX,100);
    wait (speed);
    set_val(XB1_XBOX,0);
    wait (2000);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_MENU,100);
    wait (speed);
    set_val(XB1_MENU,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_DOWN,100);
    wait (speed);
    set_val(XB1_DOWN,0);
    wait (waitSpeed);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (3000);
    set_val(XB1_A,100);
    wait (speed);
    set_val(XB1_A,0);
    wait (1000);
}