The Wiki for Tale 6 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Sithid:Macros:AutoIT

From ATITD6
Revision as of 21:01, 26 January 2012 by Sithid (talk | contribs) (→‎Brick Racks)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Brick Racks

Start the macro, switch to ATITD and get your camera setup for double F8 and then zoom in as far as you can and still see all your racks. Hover the mouse in the very middle of the top left most rack and hit F1.

You may have to do your own edits to the distance between racks based on your resolution etc.

Opt( "MustDeclareVars", 1 )

Global $Paused = False

HotKeySet( "!{ESC}", "Terminate" )
HotKeySet( "{PAUSE}", "TogglePause" )
HotKeySet( "{F1}", "SetStartLocation" )

WinWaitActive( "eGenesis Client" )

Global $StartLocation[2]
Global $ShopsVer = 4
Global $ShopsHor = 5
Global $Delay = 30000
Global $BrickType = "b"
Global $StartLocationSet = False
Main()

Func Main()
	Do
		Sleep( 100 )
	Until $StartLocationSet

	Do

		For $x = 0 To $ShopsHor - 1 Step 1
			For $y = 0 To $ShopsVer - 1 Step 1
				Local $xloc = 100 * $x
				Local $yloc = 100 * $y

				MouseMove( $StartLocation[0] + $xloc, $StartLocation[1] + $yloc, 1 )
				Send( "t" );
				Send( $BrickType );
			Next
		Next

		Sleep( $Delay );

	Until $Paused
EndFunc

Func SetStartLocation()
	If $Paused Then
		Return
	EndIf

	$StartLocation = MouseGetPos()
	$StartLocationSet = True
EndFunc

Func TogglePause()
	$Paused = Not $Paused
EndFunc

Func Terminate()
	Exit
EndFunc