diff --git a/artifacts/example_mods/TakeAllHotkey/hs_keypress.int b/artifacts/example_mods/TakeAllHotkey/hs_keypress.int new file mode 100644 index 00000000..bb78a752 Binary files /dev/null and b/artifacts/example_mods/TakeAllHotkey/hs_keypress.int differ diff --git a/artifacts/example_mods/TakeAllHotkey/hs_keypress.ssl b/artifacts/example_mods/TakeAllHotkey/hs_keypress.ssl new file mode 100644 index 00000000..c982a7ce --- /dev/null +++ b/artifacts/example_mods/TakeAllHotkey/hs_keypress.ssl @@ -0,0 +1,16 @@ +procedure start; +#include ".\HEADERS\dik.h" + +procedure start begin + variable event, keyDX; + if not init_hook then begin + event := get_sfall_arg; + keyDX := get_sfall_arg; + + if ((event == 1) and (keyDX == DIK_SEMICOLON)) then begin + tap_key(DIK_CAPITAL); + tap_key(DIK_A); + tap_key(DIK_CAPITAL); + end + end +end diff --git a/artifacts/example_mods/TakeAllHotkey/readme.txt b/artifacts/example_mods/TakeAllHotkey/readme.txt new file mode 100644 index 00000000..02b89070 --- /dev/null +++ b/artifacts/example_mods/TakeAllHotkey/readme.txt @@ -0,0 +1,9 @@ +"Take All" Hotkey mod for Fallout 2 by NovaRain +---------------------------------------- + +- makes pressing the semicolon key send an uppercase A after a semicolon. +- the uppercase A (shift + A if Caps Lock is off) is the built-in hotkey for the TAKE ALL button on the loot screen. + +To use, copy hs_keypress.int file to your scripts folder. + +This mod is a simple example of how you can use HOOK_KEYPRESS hooks.