hi, I'm trying to make a plugin to fix a nasty bug I've encountered on a warmane (3.3.5a) server. it happens that the character periodically freezes and if he continues to move, then he is constantly teleported back until he stops for a few seconds. I face this problem without using a bot and on this server.
I found a plugin on the forum (https://wrobot.eu/forums/topic/12149-how-to-disable-anti-stuck/?do=findComment&comment=58260&_rid=97009). another error is processed there and the bot stops, how can I change "stop" to "pause" and add a timer of 5-10 seconds, after which the bot will unpause and continue working? I will be grateful if you help me with advice
attaching the plugin code from the topic on the forum:
using System.ComponentModel;
using wManager.Plugin;
public class Main : IPlugin
{
private bool _isLaunched;
public void Initialize()
{
robotManager.Events.LoggingEvents.OnAddLog += delegate(robotManager.Helpful.Logging.Log log)
{
if (log != null)
{
if (log.Text.Contains("[MovementManager] Think we are stuck"))
robotManager.Products.Products.ProductStop();
}
};
}
public void Dispose()
{
_isLaunched = false;
}
public void Settings()
{
}
}