Hello,
using System.Threading;
using robotManager.Helpful;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
public class Main : wManager.Plugin.IPlugin
{
private bool _isStarted;
public void Initialize()
{
_isStarted = true;
var stopWatch = new System.Diagnostics.Stopwatch();
while (_isStarted)
{
if (Conditions.InGameAndConnectedAndProductStartedNotInPause)
{
if (ObjectManager.Me.IsDeadMe && stopWatch.Elapsed.TotalMinutes > 5)
{
Logging.Write("Bot is dead for more than 5 minutes, closing game.");
wManager.Wow.Memory.WowMemory.CloseHookedProcess();
_isStarted = false;
}
else if (ObjectManager.Me.IsDeadMe)
{
stopWatch.Start();
}
else
{
stopWatch.Reset();
}
}
Thread.Sleep(500);
}
}
public void Dispose()
{
_isStarted = false;
}
public void Settings()
{
}
}