/*
* ===============================================================================================================================================
* Author: Shadohz
* Game: Sacred 3
* 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/et3l-gbku-u1ce-rf7h. This source is not licensed under "open-source", "public
* domain", nor "source-available". Modification and redistribution requires prior approval. [email protected]
* ===============================================================================================================================================
*/
/*
* ===============================================================================================================================================
* HOW TO USE
* CONFIGURATION - The following options must be set after initializing the configuration setup.
*
* 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 10
* timer is reset after each button press to allow you plenty of time to set your cooldowns.
*
* Press D-PAD LEFT or D-PAD RIGHT to increase or decrease Bash Attack cooldown.
* Press D-PAD LEFT/RIGHT to lower and raise the cooldown for Bash Attack. The minimal value is 1. The maximum value is 10. This translates to a
* a range of 100ms to 1000ms (1 full second max). The default value is 600ms. This the lowest tested value that will allow for Stage 2 Bash.
*
* Press D-PAD UP or D-PAD DOWN to increase or decrease power cycle frequency.
* Press D-PAD UP/DOWN to lower and raise the frequency of combo powers. The inherited default value is one-per second. If you notice your
* character is not cycling through their powers correctly or you would like to slow down how often your character uses their powers then raise
* or lower the value. This will effectively make your character use basic attack more/less often depending on what you set it to.
*
* Automatic Interact, Execute, Battle Prayer
* Press Y, LEFT TRIGGER, and/or RIGHT TRIGGER respective to the powers to have them automatically ran while outside of the combos (real-time
* running).
* Note: Pressing the XBOX MENU button will disable the enable powers temporarily. You can press the LEFT STICK (post configuration) to re-enable
* the automatic powers or re-enter the configuration setup and press their respective buttons again.
*
* Display Gold
* Display Gold is enabled by default. You can press SELECT while in the configuration setup to disable or re-enable it. Display Gold will show
* once automatically after you exit combat (LEFT STICK).
*
* Press LEFT STICK to reset defaults.
* Press LEFT STICK to reset the default values of the Auto-powers (back to disabled) and coolddown for Bash.
* ===============================================================================================================================================
*/
/*
* ===============================================================================================================================================
* HOW TO USE
* POST-CONFIGURATION (IN-GAME USE) - These are the features you will use after setting up your kit's configuration.
*
* 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 B 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 prioritize escape.
*
* Press the Y Button to interupt Auto-Interact.
* This is useful for cases such as when you want to grap a bomb or hold charge for an event.
*
* 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).
*
* All the the controller buttons are assigned in the DEFINES section. You can change these to suit your controller change needs. Be sure to test
* the script to confirm your changes are funtional.
*
* Character recommendations: As with all RPGS that I like to player, I prioritize AoE, Radius, Heal on Kill/Hit, Additional projectile, and
* Critical Chance bonuses over Damage (DPS or Critical Damage). Increase duration, debuff, recharge time tend to be situational.
*
* Alithea - Leech Swarm/Poison Sweep, Crystal Rupture. Her problem is staying alive long enough to produce good damage. If you have trouble with
* going down frequently then choose Leech Swarm over Poison Sweep.
*
* Claire - Holy Word/Chain Lightning, Vortex. You have a combination of low casting times, increased radius damage, and AoE damage. Chain
* Lightning is a fair substitute.
*
* Marak - Fireblade, Stomp/Meteor Storm. Meteor Storm is great for bosses and sub-bosses. Stomp is great for dispatching large groups. You'll
* want to alternate betwen the two if you find yourself having a difficult time completing a map. I'm not a fan of this character's Light Combat
* Arts, so I reluctantly chose Fireblade for the range. The other two close-range attacks are viable options though.
*
* Vajra - Piercing Shot/Hailstorm, Tempest. You can't really go wrong with this character. Piercing Shot is great for single unit DPS. Hailstorm
* gives you more of a radius attack. I go with Tempest because I'm not particularly found of the other two lob-and-leap ice attacks. I prefer to
* aim-and-shoot while still and only moving when it's necessary to dodge.
* ===============================================================================================================================================
*/
/*
* ===============================================================================================================================================
* VERSION CHANGES
*
* 1.10 - Fixed issue XBOX MENU not disabling combo. Increased EXECUTE action to land more technical points. Fixed blinking lights. HEAVY ATTACK
* will now use full possible damage instead of minimum, using least amount of buildup. WAIT redundancies removed.
*
* 2.00 - Added configuration option to allow for increasing/decreasing charge-up time for Bash. Increased INTERACT action to garner more grabs.
* Reduced power cycles down to three (3) elements instead of four (4). Added option to display Gold while combos are running. Added automatic
* options for Interact, Execute, and Battle Prayer. Added option to display Gold during combat.
*
* 2.10 - Fixed issues with auto-Interact, Execute, and Battle Prayer not running concurrently. Changed behavior so that if Auto-powers are
* enabled then the combo ignores active Auto-powers to prevent looping and decreasing overall Wait time. Reduced power cycles down to 2 elements.
* Added a feature to reset the default values for Bash and Auto-Powers.
*
* 2.20 - Added feature that suspends Auto-Interact when the user presses the Interact button. Pressing LEFT STICK re-engages the Auto-Interact.
* Added feature to lower and raise the power cycle frequency (i.e. how often Bash, Interact, etc. repeats). The range is 1-10 seconds. Display
* Gold now only prompts once after you exit combat.
* ===============================================================================================================================================
*/
/*
* ===============================================================================================================================================
* DEFINES
* ===============================================================================================================================================
*/
define StartButton = XB360_LS; // Button used to activate all combos.
define Interact = XB360_Y; // Button assigned to Interact.
define Defend = XB360_B; // Button assigned as Defend.
define Bash = XB360_X; // Button assigned as Bash.
define Attack = XB360_A; // Button assigned as Attack.
define LCArt = XB360_LB; // Button assigned as Light Combat Art.
define HCArt = XB360_RB; // Button assigned as Heavy Combat Art.
define Execute = XB360_LT; // Button assigned as Execute.
define BPrayer = XB360_RT; // Button assigned as Battle Prayer.
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 ConfigTimeout = 3; // The amount of time alloted before the Configuration options automatically closes.
/*
* ===============================================================================================================================================
* MAPPINGS
* ===============================================================================================================================================
*/
unmap StartButton;
/*
* ===============================================================================================================================================
* INITIALIZED VARIABLES
* ===============================================================================================================================================
*/
// No need to change anything else
int CdTime0=600, CdTime1=1, CdTime2, CdCheck;
int led, currentled, run, reset, recycle, w, x, y, z;
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;
int DisplayGold=1;
int AutoInt, AutoExe, AutoBPray;
init {
led = 0;
reset_leds();
while(led<4){
if(get_led(led)==1) currentled = led;
led = led+1;
}
}
// End Initialization
/*
* ===============================================================================================================================================
* MAIN
* ===============================================================================================================================================
*/
main {
set_val(TRACE_1,AutoInt); // Seconds
set_val(TRACE_2,AutoExe); // Seconds
set_val(TRACE_3,AutoBPray); // Seconds
set_val(TRACE_4,CdTime0); // 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_led(currentled,2);
configsetup = TRUE;
seconds0=0;
CdCheck=1;
}
}
if (seconds0>=ConfigTimeout && configsetup == TRUE) {
configsetup = FALSE;
reset_leds();
}
if (event_press(XB360_LS) && configsetup == TRUE) {
seconds0 = 0;
AutoInt = 0;
AutoExe = 0;
AutoBPray = 0;
CdTime0 = 600;
CdTime2 = 0;
DisplayGold=1;
}
if (event_press(XB360_LEFT) && configsetup == TRUE) {
if (CdTime1 <= 0) {
CdTime1 = 1;
CdTime0 = CdTime1 * 100;
seconds0=0;
} else {
CdTime1 = CdTime1 - 1;
CdTime0 = CdTime1 * 100;
seconds0=0;
}
} else if (event_press(XB360_RIGHT) && configsetup == TRUE) {
if (CdTime1 >= 10) {
CdTime1 = 10;
CdTime0 = CdTime1 * 100;
seconds0=0;
} else {
CdTime1 = CdTime1 + 1;
CdTime0 = CdTime1 * 100;
seconds0=0;
}
} else if (event_press(XB360_DOWN) && configsetup == TRUE) {
if (CdTime2 <= 0) {
CdTime2 = 0;
seconds0=0;
} else {
CdTime2 = CdTime2 - 1;
seconds0=0;
}
} else if (event_press(XB360_UP) && configsetup == TRUE) {
if (CdTime2 >= 10) {
CdTime2 = 10;
seconds0=0;
} else {
CdTime2 = CdTime2 + 1;
seconds0=0;
}
}
if (event_press(XB360_BACK) && configsetup == TRUE) {
if (DisplayGold == 1) {
DisplayGold = 0;
seconds0=0;
} else {
DisplayGold = 1;
seconds0=0;
}
}
if (event_press(Interact) && configsetup == TRUE) {
if (AutoInt >= 1) {
AutoInt = 0;
seconds0=0;
} else {
AutoInt = 1;
seconds0=0;
}
}
if (event_press(Execute) && configsetup == TRUE) {
if (AutoExe >= 1) {
AutoExe = 0;
seconds0=0;
} else {
AutoExe = 1;
seconds0=0;
}
}
if (event_press(BPrayer) && configsetup == TRUE) {
if (AutoBPray >= 1) {
AutoBPray = 0;
seconds0=0;
} else {
AutoBPray = 1;
seconds0=0;
}
}
/*
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) {
combo_run (Gold);
run = 0;
} else {
run = 1;
if (AutoInt > 1) {AutoInt = 1};
if (AutoExe > 1) {AutoExe = 1};
if (AutoBPray > 1) {AutoBPray = 1};
}
} else if (event_press(XB360_BACK) || event_press(XB360_START) && configsetup == FALSE) {
run = 0;
if (AutoInt == 1) {AutoInt = 2};
if (AutoExe == 1) {AutoExe = 2};
if (AutoBPray == 1) {AutoBPray = 2};
} else if (event_press(XB360_XBOX) && configsetup == FALSE) {
run = 0;
if (AutoInt == 1) {AutoInt = 2};
if (AutoExe == 1) {AutoExe = 2};
if (AutoBPray == 1) {AutoBPray = 2};
} else if(event_press(Defend) && configsetup == FALSE) {
run=0;
}
if (event_press(Interact) && AutoInt == 1 && configsetup == FALSE) {AutoInt = 2};
if (AutoInt == 1 && configsetup == FALSE) {combo_run(AutoInteract)};
if (AutoExe == 1 && configsetup == FALSE) {combo_run(AutoExecute)};
if (AutoBPray == 1 && configsetup == FALSE) {combo_run(AutoBPrayer)};
}
// End Main
/*
* ===============================================================================================================================================
* COMBINATIONS
* ===============================================================================================================================================
*/
combo Control {
set_led(currentled, 0);
set_val(Defend, 0); // Using DEFEND breaks player out of combos.
if (seconds2 > CdTime2 && CdCheck == 1) {
if (recycle == 0) {w=Interact;x=Execute;y=BPrayer;z=LCArt;}
else if (recycle == 1) {w=Interact;x=Execute;y=BPrayer;z=HCArt;}
else if (recycle == 2) {w=0;x=0;y=0;z=Bash;}
if (recycle == 2) {combo_run (Power1Sub)}
else if (recycle < 2) {combo_run(Power2Sub)};
} else if (run == 1) {
combo_run (Shoot1Sub);
}
}
// End Combo
combo Power1Sub {
set_led(currentled, 1);
set_val(z, 100);
wait (CdTime0);
recycle=recycle+1;
if (recycle > 2) {recycle = 0};
CdCheck=0;
seconds2=0;
}
//End Combo
combo Power2Sub {
set_led(currentled, 1);
if (!w == 0 && AutoInt < 1) {set_val(w, 100)};
if (!x == 0 && AutoExe < 1) {set_val(x, 100)};
if (!y == 0 && AutoBPray < 1) {set_val(y, 100)};
wait (HoldTime);
set_val(z, 100);
wait (HoldTime);
recycle=recycle+1;
if (recycle > 2) {recycle = 0};
CdCheck=0;
seconds2=0;
}
//End Combo
combo Shoot1Sub {
set_led(currentled, 1);
set_val(Attack, 100);
wait(HoldTime);
CdCheck=1;
}
// End Combo
combo Gold {
if (DisplayGold == 1) {
set_val(XB360_BACK, 100);
}
}
// End Combo
combo AutoInteract {
set_val(Interact, 100);
wait(HoldTime);
set_val(Interact, 0);
}
// End Combo
combo AutoExecute {
set_val(Execute, 100);
wait(HoldTime);
set_val(Execute, 0);
}
// End Combo
combo AutoBPrayer {
set_val(BPrayer, 100);
wait(HoldTime);
set_val(BPrayer, 0);
}
// End Combo\0