Dungeon Siege III

This a quick-click script that automatically does basic attack as well cycle through the players offensive and defensive skills, including mastered versions. Press Left Stick to activate and deactivate the combos. Selecting Defense deactivates the combos.
Version1.00
AuthorShadohz
Publish DateSat, 19 Dec 2015 - 03:12
Last UpdateTue, 7 Jun 2016 - 15:40
Downloads42
RATE


2

0

Release Notes: Base version created.
Code: Select all
/*
* ===============================================================================================================================================
* Author:           Shadohz
* Game:             Dungeon Seige III
* 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/ndsn-xcjk-4t8f-tbe8. 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 LEFT STICK to activate automatic combos.
* Press the left stick to begin auto-attacking and powerspamming. Press the Left stick again to deactivate the combos.
*
* Press the LT Button to begin defending.
* Pressing DEFEND breaks the player out of the combos. The scripts assumes that the player is under threat and needs to proritze escape.
*
* 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).
* ===============================================================================================================================================
*/

 
/*
* ===============================================================================================================================================
* VERSION CHANGES
*
* 1.00 - Base version created.
* ===============================================================================================================================================
*/

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

define StartButton = XB360_LS;      // Button used to activate all combos.
define Defend = XB360_LT;           // Button assigned as Defend
define HoldTime = 100;              // Hold: How long to hold down the Combo button.
define RestTime = 400;              // 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=3;             // 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, w, x, y, z, 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 Defend 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_DOWN) && configsetup == TRUE) {
        ConfigSelect = 0;
        CdTime1=0;
        CdTime2=0;
    }
     if(event_press(XB360_UP) && configsetup == TRUE)  {
       ConfigSelect = 1;
        CdTime1 = CdTime1 + CdMultiplier;
        seconds0=0;
        seconds1=100;
    }
 
/*
POST-CONFIGURATION
*/

    if(run == 1 && configsetup == FALSE) {
        combo_run(Control);
    } else {
        combo_stop(Control);
        reset_leds();
    }   
 
    if(event_press(StartButton) && configsetup == FALSE) {
        if(run == 1) {
            run = 0;
        } 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(Defend) && configsetup == FALSE) {
        run=0;
      run=0;
    }
}
// End Main   
 
/*
* ===============================================================================================================================================
* COMBINATIONS
* ===============================================================================================================================================
*/

combo Control {
    set_led(currentled,0);
    set_val(Defend, 0);    // Deactivates Defend to start combos.
    if (seconds1 > CdTime1 && CdCheck == 1) {
        if (x == 0) {y=XB360_LT;z=XB360_X}
        else if (x == 1) {y=XB360_LT;z=XB360_Y}
        else if (x == 2) {y=XB360_LT;z=XB360_B}
        else if (x == 3) {y=XB360_RT;z=XB360_X}
        else if (x == 4) {y=XB360_RT;z=XB360_Y}
        else if (x == 5) {y=XB360_RT;z=XB360_B}
        else if (x == 6) {y=0;z=XB360_X}
        else if (x == 7) {y=0;z=XB360_Y}
        else if (x == 8) {y=0;z=XB360_B}
 
    combo_run (Power1Sub);       
    } else if (run == 1) {
        combo_run (Shoot1Sub);
    }
}
// End Combo
 
combo Power1Sub {
    set_led(currentled,1);
    if (!y==0) {set_val(y, 100);set_val(z, 100)};
    wait (RestTime);
//    set_val(z, 100);
//    wait (HoldTime);
//    set_val(z, 0);
//    if (!y==0) {set_val(y, 0)};
//    wait (HoldTime);
    if (y==0) {set_val(z, 100)};
    wait (HoldTime);
    w=w+1;
    x=x+1;
    if (w > 3) {w = 0};
    if (x > 8) {x = 0};
    CdCheck=0;
    seconds1=0
}
//End Combo
 
combo Shoot1Sub {
    set_led(currentled,1);
    set_val(XB360_A, 100);
    wait(HoldTime);
}
// End Combo\0