Func IterateFilterAffix()
Local $index, $offset, $count, $item[10]
startIterateObjectsList($index, $offset, $count)
Dim $item_affix_2D[1][11]
Local $i = 0
$pv_affix=getlifep()
$compt = 0
;~ $ii=0
While iterateObjectsList($index, $offset, $count, $item)
$compt += 1
If Is_Affix($item,$pv_affix) Then
ReDim $item_affix_2D[$i + 1][11]
For $x = 0 To 9
$item_affix_2D[$i][$x] = $item[$x]
Next
if (StringInStr($item[1],"woodWraith_explosion") or StringInStr($item[1],"WoodWraith_sporeCloud_emitter") ) then $item_affix_2D[$i][10] = $range_ice
if StringInStr($item[1],"molten_trail") then $item_affix_2D[$i][10] = $range_lave
if StringInStr($item[1],"Desecrator") then $item_affix_2D[$i][10] = $range_profa
if (StringInStr($item[1],"bomb_buildup") or StringInStr($item[1],"Icecluster") or stringinstr($item[1],"Molten_deathExplosion") or stringinstr($item[1],"Molten_deathStart")) then $item_affix_2D[$i][10] = $range_ice
if (StringInStr($item[1],"demonmine_C") or StringInStr($item[1],"Crater_DemonClawBomb")) then $item_affix_2D[$i][10] = $range_mine
if StringInStr($item[1],"creepMobArm") then $item_affix_2D[$i][10] = $range_arm
if (StringInStr($item[1],"spore") or StringInStr($item[1],"Plagued_endCloud") or StringInStr($item[1],"Poison")) then $item_affix_2D[$i][10] = $range_peste
if StringInStr($item[1],"ArcaneEnchanted_petsweep") then $item_affix_2D[$i][10] = $range_arcane
;~ if $item_affix_2D[$i][10]-$item_affix_2D[$i][9]>0 then $ii=$ii+1
$i += 1
EndIf
WEnd
;~ or $ii=0
If $i = 0 Then
Return False
Else
_ArraySort($item_affix_2D, 0, 0, 0, 9)
Return $item_affix_2D
EndIf
EndFunc ;==>IterateFilterAffix
$BanAffixList="poison_humanoid|"&$BanAffixList
Func Is_Affix($item,$pv=0)
if $item[9]<50 then
if ((StringInStr($item[1],"bomb_buildup") and $pv<=$Life_explo/100 ) or _
(StringInStr($item[1],"demonmine_C") and $pv<=$Life_mine/100) or _
(StringInStr($item[1],"creepMobArm") and $pv<=$Life_arm/100 ) or _
(StringInStr($item[1],"woodWraith_explosion") and $pv<=$Life_spore/100) or _
(StringInStr($item[1],"WoodWraith_sporeCloud_emitter") and $pv<=$Life_spore/100 ) or _
(StringInStr($item[1],"Crater_DemonClawBomb") and $pv<=$Life_mine/100 ) or _
(stringinstr($item[1],"Molten_deathExplosion") and $pv<=$Life_explo/100 ) or _
(stringinstr($item[1],"Molten_deathStart") and $pv<=$Life_explo/100 ) or _
(StringInStr($item[1],"icecluster") and $pv<=$Life_ice/100 ) or _
(StringInStr($item[1],"spore") and $pv<=$Life_spore/100 ) or _
(StringInStr($item[1],"ArcaneEnchanted_petsweep") and $pv<=$Life_arcane/100 ) or _
(StringInStr($item[1],"desecrator") and $pv<=$Life_profa/100 ) or _
(StringInStr($item[1],"Plagued_endCloud") and $pv<=$Life_peste/100 ) or _
(StringInStr($item[1],"poison") and $pv<=$Life_poison/100 ) or _
(StringInStr($item[1],"molten_trail") and $pv<=$Life_lave/100 )) _
and checkfromlist($BanAffixList, $item[1]) = 0 then
Return True
Else
Return False
EndIf
EndIf
EndFunc ;==>Is_Affix