public void attdam(int maxDamage, int range) {
 for (Player p : server.playerHandler.players)
  {
   if(p != null) 
    {
     client person = (client)p;
     if((person.playerName != null || person.playerName != "null"))
      {
       if(person.distanceToPoint(absX, absY) <= range && person.playerId != playerId)
        {
         int damage = misc.random(maxDamage);
         if (person.playerLevel[3] - hitDiff < 0) 
         damage = person.playerLevel[3];
	person.hitDiff = damage;
	person.KillerId = playerId;
	person.updateRequired = true;
	person.hitUpdateRequired = true;
        }
      }
    }
  }
}