Skip to content

Instantly share code, notes, and snippets.

@iamnotacoder-djs
Created April 6, 2023 17:24
Show Gist options
  • Save iamnotacoder-djs/f3083ed42b5d272f4326d45076968876 to your computer and use it in GitHub Desktop.
Save iamnotacoder-djs/f3083ed42b5d272f4326d45076968876 to your computer and use it in GitHub Desktop.
Remnant: From the Ashes gun/armor switch script
#singleInstance, force
Setup := 0
Weapon := 0
*1::changeSetup()
changeSetup() {
global Setup
if (Setup < 1)
{
DllCall("SetCursorPos", int, 956, int, 654)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
DllCall("SetCursorPos", int, 1138, int, 679)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 656)
Sleep, 30
Send {LButton}{LButton}
DllCall("SetCursorPos", int, 1138, int, 434)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
Send {Esc}
DllCall("SetCursorPos", int, 1335, int, 671)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 913)
Sleep, 30
Send {LButton}{Down}{Down}{Space}{Esc}
Sleep, 30
DllCall("SetCursorPos", int, 968, int, 859)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 913)
Sleep, 30
Send {LButton}{Down}{Space}{Esc}
Setup := 1
}
else
{
DllCall("SetCursorPos", int, 956, int, 654)
Sleep, 30
Send {LButton}{LButton}
Sleep, 100
Send {Space}
Sleep, 100
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 656)
Sleep, 30
Send {LButton}{LButton}
Sleep, 100
Send {Space}
Sleep, 100
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 1335, int, 671)
Sleep, 30
Send {LButton}{LButton}
Sleep, 100
Send {Space}
Sleep, 100
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 968, int, 859)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 913)
Sleep, 30
Send {LButton}{Down}{Space}{Esc}
Setup := 0
}
}
*2::changeWeapon()
changeWeapon() {
global Weapon
if (Weapon < 1)
{
DllCall("SetCursorPos", int, 1194, int, 368)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
Send {x}
Sleep, 30
Send {Space}
Sleep, 30
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 1125, int, 671)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
Send {x}
Sleep, 30
Send {Down}{Down}{Right}{Space}
Sleep, 30
Send {Esc}
Sleep, 30
Send {Esc}
Sleep, 30
Weapon := 1
}
else
{
DllCall("SetCursorPos", int, 1194, int, 368)
Sleep, 30
Send {LButton}{LButton}
Sleep, 30
Send {x}
Sleep, 30
Send {Space}
Sleep, 30
Send {Esc}
Sleep, 30
DllCall("SetCursorPos", int, 1152, int, 913)
Sleep, 30
Send {LButton}{Down}{Space}
Sleep, 30
Send {x}
Sleep, 30
Send {Down}{Down}{Right}{Space}
Sleep, 30
Send {Esc}
Sleep, 30
Send {Esc}
Sleep, 30
Weapon := 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment