found plugin by Droidz. few yards teleport protection. its the best !
but i don't understand how propertly configure this very strange parameter - private const double MaxYardPerSecond = 200;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Timer = robotManager.Helpful.Timer;
public class Main : wManager.Plugin.IPlugin
{
private const double MaxYardPerSecond = 200;
private const int PauseTimeSecond = 5560 * 3;
private bool _running;
public void Initialize()
{
Logging.Write("[TPpause] Loadded.");
_running = true;
var lastPos = ObjectManager.Me.Position;
var t = new Stopwatch();
t.Start();
while (_running && Products.IsStarted)
{
try
{
if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
!Conditions.IsAttackedAndCannotIgnore)
{
if (ObjectManager.Me.Position.DistanceTo(lastPos) >
MaxYardPerSecond * ((double)t.ElapsedMilliseconds / 1000))
{
try
{
Products.InPause = true;
Logging.Write("[TPpause] TP detected, pause bot for " + PauseTimeSecond + " seconds.");
var pauseTimer = new Timer(PauseTimeSecond * 1000);
while (Conditions.InGameAndConnectedAndProductStarted)
{
if (pauseTimer.IsReady)
break;
if (Conditions.IsAttackedAndCannotIgnore)
break;
Thread.Sleep(50);
}
}
catch { }
finally
{
Products.InPause = false;
}
}
}
lastPos = ObjectManager.Me.Position;
t.Restart();
}
catch {}
Thread.Sleep(20);
}
}
public void Dispose()
{
_running = false;
Logging.Write("[TPpause] Disposed.");
}
public void Settings()
{
MessageBox.Show("[TPpause] No settings for this plugin.");
}
}