@@ -41,7 +41,7 @@ Func _AutoUpgrade()
4141 If $iLoopAmount > = $iLoopMax Or $iLoopAmount > = 12 Then ExitLoop ; 6 loops max, to avoid infinite loop
4242
4343 ClickP($aAway , 1 , 0 , " #0000" ) ; Click Away
44- randomSleep(1000 )
44+ randomSleep($DELAYAUTOUPGRADEBUILDING1 )
4545 VillageReport()
4646
4747 If $g_iFreeBuilderCount < 1 Then
@@ -63,7 +63,7 @@ Func _AutoUpgrade()
6363
6464 ; open the builders menu
6565 Click(295 , 30 )
66- If _Sleep(1000 ) Then Return
66+ If _Sleep($DELAYAUTOUPGRADEBUILDING1 ) Then Return
6767
6868 ; search for 000 in builders menu, if 000 found, a possible upgrade is available
6969 If QuickMIS(" BC1" , $g_sImgAUpgradeZero , 180 , 80 + $g_iNextLineOffset , 480 , 350 ) Then
@@ -83,7 +83,7 @@ Func _AutoUpgrade()
8383
8484 ; if it's an upgrade, will click on the upgrade, in builders menu
8585 Click(180 + $g_iQuickMISX , 80 + $g_iCurrentLineOffset )
86- If _Sleep(500 ) Then Return
86+ If _Sleep($DELAYAUTOUPGRADEBUILDING1 ) Then Return
8787
8888 ; check if any wrong click by verifying the presence of the Upgrade button (the hammer)
8989 If Not QuickMIS(" BC1" , $g_sImgAUpgradeUpgradeBtn , 120 , 630 , 740 , 670 ) Then
@@ -141,7 +141,7 @@ Func _AutoUpgrade()
141141
142142 ; if upgrade don't have to be ignored, click on the Upgrade button to open Upgrade window
143143 Click(120 + $g_iQuickMISX , 630 + $g_iQuickMISY )
144- If _Sleep(1000 ) Then Return
144+ If _Sleep($DELAYAUTOUPGRADEBUILDING1 ) Then Return
145145
146146 Switch $g_aUpgradeNameLevel [1 ]
147147 Case " Barbarian King" , " Archer Queen" , " Grand Warden"
0 commit comments