Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 18:54

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How the client "despawn" a player/mob?

Discussion on How the client "despawn" a player/mob? within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2012
Posts: 9
Received Thanks: 1
How the client "despawn" a player/mob?

Hi!
I'm making a small bot to improve my programming skills and I have a little question. I hope you can help me with this
How the client knows when a mob/player is out of his range and "desappear" from the memory? I made a simple structure to save the mobs/players that the user found (I made that with the Spawn and Walk packets), but it keeps outdated every time that a mob/player goes out of the range of my client
Thx for help! ^^
Reivein is offline  
Old 02/09/2014, 23:50   #2
 
Ultimation's Avatar
 
elite*gold: 0
Join Date: Mar 2005
Posts: 1,430
Received Thanks: 1,586
easy, hook the case structure for packet type 10010 and find the remove entity packet.

Or if you have there locations, and your location just check if range between 2 coordinates > 21 then remove i guess.

Pretty simple either way
Ultimation is offline  
Old 02/10/2014, 00:16   #3
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Perhaps I'm wrong, but I thought the removal distance was anything greater than 18 in the x or y direction. That's what I've experienced, at least - players are removed from the client at 19 and greater without any server packets telling the client to remove the entities.
Spirited is offline  
Old 02/10/2014, 02:32   #4
 
elite*gold: 0
Join Date: Sep 2012
Posts: 9
Received Thanks: 1
Exactly. I reach the same conclusion that Spirited Fang after like 4h trying to understand how the client does it. I haven't found any packet that made the despawn funcion. Finally, I did it calculating distance between my coords and the mobs/players coords (over 18 is out of range, true?).

Thx for the answers ^^
Reivein is offline  
Old 02/10/2014, 02:40   #5
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Reivein View Post
Exactly. I reach the same conclusion that Spirited Fang after like 4h trying to understand how the client does it. I haven't found any packet that made the despawn funcion. Finally, I did it calculating distance between my coords and the mobs/players coords (over 18 is out of range, true?).

Thx for the answers ^^
Well, here's what I understand about the system:
Spirited is offline  
Old 02/10/2014, 02:49   #6
 
elite*gold: 0
Join Date: Sep 2012
Posts: 9
Received Thanks: 1
Quote:
Originally Posted by Spirited Fang View Post
Well, here's what I understand about the system:
I read it, and it's the same conclusion that I reach. But what I didn't understand is the part that you talk about the teleport/disconnect. In this cases, the server will send me a packet with the entity remove?

Now I need to know what happens when I kill a mob... It's time to investigate! ^^
Reivein is offline  
Old 02/10/2014, 02:59   #7
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Reivein View Post
I read it, and it's the same conclusion that I reach. But what I didn't understand is the part that you talk about the teleport/disconnect. In this cases, the server will send me a packet with the entity remove?

Now I need to know what happens when I kill a mob... It's time to investigate! ^^
Right. The entity is removed from the screen using that packet.
Spirited is offline  
Old 02/10/2014, 03:06   #8
 
elite*gold: 0
Join Date: Sep 2012
Posts: 9
Received Thanks: 1
Quote:
Originally Posted by Spirited Fang View Post
Right. The entity is removed from the screen using that packet.
This packet that you say will be a General Data packet, true?

Thx for the info! ^^
Reivein is offline  
Old 02/10/2014, 03:07   #9
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Reivein View Post
This packet that you say will be a General Data packet, true?

Thx for the info! ^^
Right, with the removal subtype, which might be 135 or something around that.
Spirited is offline  
Old 02/10/2014, 03:16   #10
 
elite*gold: 0
Join Date: Sep 2012
Posts: 9
Received Thanks: 1
Quote:
Originally Posted by Spirited Fang View Post
Right, with the removal subtype, which might be 135 or something around that.
Thank you so much! When I make something useful I'll show you! ^^
Reivein is offline  
Old 02/10/2014, 19:14   #11
 
Ultimation's Avatar
 
elite*gold: 0
Join Date: Mar 2005
Posts: 1,430
Received Thanks: 1,586
i always thought the spawn in distance was 18 and the removal distances was 21.

Reason being, is if a player is 19 coordinates away then jumps, you still receive the packet. the client then updates the offset and removes the player.
Ultimation is offline  
Old 02/10/2014, 20:00   #12
 
elite*gold: 0
Join Date: Sep 2013
Posts: 197
Received Thanks: 141
Quote:
Originally Posted by Ultimation View Post
i always thought the spawn in distance was 18 and the removal distances was 21.

Reason being, is if a player is 19 coordinates away then jumps, you still receive the packet. the client then updates the offset and removes the player.
Anything more than 18 cells away gets removed, and you only receive jump packets of players that are in the 18 cell range.
At least if you're using the correct (TQ's) distance formula.
SteveRambo is offline  
Reply




All times are GMT +1. The time now is 18:54.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.