Saints Row - All Editions

This script is designed to automatically fire weapons and cycle through superpowers with a single-click. On versions of Saints Row prior to 4, throwable weapons will be spammed with the automatic fire. There is a separate fire mode for charge-up, burst, and automatic weapons. This script has been tested on the following Saints Row versions: Saints Row 1 Saints Row 2 Saints Row: The Third Saints Row 4 Saints Row: Gat Out Of Hell
Version1.20
AuthorShadohz
Publish DateTue, 1 Sep 2015 - 17:47
Last UpdateTue, 7 Jun 2016 - 15:46
Downloads44
RATE


1

0

Release Notes: Fixed issue with XBOX MENU popping up due to a variable not initialized correctly. Added feature to disable combos after pressing XBOX MENU.
Code: Select all
/*
* ===============================================================================================================================================
* Author:           Shadohz
* Game:             Saints Row - All Editions
* System:           Xbox 360
* Controller:       Xbox 360 Controller
* Game Settings:    Default
* Website:          https://www.youtube.com/user/Shadohz75
* Copyright:        Copyright � 2015, 2016 Shadohz, 5Y5T3M 0V3RL04D. All Rights Reserved.
* Restrictions:     http://www.copyrighted.com/copyrights/view/hfhx-pnsu-zemx-nrxm. This source is not licensed under "open-source", "public
*                   domain", nor "source-available". Modification and redistribution requires prior approval. [email protected]
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* HOW TO USE
*
* Press START and BACK to initialize the configuration setup. You will have 5 seconds to respond before the configuration setup automatically
* closes. When selecting a combination with cooldowns the 5-sec timer is reset after each button press to allow you plenty of time to set your
* cooldowns.
*
*
* Press D-PAD UP to reset all cooldown times and configurations.
* Press this button if you need to reset the timers or configuration.
*
*
* Press D-PAD LEFT to set the cooldown timer for powers and throwables.
* Minimum recommneded for throwables (grenades etc): 10 seconds (Saints Row 3 and earlier)
* Minimum recommended for superpowers: 2 seconds (Saints Rows 4 and later).
* Press this button repeatedly to add time to the cooldown for superpowers and/or throwable weapons.
*
*
* Press D-PAD RIGHT to set the secondary fire mode timing (for charge up, burst, and automatic weapons).
* Minimum recommended: 2 seconds (all editions).
* Certain weapons (charge up, burst, and automatic) will not fire correctly under normal rapid fire settings. You can switch between firemodes by
* pressing LEFT STICK.
 
* Press LEFT STICK to activate automatic shooting and superpower/throwables and to switch between firemodes.
* Press the RIGHT STICK once to begin automatic shooting and superpower/throwable weapon spamming. The script will cycle through the superpowers.
* Press the button again switch to the secondary firemode. Pressing the button again will switch back to primary firing mode. This is handy for
* quick-switching between weapons.
*
*
* Press RIGHT STICK or LB (Sprint) to deactivate automatic shooting and superpower/throwable weapon spam.
* Cooldown timer(s). To reset the times back to zero (0) you must press START & BACK then UP, DOWN or LEFT TRIGGER.
*
*
* IMPORTANT NOTES:
* The combo activation button is unmapped by default (in DEFINES section). To change button, enter a new button name in that section (for
* STARTBUTTON). To disable throwable weapons, set TARGETBUTTON1 to same button as firing (i.e. RIGHT TRIGGER).
*
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* VERSION CHANGES
*
* 1.10 -  Updated Important Notes. Remmed out a few non-essential commands. Still trying to determine why CT triggers XBMenu the first time the
* script is ran. It's more an annoyance than a problem because it only occurs on the first instance.
*
* 1.20 - Fixed issue with XBOX MENU popping up due to a variable not initialized correctly. Added feature to disable combos after pressing XBOX
* MENU.
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* DEFINES
* ===============================================================================================================================================
*/

define StartButton = XB360_LS;      // Button used to activate all combos.
define Sprint = XB360_LB;           // Button assigned as Sprint
define DisableRun = XB360_RS;       // Button used to deactive all combos.
define TargetButton1 = XB360_RB;    // The target button can be changed to whatever you like but do not change the ConfirmButton or CancelButton.
define HoldTime = 100;              // Hold: How long to hold down the Combo button.
define RestTime = 500;              // Rest: How long to wait before pressing the Combo button again.
define CdMultiplier=1;              // The number of seconds to increase between D-PAD presses for Cooldown timers.
define ConfigTimeout=5;             // The number of seconds before the Config Setup automatically closes.
unmap StartButton;
/*
* ===============================================================================================================================================
* INITIALIZED VARIABLES
* ===============================================================================================================================================
*/

// No need to change anything else
int CdTime1, CdTime2, CdTime3, CdCheck;
int led, currentled, run, reset, x, y, CdWait;
int configsetup=FALSE;
int timelimit=1000;
int seconds0, seconds1, seconds2;
int minutes=0;
int hours=0;
int Start_at=FALSE;
int Finish_at=TRUE;
int refresh=FALSE;
int ConfigSelect=0;
 
init {
    led = 0;
    reset_leds();
    while(led<4){
        if(get_led(led)==1) currentled = led;
        led = led+1;
    }
}
// End Initialization
 
/*
* ===============================================================================================================================================
* MAIN
* ===============================================================================================================================================
*/

main {
//    swap(XB360_LS,XB360_RS);      // Target mode is disabled and swapped for Sprint to Right Stick.
 
//    set_val(TRACE_1,x);             // Seconds
//    set_val(TRACE_2,seconds0);      // Seconds
//    set_val(TRACE_3,seconds1);      // Seconds
//    set_val(TRACE_4,seconds2);      // Cooldown timer 1
//    set_val(TRACE_5,CdTime1);       // Cooldown timer 2
//    set_val(TRACE_6,CdTime2);       // Cooldown timer 3
    //set_val(TRACE_3,minutes);     // Minutes
    //set_val(TRACE_4,hours);       // hours
    //set_val(TRACE_5,Start_at);    // Start_at
 
    if(CdCheck == 0){Start_at=TRUE;Finish_at=FALSE;timelimit=1000;}
 
    if(Start_at && (minutes>0 && minutes<55) )refresh=TRUE
    else refresh=FALSE;
 
    if(Start_at )
    {// Timer count seconds, minutes, hour
       timelimit=timelimit- get_rtime();
        if( timelimit<=0) {seconds0=seconds0+1;seconds1=seconds1+1;seconds2=seconds2+1;timelimit=1000; } // seconds count
      //  if( timelimit<=0) {seconds3=seconds3+1;timelimit=1000; } // seconds count
      // if( seconds>=60 )  // minutes count
      //   {seconds=0;
      //    minutes= minutes+1;
      //    timelimit=1000;
      // if(refresh)combo_run(RelistALL);
      //   }
 
 //      if( minutes>=60) {minutes=0; hours=hours+1;} // hours count
 
    }
 
/*
PRE-CONFIGURATION
*/

   if(((event_press(XB360_START)) && (get_val(XB360_BACK)> 0)) || ((get_val(XB360_START)>0) && (event_press(XB360_BACK)))) {
        if(configsetup == TRUE) {
            configsetup = FALSE;
        } else {
            set_ledx(currentled, (ConfigTimeout*5));
            configsetup = TRUE;
            seconds0=0;
            CdCheck=1;
        }
    }
    if (seconds0>=ConfigTimeout && configsetup == TRUE) {
        configsetup = 0;
    }
 
    if(event_press (XB360_UP) && configsetup == TRUE) {
        ConfigSelect = 0;
        CdTime1=0;
        CdTime2=0;
    }
     if(event_press(XB360_LEFT) && configsetup == TRUE)  {
       ConfigSelect = 1;
        CdTime1 = CdTime1 + CdMultiplier;
        seconds0=0;
        seconds1=100;
    }
    if(event_press(XB360_RIGHT) && configsetup == TRUE)  {
       ConfigSelect = 2;
        CdTime2 = CdTime2 + CdMultiplier;
        seconds0=0;
        seconds2=100;
    }
 
/*
POST-CONFIGURATION
*/

    if((event_press(TargetButton1) && ConfigSelect==1) || (event_press(TargetButton1) && ConfigSelect==2) && configsetup == FALSE) {
        CdCheck=0;
        seconds1=0;
        seconds2=0;
    }
 
    if(run == 1 && configsetup == FALSE) {
        combo_run(Control);
    } else if (run == 2 && configsetup == FALSE) {
        combo_run(Control);
    } else {
        combo_stop(Control);
    }   
 
    if(event_press(StartButton) && configsetup == FALSE) {
        if(run == 1) {
            run = 2;
            reset_leds();
        } else {
            run = 1;
        }
    } else if ((event_press(XB360_BACK) || event_press(XB360_START) || event_press(XB360_XBOX)) && configsetup == FALSE) {
        run = 0;
    } else if(event_press(Sprint) && configsetup == FALSE) {
        run=0;
    } else if(event_press(DisableRun) && configsetup == FALSE) {
        run=0;
    }
}
// End Main   
 
/*
* ===============================================================================================================================================
* COMBINATIONS
* ===============================================================================================================================================
*/

combo Control {
    set_led(currentled,2);
    set_val(Sprint, 0);    // Deactivates Sprint to start combos.
    if (seconds1 > CdTime1 && CdCheck == 1) {
        if (x == 0) {y=XB360_UP}
        else if (x == 1) {y=XB360_RIGHT}
        else if (x == 2) {y=XB360_DOWN}
        else if (x == 3) {y=XB360_LEFT}
    combo_run (Power1Sub);       
// Cooldown timer is reset if player manually uses the ability.
    } else if (event_press(TargetButton1)) {
        CdCheck=0;
        seconds1=0;
    } else if (run == 1) {
        combo_run (Shoot1Sub);
    } else if (run == 2) {
        combo_run (Shoot2Sub);
    }
    wait(HoldTime);
}
// End Combo
 
combo Power1Sub {
    wait (HoldTime);
    set_val(y, 100);
    wait (HoldTime);
    set_val(y, 0);
    wait (HoldTime);
    set_val(TargetButton1, 100);
    wait (HoldTime);
    set_val(TargetButton1, 0);
    wait (HoldTime);
    x=x+1;
    if (x > 3) {x = 0};
    CdCheck=0;
    seconds1=0
}
//End Combo
 
combo Shoot1Sub {
    wait(HoldTime);
    set_val(XB360_RT, 100);
    wait(HoldTime);
    CdCheck=1;
}
// End Combo
 
combo Shoot2Sub {
    if (CdTime2 > 4) {
        CdWait=4000;
    } else if (CdTime2 == 0) {
        CdWait=10;
    } else CdWait = CdTime2 * 1000;
    set_val(XB360_RT, 100);
    wait(CdWait) ;
    set_val(XB360_RT, 0);
    wait (HoldTime);
    CdCheck=1;
}
// End Combo
 
combo WaitUp {
wait (HoldTime)
}
// End Combo
\0