You don't need a plugin to do this really, just add the following code inside the Tick() function in ExampleRoutine, under the check for IsInGame:
Code:
if (LokiPoe.CurrentWorldArea.Name == "The Lunaris Temple Level 3")
{
if (LokiPoe.ObjectManager.GetObjectsByName("Piety") != null)
{
Log.InfoFormat(
"[ExampleRoutine] Now stopping the bot because Piety was detected. TimeInInstance: {0}",
AreaStateCache.Current.TimeInInstance);
BotManager.Stop();
}
}
The area check is to avoid stopping the bot in her other encounters.