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.

Difference between revisions of "Sithid:Macros:AutoIT"

From ATITD6
Jump to navigationJump to search
(Created page with "==Brick Racks==")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Brick Racks==
 
==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.
 +
<pre>
 +
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
 +
</pre>

Latest revision as of 21:01, 26 January 2012

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