|
You last visited: Today at 18:07
Advertisement
About Global Color after use get Confirm
Discussion on About Global Color after use get Confirm within the SRO Coding Corner forum part of the Silkroad Online category.
01/31/2021, 03:22
|
#1
|
elite*gold: 5
Join Date: Jul 2020
Posts: 183
Received Thanks: 54
|
About Global Color after use get Confirm
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
|
#2
|
elite*gold: 0
Join Date: Oct 2014
Posts: 172
Received Thanks: 38
|
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
|
#3
|
elite*gold: 0
Join Date: Sep 2018
Posts: 419
Received Thanks: 941
|
Quote:
Originally Posted by ryaneichner
... 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
|
#4
|
elite*gold: 0
Join Date: Nov 2020
Posts: 170
Received Thanks: 61
|
This source does not support help because the person who created it does not want help
|
|
|
02/01/2021, 00:47
|
#5
|
elite*gold: 0
Join Date: Oct 2014
Posts: 172
Received Thanks: 38
|
hello sir
Quote:
Originally Posted by JellyBitz
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
|
#6
|
elite*gold: 0
Join Date: Sep 2020
Posts: 122
Received Thanks: 64
|
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.
|
|
|
02/01/2021, 02:02
|
#7
|
elite*gold: 0
Join Date: Oct 2014
Posts: 172
Received Thanks: 38
|
Thanks for your coment!
Quote:
Originally Posted by GameRPoP
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.
|
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
|
#8
|
elite*gold: 5
Join Date: Jul 2020
Posts: 183
Received Thanks: 54
|
Quote:
Originally Posted by LegendarySouL
he is money lover not support for free
|
right
Quote:
Originally Posted by LegendarySouL
he is money lover not support for free
|
Quote:
Originally Posted by ryaneichner
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
You can do it more easily with filter control. Thus, you can determine the color you want according to itemIDs.
|
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
|
#9
|
elite*gold: 80
Join Date: May 2015
Posts: 374
Received Thanks: 118
|
you can use Flor tut i didn't try but it gonna work im sure
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
|
#10
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,834
Received Thanks: 4,667
|
Guys stick to the topic, if you want to bash each other do it via private message.
|
|
|
02/02/2021, 05:51
|
#11
|
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
|
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);
Just need to send a packet from server to client
Good Luck
Special thanks to: florian0
|
|
|
02/02/2021, 06:00
|
#12
|
elite*gold: 5
Join Date: Jul 2020
Posts: 183
Received Thanks: 54
|
Quote:
Originally Posted by khaleed2010
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);
Just need to send a packet from server to client
Good Luck
Special thanks to: florian0 
|
You are a wonderful person, thank you
|
|
|
02/03/2021, 13:27
|
#13
|
elite*gold: 5
Join Date: Jul 2020
Posts: 183
Received Thanks: 54
|
Quote:
Originally Posted by khaleed2010
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);
Just need to send a packet from server to client
Good Luck
Special thanks to: florian0 
|
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
|
#14
|
elite*gold: 0
Join Date: Nov 2020
Posts: 170
Received Thanks: 61
|
Quote:
Originally Posted by Exner.
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
|
#15
|
elite*gold: 5
Join Date: Jul 2020
Posts: 183
Received Thanks: 54
|
Quote:
Originally Posted by LegendarySouL
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
|
|
|
All times are GMT +1. The time now is 18:08.
|
|