My current code is different with 3 skills each with different behaviour
-
Wind Devil - cast as soon as cooldown ends when you hold Left Click (key sent every 200 ms)
-
War Cry - cast as soon as cooldown ends when you hold both Left Click and Shift (key sent every 200ms)
-
Wendigo Totem - cast only once as soon as cooldown ends when you hold both Left Click and Shift and then it waits for 14 seconds to cast it again unless you release, click and hold Shift again, then you can cast it sooner (as soon as cooldown ends if you click and release Shift frequently, i.e. if moving from pack to pack when you want Totems more often) [this is how I play - I hold Left Click permanently, hold Shift when fighting one pack, Right click for movement skill]
There’s a mechanism to ensure than Wendigo Totem is definitely cast and not interrupted by Primal Strike from Left Click or other skills
~*LButton::
KeyWait, LButton, T0.2
if ErrorLevel
{
counter := 0
while GetKeyState("LButton", "P")
{
if GetKeyState("Shift", "P")
{
if counter < 10 ;we try casting Totem 10 times (for 10 x 200 ms = 2s) for 100% chance
{
Send {7} ; Wendigo Totem
}
Send {6} ; War Cry
counter := Mod(counter + 1, 70) ;70 means 70 x 200 ms = 14s because Totem has 15s duration
}
else
counter := 0
Send {8} ; Wind Devil
Sleep, 200
}
}
Return