Here is my NPCHeathRestore class I wrote.

Code:
public class NPCHealthRestore {

	private Client c;
	public NPCHealthRestore(Client Client) {
		this.c = Client;
	}
	

	public void IsHealing(int i) {
		int damage = Misc.random(40);
		int heal = (damage / 2);
	
		if (Server.npcHandler.npcs[i].HP <= 500 && Server.npcHandler.npcs[i].npcType == 50) {
			Server.npcHandler.npcs[i].HP += heal;
			Server.npcHandler.npcs[i].hitUpdateRequired = true;
			c.sendMessage("The monster drains your soul, healing itself.");
		} 
	}
	
}

Is there a method for getting the damage done to a player from an npc? so I can getDamageDone and make heal = (damagedone / 2)

then if the npc is less than 500 hp or whatever it may be the hits it does heal it by the hit/2?

any ideas on what I should change/add?