public void SpecDamgNPC(int maxDamage) {
   if(server.npcHandler.npcs[attacknpc] != null) 
    {
        if (server.npcHandler.npcs[attacknpc].IsDead == false) {
	int damage = misc.random(maxDamage);
        if (server.npcHandler.npcs[attacknpc].HP - hitDiff < 0) 
        damage = server.npcHandler.npcs[attacknpc].HP;
        server.npcHandler.npcs[attacknpc].StartKilling = playerId;
	server.npcHandler.npcs[attacknpc].RandomWalk = false;
	server.npcHandler.npcs[attacknpc].IsUnderAttack = true;
	server.npcHandler.npcs[attacknpc].hitDiff = damage;
	server.npcHandler.npcs[attacknpc].updateRequired = true;
	server.npcHandler.npcs[attacknpc].hitUpdateRequired = true;
    } 
   }
  }