Untitled
unknown
plain_text
13 days ago
3.2 kB
2
Indexable
Never
; GUI settings Gui, +Resize +Move Gui, Show, w400 h200, TMWA Client Data Script ; Function to click on bat Gui, Add, Button, x10 y10 w100 h30, Click Bat GuiControl, +gClickBat, Click Bat ; Function to check for loot Gui, Add, Button, x120 y10 w100 h30, Check Loot GuiControl, +gCheckLoot, Check Loot ; Function to collect loot Gui, Add, Button, x230 y10 w100 h30, Collect Loot GuiControl, +gCollectLoot, Collect Loot ; Function to pause script Gui, Add, Button, x340 y10 w100 h30, Pause Script GuiControl, +gPauseScript, Pause Script ; Function to sit down during pause Gui, Add, Button, x10 y50 w100 h30, Sit Down GuiControl, +gSitDown, Sit Down ; Set timer for random pauses SetTimer, PauseScript, 900000, 0 ; 15 minutes ; Set timer for checking loot SetTimer, CheckLoot, 1000, 0 ; 1 second ; Function to click on bat ClickBat: { ; Check if script is running in the specified program WinGetTitle, title, A if (title != "TMWA Client Data") { MsgBox, Script is not running in the specified program. return } ; Click on bat Click, Left, 1 } ; Function to check for loot CheckLoot: { ; Check if script is running in the specified program WinGetTitle, title, A if (title != "TMWA Client Data") { MsgBox, Script is not running in the specified program. return } ; Check for loot (bat teeth or bat wings) on the screen ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, *100 bat_teeth.png if (ErrorLevel = 0) { ; Collect loot Click, Left, 1 Sleep, 1000 } else { ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, *100 bat_wings.png if (ErrorLevel = 0) { ; Collect loot Click, Left, 1 Sleep, 1000 } else { ; Wait for 2 seconds before clicking on the next bat Sleep, 2000 } } } ; Function to collect loot CollectLoot: { ; Check if script is running in the specified program WinGetTitle, title, A if (title != "TMWA Client Data") { MsgBox, Script is not running in the specified program. return } ; Collect all loot Loop { ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, *100 bat_teeth.png if (ErrorLevel = 0) { Click, Left, 1 Sleep, 1000 } else { ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, *100 bat_wings.png if (ErrorLevel = 0) { Click, Left, 1 Sleep, 1000 } else { break } } } } ; Function to pause script PauseScript: { ; Pause script for a random duration between 1-5 minutes Random, pauseDuration, 60000, 300000 Sleep, pauseDuration ; Sit down during pause Send, {s} } ; Function to sit down during pause SitDown: { Send, {s} } ; GUI event handlers GuiClose: ExitApp GuiSize: { ; Resize GUI Gui, Show, w%A_GuiWidth% h%A_GuiHeight% }
Leave a Comment