using System.Threading; using System.Windows.Forms; using robotManager.Helpful; using wManager.Wow.Class; using wManager.Wow.Enums; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using robotManager.Products; public class Main : wManager.Plugin.IPlugin { private bool _loop; public void Initialize() { Logging.Write("Stop Bot Loadded."); _loop = true; Loop(); } void Loop() { while (_loop) { int playerPresent = 0; foreach (var wowPlayer in ObjectManager.GetObjectWoWPlayer() ) { if (wowPlayer.Name != null && wowPlayer.GetDistance<200 && !ObjectManager.Target.IsAlive) { playerPresent = 1; Logging.Write("Other Player in range detected: "+wowPlayer.Name + " " + wowPlayer.GetDistance.ToString()); Lua.LuaDoString("Dismount();"); Thread.Sleep(1000); Products.InPause = true; } } if (playerPresent == 0) { Thread.Sleep(1000); Products.InPause = false; Thread.Sleep(1000); } } } public void Dispose() { _loop = false; Logging.Write("Stop Bot Disposed."); } public void Settings() { MessageBox.Show("Stop Bot No settings for this plugin."); } }