Jump to content

Control ghost


79135

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

  • 4 weeks later...
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
Share on other sites

  • 2 weeks later...
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
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...