|
You last visited: Today at 10:05
Advertisement
Redux - Observing friend/enemy gears and item unlock
Discussion on Redux - Observing friend/enemy gears and item unlock within the CO2 Private Server forum part of the Conquer Online 2 category.
01/08/2025, 16:35
|
#1
|
elite*gold: 0
Join Date: Apr 2007
Posts: 7
Received Thanks: 0
|
Redux - Observing friend/enemy gears and item unlock
Hello everyone,
I've been working on a Redux server (5065) for some time, but I haven't been able to find detailed information on these two topics. I’m hoping someone here might have the knowledge to help:
Observing friend/enemy gear
When observing another player's equipment using the magnifying glass button, the client sends a MsgAction(1010) packet with action = 117. The server then returns MsgItemInformation(1008) packets with information for each item the target has, and everything works as expected.
However, when trying to observe a player's gear through the Friend/Enemy list window using the "Check" button, the client sends a MsgAction(1010) packet with action = 310. Returning MsgItemInformation packets for each item doesn't work; the observe window opens but displays the observing player's own character (not the target) with empty items. Is there an additional packet that needs to be sent by the server to update the observing window with the target player's character and gear?
Item unlock timer
When a player unlocks a locked item, there's a 5-day timer for the item to fully unlock. Every time the player logs in, a popup window appears, showing the timers for each item. Does anyone know which packet is used to display this window on the client, and how the server should format the item timer information?
Any insights or guidance would be greatly appreciated.
Thanks!
|
|
|
01/08/2025, 21:17
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,785
Received Thanks: 5,304
|
Quote:
Originally Posted by moorrr
However, when trying to observe a player's gear through the Friend/Enemy list window using the "Check" button, the client sends a MsgAction(1010) packet with action = 310. Returning MsgItemInformation packets for each item doesn't work; the observe window opens but displays the observing player's own character (not the target) with empty items. Is there an additional packet that needs to be sent by the server to update the observing window with the target player's character and gear?
|
iirc, you need to send 1014 with the target character to the client first. Here's my function for it.
Code:
public async Task QueryFriendEquipmentAsync(Client client)
{
if (client.Character == null)
return;
if (client.Character.Relationships == null)
return;
if (!(client.Character.Relationships.ContainsFriend(Command) || client.Character.Relationships.ContainsEnemy(Command)))
return;
if (!ServerCollections.TryGetCharacter(Command, out var targetCharacter))
return;
await CharacterObservationAsync(client);
}
public async Task CharacterObservationAsync(Client client)
{
if (client.Character == null)
return;
if (!client.Character.Alive)
return;
if (!ServerCollections.TryGetCharacter(Command, out var targetCharacter))
return;
if (!targetCharacter.Alive)
return;
if (!CalculationEngine.CanSee(client.Character, targetCharacter, 18))
return;
await client.SendAsync(MsgPlayer.SpawnPlayer(targetCharacter));
foreach (var equippedItem in targetCharacter.Equipment.GetAllEquippedItems())
{
await client.SendAsync(MsgItemInfo.CreateItemWithOwner(targetCharacter.UniqueID, equippedItem, ItemActionFlag.OtherPlayerEquipment));
}
}
|
|
|
01/10/2025, 00:05
|
#3
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
To add to Arco's comment.
The MsgPlayer packet has a small flag near the end to indicate that it is a "remote" player, which may not be on screen. Most sources do not set this flag properly, which makes the querying broken when the player isn't already in screen. I see that Arco's example seem to just always restrict the query range.
Also, the fact that the MsgPlayer packet is sent can be abused, so make sure to only send it when querying through the friends interface. It simplifies the patches you need to do. You might wonder how it can be abused?
1. The client teleports the target player to the position in the packet, so by spamming the query equipment request (like using a proxy to do so), you can know where the target stands directly (even when it jumps) and makes PvP easier.
2. The packet can be used to track players on the map and know their specific position (if you enable the out-of-range querying).
There are protections possible for both.
|
|
|
01/10/2025, 13:57
|
#4
|
elite*gold: 0
Join Date: Apr 2007
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by Arcо
iirc, you need to send 1014 with the target character to the client first. Here's my function for it.
Code:
public async Task QueryFriendEquipmentAsync(Client client)
{
if (client.Character == null)
return;
if (client.Character.Relationships == null)
return;
if (!(client.Character.Relationships.ContainsFriend(Command) || client.Character.Relationships.ContainsEnemy(Command)))
return;
if (!ServerCollections.TryGetCharacter(Command, out var targetCharacter))
return;
await CharacterObservationAsync(client);
}
public async Task CharacterObservationAsync(Client client)
{
if (client.Character == null)
return;
if (!client.Character.Alive)
return;
if (!ServerCollections.TryGetCharacter(Command, out var targetCharacter))
return;
if (!targetCharacter.Alive)
return;
if (!CalculationEngine.CanSee(client.Character, targetCharacter, 18))
return;
await client.SendAsync(MsgPlayer.SpawnPlayer(targetCharacter));
foreach (var equippedItem in targetCharacter.Equipment.GetAllEquippedItems())
{
await client.SendAsync(MsgItemInfo.CreateItemWithOwner(targetCharacter.UniqueID, equippedItem, ItemActionFlag.OtherPlayerEquipment));
}
}
|
Quote:
Originally Posted by CptSky
To add to Arco's comment.
The MsgPlayer packet has a small flag near the end to indicate that it is a "remote" player, which may not be on screen. Most sources do not set this flag properly, which makes the querying broken when the player isn't already in screen. I see that Arco's example seem to just always restrict the query range.
Also, the fact that the MsgPlayer packet is sent can be abused, so make sure to only send it when querying through the friends interface. It simplifies the patches you need to do. You might wonder how it can be abused?
1. The client teleports the target player to the position in the packet, so by spamming the query equipment request (like using a proxy to do so), you can know where the target stands directly (even when it jumps) and makes PvP easier.
2. The packet can be used to track players on the map and know their specific position (if you enable the out-of-range querying).
There are protections possible for both.
|
It worked!
Apparently the flag that you was talking about wasn't documented anywhere in the sources that I known of:
  (might be Window Spawn offset?)
So for those interested, in patch 5065 the "remote" flag in MsgPlayer is at offset 64, set it to true before observing friend/enemy equips.
Thanks guys!
|
|
|
01/10/2025, 19:22
|
#5
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Won't be useful for your version, but after poker implementation it seems to have a third value. I used the "Window Spawn" name because it seems to be related to the way it will be displayed on screen:
0: normal
1: lock dummy
2: something related to poker tables (probably poker table seat display?)
But I never saw a source with poker implemented or sniffed poker packets xD so I may be completely wrong
Quote:
Originally Posted by CptSky
To add to Arco's comment.
The MsgPlayer packet has a small flag near the end to indicate that it is a "remote" player, which may not be on screen. Most sources do not set this flag properly, which makes the querying broken when the player isn't already in screen. I see that Arco's example seem to just always restrict the query range.
Also, the fact that the MsgPlayer packet is sent can be abused, so make sure to only send it when querying through the friends interface. It simplifies the patches you need to do. You might wonder how it can be abused?
1. The client teleports the target player to the position in the packet, so by spamming the query equipment request (like using a proxy to do so), you can know where the target stands directly (even when it jumps) and makes PvP easier.
2. The packet can be used to track players on the map and know their specific position (if you enable the out-of-range querying).
There are protections possible for both.
|
oh yeah im patching this now xD
|
|
|
01/11/2025, 18:38
|
#6
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by moorrr
It worked!
Apparently the flag that you was talking about wasn't documented anywhere in the sources that I known of:
 (might be Window Spawn offset?)
So for those interested, in patch 5065 the "remote" flag in MsgPlayer is at offset 64, set it to true before observing friend/enemy equips.
Thanks guys! 
|
Oh no, someone found my in-progress wiki.
|
|
|
All times are GMT +1. The time now is 10:07.
|
|