December 20, 20232 yr Hi, I saw this from [mention=2]Cups[/mention] in another forum. #define NONE_FLAG 0 #define NAME_COLOUR_FLAG 2 #define TITLE_FLAG 4 #define OVERLAY_EFFECT_FLAG 8 #define UNDERLAY_EFFECT_FLAG 16 /** * [MENTION=1332190]author[/MENTION] Triston Plummer ("Cups") * * Represents the outgoing character overlay packet. */ namespace Shaiya::Episodes::Outgoing { /** * The character attributes structure */ struct CharacterOverlay { unsigned short opcode = 0x0240; unsigned int charId; bool visible; unsigned char flag = 0; unsigned int firstNameColour = 0; unsigned int secondNameColour = 0; unsigned int overlayEffect = 0; unsigned int underlayEffect = 0; char title[32] = { 0 }; }; }; /** * Sends the player's overlay * * [MENTION=1985011]param[/MENTION] user The user instance */ void Ep8::sendOverlay(Shaiya::Models::CUser* user) { bool titleBool = true; bool nameColourBool = true; bool overlayEffectBool = true; int nameColour = 0xFF0000; const char* title = "The Vanquisher"; int effect = 100; // The outgoing packet Shaiya::Episodes::Outgoing::CharacterOverlay overlay; overlay.charId = user->charId; overlay.visible = true; // The outgoing flag int flag = 0; if (titleBool) flag |= TITLE_FLAG; if (nameColourBool) flag |= NAME_COLOUR_FLAG; if (overlayEffectBool) flag |= OVERLAY_EFFECT_FLAG; overlay.flag = flag; // If the overlay is visibile if (overlay.visible) { overlay.firstNameColour = (flag & NAME_COLOUR_FLAG) ? nameColour : -1; overlay.secondNameColour = (flag & NAME_COLOUR_FLAG) ? nameColour : -1; overlay.underlayEffect = (flag & OVERLAY_EFFECT_FLAG) ? effect : -1; overlay.overlayEffect = (flag & OVERLAY_EFFECT_FLAG) ? effect : -1; if (flag & TITLE_FLAG) std::memcpy(&overlay.title, title, 32); } // Send the outgoing packet GameWorld::sendPacket(user, &overlay, sizeof(overlay)); } Can someone provide a detailed instruction on how to add it here.
December 20, 20232 yr there's no reason to add it. the ep6 clients don't have a handler for 0x240. even if i could share a client that does, it's gonna crash when you log in because my library doesn't support the 0x101 packet it expects.
Hi, I saw this from [mention=2]Cups[/mention] in another forum.
#define NONE_FLAG 0 #define NAME_COLOUR_FLAG 2 #define TITLE_FLAG 4 #define OVERLAY_EFFECT_FLAG 8 #define UNDERLAY_EFFECT_FLAG 16 /** * [MENTION=1332190]author[/MENTION] Triston Plummer ("Cups") * * Represents the outgoing character overlay packet. */ namespace Shaiya::Episodes::Outgoing { /** * The character attributes structure */ struct CharacterOverlay { unsigned short opcode = 0x0240; unsigned int charId; bool visible; unsigned char flag = 0; unsigned int firstNameColour = 0; unsigned int secondNameColour = 0; unsigned int overlayEffect = 0; unsigned int underlayEffect = 0; char title[32] = { 0 }; }; }; /** * Sends the player's overlay * * [MENTION=1985011]param[/MENTION] user The user instance */ void Ep8::sendOverlay(Shaiya::Models::CUser* user) { bool titleBool = true; bool nameColourBool = true; bool overlayEffectBool = true; int nameColour = 0xFF0000; const char* title = "The Vanquisher"; int effect = 100; // The outgoing packet Shaiya::Episodes::Outgoing::CharacterOverlay overlay; overlay.charId = user->charId; overlay.visible = true; // The outgoing flag int flag = 0; if (titleBool) flag |= TITLE_FLAG; if (nameColourBool) flag |= NAME_COLOUR_FLAG; if (overlayEffectBool) flag |= OVERLAY_EFFECT_FLAG; overlay.flag = flag; // If the overlay is visibile if (overlay.visible) { overlay.firstNameColour = (flag & NAME_COLOUR_FLAG) ? nameColour : -1; overlay.secondNameColour = (flag & NAME_COLOUR_FLAG) ? nameColour : -1; overlay.underlayEffect = (flag & OVERLAY_EFFECT_FLAG) ? effect : -1; overlay.overlayEffect = (flag & OVERLAY_EFFECT_FLAG) ? effect : -1; if (flag & TITLE_FLAG) std::memcpy(&overlay.title, title, 32); } // Send the outgoing packet GameWorld::sendPacket(user, &overlay, sizeof(overlay)); }Can someone provide a detailed instruction on how to add it here.