User:StrawberryBunny/Mineshaft.ahk

From Dwarf Fortress Wiki
Jump to navigation Jump to search

This is an AHK script to quickly designate exploratory mineshafts in an area, see Exploratory mining#Mine shafts

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; mineshaft.ahk						  ;
 ; this is an ahk script to place exploratory mine shafts.  ;
 ; press d and place the cursor				  ;
 ; in the top left corner of the area to be explored	  ;
 ; then use ctrl+shift+s to run				  ;
 ;							  ;
 ; NOTE:							  ;
 ; change variables x, y and depth to suit your conditions ;
 ; Author: StrawberryBunny
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ^+s::
x = 3
y = 3
depth = 15

Loop %x%
{
	Loop %y%
	{
		Loop %depth%
		{
			Send i
			Send {Enter}
			Send {Enter}
			Send +.
			Sleep 200
		}
		Loop %depth%
		{
			Send +,
			Sleep 200
		}
		Send {Down}
		Sleep 200
		Send {Down}
		Sleep 200
		Send {Down}
		Sleep 200
	}
	Send {Right}
	Sleep 200
	Send {Right}
	Sleep 200
	Send {Right}
	Sleep 200
	Loop %y%
	{
		Send {Up}
		Sleep 200
		
		Send {Up}
		Sleep 200
		
		Send {Up}
		Sleep 200
	}
}
return