About Global Color after use get Confirm

01/31/2021 03:22 Exner.#1
About Global Color after use get disconnected *
SRO_DevKit
global color It became the normal thing there is a lot who did this and there is a lot of dll about this thing, and we would have wanted to do this in the source If there is someone who has a better code than this, does not skimp to share and thank you

Code:
#include "globalcolors.h"
#include "memhelp.h"
#include "chathelp.h"


std::vector<tGlobalIdColorPair> globalcolors::m_data;

const DWORD dwHookAddr = 0x0087703A; //we need EAX
const DWORD dwHookJmpback = 0x0087704C; // 0x00877046;

const DWORD dwHookMsgSend = 0x00790287;
const DWORD dwHookMsgSendJumpback = 0x007902A1;

const DWORD wOpcodeForEventGlobal = 0x1333;
const DWORD wOpcodeForNormalGlobal = 0x1334;

const WORD wEventGlobalRefItemID = 35592 + 1; //+1 from db
const WORD wNormalGlobalRefItemID = 3851 + 1; //+1 from db

//const DWORD dwJumpSendIfEq1= 0x0079035D; see __asm
const DWORD dwHookSendCall1 = 0x00841780; //call sro_clie.0x00841780

DWORD dwIsEvent = 0;

//nop 9 bytes, emulate movzx eax, byte
//movzx eax, byte ptr ss:[esp+230] == msg type (will spoof)


void globalcolors::AssignColorToId(uint8_t id, DWORD color)
{
    m_data.push_back(tGlobalIdColorPair(id, color));
}


wchar_t* msgBuf;
void HandleCustomGlobalMsg()
{
    std::wcout << msgBuf << std::endl;
    std::cout << wcslen(msgBuf) << std::endl;


    int lastIndex = wcslen(msgBuf) - 1;
    DWORD color = globalcolors::GetColorByType(msgBuf[lastIndex]);

    msgBuf[lastIndex] = 0x00;

}

DWORD globalcolors::GetColorByType(uint8_t id)
{
    DWORD res = 0;
    for(std::vector<tGlobalIdColorPair>::iterator iter = m_data.begin(); iter != m_data.end(); iter++)
    {
        if(iter->first == id)
        {
            res = iter->second;
            break;
        }
    }
    return res;
}

__declspec(naked) void globalcolors::OnGlobalMsg()
{
    __asm
    {
    mov msgBuf, eax;

    pushad;
    call HandleCustomGlobalMsg;
    popad;

    movzx eax, byte ptr ss:[esp+0x230];


    //add esp, 0x8;
    jmp dwHookJmpback;
    }

    }

    __declspec(naked) void ExecEvent()
    {
        __asm pop eax;

        __asm push wOpcodeForEventGlobal;
        __asm call dwHookSendCall1;
        __asm add esp, 8;
        __asm test eax, eax;
        __asm je 0x0079035D;
        __asm push wOpcodeForEventGlobal;
        __asm jmp dwHookMsgSendJumpback;
    }

    __declspec(naked) void ExecNormal()
    {
        __asm pop eax;

        __asm push wOpcodeForNormalGlobal;
        __asm call dwHookSendCall1;
        __asm add esp, 8;
        __asm test eax, eax;
        __asm je 0x0079035D;
        __asm push wOpcodeForNormalGlobal;
        __asm jmp dwHookMsgSendJumpback;
    }

    __declspec(naked) void OnGlobalItemUsed()
    {
        __asm push eax;
        __asm mov ax, ss : [esp - 0x24];
        __asm cmp ax, wEventGlobalRefItemID;

        __asm je ExecEvent;
        __asm jmp ExecNormal;
    }


    void globalcolors::Initialize()
    {
        memhelp::RenderNop((void*)dwHookAddr, 9);
        memhelp::RenderDetour(ASM_JMP, (void*)dwHookAddr, globalcolors::OnGlobalMsg);

        memhelp::RenderNop((void*)dwHookMsgSend, 26);
        memhelp::RenderDetour(ASM_JMP, (void*)dwHookMsgSend, OnGlobalItemUsed);
    }
Code:
#pragma once
#include "xlib.h"

typedef std::pair<uint8_t, DWORD> tGlobalIdColorPair;


class globalcolors
{
public:
    static void Initialize();
    static void AssignColorToId(uint8_t id, DWORD color);
    static DWORD GetColorByType(uint8_t id);

private:
    //__declspec(naked)
    static void OnGlobalMsg();

    static std::vector<tGlobalIdColorPair> m_data;

};
Code:
        globalcolors::Initialize();
        globalcolors::AssignColorToId(0x01, 0xFF33FF33);
        globalcolors::AssignColorToId(0x02, 0xFF669911);
Is there anyone who helps about this
01/31/2021 04:00 ryaneichner#2
Hello sir.

Well I don't know how to help you because I'm a newbie but this code also leaves the normal chat with black color and the last letter of the phrase / word invisible, specify this in the topic too so that someone helps us this code is good, just a little missing correction
01/31/2021 06:58 JellyBitz#3
Quote:
Originally Posted by ryaneichner View Post
... this code also leaves the normal chat with black color and the last letter of the phrase / word invisible ...
It's because...

PHP Code:
DWORD globalcolors::GetColorByType(uint8_t id)
{
    
DWORD res 0// DEFAULT COLOR (BLACK)
    
....

And seems like the code is editing the last byte to set the color id, that means your maximum will be 256 color id availables and you'll lost the last letter.
01/31/2021 10:45 LegendarySouL#4
This source does not support help because the person who created it does not want help :rolleyes:
02/01/2021 00:47 ryaneichner#5
Quote:
Originally Posted by JellyBitz View Post
It's because...

PHP Code:
DWORD globalcolors::GetColorByType(uint8_t id)
{
    
DWORD res 0// DEFAULT COLOR (BLACK)
    
....

And seems like the code is editing the last byte to set the color id, that means your maximum will be 256 color id availables and you'll lost the last letter.
you know how we can fix it, and add fix dc when use global color's ?

thanks for your help!
02/01/2021 01:39 GameRPoP#6
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.

[Only registered and activated users can see links. Click Here To Register...]
02/01/2021 02:02 ryaneichner#7
Quote:
Originally Posted by GameRPoP View Post
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.

[Only registered and activated users can see links. Click Here To Register...]
yeah i know but we don't have source codes and i don't have any filter source coded by me or one source working fine to edit, i'm using a open source filter but i can't know how extract it or edit it, athena filter source have alot bug's, and kryfilter have bug in dll HWID

maybe we can try add from dll this codes for me will work fine, if you can help we are thank you to it !

sorry for bad english.
02/01/2021 09:48 Exner.#8
Quote:
Originally Posted by LegendarySouL View Post
he is money lover not support for free
right

Quote:
Originally Posted by LegendarySouL View Post
he is money lover not support for free
Quote:
Originally Posted by ryaneichner View Post
yeah i know but we don't have source codes and i don't have any filter source coded by me or one source working fine to edit, i'm using a open source filter but i can't know how extract it or edit it, athena filter source have alot bug's, and kryfilter have bug in dll HWID

maybe we can try add from dll this codes for me will work fine, if you can help we are thank you to it !

sorry for bad english.
You are a person trying to reach this is a good thing

Quote:
Originally Posted by GameRPoP View Post
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.

[Only registered and activated users can see links. Click Here To Register...]
Lots of people did that and are asking money for things like that. If something like that were released it would be awesome
02/01/2021 16:32 Mc-Diesel#9
you can use Flor tut i didn't try but it gonna work im sure
[Only registered and activated users can see links. Click Here To Register...]

use this tutorial create a custom packet or global one , add the the function to item id by filter , send the packet to all server and done
02/01/2021 18:37 Devsome#10
Guys stick to the topic, if you want to bash each other do it via private message.
02/02/2021 05:51 Laag#82#11
Hello to everyone


I'm trying to give you an example


Already this system in SRO_DevKit

Code:
wchar_t message[] = L"  Exner. SRO_DevKit / Elitepvpers";

int color = D3DCOLOR_ARGB(255, 166, 9, 168);
int color2 = D3DCOLOR_ARGB(255, 4, 72, 37);
int color3 = D3DCOLOR_ARGB(255, 15, 179, 53);

g_pCGInterface->FUN_00777c30(CHAT_All, message, color, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color2, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color3, 1);
[Only registered and activated users can see links. Click Here To Register...]

Just need to send a packet from server to client


Good Luck

Special thanks to: florian0 :rolleyes:
02/02/2021 06:00 Exner.#12
Quote:
Originally Posted by khaleed2010 View Post
Hello to everyone


I'm trying to give you an example


Already this system in SRO_DevKit

Code:
wchar_t message[] = L"  Exner. SRO_DevKit / Elitepvpers";

int color = D3DCOLOR_ARGB(255, 166, 9, 168);
int color2 = D3DCOLOR_ARGB(255, 4, 72, 37);
int color3 = D3DCOLOR_ARGB(255, 15, 179, 53);

g_pCGInterface->FUN_00777c30(CHAT_All, message, color, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color2, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color3, 1);
[Only registered and activated users can see links. Click Here To Register...]

Just need to send a packet from server to client


Good Luck

Special thanks to: florian0 :rolleyes:
You are a wonderful person, thank you
02/03/2021 13:27 Exner.#13
Quote:
Originally Posted by khaleed2010 View Post
Hello to everyone


I'm trying to give you an example


Already this system in SRO_DevKit

Code:
wchar_t message[] = L"  Exner. SRO_DevKit / Elitepvpers";

int color = D3DCOLOR_ARGB(255, 166, 9, 168);
int color2 = D3DCOLOR_ARGB(255, 4, 72, 37);
int color3 = D3DCOLOR_ARGB(255, 15, 179, 53);

g_pCGInterface->FUN_00777c30(CHAT_All, message, color, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color2, 1);
g_pCGInterface->FUN_00777c30(CHAT_All, message, color3, 1);
[Only registered and activated users can see links. Click Here To Register...]

Just need to send a packet from server to client


Good Luck

Special thanks to: florian0 :rolleyes:
If you don't mind this I don't have much experience in c#

Code in sro_devkit

CPSMission
Code:
        if (MsgBuffer->msgid() == 0x9418) //this new packet
        {

            std::n_string msg;
            *MsgBuffer >> msg;

            wchar_t message[1000];

            int color = D3DCOLOR_ARGB(255, 166, 9, 168);


            g_pCGInterface->FUN_00777c30(CHAT_All, message, color, 1);

        }
Code in Filter
Code:
        public void GlobalColor()

        {

            Packet packet = new Packet(0x9418);
            packet.WriteUInt8((byte)105);
            m_LocalSecurity.Send(packet);
            Send(false);
        }
Code:
            if (itemid == MainForm.COLOR_GLOBAL_ITEMID)
            {
            this.GlobalColor();
            }
don't know if I’m doing it right

I'm trying to do if an item id global is used this command is executed

But I don't have experience with c#

If you don't mind help
02/03/2021 13:59 LegendarySouL#14
Quote:
Originally Posted by Exner. View Post
If you don't mind this I don't have much experience in c#

Code in sro_devkit

CPSMission
Code:
        if (MsgBuffer->msgid() == 0x9418) //this new packet
        {

            std::n_string msg;
            *MsgBuffer >> msg;

            wchar_t message[1000];

            int color = D3DCOLOR_ARGB(255, 166, 9, 168);


            g_pCGInterface->FUN_00777c30(CHAT_All, message, color, 1);

        }
Code in Filter
Code:
        public void GlobalColor()

        {

            Packet packet = new Packet(0x9418);
            packet.WriteUInt8((byte)105);
            m_LocalSecurity.Send(packet);
            Send(false);
        }
Code:
            if (itemid == MainForm.COLOR_GLOBAL_ITEMID)
            {
            this.GlobalColor();
            }
don't know if I’m doing it right

I'm trying to do if an item id global is used this command is executed

But I don't have experience with c#

If you don't mind help

not more information
Code:
            else if (type == 6) // Colorful Global Chatting
            {
                Packet packet = new Packet(0xB034);
                packet.WriteUInt8((byte)105);
                packet.WriteUInt32(color);
                packet.WriteAscii(message);
                m_LocalSecurity.Send(packet);
                Send(false);
            }
_________________________________________
Doesn't help people, just wants help, meaning nothing
02/03/2021 14:07 Exner.#15
Quote:
Originally Posted by LegendarySouL View Post
not more information

_________________________________________
Doesn't help people, just wants help, meaning nothing
But I want to understand something about how if use a packet or use item ID to send this packet