Jump to content

Move2

Members
  • Posts

    4
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Move2 reacted to Droidz in [Request Plugin] close bot/client after X minutes when character can't reach corpse   
    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() { } }  
×
×
  • Create New...