(https://autohotkey.com/docs/static/ahk_logo_no_text.png)
AutoHotKey Script Guide
Hey there! I get asked this question quite a bit, so thought I'd share with everyone how to set up some magical keybinds!
First, the rules.
Rules: (http://www.argonathrpg.eu/index.php?topic=116540.0)
- You must be present when keybinds are running.
- You cannot create keybinds which run for more than 30 seconds per activation.
Basically, don't bot or be an asshole. Pretty simple.
You can get AutoHotKey from here (https://autohotkey.com/download/). Download the Zip for portable, installer for non-portable version. Once installed, it'll pop open the helpfile. This can be extremely useful for reference.
Now, we're gonna create a new script. Go ahead and create a new notepad document, and import the following into the text file:
NUMPAD0::
Send t/paytoll{enter}
Return
NUMPAD1::
Send t/engine{enter}
Return
NUMPAD2::
Send t/fillup{enter}
Return
NUMPAD3::
Send t/repairvehicle{enter}
Return
Next, hit File > Save As... and save the new file as Argonath.ahk (instead of .txt). Now, when double clicking the script, it will automatically launch!
Useful Combos:
# Win (Windows logo key).
! Alt
^ Control
+ Shift
< Use the left key of the pair. e.g. <!a is the same as !a except that only the left Alt key will trigger it.
> Use the right key of the pair.
For example, !NUMPAD0:: is Alt + Numpad 0, <!NUMPAD0:: is only left Alt + Numpad 0.
In some games/instances, you have to simulate both keypress and keyrelease (otherwise they are not detected). A 1/10th of a second (100ms) delay is sufficient for most games.
Send {Enter down}
Sleep 100
Send {Enter up}
Here's an example of scripting vehicle repair for the server.
NUMPAD3::
Send t/engine{enter}
Sleep 100
Send t/repairvehicle{enter}
Sleep 4000
Send t/engine{enter}
Return
Turns the engine off, sends the command to repair, waits 4 seconds, turns the engine back on.
EZ-PZ!
You can edit a live script by right clicking the icon in the taskbar. Once you save it, be sure to right click the icon again and reload the script so the changes can be updated!
Reference: Keylist (https://autohotkey.com/docs/KeyList.htm)
Reference: Hotkeys and Modifiers (https://autohotkey.com/docs/Hotkeys.htm)
Hope this helps!