[DotA] Invoker Auto-Hotkey Script Ver.3
Wynthar's DotA Invoker Auto-Hotkey Script
Okay, so version three! Man. I have just spent many hours writing this script. I really don't feel like making a tutorial. But, I'm so happy with the way the script turned out ath I'm going to try to create a nice looking well rounded tutorial to support the script.
kill5link : Code for turning on and off the script in chat rooms/hitting enter/escape.
CerberPl : Pointed out a major flaw in my last script which made this script so much better.
Valarauka : Got some stuff for version one, including the Enter key to toggle.
So, the thing that I spent hours on this revision is the ability to "remember" which spell or spells are currently invoked. The first tactic I used was to detect what the current spells were by grabbing a pixel at a point of the screen for the spells. I realized I had to get a different color for the spell if it was on the left side or the right side. I also realized I had to get a different color if the spell was currently in cooldown. So, I spent perhaps an hour writing up some code to detect the colors, then one by one I had to cast each spell, get the color, cast next spell get the color, invoke next spell. You get the idea. Eventually it was kind of tricky to get a few of the spells to be on the right side or the left side in order to record the colors.
After spending a long time doing this, I was in window'd mode, and I resized the window. I suddenly noticed that all my colors were off. I did a little bit more experimentation and found out that the colors change at various resolutions. Very upsetting. So I was stumped for a while, but then I thought about something I had seen once. Each time a spell is invoked record it. But there is a problem here too. Because, sometimes the spell doesn't get invoked if the invoke spell is on cool down. So, I grab the colors and determine if the invoke spell actually got casted. If it does, I keep track of the last two spells to be successfully invoked. Rotating in the newly invoked spell and cycling out the spell invoked two times ago. It's working pretty well now.
I know already that there will be one bug. The bug is going to be that if you are only at level 1 of Invoke, and you have invoked two spell so far, the script will think that you have two spells invoked. For example, let's say we've only got one level of invoke, and we invoke sunstrike, and then forge spirits. Well, we want to go cast sunstrike again. The script thinks that we have sun strike, since we can have two spells at higher levels. This will fail then when you try to use F7 to cast sunstrike. Until you have two ranks of invoke, you will have to manually invoke sunstrike (7) before you can cast it with F7.
How It Works
[Ссылки скрыты от гостей.]
In this screen shot: F11 would cast EMP, F12 would cast Sun Strike
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.
Invoke 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
5 Forge Spirits
6 Ghost Walk
7 Sun Strike
0 Cold Snap
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)
Cast Spell Keys
Same numbering sequence, and similar idea to the Invoke spell script. This spell willa ctually cast the spell as well as invoke it if needed. Remember this will have a bug if you only have one rank of the invoke spell. But once you have the second rank of invoke spell it works pretty well.
F1 Deafening Blast
F2 Chaos Meteor
F3 Ice Wall
F5 Forge Spirits
F6 Ghost Walk
F7 Sun Strike
F10 Cold Snap
Attached code as well. (Obviously rename it from Invoker3.txt to Invoker3.ahk)
[Ссылки скрыты от гостей.] - скачать
Последний раз редактировалось UnDeaDRoCUser; 02.07.2010 в 21:51.
|Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)|