MsgInteract

This message is used to request an interaction with another player or broadcast an interaction to surrounding players. Some example interactions include physical and magical attacks, proposing, and killing a player.

Magic attacks in Conquer Online are obfuscated using bit rotations and XORs. See the example below from Soul.

#define ENCODE_MAGICATTACK(idUser, usType, idTarget, usPosX, usPosY)                           \
{                                                                                              \
    usType = (::ExchangeShortBits((usType - 0x14BE), 3) ^ (idUser) ^ 0x915D);                  \
    idTarget = ::ExchangeLongBits(((idTarget - 0x8B90B51A) ^ (idUser) ^ 0x5F2D2463), 32 - 13); \
    usPosX = (::ExchangeShortBits((usPosX - 0xDD12), 1) ^ (idUser) ^ 0x2ED6);                  \
    usPosY = (::ExchangeShortBits((usPosY - 0x76DE), 5) ^ (idUser) ^ 0xB99B);                  \
}

#define DECODE_MAGICATTACK(idUser, usType, idTarget, usPosX, usPosY)                          \
{                                                                                             \
    usType = 0xFFFF & (::ExchangeShortBits(((usType) ^ (idUser) ^ 0x915D), 16 - 3) + 0x14BE); \
    idTarget = (::ExchangeLongBits((idTarget), 13) ^ (idUser) ^ 0x5F2D2463) + 0x8B90B51A;     \
    usPosX = 0xFFFF & (::ExchangeShortBits(((usPosX) ^ (idUser) ^ 0x2ED6), 16 - 1) + 0xDD12); \
    usPosY = 0xFFFF & (::ExchangeShortBits(((usPosY) ^ (idUser) ^ 0xB99B), 16 - 5) + 0x76DE); \
}

inline unsigned int ExchangeShortBits(unsigned long nData, int nBits)
{
    MYASSERT(nBits >= 0 && nBits < 16);
    nData &= 0xFFFF;
    return ((nData >> nBits) | (nData << (16 - nBits))) & 0xFFFF;
}

inline unsigned int ExchangeLongBits(unsigned long nData, int nBits)
{
    MYASSERT(nBits >= 0 && nBits < 32);
    return (nData >> nBits) | (nData << (32 - nBits));
}

Similar to other messages, MsgInteract also contains types that overlap with other types in other messages. For example, aborting magic was handled in MsgInteract, but is instead duplicated and utilized in MsgAction.

Table of Contents

Patch 4267

Message Definition

☑️ Assumed (Observed) - CoFuture + Soul

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1022
4UInt32System TimeMilliseconds of system uptime10000
8UInt32SenderRole ID of the initiator1000000
12UInt32TargetRole ID of the target1000001
16UInt16XX coordinate of the interaction320
18UInt16YY coordinate of the interaction460
20UInt32TypeHow to processes the message14
24UInt32DataValue associated with the interaction1

Interaction Type

☑️ Assumed (Observed) - CoFuture + Soul

🔶 Response data

ValNameDescriptionRecipientData
2ATTACKPhysical attackServerDamage 🔶
8COURTPropose to a playerServer
9MARRYAccept a proposalServer
14KILLConfirms kill of an entityClientCount
21MAGIC_ATTACKMagical attackServerHIGH: MagicType
23REFLECT_WEAPONReflect a physical attackClientDamage
24BUMPBumped from dashClientDirection
25SHOOTShoot projectileServerDamage 🔶
26REFLECT_MAGICReflect a magical attackClientDamage

Patch 5017

Message Definition

☑️ Assumed (Observed) - COPSv6

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1022
4UInt32System TimeMilliseconds of system uptime10000
8UInt32SenderRole ID of the initiator1000000
12UInt32TargetRole ID of the target1000001
16UInt16XX coordinate of the interaction320
18UInt16YY coordinate of the interaction460
20UInt32TypeHow to processes the message14
24UInt32DataValue associated with the interaction1
28UInt32ProgressProgress on an interaction0

Interaction Type

☑️ Assumed (Observed) - COPSv6

🔶 Response data

ValNameDescriptionRecipientDataProgress
2ATTACKPhysical attackServerDamage 🔶
8COURTPropose to a playerServer
9MARRYAccept a proposalServer
14KILLConfirms kill of an entityClientCount
21MAGIC_ATTACKMagical attackServerHIGH: MagicType
23REFLECT_WEAPONReflect a physical attackClientDamage
24BUMPBumped from dashClientDirection
25SHOOTShoot projectileServerDamage 🔶
26REFLECT_MAGICReflect a magical attackClientDamage
30JAR_PROGRESSCloud Saint Jar countServer0Count 🔶