Another way you could do it, if you want to keep stealth but keep him from doing it before he loots or harvests or something like that, would be:
1. Add something like the following method to your Rotation Class file:
public bool isLootableInRange(float range)
{
return ObjectManager.GetObjects<TorNpc>().Any(e => e.IsDead && e.IsLootable && e.Distance < range);
}
2.) In the section Altard mentioned, instead of replacing it with force potency, replace it with a call to the above method:
public override Composite Buffs
{
get
{
return new PrioritySelector(
Spell.Buff("Force Technique"),
Spell.Buff("Force Valor"),
Spell.Cast("Guard", on => Me.Companion, ret => Me.Companion != null && !Me.Companion.IsDead && !Me.Companion.HasBuff("Guard")),
Spell.Buff("Stealth", ret => !Rest.KeepResting() && !DefaultCombat.MovementDisabled && !isLootableInRange(5.0f) )
);
}
}
I haven't tested it, but the concept is that it should prevent you from stealthing after combat if there are any mobs to loot around you.