The Wiki for Tale 4 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.

User:Sithid/Macros/AutoIT/Watering

From A Tale in the Desert
< User:Sithid‎ | Macros‎ | AutoIT
Revision as of 00:59, 18 December 2008 by Sithid (talk | contribs) (New page: <pre> #cs -------------------------------------------------------------------------------------- AutoIt Version 3.2.12.1 Author: Sithid Date: 07.12.08 Version: 0.3 Script Functi...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
#cs --------------------------------------------------------------------------------------
	
	AutoIt Version 3.2.12.1
	Author:		Sithid
	Date:		07.12.08
	Version:	0.3
	
	Script Function:
	Plant Watering Hotkey

#ce --------------------------------------------------------------------------------------

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt( "MustDeclareVars", 1 )

Global $Paused = False

HotKeySet( "{ESC}", "Terminate" )
HotKeySet( "{PAUSE}", "TogglePause" )
HotKeySet( "{w}", "WaterPlant" )

WinWaitActive( "eGenesis Client" )
	
Main()

Func Main()
	Do
		Sleep( 100 )
	Until 1 = 2
EndFunc

Func WaterPlant()
	Local $MouseLoc = MouseGetPos()
	MouseClick( "left", $MouseLoc[0], $MouseLoc[1], 1, 1 )
	Sleep( 200 )
	MouseClick( "left", $MouseLoc[0] + 50, $MouseLoc[1] + 3, 1, 1 )
EndFunc

Func TogglePause()
	$Paused = Not $Paused
			
	While $Paused
		Sleep(100 )
	WEnd
EndFunc

Func Terminate()
		Exit
EndFunc