//

// toggleCast v1.1

// by Azul3z

//

// This script will allow you to toggle your abilities between quick-cast and normal-cast on the fly during games.

//

// It may be useful if you have a big, precision ult (like Faceless Void), or otherwise like to customize your heroes' cast modes individually.

//

//

// Usage:

// Set things up as detailed below.

// '[' will reset cast mode uniformly, as customized below.

// Hold ']' and press a cast key to swap between Normal and Quick casting for that ability.

//

// Changes:

// 1.1 - Changed key assignments to DOTA defaults for public compatibility

//

// ** FIVE IMPORTANT NOTES **

// 1. This script uses the (newish) 'say_student' command to give feedback to the user without annoying their team.

// ^ Might be useful for other scripts

// 2. Drop this in your 'SteamApps\Common\Dota 2\dota\cfg\' folder to use it. Add a line in your autoexec.cfg: 'exec togglecast.cfg'

// 3. It is *REQUIRED* that you unbind your unmodified (non-alt) ability keys in the DOTA SETTINGS MENU or this script WILL NOT WORK.

// 4. Main script, with CUSTOMIZATIONS DOWN at the BOTTOM! You probably shouldn't mess with what's between here and there.

// I guess you could change the text output if you wanted to. I kept labelling core to commands, ie ult is Ability 5

//

// ******

alias quick_0 "alias act_0 dota_ability_quickcast 0; say_student Ability 0 set QUICK; alias toggle_0 slow_0"

alias quick_1 "alias act_1 dota_ability_quickcast 1; say_student Ability 1 set QUICK; alias toggle_1 slow_1"

alias quick_2 "alias act_2 dota_ability_quickcast 2; say_student Ability 2 set QUICK; alias toggle_2 slow_2"

alias quick_3 "alias act_3 dota_ability_quickcast 3; say_student Ability 3 set QUICK; alias toggle_3 slow_3"

alias quick_4 "alias act_4 dota_ability_quickcast 4; say_student Ability 4 set QUICK; alias toggle_4 slow_4"

alias quick_5 "alias act_5 dota_ability_quickcast 5; say_student Ability 5 set QUICK; alias toggle_5 slow_5"

alias slow_0 "alias act_0 dota_ability_execute 0; say_student Ability 0 set NORMAL; alias toggle_0 quick_0"

alias slow_1 "alias act_1 dota_ability_execute 1; say_student Ability 1 set NORMAL; alias toggle_1 quick_1"

alias slow_2 "alias act_2 dota_ability_execute 2; say_student Ability 2 set NORMAL; alias toggle_2 quick_2"

alias slow_3 "alias act_3 dota_ability_execute 3; say_student Ability 3 set NORMAL; alias toggle_3 quick_3"

alias slow_4 "alias act_4 dota_ability_execute 4; say_student Ability 4 set NORMAL; alias toggle_4 quick_4"

alias slow_5 "alias act_5 dota_ability_execute 5; say_student Ability 5 set NORMAL; alias toggle_5 quick_5"

alias silent_reset_all_quick "alias act_0 dota_ability_quickcast 0;alias act_1 dota_ability_quickcast 1;alias act_2 dota_ability_quickcast 2;alias act_3 dota_ability_quickcast 3;alias act_4 dota_ability_quickcast 4;alias act_5 dota_ability_quickcast 5;alias toggle_0 slow_0; alias toggle_1 slow_1; alias toggle_2 slow_2; alias toggle_3 slow_3; alias toggle_4 slow_4; alias toggle_5 slow_5"

alias silent_reset_all_slow "alias act_0 dota_ability_execute 0;alias act_1 dota_ability_execute 1;alias act_2 dota_ability_execute 2;alias act_3 dota_ability_execute 3;alias act_4 dota_ability_execute 4;alias act_5 dota_ability_execute 5;alias toggle_0 quick_0; alias toggle_1 quick_1; alias toggle_2 quick_2; alias toggle_3 quick_3; alias toggle_4 quick_4; alias toggle_5 quick_5"

alias reset_all_quick "silent_reset_all_quick;say_student ALL Abilities set QUICK"

alias reset_all_slow "silent_reset_all_slow;say_student ALL Abilities set NORMAL"

// ******

//

// 5. *** Here are the some parts that you MAY need to personalize: ***

// These are now adjusted to use defaults for public posting.

//

// * Toggle and action bindings. My setup is 234yh5, but defaults are qwedfr.

//

// alias +bind_toggle "bind 2 toggle_0;bind 3 toggle_1;bind 4 toggle_2;bind 5 toggle_5;bind y toggle_3;bind h toggle_4"

// alias -bind_toggle "bind 2 act_0;bind 3 act_1;bind 4 act_2;bind 5 act_5; bind y act_3; bind h act_4"

alias +bind_toggle "bind q toggle_0;bind w toggle_1;bind e toggle_2;bind r toggle_5;bind d toggle_3;bind f toggle_4"

alias -bind_toggle "bind q act_0;bind w act_1;bind e act_2;bind r act_5; bind d act_3; bind f act_4"

// * I prefer to default to quick-cast. Swap these if you are similar of mind.

//

// bind [ reset_all_quick

// silent_reset_all_quick

bind [ reset_all_slow

silent_reset_all_slow

bind ] +bind_toggle