Jump to content

Custom Code Movement


Alaron
 Share

Recommended Posts

Hello, I've been messing with profiles and got some help form a community member, but I have a question regarding this piece of code.

 

//Start Movement
            Vector3 startPoint = new Vector3(-8863.688f, -211.7936f, 80.63557f);

            IEnumerable<Vector3> paths = new List<Vector3>() {
new Vector3(-8863.688f, -211.7936f, 80.63557f, "None"),
new Vector3(-8865.09f, -216.894f, 80.96149f, "None"),
new Vector3(-8867.372f, -223.5137f, 81.30844f, "None"),
new Vector3(-8867.26f, -229.2805f, 81.51604f, "None"),
new Vector3(-8861.448f, -232.0775f, 81.7221f, "None"),
new Vector3(-8855.631f, -228.725f, 81.67682f, "None"),
new Vector3(-8851.373f, -225.6607f, 81.73775f, "None"),
new Vector3(-8851.373f, -225.6607f, 81.73775f, "None")
                                                                };
            if (ObjectManager.Me.Position.DistanceTo2D(startPoint) < 300)
            {
                // Process waypoints
                foreach (Vector3 waypoint in paths)
                {
                    // Move to the given position
                    MovementManager.Go(PathFinder.FindPath(waypoint), false);

                    // Loop
                    while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                    {
                        // Wait follow path
                        Thread.Sleep(10);
                    }
                }

                // Stop movement
                MovementManager.StopMove();

                // End Movement

            }

It works great, only issue I have is when the bot approaches it next Vector3 it stops for a split second before preceding on. Looks abnormal and not human like. Is there a way to smooth it out? I've tried adjusting the Thread.Sleep() function with a lower number but the results are the same. Something else I've tried it running Wrobot with the No Frame Lock. 

Maybe this is a limitation to the bot or I'm simply overlooking some simple any advise or help would be greatly appreciated. 

Link to comment
Share on other sites

Is there any reason you are using this method of movement over a followpath??

Personally I'm a fan of a followpath pulse if i know the bot is going to need something more than native navigation...

Link to comment
Share on other sites

12 hours ago, eeny said:

Is there any reason you are using this method of movement over a followpath??

Personally I'm a fan of a followpath pulse if i know the bot is going to need something more than native navigation...

I use Followpath if the quest is a Go talk to x but I was using this code for Kill and loot or gather quests. Once completed do this code so the bot takes a predefined path and looks more normal. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...