Try this plugin LootMaxDistanceZ.cs :
using System.ComponentModel;
using wManager.Wow.ObjectManager;
public class Main : wManager.Plugin.IPlugin
{
public void Initialize()
{
wManager.Events.LootingEvents.OnLootingPulse += delegate (WoWUnit unit, CancelEventArgs cancelable)
{
try
{
if (unit.GetDistanceZ > 15)
{
wManager.wManagerSetting.AddBlackList(unit.Guid, 1000 * 60, true);
cancelable.Cancel = true;
}
}
catch {}
};
}
public void Dispose()
{
}
public void Settings()
{
}
}
(replace 15 (line 12) by max Z distance)