# How to script autobuy of specific items

i was told / i read that it was possible to buy from shop via hotkeys. (not quickbuy)

i tried to build a script:

bind KP_8 shop_nav_to_search    //with the shop open, makes the search box active
bind KP_9 shop_nav_to_tab       //switch to a particular shop tab ( 0 - 12 )
bind KP_4 shop_select_itemrow   //not a real command? //buy ( or set quickbuy with shift held ) a particular displayed row


but this commands dont do anything. does any1 know more about these commands?

-
if you find a solution, please post an answer rather than editing the question. –  z ' Mar 5 '12 at 0:07
i dont think this is a full solution. when im off from work i wanted to give a solution with screenshots, etc. –  Wandang Mar 5 '12 at 7:36

As you can see the shop is a grid of items.

# Commands needed:

the command shop_nav_to_tab x is the column you want in x(0-9)

the command shop_select_itemrow x is the row you want in x(1-11)

example: you want town portal. this would be shop_nav_to_tab 0 and shop_select_itemrow 5

to buy items you need 2 more commands:

dota_shop_force_hotkeys x activates shopkeys(1) or disables them(0) toggleshoppanel just brings up the shop itself

# Building:

we need to combine them all into one command:

bind k "dota_shop_force_hotkeys 1;toggleshoppanel;shop_nav_to_tab 0;shop_select_itemrow 5;toggleshoppanel;dota_shop_force_hotkeys 0"

would bind buying a town portal to the key k.

you can bind as many items as u want to one key. just add them after toggleshoppanel:

bind j "clarity+tango+healing_salve" "dota_shop_force_hotkeys 1;toggleshoppanel;shop_nav_to_tab 0;shop_select_itemrow 1;shop_nav_to_tab 0;shop_select_itemrow 2;shop_nav_to_tab 0;shop_select_itemrow 3;toggleshoppanel;dota_shop_force_hotkeys 0"
//                                                                                    (0/1)=clarity                             (0/2)=Tango                           (0/3)=Healing_Salve


## Extras:

for a better overview of the things you do you can use alias "namethecommandiwant"

for example:

alias "tp" "dota_shop_force_hotkeys 1;toggleshoppanel;shop_nav_to_tab 0;shop_select_itemrow 5;toggleshoppanel;dota_shop_force_hotkeys 0"

bind k "tp"


is the same code as above! you can just see the binding more clearly.

the clarity combo would be the following:

alias "clarity+tango+healing_salve" "dota_shop_force_hotkeys 1;toggleshoppanel;shop_nav_to_tab 0;shop_select_itemrow 1;shop_nav_to_tab 0;shop_select_itemrow 2;shop_nav_to_tab 0;shop_select_itemrow 3;toggleshoppanel;dota_shop_force_hotkeys 0"
//                                                                                    (0/1)=clarity                             (0/2)=Tango                           (0/3)=Healing_Salve
bind j "clarity+tango+healing_salve"

-
nice, where do you put this script so its activated every time you start up dota2? –  z ' Mar 5 '12 at 22:53
just put the code into a textfile and call it autoexec.cfg. then move this file to "\Steam\SteamApps\common\dota 2 beta\dota\cfg\" . if you need more help feel free to ask (i wrote several scripts for different heroes). regards –  Wandang Mar 5 '12 at 23:48