Hotkey to send hero back to base

Solution 1:

In dota 2, to be able to go back to the fountain with any heroes you need to own either a TP Scroll or Boots of Travel. If you have one of those in your inventory you can double tap the hotkey of the inventory slot to teleport to fountain. Hotkeys for inventory slot can be set in the parameters menu.

If your question concerns the action "Walk back to the fountain", there are none such command (unlike courier who has a "back to the fountain" action).

Solution 2:

I tried to make a quick script here it is:

alias +base "dota_camera_setpos -7008.000000 -7367.000000 1243.072876"

alias -base "dota_camera_center"

bind k "+base"

Drawbacks:

  1. This doesn't cause your hero to move automatically, but only moves your camera to the fountain. You still have to manually right click or give the move command.

  2. On releasing the button, in this case "k" the camera centers and follows the hero. Unless this is disabled by edge panning(move the mouse till the camera stop following the hero), you won't be able to press the button("k" in this case) and look at the fountain.

If anyone could improve or find a solution to these drawbacks, I'd much appreciate it. Hope it helped you. Edit: Replace "k" with the button of your choice.

Solution 3:

I improved User56743's script a bit (removed the drawbacks):

Defining leftclick, position of fountains and hero

alias "leftclick" "+sixense_left_click; -sixense_left_click"
alias "camRadiant" "dota_camera_setpos -6985 -6942 1243"
alias "camDire" "dota_camera_setpos 6878 5772 1238"
alias "camCenter" "+dota_camera_follow;+dota_camera_follow;-dota_camera_follow"

Defining what happens on buttonpress(+myMoveRad) and buttonrelease (-myMoveRad)

alias "+myMoveRad" "mc_move; camRadiant; leftclick"
alias "-myMoveRad" "camCenter"
alias "+myMoveDire" "mc_move; camDire; leftclick"
alias "-myMoveDire" "camCenter"

bind "B" "+myMoveRad"
bind "C" "+myMoveDire"

this code moves the camera to the desired fountain, leftclicks where the mouse currently is and moves the camera back to the hero without sticking to it.

Technical detail:

the onpress (+) and onrelease (-) parts are important in this code because the execution of the camCenter part is faster then the leftclick part resulting in a move command at your original camera position (center) instead of the fountain.