AutoHotKey Scripts for playing MK9 with Keyboard

Post Reply
User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

AutoHotKey Scripts for playing MK9 with Keyboard

Post by percitrovsk »

What I'm posting it's not necessarily a gameplay MOD, but since it affects the gameplay, I think here is the best place to post. Do you play MK9 with keyboard because you don't have a joystick? Do you think it's difficult? Well, try these AutoHotKey scripts!

What's AutoHotKey?
According Wikipedia (http://en.wikipedia.org/wiki/AutoHotkey) "AutoHotkey is a free, open-source custom scripting language for Microsoft Windows. Initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allowed users of most levels of computer skill to automate repetitive tasks in any Microsoft Windows application."

Macros? But this is cheating...
If you ask me, I would say "Yes, it's cheating". But I like to think like a "Boss Mod". You wouldn't hope to have a fair fight playing as Shao Kahn. It's just to have fun. These scripts are the same. They can be good for two situations: 1) you don't have a gamepad and are having a hard time playing with the keyboard or 2) Your brother/friend wants to play against you in your PC, you just have one joystick and neither of you want to use the keyboard. Also, there are high-tech keyboards/gamepads which have this function. AutoHotKey is just a free solution. It's depends on the good will from the user to don't use it to play Online.

Before continuing, there are some important notes:

1) I don't know how Steam treats AutoHotKey. Just recently I tested these scripts, and I heard that takes some time until VAC catches someone. Furthermore, AutoHotKey has cursor monitoring function. Search Google. If you think there will be problems with Steam VAC or the program seems suspcious, you should stop here.

2) Just use these scripts for keyboard as second player. If you want to use as single player, you must have started the game for the first time using the WASD scheme.

See these topics:
http://steamcommunity.com/app/237110/di ... 572041569/
http://forums.steampowered.com/forums/a ... 84507.html

MKKE has a problem about changing devices. YOU MAY LOSE YOUR SAVE FILE. Make a backup. If you want to use as single player, be sure that you already were using WASD scheme without saving problems.

3) I will post just the txt files of the scripts. It's safer: you can see them and, when you compile them in Autohotkey, even if your anti-virus accuses something, you will know it's safe. And better, you can edit them with your own preferences.


User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by percitrovsk »

Getting started!

First, download and install Autohotkey program. If you search Google, there will be two main pages: .com and .org. I recommend the .org, because they have a newer version (since I tested the scripts with the newer version, you may have delay problems with the old one). Then, download the Script you want (I made scripts for the three first characters from story mode: Johnny Cage, Sonya and Scorpion). Right click somewhere in the Desktop and select "New" > "AutoHotKey Script". Rename it as you like. Right click it and select "Edit". Paste the script you downloaded and save. Run the script.

About the layout

The three scripts share the same model (the differences are the Special Moves/Combos/Fatalities):

w:: ; Up
a:: ; Left
s:: ; Down
d:: ; Right

Numpad1:: ; (g) FK - Front Kick / Confirm
Numpad2:: ; (j) BK - Back Kick / Cancel
Numpad3:: ; (Space) BL - Block
Numpad4:: ; (t) FP - Front Puch
Numpad5:: ; (u) BP - Back Punch
Numpad6:: ; (y) TH - Throw
Numpad7:: ; (Tab) TG - Tag
Numpad8:: ; (h) SS - Flip Stance
Numpad9:: ; X-Ray (BL + SS)
Numpad0:: ; (1) Start
NumpadDot:: ; (4) Back

"Q" + NumpadX:: ; Special Moves with your Character in the left
"E" + NumpadX:: ; Special Moves with your Character in the right

The ingame Keyboard settings must be set to default with just two changes: Flip Stance = h and Throw = y. NumLock must be enabled. If you want to change something, you must change in the script (example: even if ingame you change FP to "P", in the script all Special Moves which have FP will still send "T").

As you know, Special Moves depend where your character is (left or right). So, to perform them you need to use a "prefix" to change the regular keys to special ones. It could be Shift or Alt, but I thought it could make confusion. Try to remember this: if your character is in the left, you will use the button above the "A" (Q) + Numpad; if your character is in the right, you will use the button above the "D" (E) + Numpad.

Most Special moves and Fatalities seem to work fine. Combos, however, need to be much more accurate. I searched GameFaqs for a list of combos and I chose the easiest ones. Even with them I was having difficult. I don't know if they will work in different machines (they may depend on the game FPS, SO processing time delays, etc). If they are not working, you should adjust delays or even try to record a better combo.
User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

Re: Johnny Cage Keyboard Script

Post by percitrovsk »

Johnny Cage Script
#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.

; Numpad Commands

Numpad1:: ; FK - Front Kick / Confirm
Send {g down}
KeyWait Numpad1
Send {g up}
return

Numpad2:: ; BK - Back Kick / Cancel
Send {j down}
KeyWait Numpad2
Send {j up}
return

Numpad3:: ; BL - Block
Send {Space down}
KeyWait Numpad3
Send {Space up}
return

Numpad4:: ; FP - Front Puch
Send {t down}
KeyWait Numpad4
Send {t up}
return

Numpad5:: ; BP - Back Punch
Send {u down}
KeyWait Numpad5
Send {u up}
return

Numpad6:: ; TH - Throw
Send {y down}
KeyWait Numpad6
Send {y up}
return

Numpad7:: ; TG - Tag
Send {Tab down}
KeyWait Numpad7
Send {Tab up}
return

Numpad8:: ; SS - Flip Stance
Send {h down}
KeyWait Numpad8
Send {h up}
return

Numpad9:: ; X-Ray (BL + SS)
Send {Space down}{h down}
KeyWait Numpad9
Send {Space up}{h up}
return

Numpad0:: ; Start
Send {1 down}
KeyWait Numpad0
Send {1 up}
return

NumpadDot:: ; Back
Send {4 down}
KeyWait NumpadDot
Send {4 up}
return


; Q + Numpad Commands (your character in the left)

Q & Numpad1:: ; Low Forceball
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & Numpad2:: ; High Forceball
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & Numpad3:: ; Flip Kick
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & Numpad4:: ; Shadow Kick
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad5:: ; Nut Punch
Send {a down}
Sleep, 30
Send {a up}
Send {s down}
Sleep, 30
Send {s up}
Send {t down}
Sleep, 30
Send {t up}
return

Q & Numpad7:: ; Combo - 4 Hits
Send {u down}
Sleep, 30
Send {u up}
Sleep, 60
Send {t down}
Sleep, 30
Send {t up}
Sleep, 60
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 1000
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad8:: ; Combo - 4 Hits
Send {d down}{g down}
Sleep, 30
Send {d up}{g up}
Sleep, 60
Send {g down}
Sleep, 30
Send {g up}
Sleep, 100
Send {a down}{g down}
Sleep, 30
Send {a up}{g up}
Sleep, 400
Send {a down}
Sleep, 30
Send {a up}
Send {s down}
Sleep, 30
Send {s up}
Send {t down}
Sleep, 30
Send {t up}
return

Q & Numpad9:: ; Combo - 5 Hits (opponent must be in corner, sometimes fails)
Send {d down}{j down}
Sleep, 30
Send {d up}{j up}
Sleep, 700
Send {d down}{j down}
Sleep, 30
Send {d up}{j up}
Sleep, 800
Send {t down}
Sleep, 30
Send {t up}
Sleep, 10
Send {t down}
Sleep, 30
Send {t up}
Sleep, 60
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {Space down}
Sleep, 30
Send {Space up}
return

Q & NumpadAdd:: ; Babality (Distance: Jump)
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & NumpadDiv:: ; Fatality 1 - Heads Up! (Distance: Touching)
Send {d down}
Sleep, 30
Send {d up}
Sleep, 10
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {s down}
Sleep, 30
Send {s up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & NumpadMult:: ; Fatality 2 - And the Winner Is... (Distance: Sweep)
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return


; E + Numpad Commands (your character in the right)

E & Numpad1:: ; Low Forceball
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {u down}
Sleep, 30
Send {u up}
return

E & Numpad2:: ; High Forceball
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {u down}
Sleep, 30
Send {u up}
return

E & Numpad3:: ; Flip Kick
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

E & Numpad4:: ; Shadow Kick
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad5:: ; Nut Punch
Send {d down}
Sleep, 30
Send {d up}
Send {s down}
Sleep, 30
Send {s up}
Send {t down}
Sleep, 30
Send {t up}
return

E & Numpad7:: ; Combo - 4 Hits
Send {u down}
Sleep, 30
Send {u up}
Sleep, 60
Send {t down}
Sleep, 30
Send {t up}
Sleep, 60
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 1000
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad8:: ; Combo - 4 Hits
Send {a down}{g down}
Sleep, 30
Send {a up}{g up}
Sleep, 60
Send {g down}
Sleep, 30
Send {g up}
Sleep, 100
Send {d down}{g down}
Sleep, 30
Send {d up}{g up}
Sleep, 400
Send {d down}
Sleep, 30
Send {d up}
Send {s down}
Sleep, 30
Send {s up}
Send {t down}
Sleep, 30
Send {t up}
return

E & Numpad9:: ; Combo - 5 Hits (sometimes fails)
Send {a down}{j down}
Sleep, 30
Send {a up}{j up}
Sleep, 700
Send {a down}{j down}
Sleep, 30
Send {a up}{j up}
Sleep, 800
Send {t down}
Sleep, 30
Send {t up}
Sleep, 10
Send {t down}
Sleep, 30
Send {t up}
Sleep, 60
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

E & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {Space down}
Sleep, 30
Send {Space up}
return

E & NumpadAdd:: ; Babality (Distance: Jump)
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & NumpadDiv:: ; Fatality 1 - Heads Up! (Distance: Touching)
Send {a down}
Sleep, 30
Send {a up}
Sleep, 10
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {s down}
Sleep, 30
Send {s up}
Send {g down}
Sleep, 30
Send {g up}
return

E & NumpadMult:: ; Fatality 2 - And the Winner Is... (Distance: Sweep)
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return
User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

Re: Sonya Keyboard Script

Post by percitrovsk »

Sonya Script
#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.

; Numpad Commands

Numpad1:: ; FK - Front Kick / Confirm
Send {g down}
KeyWait Numpad1
Send {g up}
return

Numpad2:: ; BK - Back Kick / Cancel
Send {j down}
KeyWait Numpad2
Send {j up}
return

Numpad3:: ; BL - Block
Send {Space down}
KeyWait Numpad3
Send {Space up}
return

Numpad4:: ; FP - Front Puch
Send {t down}
KeyWait Numpad4
Send {t up}
return

Numpad5:: ; BP - Back Punch
Send {u down}
KeyWait Numpad5
Send {u up}
return

Numpad6:: ; TH - Throw
Send {y down}
KeyWait Numpad6
Send {y up}
return

Numpad7:: ; TG - Tag
Send {Tab down}
KeyWait Numpad7
Send {Tab up}
return

Numpad8:: ; SS - Flip Stance
Send {h down}
KeyWait Numpad8
Send {h up}
return

Numpad9:: ; X-Ray (BL + SS)
Send {Space down}{h down}
KeyWait Numpad9
Send {Space up}{h up}
return

Numpad0:: ; Start
Send {1 down}
KeyWait Numpad0
Send {1 up}
return

NumpadDot:: ; Back
Send {4 down}
KeyWait NumpadDot
Send {4 up}
return


; Q + Numpad Commands (your character in the left)

Q & Numpad1:: ; Energy Ring Blast
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & Numpad2:: ; Leg Grab
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad3:: ; Kiss
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
return

Q & Numpad4:: ; Arc Kick
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad5:: ; Kartwheel
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & Numpad6:: ; Air Drop (While in the air)
Send {s down}{j down}
Sleep, 30
Send {s up}{j up}
return

Q & Numpad7:: ; Combo - 5 Hits
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 50
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 650
Send {w down}
Sleep, 150
Send {w up}
Sleep, 30
Send {y down}
Sleep, 30
Send {y up}
return

Q & Numpad8:: ; Combo - 6 Hits
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
Sleep, 150
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 1100
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad9:: ; Combo - 7 Hits
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {j down}
Sleep, 30
Send {j up}
Sleep, 200
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 1000
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {s down}
Sleep, 30
Send {s up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
return

Q & NumpadAdd:: ; Babality (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & NumpadDiv:: ; Fatality 1 - Scissor Split (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
return

Q & NumpadMult:: ; Fatality 2 - Kut-Throat (Distance: Sweep)
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return


; E + Numpad Commands (your character in the right)

E & Numpad1:: ; Energy Ring Blast
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {u down}
Sleep, 30
Send {u up}
return

E & Numpad2:: ; Leg Grab
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad3:: ; Kiss
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
return

E & Numpad4:: ; Arc Kick
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad5:: ; Kartwheel
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

E & Numpad6:: ; Air Drop (While in the air)
Send {s down}{j down}
Sleep, 30
Send {s up}{j up}
return

E & Numpad7:: ; Combo - 5 Hits
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 50
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 650
Send {w down}
Sleep, 150
Send {w up}
Sleep, 30
Send {y down}
Sleep, 30
Send {y up}
return

E & Numpad8:: ; Combo - 6 Hits
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
Sleep, 150
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 1100
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad9:: ; Combo - 7 Hits
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {j down}
Sleep, 30
Send {j up}
Sleep, 200
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 1000
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {s down}
Sleep, 30
Send {s up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
return

E & NumpadAdd:: ; Babality (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

E & NumpadDiv:: ; Fatality 1 - Scissor Split (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
return

E & NumpadMult:: ; Fatality 2 - Kut-Throat (Distance: Sweep)
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return
User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

Re: Scorpion Keyboard Script

Post by percitrovsk »

Scorpion Script
#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.

; Numpad Commands

Numpad1:: ; FK - Front Kick / Confirm
Send {g down}
KeyWait Numpad1
Send {g up}
return

Numpad2:: ; BK - Back Kick / Cancel
Send {j down}
KeyWait Numpad2
Send {j up}
return

Numpad3:: ; BL - Block
Send {Space down}
KeyWait Numpad3
Send {Space up}
return

Numpad4:: ; FP - Front Puch
Send {t down}
KeyWait Numpad4
Send {t up}
return

Numpad5:: ; BP - Back Punch
Send {u down}
KeyWait Numpad5
Send {u up}
return

Numpad6:: ; TH - Throw
Send {y down}
KeyWait Numpad6
Send {y up}
return

Numpad7:: ; TG - Tag
Send {Tab down}
KeyWait Numpad7
Send {Tab up}
return

Numpad8:: ; SS - Flip Stance
Send {h down}
KeyWait Numpad8
Send {h up}
return

Numpad9:: ; X-Ray (BL + SS)
Send {Space down}{h down}
KeyWait Numpad9
Send {Space up}{h up}
return

Numpad0:: ; Start
Send {1 down}
KeyWait Numpad0
Send {1 up}
return

NumpadDot:: ; Back
Send {4 down}
KeyWait NumpadDot
Send {4 up}
return


; Q + Numpad Commands (your character in the left)

Q & Numpad1:: ; Spear
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
return

Q & Numpad2:: ; Demon Fire
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & Numpad3:: ; Teleport
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & Numpad4:: ; Take Down
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad7:: ; Combo - 5 Hits
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2200
Send {g down}
Sleep, 30
Send {g up}
Sleep, 30
Send {g down}
Sleep, 30
Send {g up}
Sleep, 100
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad8:: ; Combo - 6 Hits + 2 (sometimes misses)
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 800
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 500
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2000
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad9:: ; Combo - 3 Hits + 4 + 2
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 300
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2400
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

Q & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {Space down}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Send {Space up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
return

Q & NumpadAdd:: ; Babality (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {s down}
Sleep, 30
Send {s up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & NumpadDiv:: ; Fatality 1 - Split Decision (Distance: Touching)
Send {d down}
Sleep, 30
Send {d up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {u down}
Sleep, 30
Send {u up}
return

Q & NumpadMult:: ; Fatality 2 - Nether-Gate (Distance: Touching)
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
return

Q & NumpadSub:: ; Fatality 3 - Toasty (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Send {Space down}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Send {Space up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
return


; E + Numpad Commands (your character in the right)

E & Numpad1:: ; Spear
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
return

E & Numpad2:: ; Demon Fire
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {u down}
Sleep, 30
Send {u up}
return

E & Numpad3:: ; Teleport
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

E & Numpad4:: ; Take Down
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad7:: ; Combo - 5 Hits
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2200
Send {g down}
Sleep, 30
Send {g up}
Sleep, 30
Send {g down}
Sleep, 30
Send {g up}
Sleep, 100
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad8:: ; Combo - 6 Hits + 2 (sometimes misses)
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 800
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 500
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2000
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad9:: ; Combo - 3 Hits + 4 + 2
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 300
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2400
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 400
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {j down}
Sleep, 30
Send {j up}
return

E & Numpad0:: ; Stage Fatality (Distance: Varies)
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {Space down}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Send {Space up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
return

E & NumpadAdd:: ; Babality (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {s down}
Sleep, 30
Send {s up}
Send {u down}
Sleep, 30
Send {u up}
return

E & NumpadDiv:: ; Fatality 1 - Split Decision (Distance: Touching)
Send {a down}
Sleep, 30
Send {a up}
Sleep, 10
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {u down}
Sleep, 30
Send {u up}
return

E & NumpadMult:: ; Fatality 2 - Nether-Gate (Distance: Touching)
Send {d down}
Sleep, 30
Send {d up}
Send {a down}
Sleep, 30
Send {a up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
return

E & NumpadSub:: ; Fatality 3 - Toasty (Distance: Jump)
Send {s down}
Sleep, 30
Send {s up}
Send {Space down}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Sleep, 30
Send {w down}
Sleep, 30
Send {w up}
Send {Space up}
Sleep, 30
Send {u down}
Sleep, 30
Send {u up}
return
User avatar
Kamidogu
Apprentice
Posts: 80
Joined: Thu Sep 12, 2013 7:23 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by Kamidogu »

Hopefully it's okay if I post here, never thought about using AHK in this manner. Very nice post! Thanks, it will be pretty entertaining for those hard to remember fatalities. No more pausing for me!
User avatar
percitrovsk
Mortal
Posts: 26
Joined: Tue Feb 10, 2015 12:19 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by percitrovsk »

Kamidogu,

Thanks. But be careful! As I said in the first post, if you already progressed the game with a gamepad, you should use the script only for the 2 Player, or you may have problems with your save file.

I know the forum seems dead, but I have hope in something: about a month before MKX Release, WB will make a mega discount for MKKE (to attract new players) and many of them will want to mod the game. I think it would be nice to already have some working mods/skins for the updated Steam.

Or I may be wrong. No discounts for MK9, MKX will be released and all modders will migrate to the new game. It would be the end of the MK9 forum (that's why I updated some skins, but not so many. It depends if there are people interested).

Since I think this topic isn't going to be much viewed and you helped me with the Color Picker, tell me your favorite character. I will gladly try to make his/her script. Even if you don't use it (because the gamepad), I will post here to anyone who doesn't have a joystick.
User avatar
Kamidogu
Apprentice
Posts: 80
Joined: Thu Sep 12, 2013 7:23 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by Kamidogu »

Thanks for the heads up percitrovsk! I definitely do keep a handy backup just in case.

In my own opinion, unfortunately the update really hurt the game more than it actually 'fixed'. HVS did a terrible job fixing the supposed issues with the online connectivity. Even with the update, I was lucky if I could stay in a match for longer than 1 round. This is mainly why I stayed with the pre-patched version, since I already had many mods installed already and was too lazy to update each one individually.

It's great to have options though, so thanks for updating many of the classic mods. Along with folks like CynicalHippie who's quality mods really made me think twice about staying with the pre-patched version. Sonya with the classic MK3 kick sound? YES please!

I'm with you though, wish we could see more activity. AND hope that's what MKX will accomplish. Hopefully more activity that will be divided in between both games.

And no worries, I actually do have a gamepad, but sometimes I boot the game without it. Just to test a thing or two out. But I found your use of AHK to be interesting for offline play. For example for really easy fatalities, or maybe even for complicated juggle combos? So again, thanks for contributing what you can to the MK community. Hopefully in the upcoming months we will see a lot more activity in these forums! :)
User avatar
ironman92710
Mortal
Posts: 2
Joined: Tue Feb 16, 2016 5:11 pm
Side: Darkness

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by ironman92710 »

Thank you so much for this base that i could expand upon. with your help i made these masterpiece

Q & Numpad5:: ; Combo of death v1.1
Send {w down}{d down}
Sleep, 500
Send {w up}{d up}
Send {u down}
Sleep, 30
Send {u up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 300
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2200
Send {w down}
Sleep, 650
Send {w up}
Send {u down}
Sleep, 30
Send {u up}
Sleep, 200
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 300
Send {d up}
Sleep, 30
Send {a down}{u down}
Sleep, 30
Send {a up}{u up}
Sleep, 800
Send {w down}{d down}
Sleep, 60
Send {w up}{d up}
Send {j down}
Sleep, 30
Send {j up}
Sleep, 30
Send {s down}
Sleep, 30
Send {s up}
Send {a down}
Sleep, 30
Send {a up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 465
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 30
Send {a up}
Sleep, 370
Send {g down}
Sleep, 30
Send {g up}
Sleep, 30
Send {Space down}{Shift down}
Sleep, 30
Send {Space up}{Shift up}
return

E & Numpad5:: ; Combo of death v1.1
Send {w down}{a down}
Sleep, 500
Send {w up}{a up}
Send {u down}
Sleep, 30
Send {u up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 30
Send {t down}
Sleep, 30
Send {t up}
Sleep, 300
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Send {t down}
Sleep, 30
Send {t up}
Sleep, 2200
Send {w down}
Sleep, 650
Send {w up}
Send {u down}
Sleep, 30
Send {u up}
Sleep, 200
Send {a down}
Sleep, 30
Send {a up}
Sleep, 30
Send {a down}
Sleep, 300
Send {a up}
Sleep, 30
Send {d down}{u down}
Sleep, 30
Send {d up}{u up}
Sleep, 800
Send {w down}{a down}
Sleep, 60
Send {w up}{a up}
Send {j down}
Sleep, 30
Send {j up}
Sleep, 30
Send {s down}
Sleep, 30
Send {s up}
Send {d down}
Sleep, 30
Send {d up}
Send {g down}
Sleep, 30
Send {g up}
Sleep, 465
Send {d down}
Sleep, 30
Send {d up}
Sleep, 30
Send {d down}
Sleep, 30
Send {d up}
Sleep, 370
Send {g down}
Sleep, 30
Send {g up}
Sleep, 30
Send {Space down}{Shift down}
Sleep, 30
Send {Space up}{Shift up}
return

try that on for a size
(forward jump punch first two hits of scorpians fp combo spear neutral jump punch forward dash pop up forward jump kick teleport back dash front kick x-ray)

v1.1-added a bunch of tweaks and timing fixes so it hits every time(or at least a lot more often)perfectly from any distance
Last edited by ironman92710 on Wed Feb 17, 2016 11:49 am, edited 1 time in total.
User avatar
ironman92710
Mortal
Posts: 2
Joined: Tue Feb 16, 2016 5:11 pm
Side: Darkness

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by ironman92710 »

I think i might continue making these custom scripts as long as i can find new combos that are awesome and i will just keep posting them here as add-ons to your scripts
User avatar
Mr_Majestick
Mortal
Posts: 6
Joined: Tue Feb 15, 2022 6:37 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by Mr_Majestick »

Do you know how to write an edit scripts for character in Mortal Kombat 9 for PS3 eg: overpowering the char and adding additional moves like subzero and scorpion moves on the same character
User avatar
MR ZERO
Mortal
Posts: 8
Joined: Tue Dec 26, 2023 7:26 pm

Re: AutoHotKey Scripts for playing MK9 with Keyboard

Post by MR ZERO »

Hello mate well done on the scripts i just have one question how you managed to make autohotkey work on mk9 i just tried many times but it seems that the app don't affect the game
Post Reply

Return to “Mortal Kombat 9 PC Gameplay Mods”