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.
Seq2T_TimerState := 0 ;MUST be at the top of the script
#NoEnv
SendMode Input
#SingleInstance, Force
Process, WaitClose, grim dawn.exe
ExitApp
global Toggle := false
return
UseSkill(key)
{
;IfWinActive, Grim Dawn
{
Send {%key%}
}
}
; this key will start and stop the loop
~Shift::
ToggleLoop(false)
return
; restart loop
Numpad9::
ToggleLoop(true)
return
;this function will toggle the loop, if the reset parameter is true we will restart the timers.
ToggleLoop(reset)
{
Toggle := !Toggle || reset
; list all the skills you have timers for here
if(Toggle)
{
Gosub Ascenção
Gosub ELA
Gosub Anel
Gosub Sombra
Gosub Attack
Gosub Veno
}
; enable or disable timers for all skills you want to loop
SetTimer, Ascenção, % (Toggle) ? 11000 : "Off" ;22 seg
SetTimer, ELA, % (Toggle) ? 1800 : "Off" ;1.8 seg
SetTimer, Anel, % (Toggle) ? 1500 : "Off" ;3 seg
SetTimer, Sombra, % (Toggle) ? 1750 : "Off" ;3.5 seg
SetTimer, Attack, % (Toggle) ? 200 : "Off" ;.2 seg
SetTimer, Veno, % (Toggle) ? 8000 : "Off" ;16seg
}
; make a label for all skills here
Attack:
UseSkill(1)
return
Ascenção:
UseSkill(3)
return
ELA:
UseSkill(5)
return
Anel:
UseSkill(6)
return
Sombra:
UseSkill(4)
return
Veno:
UseSkill(7)
return
$RButton:: ;start the sequence
{
Seq2T_count++
if (Seq2T_count = 3) { ;n+1 actions in the sequence
Seq2T_count := 1
}
if (Seq2T_TimerState = 1) {
if (Seq2T_count = 1) { ; = action#
send 8 ;1st action in the sequence
}
else if (Seq2T_count = 2) { ; = action#
send E ;2nd action in the sequence
}
return
}
else if (Seq2T_TimerState = 0) {
send RButton ;1st action in the sequence
SetTimer, Seq2T_Timer, 6000 ;reset timer duration in ms
Seq2T_TimerState := 1
}
return
}
Seq2T_Timer:
{
Seq2T_count := 0
SetTimer, Seq2T_Timer, Delete
Seq2T_TimerState := 0
return
}
;--------------------------------------------------------
$2:: ;start the sequence
{
Seq2T_count++
if (Seq2T_count = 3) { ;n+1 actions in the sequence
Seq2T_count := 1
}
if (Seq2T_TimerState = 1) {
if (Seq2T_count = 1) { ; = action#
Send 2 ;first action in the sequence
}
else if (Seq2T_count = 2) { ; = action#
Send 4 ;second action in the sequence
}
return
}
else if (Seq2T_TimerState = 0) {
Send 2 ;first action in the sequence
SetTimer, Seq2T_Timer, 6000 ;reset timer duration in ms
Seq2T_TimerState := 1
}
return
}
;--------------------------------------------------------
NumpadEnter::
Suspend
Pause ,,1
if A_IsPaused {
ToolTip, PAUSADO, 1500, 1250
} else {
ToolTip, RUNNING, 1500, 1250
SetTimer RemoveToolTip, 1000
}
return
RemoveToolTip:
ToolTip
SetTimer, RemoveToolTip, Off
return