// DRANZER'S DOTA 2 AUTOEXEC CFG

// Last Updated on April 14th 2015

// Use as you will, but use at your own risk.

// !!! WARNING !!!

// READ THE COMMENTS BEFORE YOU PLUG THIS IN

// IT MAY OVERWRITE PRE-EXISTING SETTINGS

// !!! WARNING !!!

// SUMMARY OF FUNCTIONALITY:

// Sets up the minimap and enables some useful misc functionality.

// Provides toggle keys for certain settings.

// Creates binds for multiple chatwheels.

// Binds space to center camera on hero.

// Replaces default control group functionality with more general unit selection binds.

// (Still allows default behaviour via toggle.)

// Creates overloads for the D and F keys for heroes with less than 6 skills.

// IMPORTANT:

// This script makes certain assumptions about your control configuration.

// It assumes that your control group, skill and item keys are bound to their defaults.

// Before you begin, it is wise to unbind the following keys:

//

// Numbers 1-6 (Control groups, will be rebound with similar functionality)

// D and F (But ONLY from the hero hotkeys, will be rebound with similar functionality)

// T, Y, U (These will be rebound to multiple chatwheels)

// Space (Will be rebound to center the camera on the player)

// F4 (This will be bound to a "re-use courier" ping)

// Insert, Delete, Home, End, Pageup, Pagedown (These are typically unused)

// The entire Numpad (This is typically unused)

//

// If you want to clear a keybind in the options menu, click that command and then right click.

// If the above keys are not unbound, parts of this autoexec may not function properly.

// MINOR NOTES:

// All custom aliases are prefixed with "dz_" to prevent confusion.

// I use say_student to echo the functionality of toggles.

// Valve, if you're reading this, please implement a chat_echo function.

echo "autoexec.cfg loading begin"

// MINIMAP VISIBILITY AND MISC FUNCTIONALITY

// !!! WARNING !!! -The following settings will not be reset if you remove this autoexec.

// The minimap options are fairly self-explanatory.

// The range finder is a green line that shows up when you try to cast a skill.

// It helps you determine if you're in range to use the skill or not.

// allow_moveto_direction allows you to alt-click to basically disable pathfinding.

// auto_repeat_right_mouse makes holding right-click spam right-click.

dota_minimap_hero_size 750

dota_minimap_creep_scale 1.2

dota_minimap_ping_duration 9

dota_disable_range_finder 0

dota_unit_allow_moveto_direction 1

dota_player_auto_repeat_right_mouse 1

// MULTIPLE CUSTOM CHATWHEELS

// !!! WARNING !!! - These chatwheel bindings will overwrite your existing phrases.

// !!! WARNING !!! - If you make changes to the phrases within the client, they will not stick.

// The first chatwheel is for basic positioning calls.

// The second is for more flavor, things like thanks and sorry, etc.

// The third is mainly memephrases.

alias +chatwheel_basic "chat_wheel_phrase_0 8; chat_wheel_phrase_1 78; chat_wheel_phrase_2 2; chat_wheel_phrase_3 19; chat_wheel_phrase_4 29; chat_wheel_phrase_5 22; chat_wheel_phrase_6 12; chat_wheel_phrase_7 21; +chatwheel;"

alias -chatwheel_basic "-chatwheel;"

alias +chatwheel_banter "chat_wheel_phrase_0 70; chat_wheel_phrase_1 64; chat_wheel_phrase_2 69; chat_wheel_phrase_3 63; chat_wheel_phrase_4 54; chat_wheel_phrase_5 62; chat_wheel_phrase_6 65; chat_wheel_phrase_7 7; +chatwheel;"

alias -chatwheel_banter "-chatwheel;"

alias +chatwheel_other "chat_wheel_phrase_0 80; chat_wheel_phrase_1 26; chat_wheel_phrase_2 66; chat_wheel_phrase_3 27; chat_wheel_phrase_4 60; chat_wheel_phrase_5 67; chat_wheel_phrase_6 61; chat_wheel_phrase_7 79; +chatwheel;"

alias -chatwheel_other "-chatwheel;"

bind "t" "+chatwheel_basic"

bind "y" "+chatwheel_banter"

bind "u" "+chatwheel_other"

+chatwheel_basic;

-chatwheel_basic;

// RE-USE COURIER ANNOUNCEMENT

bind "F4" "chatwheel_say 44;"

// CAMERA LOCK

alias "+dz_camera_lock" "dota_camera_lock 1;"

alias "-dz_camera_lock" "dota_camera_lock 0;"

bind "space" "+dz_camera_lock"

// FUNCTIONALITY TOGGLES

// Toggles are as follows:

// Auto-Attack

// Post-Spell Auto-Attack

// Auto-Select Summoned Units

// Unified Attack Orders

alias "dz_autoattack_toggle"

alias "dz_psaa_toggle"

alias "dz_assu_toggle"

alias "dz_uao_toggle"

alias "dz_autoattack_on" "alias dz_autoattack_toggle dz_autoattack_off; dota_player_units_auto_attack 1; say_student AutoAttack: ON;"

alias "dz_autoattack_off" "alias dz_autoattack_toggle dz_autoattack_on; dota_player_units_auto_attack 0; say_student AutoAttack: OFF;"

alias "dz_postspellaa_on" "alias dz_postspellaa_toggle dz_postspellaa_off; dota_player_units_auto_attack_after_spell 1; say_student PostSpellAA: ON;"

alias "dz_postspellaa_off" "alias dz_postspellaa_toggle dz_postspellaa_on; dota_player_units_auto_attack_after_spell 0; say_student PostSpellAA: OFF;"

alias "dz_autoselect_on" "alias dz_autoselect_toggle dz_autoselect_off; dota_player_add_summoned_to_selection 1; say_student AutoSelect: ON;"

alias "dz_autoselect_off" "alias dz_autoselect_toggle dz_autoselect_on; dota_player_add_summoned_to_selection 0; say_student AutoSelect: OFF;"

alias "dz_unifiedorders_on" "alias dz_unifiedorders_toggle dz_unifiedorders_off; dota_player_multipler_orders 1; say_student UnifiedOrders: ON;"

alias "dz_unifiedorders_off" "alias dz_unifiedorders_toggle dz_unifiedorders_on; dota_player_multipler_orders 0; say_student UnifiedOrders: OFF;"

dz_autoattack_off

dz_postspellaa_on

dz_autoselect_on

dz_unifiedorders_on

bind INS dz_autoattack_toggle

bind DEL dz_postspellaa_toggle

bind PGUP dz_autoselect_toggle

bind PGDN dz_unifiedorders_toggle

// SMART CONTROL GROUPS

// Here's how it works: 1-6 will be rebound.

// 1: Select Hero

// 2: Select All Others

// 3: Select All

// 4: Toggle Auto-Select Summoned Units

// 5: Toggle Unified Attack Orders

// 6: Toggles above behaviour and default behaviour (1-5 will be standard control group keys)

alias "dz_smartgroups_toggle"

alias "dz_bind_smart_groups" "bind 1 +dota_camera_follow; bind 2 dota_select_all_others; bind 3 dota_select_all; bind 4 dz_assu_toggle; bind 5 dz_uao_toggle;"

alias "dz_bind_control_groups" "bind 1 +dota_control_group 1; bind 2 +dota_control_group 2; bind 3 +dota_control_group 3; bind 4 +dota_control_group 4; bind 5 +dota_control_group 5;"

alias "dz_smartgroups_on" "alias dz_smartgroups_toggle dz_smartgroups_off; dz_bind_smart_groups; say_student SmartGroups: ON;"

alias "dz_smartgroups_off" "alias dz_smartgroups_toggle dz_smartgroups_on; dz_bind_control_groups; say_student SmartGroups: OFF;"

dz_smartgroups_on

bind 6 dz_smartgroups_toggle

// HERO-SPECIFIC OVERLOADS

// !!! WARNING !!! - Read the following section CAREFULLY.

// First, a little preamble.

//

// When I was considering additional functionality that might be useful for certain heroes,

// it occured to me that not every hero uses the D and F skill hotkeys. This is in spite of

// the fact that those keys are prime real-estate. So why not rebind them for certain heroes

// which can benefit from such? The idea is that these custom bindings are bound to various

// numpad keys, and pressed once at the start of each match. This will auto-load configurations

// for specific heroes.

//

// There are two minor drawbacks to this method.

//

// Firstly, the need to unbind D and F in the options menu means those skills icons will not

// display their hotkey properly in the UI. The functionality is identical, but the appearance

// looks a little odd.

//

// The second is that the functionality is "sticky". What that means is when you set the

// functionality of the D/F keys, it stays like that until you either rebind it or restart

// the client. This is mainly just an inconvenience: If you play, say, Meepo, and then you

// play a game of, say, Invoker, your hotkeys may be messed up until you remember to reset

// them manually.

//

// It is my hope that Valve will eventually implement player-specific config files, thus

// rendering this entire set of macros useless.

// Here are the more general binds:

//

// Numpad 0: Default behavior.

// Numpad .: D will be bound to the D skill. F will be bound to item 6.

// Numpad +: D and F will be bound to items 5 and 6, respectively.

//

// These are hero specific:

//

// Numpad 1: Tinker

// D is bound to Item 6 (which I would probably use for Blink Dagger).

// F is bound to a specific macro that uses item 1, item 5, and then uses Rearm.

// It's designed with the intent to have Soul Ring in slot 1 and Bottle in slot 5.

// The idea is to provide a quick way of doing the Rearm juggle.

//

// Numpad 2: Lone Druid

// D is bound as usual. F is designed to use the bear's second item, which is where

// I usually stick Phase Boots. Another macro is provided (but unbound) which invokes

// the bear's blink.

//

// Numpad 3: Meepo

// D is bound to "quickcast net and then cycle to the next Meepo".

// F is bound to "quickcast poof and then cycle to the next Meepo".

// You could engineer more fancy ones, but these are the most reasonable I feel.

// Disclaimer: I have never played Meepo. I do appreciate his love of gingers, though.

//

// Numpad 4: Beastmaster

// D is bound as usual. F is bound to control group 9, mainly with the intent for it

// to be bound to his hawk. This may be useful for other micro heroes, actually.

alias dz_item_5 "dota_item_execute 4"

alias dz_item_6 "dota_item_execute 5"

alias dz_ability_d "dota_ability_execute 3"

alias dz_ability_f "dota_ability_execute 4"

alias dz_tinker_full_reload "dota_item_execute 0; dota_item_execute 4; dota_ability_execute 5;"

alias dz_lone_druid_bear_blink "dota_cycle_selected; dota_ability_execute 0; dota_cycle_selected;"

alias dz_lone_druid_bear_boots "dota_cycle_selected; dota_item_execute 1; dota_cycle_selected;"

alias dz_meepo_net_and_next "dota_ability_quickcast 0; dota_cycle_selected;"

alias dz_meepo_poof_and_next "dota_ability_quickcast 1; dota_cycle_selected;"

bind KP_0 "bind d dz_ability_d; bind f dz_ability_f; say_student DF Hotkeys: Skills;"

bind KP_DEL "bind d dz_ability_d; bind f dz_item_6; say_student DF Hotkeys: Skill/Item;"

bind KP_PLUS "bind d dz_item_5; bind f dz_item_6; say_student DF Hotkeys: Items;"

bind KP_1 "bind d dz_item_6; bind f dz_tinker_full_reload; say_student DF Hotkeys: Tinker;"

bind KP_2 "bind d dz_ability_d; bind f dz_lone_druid_bear_boots; say_student DF Hotkeys: Lone Druid;"

bind KP_3 "bind d dz_meepo_net_and_next; bind f dz_meepo_poof_and_next; say_student DF Hotkeys: Meepo;"

bind KP_4 "bind d dz_ability_d; bind f +dota_control_group 9; say_student DF Hotkeys: Beastmaster;"

bind d dz_ability_d

bind f dz_ability_f