My code didn't work properly so i gotta work on it when i got time but here is code from my druid profile. It won't work like this but if you know something about programming you should be able to get this working
var resAll = getPartymembers().Where(o => o.IsValid && o.IsDead && !TraceLine.TraceLineGo(o.Position)).OrderBy(o => o.GetDistance);
if (resAll.Count() > 0)
{
var u = resAll.First();
WoWPlayer all = new WoWPlayer(u.GetBaseAddress);
if (!TraceLine.TraceLineGo(all.Position) && all.IsDead)
{
Interact.InteractGameObject(all.GetBaseAddress, false);
_rebirth.Launch();
return true;
}
}