I am sorry but I cannot fix code of this version, you can try to use wrobot plugin like:
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Keybindings = wManager.Wow.Helpers.Keybindings;
public class Main : wManager.Plugin.IPlugin
{
public void Initialize()
{
bool last = false;
while (Conditions.ProductIsStarted)
{
while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
{
bool isMount = ObjectManager.Me.IsMounted;
if (last && !isMount)
{
try
{
Keybindings.PressKeybindings(wManager.Wow.Enums.Keybindings.MOVEFORWARD, 5);
Keybindings.PressKeybindings(wManager.Wow.Enums.Keybindings.MOVEBACKWARD, 5);
}
catch {}
}
last = isMount;
Thread.Sleep(5);
}
last = false;
Thread.Sleep(20);
}
Logging.Write("[DismountMove] Loadded.");
}
public void Dispose()
{
Logging.Write("[DismountMove] Disposed.");
}
public void Settings()
{
MessageBox.Show("[DismountMove] No settings for this plugin.");
}
}