Dota macros - Dota scripts AutoHotkey

Post gaming related scripts
Player
Posts: 5
Joined: 03 Feb 2018, 15:21

Dota macros - Dota scripts AutoHotkey

Post by Player » 03 Feb 2018, 15:54

Is using macros considered as cheating?

Quick answer: they aren't cheats, you can't get banned for using macros since it is detected as key inputs but you can get spectated in a ranked game and the replay can be sent to Valve.

Macros do not hack the game, most gaming mouses and keyboards allow that. But they do not reflect your true skill that is why I think it is fine if you are using them in pub games or in arcade (especially in coop versus AI) only because those are party games. Though macros won't improve your game sense, like knowing where to be, what to do, what is the adequate pick or build. Macros can be used if you are a casual player or you are staying in a low MMR because those types of games aren't for you. They will allow you to play a wider range of heroes and to pick those hard to master without penalizing your team, otherwise you would be forced to stick with a basic right clicker in every game to not be reported.
I think heroes with spammable spells can be tolerated in ranked like for example Bristleback, to avoid breaking your keyboard while mashing q and w.

Recommendations

- Set every spells and items to quickcast. Every shortcuts here are those by default.
- I recommend you to use the key ` (at the left of the 1 button) for your main macro. In Dota it is used for the scoreboard, remove the shortcut for it.
- For the courrier I recommend you to use the shortcut "g".
- I suggest you to include the action that have a very low cast point in your script, preferably 0 second. 0.05 works too. If the cast animation is too long like 0.3 some actions could be queued and your disablers for example the use of an orchid could be delayed by 0.3 seconds after your heroe cast a nuke.
The list of every abilities, you can sort them by cast point: https://dota2.gamepedia.com/Cast_animat ... backswings

Basic script

So here is the most important script, toggle it On or Off with the ` key. Use the minimum amount of inputs to avoid lags and abilities with no cast animations.
It triggers every abilities and items expected the last two item slots to put your teleporter scroll, heals, arcane boots, refresher, etc.
You can add a "Click, right" bellow the SendInput but it will make your hero attack less if you can't track the enemy with the mouse. It will also allow to remove the backswing after a spell and to move all your controlled units to your cursor (if you keep {tab} in the script).

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Toggle = 0
#MaxThreadsPerHotkey 2

`::
SendInput, {esc}{F1}
Toggle := !Toggle
While Toggle{
	SendInput, zxcvrqwedf{tab}
	sleep 75
}
return
While your hero turns to face the enemy it casts the current key pressed by the loop when it is oriented correctly. If the key was an ability with a slow cast animation all other instantly casted items and abilities will be delayed. To avoid that add a repeat condition for the instant cast items.

For example this loop for Nature Prophet will use all his items in priority before sprout:

Code: Select all

`::
repeat = 5
SendInput, {esc}{F1}
While (repeat > 0) {
	if (repeat > 2) {
		SendInput, zxcv
	}
	else {
		SendInput, zxcvq
	}
	repeat--
	sleep 75
}
return
Here are a set of script you an use in loops

Fast click. Minimum sleep 1.

Code: Select all

Click, right
Call the courrier. Minimum sleep 50:

Code: Select all

SendInput, g
Instapick (this one picks Bristleback). Minimum sleep 75.

Code: Select all

Click, left, 455, 224
sleep 10
Click, left, 1482, 794
sleep 75
Quickly re-enter a lobby. Minimum sleep 1:

Code: Select all

Click, left, 960, 613
Click, left, 1500, 889
Scripts you can use (not looped):

This script will quickly buy an healing salve and a mango then call the courier, you can adjust it to only buy one item:

Code: Select all

MouseGetPos, xpos, ypos
Click, 1730, 1050 ;shop
Click, right, 1655, 414 ;mango
Click, right, 1660, 375 ;salve
MouseMove, %xpos%, %ypos%
SendInput, {esc}g
Return
Using delays:

For other heroes that need a specific order to use their items and cast their abilities you need to add a delay between each keystroke and to use the cast animation timing on the wiki: https://dota2.gamepedia.com/Cast_animation
To use them properly you need to trigger in priority every items then abilities without cast animation that you want with a delay of 75 ms added then use the abilities with the lowest cast animation time to the highest. A cast animation of 0.3s on the wiki is equal to a sleep of 300 ms, and 1s = 1000 ms.
I suggest a sleep of 150 after the first target ability so your hero has the time to turn and face the enemy before doing the other inputs.

For example for Nature Prophet the Sprout cast animation is 0.35s (350) so to summon the treants with Nature's call you need to use a sleep of 0.35s + 0.075s and if this is the first point cast input of the script add 0.15s after so it can face the enemy.

Note that you need to be in range to cast your spells in the order, you can get a blink dagger, aether lens or shadow blade to never miss your abilities' order.

An example with Queen of Pain, the b is used for the glimmer cape and it isn't in quickcast.

Code: Select all

delay = 75

`::
SendInput, w
sleep 330 + delay
SendInput, z
sleep delay*2
SendInput, x
sleep delay
SendInput, c
sleep delay
SendInput, v
sleep delay
SendInput, b
sleep delay
SendInput, b
sleep delay
SendInput, e
sleep delay
SendInput, q
sleep 400 + delay
SendInput, r
return
Items and ability order:

There is a minimum delay of 75 ms between each:

Pre-initiation:
- Shiva
- Cloak
- Blademail
- Glimmer Cape
- Lotus Orb

Initiation:
- Blink dagger (note, to avoid the turning delay you can use a long range disabler like orchid)

Items with travel speed:
- Ethereal blade
- Nullifier
- Rod of Atos

Turn delay of 150 ms or after the disabling items bellow

Strong disablers:
- Scythe of Vyse
- Orchid
- Halberd

Disablers:
- Diffusal blade
- Solar Crest

Items active:
- almost every items with an active including Necronomicon

Items with an aura:
- Drum of Endurance
- Pipe of Insight

Abilities:
- Every abilities without cast animation then use progressively the ability with the highest cast animation unless they need a specific order of execution like a damage amplification.

Bonus macros:

You can add a taunt shortcut at the end of a macro if you want.

Auto laugh: it will trigger the laugh of your hero every 14 seconds:

Code: Select all

f8::
SendInput, {esc}
Toggle := !Toggle
While Toggle{
	SendInput, {esc}
	sleep 10
	SendInput, {enter}
	sleep 10
	SendInput, /laugh
	sleep 10
	SendInput, {esc}
	sleep 10
	SendInput, {enter}
	sleep 10
	SendInput, {esc}
	sleep 14000
}
return

Return to “Gaming”