Wynthar's DotA Invoker Auto-Hotkey Script Version 2
Alright, I have updated this invoker script. It's pretty slick now. The last one wouldn't let me be attacking or moving and switch spells and stuff. This one, instead of "pressing" the keys with the keyboard, it actually "clicks" the locations on the screen.
Features:- 1 - 0 : Spells
- = : rotate current power balls
- F9, F10 : click the left and right spots of the invoker spells.
How It Works
In this screen shot: F9 would cast EMP, F10 would cast Sun Strike
"Power Ball"
This is the term that I use to refer to the balls that fly around invoker. When you press "E" three times (for Exort) you will see three red balls floating around invoker. You will also notice his damage goes up +3 each power ball. So +9 at level one. If you have trained up to level 7 Exort you will have a maximum of +63 damage if all three "power balls" are red (Exort). This is why it is handy that when the spells are invoked, it reverts back to the "current" power ball. Sometimes you have the Wes power balls set because you want increased move speed. Say maybe you are trying to run away, or get to a battle. Then you want to cast ice wall and keep running, well then it's nice to just press the number 3, and have it invoke ice wall so you have that spell prepared, then it also reverts back to three Wes balls so that you can keep running quickly. Same goes for the other power balls, like with Exort you want to keep the DPS high.
In order to activate your "power balls" for the script to know which set you have, you must use the
= key. You can find in the script where this key is mapped and change it if you want. It just is where I like to have it.
Even if you don't have a particular power ball, pressing
= will attempt to "press" that button three times. Just press [=] again and it will move to the next "power ball." Hope that makes sense. Just get into a single player game, pick invoker. Type -lvlup 25 and level up his spells and try playing around with the script.
Spell Keys
Pressing the following numbers will invoke the spell, then it will revert back to your current "power ball."
1 Deafening Blast
2 Chaos Meteor
3 Ice Wall
4 EMP
5 Forge Spirits
6 Ghost Walk
7 Sun Strike
8 Tornado
9 Alacrity
0 Cold Snap
For Example
If your current power ball is Quas, and you press the number 5. The script will quickly "Click" the Exort, Exort, Quas button, then Invoke, then Quas, Quas, Quas. This will result in preparing the forge spirits spell, and then going back to your quas "powerball."
Of course you can remap all these keys by changing the letters in the script. Should be easy enough to find.
(Hint: *1:: PrepBlast() is where it sets they number 1 to cast the Deafening Blast Spell)
Code:
#NoEnv
SetWorkingDir %A_ScriptDir%
#InstallKeybdHook
SendMode Play
Suspend On
#IfWinActive, Warcraft III
#UseHook On
*F3::
Suspend
InitialSetup()
return
InitialSetup()
{
global
CurrentBallVar = 0
sleeptime = 150
;SetColors()
GridSetup()
if (A_IsSuspended)
SoundPlay *64
else
SoundPlay *48
}
*1:: PrepBlast()
*2:: PrepMeteor()
*3:: PrepIceWall()
*4:: PrepEmp()
*5:: PrepForge()
*6:: PrepGhost()
*7:: PrepSunStrike()
*8:: PrepTornado()
*9:: PrepAlacrity()
*0:: PrepColdSnap()
*=:: NextBall()
*F9:: ClickLeftSpell()
*F10:: ClickRightSpell()
ClickLeftSpell()
{
global
ClickSpot(x2, y2)
;ClickSpot(1355, 1050)
}
ClickRightSpell()
{
global
ClickSpot(x3, y2)
;ClickSpot(1440, 1050)
}
ClickSpot(x, y)
{
SetMouseDelay, 1, Play
MouseGetPos, xpos, ypos
Send {Click %x%, %y%, L}
MouseMove, %xpos%, %ypos%
SetMouseDelay, -1, Play
}
ClickStart()
{
global
SetMouseDelay, 1, Play
MouseGetPos, xpos, ypos
}
ClickFinish()
{
global
MouseMove, %xpos%, %ypos%
SetMouseDelay, -1, Play
}
ClickQ()
{
global
SendPlay {Click %x1%, %y3%, L}
}
ClickW()
{
global
SendPlay {Click %x2%, %y3%, L}
}
ClickE()
{
global
SendPlay {Click %x3%, %y3%, L}
}
ClickR()
{
global
SendPlay {Click %x4%, %y3%, L}
}
PrepGhost()
{
ClickStart()
ClickQ()
ClickQ()
ClickW()
ClickR()
; Go to 3 Wex balls for move speed.
ClickW()
ClickW()
CLickW()
ClickFinish()
}
PrepForge()
{
ClickStart()
ClickE()
ClickE()
ClickQ()
ClickR()
CurrentBall()
ClickFinish()
}
PrepBlast()
{
ClickStart()
ClickQ()
ClickW()
ClickE()
ClickR()
CurrentBall()
ClickFinish()
}
PrepMeteor()
{
ClickStart()
ClickE()
ClickE()
ClickW()
ClickR()
CurrentBall()
ClickFinish()
}
PrepIceWall()
{
ClickStart()
ClickQ()
ClickQ()
ClickE()
ClickR()
CurrentBall()
ClickFinish()
}
PrepEmp()
{
ClickStart()
ClickW()
ClickW()
ClickW()
ClickR()
CurrentBall()
ClickFinish()
}
PrepSunStrike()
{
ClickStart()
ClickE()
ClickE()
ClickE()
ClickR()
CurrentBall()
ClickFinish()
}
PrepColdSnap()
{
ClickStart()
ClickQ()
ClickQ()
ClickQ()
ClickR()
CurrentBall()
ClickFinish()
}
PrepAlacrity()
{
ClickStart()
ClickW()
ClickW()
ClickE()
ClickR()
CurrentBall()
ClickFinish()
}
PrepTornado()
{
ClickStart()
ClickW()
ClickW()
ClickQ()
ClickR()
CurrentBall()
ClickFinish()
}
CurrentBall()
{
global
if (CurrentBallVar = 0)
{
ClickQ()
ClickQ()
ClickQ()
}
else if (CurrentBallVar = 1)
{
ClickW()
ClickW()
ClickW()
}
else if (CurrentBallVar = 2)
{
ClickE()
ClickE()
ClickE()
}
}
NextBall()
{
global
if (CurrentBallVar = 0)
{
CurrentBallVar = 1
}
else if (CurrentBallVar = 1)
{
CurrentBallVar = 2
}
else if (CurrentBallVar = 2)
{
CurrentBallVar = 0
}
ClickStart()
CurrentBall()
ClickFinish()
}
GridSetup() ;set up the screen coords for clicking
{
global
WinGetPos,,, winWidth, winHeight, A
x1:=(510*winWidth)//640
x2:=(544*winWidth)//640
x3:=(578*winWidth)//640
x4:=(612*winWidth)//640
y1:=(390*winHeight)//480
y2:=(424*winHeight)//480
y3:=(458*winHeight)//480
sentinelx:=(13*winWidth)//640 ;Sentinel fountain
sentinely:=(467*winHeight)//480
scourgex:=(110*winWidth)//640 ;Scourge fountain
scourgey:=(374*winHeight)//480
selfx:=(200*winWidth)//640
selfy:=(420*winHeight)//480
}
Just post any questions, comments, thanks, changes, ideas in this thread. If I don't reply within a day or two try to PM me. Sometimes I miss the threads.
