here sleep 20 , no exit , The risk is too high
ChooseEnemyBaseTarget is same , but here just sleep 4
CreepAttack
if target == null then
call Trace("No creep target found")
call Sleep(sleep_multiplier)
return
endif
ChooseEnemyBaseTarget
call StartGetEnemyBase()
loop
exitwhen not WaitGetEnemyBase() or town_threatened or isfleeing or CaptainRetreating() or CaptainIsEmpty()
if c > 4 then
return null
endif
call Sleep(1)
set c = c + 1
endloop
and here why not check target die ? AttackMoveKillCreep will check , It's all an attack Creep , should same
function CreepAttack takes integer str returns nothing
local unit target = null
set target = GetFittingCreep(target,str)
// Creep camp small is level 1 - 9
// Creep camp medium is level 10 - 19
// Creep camp strong is level 20 - 100
if target == null then
call Trace("No creep target found")
call Sleep(20)
return
endif
if air_strength > 15 then
call SetAllianceTargetIfLeadAndChat(target, C_Creep)
endif
call FormGroupAM(3)
call AttackMoveKillCreep(target)
set target = null
endfunction
here sleep 20 , no exit , The risk is too high ChooseEnemyBaseTarget is same , but here just sleep 4
and here why not check target die ? AttackMoveKillCreep will check , It's all an attack Creep , should same