September 25, 20214 yr Good afternoon, I am trying to move through an area that is well over my level. Unfortunately, when I revive - I get attacked and die, so I am trying to revive to the furthest point to continue forward. Is there a way that I can have a plug-in run me back to my body and then just stop? I attempted to use this code below, but it halts the bot at the Spirit Healer. I want to stop the bot, at my dead corpse, before resurrecting. using System.Threading; using wManager.Wow.Bot.States; public class Main : wManager.Plugin.IPlugin { public void Initialize() { robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (state is Resurrect || state is ResurrectBG) { robotManager.Products.Products.ProductStop(); } }; } public void Dispose() { } public void Settings() { } }
September 27, 20214 yr Hey, it is hardcoded but try code like that (not tested) using System.Threading; using System.Threading.Tasks; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Bot.States; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { public void Initialize() { robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (state is Resurrect || state is ResurrectBG) { Task.Run(() => { while (Conditions.InGameAndConnectedAndProductStartedNotInPause && ObjectManager.Me.IsDeadMe) { if (ObjectManager.Me.IsValid && ObjectManager.Me.PositionCorpse.DistanceTo(ObjectManager.Me.Position) < 45) { Logging.Write("Stop product near corpse"); Products.ProductStop(); } Thread.Sleep(500); } }); } }; } public void Dispose() { } public void Settings() { } }
Create an account or sign in to comment