Skip to content

Instantly share code, notes, and snippets.

@chrisglick
Created February 9, 2018 20:42
Show Gist options
  • Save chrisglick/1182a2e5c1b7e7907238ded2c13d0c1a to your computer and use it in GitHub Desktop.
Save chrisglick/1182a2e5c1b7e7907238ded2c13d0c1a to your computer and use it in GitHub Desktop.
AutoHotKey script
; AFK Farming for video game Sundered
; http://store.steampowered.com/app/535480/Sundered/
; Script for AutoHotKey: https://www.autohotkey.com
; Sub-author: Chris Glick
; Video tutorial on use: https://www.youtube.com/watch?v=qnOCnhyQnkg
; Modified from original source below:
;
; WASD Movement For Titan Quest Series v3
; Author: Desi Quintans <me@desiquintans.com>
; Website: http://www.desiquintans.com
;
; Script Function:
; Holds Up on the keyboard and the attack button 'a' at a certain point in the game to
; farm infinite shards (currency) from enemies.
;
; Use: Load script, hit 'r' to start the macro. If it looks like it's working, you're done.
; To STOP the LOOP: hit 't'
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
#MaxHotkeysPerInterval, 200
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetDefaultMouseSpeed, 0
SetTimer, Button_Pressed, 1
return
Button_Pressed:
if GetKeyState("r", "P")
{
Loop
{
; Since no number is specified with Loop, this is an infinite loop (locking computer)
; unless "break" or "return" is encountered inside.
if GetKeyState("t", "P") ; If this statement is true, the user has released the t key.
{
break ; Get out of the loop
}
; OTHERWISE
Send {Up}
Send {a}
Sleep 10
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment