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.

Difference between revisions of "User:Jondan/stitch.ahk"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (preformatted style)
m (preformatted style (this time i mean it...))
 
Line 12: Line 12:
 
   ; Modified by: Jondan                                                        ;
 
   ; Modified by: Jondan                                                        ;
 
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+
 
  x = 3
 
  x = 3
 
  y = 3
 
  y = 3
 
  depth = 3
 
  depth = 3
 
  wait = 100
 
  wait = 100
 
+
 
   ^+c::
 
   ^+c::
 
  inputbox x, Input Length, Vertical pattern length: x-axis
 
  inputbox x, Input Length, Vertical pattern length: x-axis
Line 24: Line 24:
 
  inputbox wait, Input Delay, Delay in miliseconds (>= 100 recommended)
 
  inputbox wait, Input Delay, Delay in miliseconds (>= 100 recommended)
 
  return
 
  return
 
+
 
   ^+s::
 
   ^+s::
 
  SetKeyDelay %wait%
 
  SetKeyDelay %wait%
 
+
 
  VarRuntime := ((5 * x * y * depth) + (22 * x * y)) / 10
 
  VarRuntime := ((5 * x * y * depth) + (22 * x * y)) / 10
 
  VarRuntimeMinutes := VarRuntime / 60
 
  VarRuntimeMinutes := VarRuntime / 60
 
  VarRuntimeHours := VarRuntimeMinutes / 60
 
  VarRuntimeHours := VarRuntimeMinutes / 60
 
  VarXCount = 1
 
  VarXCount = 1
 
+
 
  MsgBox Estimated time to run is %VarRuntime% seconds / %VarRuntimeMinutes% minutes / %VarRuntimeHours% hours
 
  MsgBox Estimated time to run is %VarRuntime% seconds / %VarRuntimeMinutes% minutes / %VarRuntimeHours% hours
 
+
 
  Loop %x%
 
  Loop %x%
 
  {
 
  {
 
     VarYCount = 1
 
     VarYCount = 1
 
+
 
     Loop %y%
 
     Loop %y%
 
     {
 
     {
Line 51: Line 51:
 
             Send i
 
             Send i
 
           }
 
           }
 
+
 
           Send {Enter 2}+.
 
           Send {Enter 2}+.
 
       }
 
       }
 
+
 
       Send u{Enter 2}d
 
       Send u{Enter 2}d
 
+
 
       if ( VarXCount < x )
 
       if ( VarXCount < x )
 
       {
 
       {
 
           Send {Right}{Enter}{Right}{Enter}{Left 2}
 
           Send {Right}{Enter}{Right}{Enter}{Left 2}
 
       }
 
       }
 
+
 
       Loop %depth%
 
       Loop %depth%
 
       {
 
       {
 
           Send +,
 
           Send +,
 
       }
 
       }
 
+
 
       if ( VarYCount < y )
 
       if ( VarYCount < y )
 
       {
 
       {
 
           Send {Down}{Enter}{Down}{Enter}{Down}
 
           Send {Down}{Enter}{Down}{Enter}{Down}
 
       }
 
       }
 
+
 
       VarYCount += 1
 
       VarYCount += 1
 
     }
 
     }
 
+
 
     if ( VarXCount < x )
 
     if ( VarXCount < x )
 
     {
 
     {
 
       Send {Right 3}
 
       Send {Right 3}
 
+
 
       Loop % y - 1
 
       Loop % y - 1
 
       {
 
       {
Line 84: Line 84:
 
       }
 
       }
 
     }
 
     }
 
+
 
     VarXCount += 1
 
     VarXCount += 1
 
  }
 
  }
 
+
 
  MsgBox All done!
 
  MsgBox All done!
 
+
 
  return
 
  return

Latest revision as of 21:05, 16 June 2009

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; mineshaft.ahk                                                              ;
 ; This is an AHK script to place exploratory mine shafts. Press d and place  ;
 ; the cursor in the top left corner (on the top floor) of the area to be     ;
 ; explored then use CTRL+SHIFT+S to run.                                     ;
 ;                                                                            ;
 ; NOTE:                                                                      ;
 ; Change variables x, y and depth, or press CTRL+SHIFT+C, to suit your       ;
 ; conditions.                                                                ;
 ;                                                                            ;
 ; Original author: StrawberryBunny                                           ;
 ; Modified by: Jondan                                                        ;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

x = 3
y = 3
depth = 3
wait = 100

 ^+c::
inputbox x, Input Length, Vertical pattern length: x-axis
inputbox y, Input Width, Horizontal pattern width: y-axis
inputbox depth, Input Depth, Mineshaft depth: z-axis
inputbox wait, Input Delay, Delay in miliseconds (>= 100 recommended)
return

 ^+s::
SetKeyDelay %wait%

VarRuntime := ((5 * x * y * depth) + (22 * x * y)) / 10
VarRuntimeMinutes := VarRuntime / 60
VarRuntimeHours := VarRuntimeMinutes / 60
VarXCount = 1

MsgBox Estimated time to run is %VarRuntime% seconds / %VarRuntimeMinutes% minutes / %VarRuntimeHours% hours

Loop %x%
{
   VarYCount = 1

   Loop %y%
   {
      Loop %depth%
      {
         if ( A_Index = 1 )
         {
            Send j
         }
         else
         {
            Send i
         }

         Send {Enter 2}+.
      }

      Send u{Enter 2}d

      if ( VarXCount < x )
      {
         Send {Right}{Enter}{Right}{Enter}{Left 2}
      }

      Loop %depth%
      {
         Send +,
      }

      if ( VarYCount < y )
      {
         Send {Down}{Enter}{Down}{Enter}{Down}
      }

      VarYCount += 1
   }

   if ( VarXCount < x )
   {
      Send {Right 3}

      Loop % y - 1
      {
         Send {Up 3}
      }
   }

   VarXCount += 1
}

MsgBox All done!

return