My change formation and casting macro

Talk about anything Legend of Grimrock 1 related here.
Post Reply
techzen
Posts: 4
Joined: Thu Apr 12, 2012 1:10 am

My change formation and casting macro

Post by techzen »

These give you the foundation to make your own scripts very easily, by just changing mouse coordinates, which can be found using mspaint. Super simple.
I posted this as a reply to another script but I figured I'd just make one since I might be updating what I do. This is really for people who have trouble with the combat for whatever reason. It should make things more accessible.

Here is an autohotkey script I wrote that will move your characters from back to front so you can melee attack etc. Spacebar and Capslock moves them.

This will only work if you play in fullscreen 1920x1080, but you can edit the file however you like. After hitting space or caps, the cursor will hover over the first equipped item square for easy left clicking should you need to. If you want to change how the mouse moves, open up fraps and take a screenshot of the game while playing. Open that in paint and move the cursor around. At the bottom right you will see the current mouse coordinates, that's how I found them anyway.

I made this for people who may have trouble moving the mouse quick enough or accurate enough for whatever reason that may be. Btw, use the "-" key on the numpad to suspend the script so you can hit space without it moving the mouse around etc.

Oh and to move the mouse to the center of the screen after a part of a script, just add this to the end of the relevant section.

Sleep 50
Mousemove x, y

Replace the x and y with your resolution settings divided by 2. That should put the cursor in the middle of your screen again.

Code: Select all

#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. ##831, 441, 437

Numpadsub::suspend

SendMode Play
#SingleInstance
 

 
Space::

Keywait Space
BlockInput On
Mousemove 1500, 950
Sleep 50
SendEvent {LButton down}

Sleep 50

MouseClickDrag, left, 1500, 950, 1500, 750

SendEvent {LButton up}

Sleep 50

MouseMove 1533, 846

BlockInput Off

return

Capslock::

Keywait Capslock
BlockInput On
Mousemove 1715, 950
Sleep 50
SendEvent {LButton down}

Sleep 50

MouseClickDrag, left, 1715, 950, 1715, 750

SendEvent {LButton up}

Sleep 50

MouseMove 1745, 846

BlockInput Off

return
Here is how I hotkey spells, you can put this in the same script file. This is meant to give you a way to make your own and edit them how you see fit. It's actually very easy. It's a bit of a spoiler so hopefully I can do code within a spoiler tag. Mouse coordinates per spell symbol if using 1920x1080 resolution.
SpoilerShow

Code: Select all

;THE FOLLOWING WILL BE COORDS FOR ALL THE SPELL ICONS
;  [1725, 950] -  [1770, 950] -  [1815, 950]
;  [1725, 995] -  [1770, 995] -  [1815, 995]
; [1725, 1040] - [1770, 1040] - [1815, 1040]
SpoilerShow

Code: Select all

F3::  ;Fireburst

Keywait F3

BlockInput On

MouseMove 1745, 1015        ;moves mouse to the bottom right character, first equipment slot, which is my wand for spell casting.  
Sleep 50

Click right
Sleep 50

MouseMove 1725, 950    ;chooses the appropriate symbol
Sleep 50

Click
Sleep 50

MouseMove 1858, 1018   ;moves mouse to casting icon
Sleep 50

MouseClick, right

BlockInput Off

return

F4::  ;Poison Cloud

Keywait F4

BlockInput On

MouseMove 1745, 1015
Sleep 50

Click right
Sleep 50

MouseMove 1725, 1040
Sleep 50

Click
Sleep 50

MouseMove 1858, 1018
Sleep 50

MouseClick, right

BlockInput Off

return
I will be playing the game, it's so fun, so if anybody has a question I probably won't answer instantly. I'll try to check back every hour or so in case there is any interest. If not, I'm sure this will help someone down the road.
Post Reply