Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 89 additions & 2 deletions Idle Runner.au3
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Resources\Icon.ico
#AutoIt3Wrapper_Outfile=D:\Idle Macro\idleslayer\Idle Runner_x32.exe
#AutoIt3Wrapper_Outfile_x64=D:\Idle Macro\idleslayer\Idle Runner_x64.exe
#AutoIt3Wrapper_Outfile=Idle Runner_x32.exe
#AutoIt3Wrapper_Outfile_x64=Idle Runner_x64.exe
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
Expand Down Expand Up @@ -37,6 +37,11 @@
#AutoIt3Wrapper_Res_File_Add=Resources\CraftDimensionalStaff.jpg, RT_RCDATA, DIMENSIONAL,0
#AutoIt3Wrapper_Res_File_Add=Resources\PerfectChestHunt.jpg, RT_RCDATA, PERFECTCHESTHUNT,0
#AutoIt3Wrapper_Res_File_Add=Resources\DisableRage.jpg, RT_RCDATA, DISABLERAGE,0
#AutoIt3Wrapper_Res_File_Add=Resources\Armory.jpg, RT_RCDATA, ARMORY,0
#AutoIt3Wrapper_Res_File_Add=Resources\SellExcVictorRing.jpg, RT_RCDATA, SELLVICTORRING,0
#AutoIt3Wrapper_Res_File_Add=Resources\SellNonExcellentArmor.jpg, RT_RCDATA, SELLNOEXCELENT,0
#AutoIt3Wrapper_Res_File_Add=Resources\SellExcellentArmor.jpg, RT_RCDATA, SELLEXCELENT,0
#AutoIt3Wrapper_Res_File_Add=Resources\RestartGame.jpg, RT_RCDATA, RESTARTGAME,0
#AutoIt3Wrapper_Res_File_Add=Resources\0.jpg, RT_RCDATA, NUM0,0
#AutoIt3Wrapper_Res_File_Add=Resources\10.jpg, RT_RCDATA, NUM10,0
#AutoIt3Wrapper_Res_File_Add=Resources\20.jpg, RT_RCDATA, NUM20,0
Expand Down Expand Up @@ -84,6 +89,7 @@
#include "Libraries\Common.au3"
#include "Libraries\AscendingHeights.au3"
#include "Libraries\Chesthunt.au3"
#include "Libraries\Armory.au3"
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
Expand All @@ -95,6 +101,11 @@
#include <EditConstants.au3>
#include <AutoItConstants.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>





setSetting()
_AuThread_Startup()
Expand Down Expand Up @@ -126,6 +137,8 @@ Func Main()
ControlFocus("Idle Slayer", "", "")
EndIf



; Silver box collect
PixelSearch(650, 36, 650, 36, 0xCA9700)
If Not @error Then
Expand Down Expand Up @@ -155,6 +168,15 @@ Func Main()
ControlSend("Idle Slayer", "", "", "{r}")
EndIf

; SellArmory
PixelSearch(169, 104, 169, 104, 0xFFF272)
If Not @error Then
SyncProcess(False)
SellArmory($bArmoryExcVictorState, $bArmoryNonExcellentState , $bArmoryExcellentState)
SyncProcess(True)
EndIf


; Collect minions
PixelSearch(99, 113, 99, 113, 0xFFFF7A)
If Not @error Then
Expand All @@ -171,6 +193,8 @@ Func Main()
If Not @error Then
SyncProcess(False)
Chesthunt($bNoLockpickingState, $bPerfectChestHuntState, $bNoReinforcedCrystalSaverState)
Sleep(1000)
RestartIdleSlayerGame("Idle Slayer")
SyncProcess(True)
EndIf

Expand Down Expand Up @@ -631,6 +655,25 @@ Func ClaimQuests()
MouseClick("left", 1000, 690, 1, 0)
Sleep(50)


; daily Quest
Sleep(500)
PixelSearch(1073, 174, 1073, 174, 0x379D37)
If Not @error Then
;Click on +2 daily Quest
Sleep(500)
MouseClick("left", 1073, 174, 1, 0)
EndIf

; weekly Quest
Sleep(500)
PixelSearch(1067, 230, 1067, 230, 0x379D37)
If Not @error Then
;Click on +2 daily Quest
Sleep(500)
MouseClick("left", 1067, 230, 1, 0)
EndIf

; Top of scrollbar
MouseMove(1254, 272, 0)
Do
Expand Down Expand Up @@ -737,3 +780,47 @@ Func ShootAndBoost()
ControlSend("Idle Slayer", "", "", "{Up}{Right}")
WEnd
EndFunc ;==>ShootAndBoost


Func RestartIdleSlayerGame($WindowTitle)

; Check if restart activated GUI
If $bRestartGameState Then

; Check if X hours select at GUI to continue
If TimerDiff($iTimerRestartGame) < ($iRestartGameTimer * 3600000) Then
Return ; Exit function, do not continue
EndIf

; If we are here, X hours have passed.
; RESET the timer immediately for the next cycle.
$iTimerRestartGame = TimerInit()

; Close Game
If WinExists($WindowTitle) Then
WinClose($WindowTitle)
WinWaitClose($WindowTitle, "", 5)

EndIf
Sleep(10000)


;Open Game
ShellExecute("steam://rungameid/1353300")
Sleep(10000)

;Start screen Click
MouseClick("left", 550, 320, 1, 0)
Sleep(10000)

;Wind Dash Click
MouseMove(113, 644, 0)
MouseDown("right")
Sleep(4000)
MouseUp("right")

WriteInLogs("Game restarted")

EndIf

EndFunc ;==>RestartIdleSlayerGame
182 changes: 182 additions & 0 deletions Libraries/Armory.au3
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
#include-once
#include "Common.au3"



Func SellArmory($bArmoryExcVictorState, $bArmoryNonExcellentState , $bArmoryExcellentState)

; Open Armory and scroll up
; Scroll down searching red !
; When find a red !, drag to shell
; Depending on the choices made in the GUI, you will either sell or keep the items.

Local $aCoord
;Click armory button
MouseClick("left", 169, 104, 1, 0)
Sleep(500)
;Click armory tab
MouseClick("left", 359, 694, 1, 0)
Sleep(500)
;Exit Key Items
MouseClick("left", 81, 610, 1, 0)
Sleep(500)
;Click for scroll
MouseClick("left", 476, 525, 1, 0)
Sleep(500)
;Scroll TOP
MouseWheel("up", 50)
Sleep(500)

; Scroll in Armory 7 times
For $i = 1 To 7

; Search red !
While 1
; Red pixel !
$aCoord = PixelSearch(31, 239, 472, 500, 0xE41111)

If Not @error Then
WriteInLogs("SellArmory 1 New Item Found")

; Drag to sell
Sleep(500)
MouseClickDrag("left", $aCoord[0], $aCoord[1]+10, 133, 618, 10)
Sleep(500)


; Check if Victor Ring
; If GUI is checked Break if not Cancel Break
If $bArmoryExcVictorState Then
;Search pattern for Exc Victor Ring 0x51E294 Positions : 711,518 . 629,519 . 687,515 .
Sleep(500)
PixelSearch(711, 518, 711, 518, 0x51E294)
If Not @error Then
PixelSearch(629, 519, 629, 519, 0x51E294)
If Not @error Then
PixelSearch(687, 515, 687, 515, 0x51E294)
If Not @error Then
WriteInLogs("SellArmory Excelent Victor Ring sold")

;Click Break 510,578 0x00A400
MouseClick("left", 510, 578, 1, 0)
Sleep(500)
EndIf
EndIf
EndIf
Else
; Dont sell
;Search pattern for Exc Victor Ring Positions : 711,518 . 629,519 . 687,515 .
Sleep(500)
PixelSearch(711, 518, 711, 518, 0x51E294)
If Not @error Then
PixelSearch(629, 519, 629, 519, 0x51E294)
If Not @error Then
PixelSearch(687, 515, 687, 515, 0x51E294)
If Not @error Then
WriteInLogs("SellArmory Excelent Victor Ring wasn´t sold")

;Click Cancel DONT SELL 676,580 0xAF0000
MouseClick("left", 676,580, 1, 0)
EndIf
EndIf
EndIf

EndIf

; Check if Non-Excellent Item
; If GUI is checked Break if not Cancel Break
If $bArmoryNonExcellentState Then
;Not Excelent Item (since 478,507, to 776,530) 0xFFFFFF White
Sleep(500)
PixelSearch(478,507, 776,530, 0xFFFFFF)
If Not @error Then
WriteInLogs("SellArmory Not Excelent Item sold")

;Click Break 510,578 0x00A400
MouseClick("left", 510, 578, 1, 0)
Sleep(500)
EndIf
Else
;Not Excelent Item (since 478,507, to 776,530) 0xFFFFFF White
Sleep(500)
PixelSearch(478,507, 776,530, 0xFFFFFF)
If Not @error Then
WriteInLogs("SellArmory > Not Excelent Item wasn´t sold")

;Click Cancel DONT SELL 676,580 0xAF0000
MouseClick("left", 676,580, 1, 0)
EndIf

EndIf

; Check if Non-Excellent Item
; If GUI is checked Break if not Cancel Break
If $bArmoryNonExcellentState Then
;Not Excelent Item (since 478,507, to 776,530) 0x738FE3 Blue
Sleep(500)
PixelSearch(478,507, 776,530, 0x738FE3)
If Not @error Then
WriteInLogs("SellArmory Not Excelent Item sold")

;Click Break 510,578 0x00A400
MouseClick("left", 510, 578, 1, 0)
Sleep(500)
EndIf
Else
;Not Excelent Item (since 478,507, to 776,530) 0x738FE3 Blue
Sleep(500)
PixelSearch(478,507, 776,530, 0x738FE3)
If Not @error Then
WriteInLogs("SellArmory > Not Excelent Item wasn´t sold")

;Click Cancel DONT SELL 676,580 0xAF0000
MouseClick("left", 676,580, 1, 0)
EndIf

EndIf

; Check if Excellent Item
; If GUI is checked Break if not Cancel Break
If $bArmoryExcellentState Then
;Excelent Item (since 478,507, to 776,530) GREEN 0x51E294
Sleep(500)
PixelSearch(478,507, 776,530, 0x51E294)
If Not @error Then
WriteInLogs("SellArmory Excelent Item sold")

;Click Break 510,578 0x00A400
MouseClick("left", 510, 578, 1, 0)
Sleep(500)
EndIf
Else
;Excelent Item (since 478,507, to 776,530) GREEN 0x51E294
Sleep(500)
PixelSearch(478,507, 776,530, 0x51E294)
If Not @error Then
WriteInLogs("SellArmory Excelent Item wasn´t sold")

;Click Cancel DONT SELL 676,580 0xAF0000
MouseClick("left", 676,580, 1, 0)
Sleep(500)
EndIf

EndIf



Else
ExitLoop
EndIf
WEnd

;Click for scroll
MouseClick("left", 476, 525, 1, 0)
Sleep(500)
; Scroll down
MouseWheel("down", 2)
Sleep(500)

Next
WriteInLogs("SellArmory Finish")
MouseClick("left", 467, 698, 1, 0)
EndFunc ;==>SellArmory
Loading