I don't know if there's an action to replace item carried by a hero, but I think there is. So the trigger would look like this.
Trigger:
Events
A unit is attacked
Conditions
Owner of Attacking Unit is not neutral
Owner of Attacking Unit is not sentinel/scourge (the computer controllers)
Attacked Unit has item Heart
Actions
if-then-else
if
HeartDisabledTime[Player Number of Owner of Attacked Unit] Less Than or Equal to 0
then
Replace Heart item with Disabled Heart item
else
Set HeartDisabledTime[Player Number of Owner of Attacked Unit] = 8
Trigger:
Events
Every 1 second of game time
Conditions
Actions
For loop Integer A 1 to MaxPlayersInYourGame
Loop-actions
Set HeartDisabledTime[Integer A] = HeartDisabledTime[Integer A] - 1
if-then-else
if
HeartDisabledTime[Integer A] Equal to 0
Hero[Integer A] has item Disabled Heart
then
Replace Disabled Heart item for Hero[Integer A] with Heart
Else
Firstly, it would be best if you have a Unit array, e.g. Hero that stores every player's Hero (I am assuming in your map you can only control a Hero at a time). Then an Integer array, e.g. HeartDisabledTime to serve as a "timer". When a hero is attacked by a player controlled unit, the Heart will get replaced by the disabled version and have timer set to 8. In the second trigger, the "timer" will reduce by 1 every second of game time. If any of the timer reaches 0 and the corresponding hero has the disabled heart, it will be replaced with the normal heart.
And it was obviously freehanded, I don't have WE with me. I hope this actually helps you a little.
Use a damage detection system with a 12-player array (real, that is the timer to enable it again) whenever a unit takes damage and has the Heart, remove the Heart and replace it with the Disabled one and set the timer to 8 (Set Heart_Timer = 8.00) and make another trigger that runs periodically every 0.05 seconds that reduces the timer by 0.05 (Set Heart_Timer = Heart_Timer - 0.05).
Remember to check that the attacker is a Hero (or Roshan/Your Boss if you want it).
Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.