@ironman47
you do realize these calculations would bug?
Example:
36 agi +10% of 36 = 39.6 (reals) or 39 (integers)
now substract that 10% again like in your triggers....
39 agi -10% of 39 = 35.1 (reals) or 35 (integers)
as you see... stat loss. think of a way to make it a bonus stat instead of changing the stats btw. (you know... the green +x to the right of the stat.)
a way of acomplishing this could be to create a stat boosting ability based on Attribute Bonus, make it show no icons and let it have... lets say 100 levels.
each level gives +1 agility more than the previous, 1/2/3/4/5/etc.etc.
when you pick up the item, give the hero manipulating the item this ability and set the level of the ability to the amount of x% boosted (save this in a integer somewhere for whenever you pick up/drop such an item)
the only problem with above mentioned solution is that it'll cause a minor freeze on the first go. (tested.)