BusyAtSchool 0 Posted September 25, 2021 Share Posted September 25, 2021 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() { } } Link to comment https://wrobot.eu/forums/topic/13538-run-back-to-corpse-stop-bot/ Share on other sites More sharing options...
Droidz 2738 Posted September 27, 2021 Share Posted September 27, 2021 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() { } } Link to comment https://wrobot.eu/forums/topic/13538-run-back-to-corpse-stop-bot/#findComment-63693 Share on other sites More sharing options...
BusyAtSchool 0 Posted September 28, 2021 Author Share Posted September 28, 2021 Thank you! I will test this today. Link to comment https://wrobot.eu/forums/topic/13538-run-back-to-corpse-stop-bot/#findComment-63705 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now