While $attack
$hTimer=TimerInit()
Sleep(5000)
If $iDiff >= $cyc Then
_IELinkClickByText($oIE,'Мой герой')
If Not (_IELinkClickByText($oIE,'Защита от роботов')) Then
_IELinkClickByText($oIE,'Снаряжение')
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText,'Починить все вещи за') Then
_IEAction($oLink, "click")
ExitLoop
EndIf
Next
$hTimer=_Timer_Init()
_IELinkClickByText($oIE,'Вернуться в бой')
Else
$action=False
_IEQuit($oIE)
MsgBox(0,'Bot Stopped','Причина: защита от роботов')
EndIf
Else
If Not (_IELinkClickByText($oIE,'Бepcepк (гoтoво)')) Then
$finish = False
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText,'Добивать') Then
_IEAction($oLink, "click")
$finish = True
ExitLoop
EndIf
Next
If $finish == False Then
If Not (_IELinkClickByText($oIE,'Бить врагов')) Then
$tower = False
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText,'Бить ') Then
_IEAction($oLink, "click")
$tower = True
ExitLoop
EndIf
Next
If $tower == False Then
_IEAction($oIE,'refresh')
EndIf
EndIf
EndIf
EndIf
EndIf
$iDiff = TimerDiff($hTimer)
WEnd