int range = 500;
int minRangeCreature = range + 1;
Creature minRangeCreatureObject = null;
for (Creature creature : World.getAroundCreture(activeChar, range))
{
if (!creature.isAlikeDead())
{
continue;
}
int rangeToCreature = creature.calculate3DDistance(activeChar);
if (rangeToCreature < minRange)
{
minRangeCreature = rangeToCreature;
minRangeCreatureObject = creature;
}
}