Question abou API move_to

Hello everybody
I have a little question
When using the move_to API, how do we calculate the estimated time to complete a move?

Youd have to make a function to do that based on the distance between the two points… keep in mind theres also start_script if youre trying to walk to multiple points.

Characters in the game also use skills or items that increase movement speed, is there any way to calculate this problem?

If I use start_script, I don’t know when the script will complete?

I found this code

int delay = (int)(distance / speed * 10000)
float CICPlayer::DistanceTo(D3DXVECTOR3 Pos, UINT16 region) {

     float x1 = (float)(((byte)(region & 0xFF) - 135) * 192 + Pos.x / 10);
     float y1 = (float)(((byte)(region >> 8) - 92) * 192 + Pos.z / 10);

     float x2 = (float)(((byte)(GetRegionX().r & 0xFF) - 135) * 192 + location.x / 10);
     float y2 = (float)(((byte)(GetRegionX().r >> 8) - 92) * 192 + location.z / 10);

     return sqrt(pow(x1 - x2, 2 ) + pow(y1 - y2,2));

Can the above code be used to calculate distance and time?
How to get the value of speed parameter?

Why exactly do you need this? It seems pretty useless especially considering it wont ever be 100% accurate.

My idea is to want group members to move to my location at any end of the map when I send a message via group chat

  • First, use the generate_path api to get the locations
  • Then use the timer to call the move_to api to let the character move

I would just use start_script then.

If you really want to use move_to then you’re better off checking if the char has reached the point rather than estimating the time.

Ok thank for solution of you