79135 4 Posted June 18, 2018 Share Posted June 18, 2018 Hello, I use Quester profile. I need control under char when it is ghost(with help Plugin). Explain, please, how to force char go to my path when it ghost? Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/ Share on other sites More sharing options...
Droidz 2738 Posted June 19, 2018 Share Posted June 19, 2018 Hello, robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (ObjectManager.Me.IsDeadMe && state.DisplayName == "Regeneration" && ObjectManager.Me.PositionCorpse.DistanceTo(ObjectManager.Me.Position) > 40) { cancelable.Cancel = true; // You code to follow path here } }; Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/#findComment-44606 Share on other sites More sharing options...
Ordush 185 Posted June 19, 2018 Share Posted June 19, 2018 39 minutes ago, Droidz said: Hello, robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (ObjectManager.Me.IsDeadMe && state.DisplayName == "Regeneration" && ObjectManager.Me.PositionCorpse.DistanceTo(ObjectManager.Me.Position) > 40) { cancelable.Cancel = true; // You code to follow path here } }; Can't this code be used to fix the revive bug in dungeons? Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/#findComment-44607 Share on other sites More sharing options...
79135 4 Posted July 13, 2018 Author Share Posted July 13, 2018 On 6/19/2018 at 1:28 PM, Droidz said: Hello, robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (ObjectManager.Me.IsDeadMe && state.DisplayName == "Regeneration" && ObjectManager.Me.PositionCorpse.DistanceTo(ObjectManager.Me.Position) > 40) { cancelable.Cancel = true; // You code to follow path here } }; I want what bot go to my path, how insert in the code my path, write please .. I need: Point1 - wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(1,2,3)); Point2 - wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(2,3,4)); I don't know how write follow path, I need example. Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/#findComment-45521 Share on other sites More sharing options...
79135 4 Posted July 22, 2018 Author Share Posted July 22, 2018 On 6/19/2018 at 1:28 PM, Droidz said: Hello, robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (ObjectManager.Me.IsDeadMe && state.DisplayName == "Regeneration" && ObjectManager.Me.PositionCorpse.DistanceTo(ObjectManager.Me.Position) > 40) { cancelable.Cancel = true; // You code to follow path here } }; public class Main : IPlugin { private bool _isLaunched; public void Initialize() { _isLaunched = true; robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (ObjectManager.Me.IsDeadMe && Usefuls.ContinentId != (int)ContinentId.WailingCaverns) { cancelable.Cancel = true; IEnumerable<Vector3> paths = new List<Vector3>() { new Vector3(-852.5135, -2170.376, 92, "None"), new Vector3(-849.0024, -2036.948, 80, "None"), new Vector3(-748.3444, -2059.984, 71, "None"), new Vector3(-621.9654, -2026.705, 63, "None"), new Vector3(-591.3438, -2135.192, 51, "None"), new Vector3(-588.2389, -2123.332, 50, "None"), new Vector3(-628.1954, -2185.471, 48, "None"), new Vector3(-745,-2210,16, "None") }; if (ObjectManager.Me.IsDeadMe) { // Process waypoints foreach (Vector3 waypoint in paths) { // Move to the given position MovementManager.Go(PathFinder.FindPath(waypoint), false); // Loop while (MovementManager.InMovement && Conditions.InGameAndConnectedAndProductStartedNotInPause && ObjectManager.Me.Position.DistanceTo2D(waypoint) > 1.5 && Usefuls.ContinentId != (int)ContinentId.WailingCaverns) { // Wait follow path Thread.Sleep(10); } } // Stop movement MovementManager.StopMove(); // End Movement } } }; It is badly work. Char sometimes run back , sometimes stop. How is right to write? Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/#findComment-45886 Share on other sites More sharing options...
Ordush 185 Posted July 22, 2018 Share Posted July 22, 2018 You don't need to tell it not to be in wc. You need to add sleep to your while loop Link to comment https://wrobot.eu/forums/topic/9611-control-ghost/#findComment-45890 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