v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

User:StrawberryBunny/Mineshaft.ahk

From Dwarf Fortress Wiki
< User:StrawberryBunny
Revision as of 21:19, 1 December 2008 by EvilStickMan (talk | contribs) (fixed an algorithmic error)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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