while i was looking at the distro attackhook i noticed a little, but critical bug that practically breaks the whole hook...
in this function
Code:
function GetArmorHit(byref d_info)
var hit_zone := CS_GetRandomArmorZone();
var armor_hit := CS_GetEquipmentInArmorZone(d_info.mobile, hit_zone);
if ( armor_hit.Size() < 1 )
return 0;
endif
var best_armor := 0;
foreach item in ( armor_hit )
if ( item.ar > best_armor.ar )
best_armor := item;
endif
SleepMS(2);
endforeach
return best_armor;
endfunction
there is
var best_armor := 0; and then
if ( item.ar > best_armor.ar )which is terribily wrong, and causes the function to return 0 nearly always, and with 0 armor you get huge damage...
so this is the fixed function:
Code:
function GetArmorHit(byref d_info)
var hit_zone := CS_GetRandomArmorZone();
var armor_hit := CS_GetEquipmentInArmorZone(d_info.mobile, hit_zone);
if ( armor_hit.Size() < 1 )
return 0;
endif
var best_armor := armor_hit[1];
foreach item in ( armor_hit )
if ( item.ar > best_armor.ar )
best_armor := item;
endif
SleepMS(2);
endforeach
return best_armor;
endfunction
cheers