My script can be modified (if you have a reasonably fast computer) to pop the delay to 15, instead of 50.
i'll post the changes here.
Code: Select all
; Legend of Grimrock
;==================
; Attack keys v 0.2a
; Autohotkey Script
; Original Ideas for % based locations and
; original script created by
;---------------------------
; d32
;----------original swap by-
; techzen
;---------------------------
; Script modified by
;---------------------------
; Adakos
;---------------------------
; Download Autohotkey at: http://www.autohotkey.com/
;==========================
;^^^^^^^^^^^^^^^^
; TO DO
;.................
;incorporate spells
;.................
;speed up swapping
;vvvvvvvvvvvvvvvvv
;
;
;
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
; YOU MUST SET YOUR RESOLUTION HERE <_DO IT
resX := 1920
resY := 1080
SetTitleMatchMode, 2
#IfWinActive Grimrock ahk_class EWindowClass
dx1l := 0.8 ;x loc left weapon slot L
dx2l := 0.9 ;x loc left weapon slot R
dx1r := 0.85 ;x loc right weapon slot L
dx2r := 0.95 ;x loc right weapon slot R
dy1 := 0.8 ;Y loc top row
dy2 := 0.95 ;Y loc bottom row
tlcx1 := 0.78 ;top left character portrait x
tlcy1 := 0.73 ;top left character portrait y
blcx1 := 0.78 ;bottom left character portrait x
blcy1 := 0.88 ;bottom left character portrait y
trcx1 := 0.89 ;top right character portrait x
trcy1 := 0.73 ;top right character portrait y
brcx1 := 0.89 ;bottom right character portrait x
brcy1 := 0.88 ;bottom right character portrait y
;sysget, resX, 16
;sysget, resY, 17
i::1 ;opens inventory
Numpad4::MouseClick, right, (resX*dx1l), (resY*dy1) ;attack left TL
Numpad5::MouseClick, right, (resX*dx2l), (resY*dy1) ;attack left TR
Numpad1::MouseClick, right, (resX*dx1l), (resY*dy2) ;attack left BL
Numpad2::MouseClick, right, (resX*dx2l), (resY*dy2) ;attack left BR
j::MouseClick, right, (resX*dx1l), (resY*dy1) ;attack left TL
k::MouseClick, right, (resX*dx2l), (resY*dy1) ;attack left TR
l::MouseClick, right, (resX*dx1l), (resY*dy2) ;attack left BL
`;::MouseClick, right, (resX*dx2l), (resY*dy2) ;attack left BR
m::MouseClick, right, (resX*dx1r), (resY*dy1) ;attack right TL
,::MouseClick, right, (resX*dx2r), (resY*dy1) ;attack right TR
.::MouseClick, right, (resX*dx1r), (resY*dy2) ;attack right BL
/::MouseClick, right, (resX*dx2r), (resY*dy2) ;attack right BR
;SWAP LEFT SIDE
Numpad6::
Keywait Numpad6
BlockInput On
MouseMove, (resX*tlcx1), (resY*tlcy1)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*tlcx1), (resY*tlcy1), (resX*blcx1), (resY*blcy1)
SendEvent {LButton up}
Sleep 15
BlockInput Off
return
;swap RIGHT SIDE
Numpad3::
Keywait Numpad3
BlockInput On
MouseMove, (resX*trcx1), (resY*trcy1)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*trcx1), (resY*trcy1), (resX*brcx1), (resY*brcy1)
SendEvent {LButton up}
Sleep 15
BlockInput Off
return
;MouseClick, right, (resX*tlcx1), (resY*tlcy1) - old script to select TL
;MouseClick, right, (resX*blcx1), (resY*blcy1) - old script to select BL
;MouseClick, right, (resX*trcx1), (resY*trcy1) -loc of TR portrait
;MouseClick, right, (resX*brcx1), (resY*brcy1) - loc of BR portrait
;attack TL , SWAP TL - BL , attack TL, SWAP TL-BL
Numpad7::
Keywait Numpad7
BlockInput On
MouseClick, right, (resX*dx1l), (resY*dy1) ;attack with tl(1)
Sleep 15
MouseMove, (resX*tlcx1), (resY*tlcy1) ;begin swap cycle (1)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*tlcx1), (resY*tlcy1), (resX*blcx1), (resY*blcy1)
SendEvent {LButton up}
Sleep 15
MouseClick, right, (resX*dx1l), (resY*dy1) ;attack with tl (2)
Sleep 15
MouseMove, (resX*tlcx1), (resY*tlcy1) ;begin swap cycle (2)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*tlcx1), (resY*tlcy1), (resX*blcx1), (resY*blcy1)
SendEvent {LButton up}
Sleep 15
BlockInput Off
return
;attack TL , SWAP TL - BL , attack TL, SWAP TL-BL
Numpad8::
Keywait Numpad8
BlockInput On
MouseClick, right, (resX*dx2l), (resY*dy1) ;attack with tr(1)
Sleep 15
MouseMove, (resX*trcx1), (resY*trcy1) ;begin swap cycle (1)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*trcx1), (resY*trcy1), (resX*brcx1), (resY*brcy1)
SendEvent {LButton up}
Sleep 15
MouseClick, right, (resX*dx2l), (resY*dy1) ;attack with tr(2)
Sleep 15
MouseMove, (resX*trcx1), (resY*trcy1) ;begin swap cycle (2)
Sleep 15
SendEvent {LButton down}
Sleep 15
MouseClickDrag, left, (resX*trcx1), (resY*trcy1), (resX*brcx1), (resY*brcy1)
SendEvent {LButton up}
Sleep 15
BlockInput Off
return
#IfWinActive