well as ArmorReplenishGain replenishes armor all the time i would rather say ArmorGain should be used for that because i didn't get the point of ArmorGain yet, it only replenishes armor if the current armor is != x*100 (partly regenerated)Kyb wrote:If we can forbid the Armor regain with the attribute"Player.ArmorReplenishGain", it would be nice too.
anyways, you can reach your desired functionality with only one line of code
Code: Select all
if (Player.Armor % 100 == 0) Player.Armor = (Player.Armor / 100) * 100;
regarding your code about
Events when players regenerate their armor (with 1-8-3 and 1-8-4 blocks).
i would rather suggest using key-value-coding instead of arrays
Code: Select all
declare OldArmor for Player = 200;
if (Player.Armor % 100 != 0 && Player.Armor > OldArmor) SendMessage();
OldArmor = Player.Armor;
//Edit: just for the records, the suggested code doesn't work see the following post for the reason