;-------------------------------------------------------------------------------
; Global Settings
;-------------------------------------------------------------------------------
#RequireAdmin
Global $pos[2]
Global $SleepTime = Random(1000, 2000, 1) ; Random sleeptime from 1 up to 2
Global $g_bPaused= 0;
;-------------------------------------------------------------------------------
; HotKey Definitions
;-------------------------------------------------------------------------------
HotKeySet("{ESC}", "Stop") ; Stop the script with "escape" button
HotKeySet("{PAUSE}", "TogglePause") ; Pause the script with "pause" button
;-------------------------------------------------------------------------------
; Wait for active "Trove" Window Name
;-------------------------------------------------------------------------------
WinActivate("Trove") ; Wait for active "Trove" Window Name
;-------------------------------------------------------------------------------
; Function for repeating the search function
;-------------------------------------------------------------------------------
Call("Repeat")
Func Repeat()
While 1 ; Always repeat the search function for the boots
Call("search")
Wend
EndFunc
;-------------------------------------------------------------------------------
; Function to search for the boots
;-------------------------------------------------------------------------------
search()
Func search()
$pos = PixelSearch( 1525, 150, 1920, 910, 0x443B28 ) ; search for color in HEX 0x443B28 in your inventory
If IsArray($pos) Then ; If he founds the boots,
Sleep($SleepTime)
MouseMove ($pos[0], $pos[1], 5) ; Place the mouse over the boots
Sleep($SleepTime)
MouseClickDrag("left", $pos[0], $pos[1], 950, 540, 2) ; Drop the boots
EndIf
EndFunc
;-------------------------------------------------------------------------------
; Pause
;-------------------------------------------------------------------------------
Func TogglePause()
$g_bPaused = Not $g_bPaused
While $g_bPaused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
;-------------------------------------------------------------------------------
; Quitter
;-------------------------------------------------------------------------------
Func Stop()
Exit 0
EndFunc ;==>Stop
; ~~Heck~~