Skip to content

Instantly share code, notes, and snippets.

@abix-
Last active December 23, 2021 21:29
Show Gist options
  • Save abix-/119b5447f59118866934e280896b5067 to your computer and use it in GitHub Desktop.
Save abix-/119b5447f59118866934e280896b5067 to your computer and use it in GitHub Desktop.
; https://www.autohotkey.com/docs/Hotkeys.htm
; ^ = Control
; * = Wildcard: Fire the hotkey even if extra modifiers are being held down
; ~ = When the hotkey fires, its key's native function will not be blocked (hidden from the system)
; Click positions assume 1920x1080 resolution
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#MaxThreadsPerHotkey 1
SetDefaultMouseSpeed 0
; Repeat left click
; Ctrl + F1
*^F1::
F1Toggle := !F1Toggle
If(F1Toggle) {
gosub Click
SetTimer,Click,50,On
} else {
SetTimer,Click,off
}
return
Click:
Click
return
; Repeat right click
; Ctrl + F2
*^F2::
F2Toggle := !F2Toggle
If(F2Toggle) {
gosub RightClick
SetTimer,RightClick,50,On
} else {
SetTimer,RightClick,off
}
return
RightClick:
Click, right
return
; Repeat e
; Ctrl+F3
*^F3::
F3Toggle := !F3Toggle
If(F3Toggle) {
gosub SendE
SetTimer,SendE,200,On
} else {
SetTimer,SendE,off
}
return
SendE:
send,e
return
; Buy in Fair
; Ctrl + F4
*^F4::
F4Toggle := !F4Toggle
If(F4Toggle) {
gosub FairBuy
SetTimer, FairBuy, 1000, on
} else {
SetTimer, FairBuy,off
}
return
FairBuy:
Click, 1688, 1000
Sleep, 250
Click, 834, 700
return
; Thrall attack
; Ctrl + F5
*^F5::
F5Toggle := !F5Toggle
if(F5Toggle) {
gosub Thrall
SetTimer, Thrall, 60000
} else {
SetTimer, Thrall, off
}
return
Thrall:
; Click left mouse 10 times with 1 second delay
Loop, 10 {
Click
Sleep, 1000
}
; Eat food in slot 0
Send, 0
return
; Disable everything when press s
~s::
F1Toggle := 0
F2Toggle := 0
F3Toggle := 0
F4Toggle := 0
F5Toggle := 0
SetTimer, Click,off
SetTimer, RightClick,off
SetTimer, SendE,off
SetTimer, FairBuy,off
SetTimer, Thrall,off
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment