Created
March 19, 2020 21:56
-
-
Save AdrienHorgnies/3ec43a730fb7f777103b1b74b1f414c6 to your computer and use it in GitHub Desktop.
sfv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; A set of scenario to record in training mode. | |
; place focus on button to start record then press shortcut for given scenario | |
F11::Suspend, Toggle | |
jump(direction) | |
{ | |
if (direction = "left") | |
{ | |
Send, {Left Down} | |
Send, {Up Down} | |
Sleep, 20 | |
Send, {Left Up} | |
Send, {Up Up} | |
} | |
else if (direction = "right") | |
{ | |
Send, {Right Down} | |
Send, {Up Down} | |
Sleep, 20 | |
Send, {Right Up} | |
Send, {Up Up} | |
} | |
else if (direction = "vertical") | |
{ | |
Send, {Up Down} | |
Sleep, 20 | |
Send, {Up Up} | |
} | |
else | |
{ | |
MsgBox, "Unrecognised direction, use left or right" | |
} | |
} | |
walk(direction, duration) | |
{ | |
if (direction = "left") | |
{ | |
Send, {Left Down} | |
Sleep, duration | |
Send, {Left Up} | |
} | |
else if (direction = "right") | |
{ | |
Send, {Right Down} | |
Sleep, duration | |
Send, {Right Up} | |
} | |
else | |
{ | |
MsgBox, "Unrecognised direction, use left or right" | |
} | |
} | |
; MENU NAVIGATION | |
open_menu() | |
{ | |
Send, {Enter Down} | |
Sleep, 20 | |
Send, {Enter Up} | |
} | |
menu_left() | |
{ | |
Send, {k Down} | |
Sleep, 20 | |
Send, {k Up} | |
} | |
menu_right() | |
{ | |
Send, {j Down} | |
Sleep, 20 | |
Send, {j Up} | |
} | |
menu_click() | |
{ | |
Send, {b Down} | |
Sleep, 20 | |
Send, {b Up} | |
} | |
menu_close() | |
{ | |
Send, {n Down} | |
Sleep, 20 | |
Send, {n Up} | |
} | |
left() | |
{ | |
Send, {a Down} | |
Sleep, 20 | |
Send, {a Up} | |
} | |
down() | |
{ | |
Send, {s Down} | |
Sleep, 20 | |
Send, {s Up} | |
} | |
right() | |
{ | |
Send, {d Down} | |
Sleep, 20 | |
Send, {d Up} | |
} | |
up() | |
{ | |
Send, {w Down} | |
Sleep, 20 | |
Send, {w Up} | |
} | |
; PUNCHES | |
lp() | |
{ | |
Send, {g Down} | |
Sleep, 20 | |
Send, {g Up} | |
} | |
mp() | |
{ | |
Send, {h Down} | |
Sleep, 20 | |
Send, {h Up} | |
} | |
hp() | |
{ | |
Send, {j Down} | |
Sleep, 20 | |
Send, {j Up} | |
} | |
tp() | |
{ | |
Send, {k Down} | |
Sleep, 20 | |
Send, {k Up} | |
} | |
; KICKS | |
lk() | |
{ | |
Send, {b Down} | |
Sleep, 20 | |
Send, {b Up} | |
} | |
mk() | |
{ | |
Send, {n Down} | |
Sleep, 20 | |
Send, {n Up} | |
} | |
hk() | |
{ | |
Send, {m Down} | |
Sleep, 20 | |
Send, {m Up} | |
} | |
tk() | |
{ | |
Send, {, Down} | |
Sleep, 20 | |
Send, {, Up} | |
} | |
; manipulations | |
qcl() ; quarter circle left | |
{ | |
Send, {Down Down} | |
Sleep, 20 | |
Send, {Left Down} | |
Sleep, 20 | |
Send, {Down Up} | |
Sleep, 20 | |
Send, {Left Up} | |
} | |
qcr() ; quarter circle right | |
{ | |
Send, {Down Down} | |
Sleep, 20 | |
Send, {Right Down} | |
Sleep, 20 | |
Send, {Down Up} | |
Sleep, 20 | |
Send, {Right Up} | |
} | |
; data | |
wait_frames(n) | |
{ | |
Sleep, Floor(n * 1000 / 60) | |
} | |
; specials | |
hadouken(direction, strength) | |
{ | |
if (direction = "left") | |
{ | |
qcl() | |
} | |
else if (direction = "right") | |
{ | |
qcr() | |
} | |
else | |
{ | |
MsgBox, "direction is left or right" | |
} | |
if (strength = "low") | |
{ | |
lp() | |
} | |
else if (strength = "medium") | |
{ | |
mp() | |
} | |
else if (strength = "strong") | |
{ | |
hp() | |
} | |
else | |
{ | |
MsgBox, "strength is low, medium or strong" | |
} | |
wait_frames(45) | |
} | |
; recording | |
record(scenario) | |
{ | |
func := Func(scenario) | |
menu_click() | |
func.Call() | |
open_menu() | |
} | |
record_all(scenari) | |
{ | |
Loop % scenari.Length() | |
{ | |
record(scenari[A_Index]) | |
Sleep, 500 | |
menu_close() ; quit recording menu | |
Sleep, 500 | |
menu_left() ; go to tab 1 | |
Sleep, 500 | |
menu_click() ; restart battle | |
Sleep, 500 | |
open_menu() ; open menu back | |
Sleep, 500 | |
menu_right() ; go to tab 2 | |
down() ; go to recordings settings | |
Sleep, 500 | |
menu_click() ; open recordings settings | |
Sleep, 500 | |
down() ; go to next recording | |
Sleep, 500 | |
} | |
} | |
scenario_jhk_high() | |
{ | |
; Jumping forward, jumping hard kick, moving backward | |
jump("left") | |
Sleep, 320 | |
hk() | |
walk("right", 1600) | |
} | |
scenario_jhk_far() | |
{ | |
; walking backward, jhk at max range, moving backward | |
walk("right", 300) | |
jump("left") | |
Sleep, 400 | |
hk() | |
walk("right", 1400) | |
} | |
scenario_hadouken() | |
{ | |
hadouken("left", "low") | |
} | |
F1::record_all(["scenario_jhk_high", "scenario_jhk_far", "scenario_hadouken"]) | |
F2::record("scenario_hadouken") | |
F4::ExitApp, 0 ; press F4 if script fucks up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#HotkeyInterval 1000 ; This is the default value (milliseconds). | |
#MaxHotkeysPerInterval 200 ; Max 200 hotkeys by seconds | |
; Script toggle | |
F12::Suspend, Toggle | |
; menu | |
Right::Enter | |
; moves | |
a::a ; left | |
z::s ; down | |
e::d ; right | |
Space::w ; up | |
; punches | |
NumpadAdd::k ; triple punch | |
Numpad4::g ; low punch | |
Numpad5::h ; medium punch | |
Numpad6::j ; hard punch | |
; kicks | |
NumpadEnter::, ; triple kick | |
Numpad1::b ; low kick | |
Numpad2::n ; medium kick | |
Numpad3::m ; hard kick | |
; commands | |
; grab | |
Numpad7:: | |
{ | |
Send, {g Down}{b Down} | |
KeyWait, Numpad7 | |
Send, {g Up}{b Up} | |
} | |
return | |
; v-skill | |
Numpad8:: | |
{ | |
Send, {h Down}{n Down} | |
KeyWait, Numpad8 | |
Send, {h Up}{n Up} | |
} | |
return | |
; v-trigger | |
Numpad9:: | |
{ | |
Send, {j Down}{m Down} | |
KeyWait, Numpad9 | |
Send, {j Up}{m Up} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment