Custom Unique Notifies with IFSystemMessage Colors
Use @
for thisCredits for helper CustomUniqueNotifiers: @
from
With some things changing.
Add this in DllMain.cpp
Code:
#include "CustomUniqueNotifiers.h" //Custom Unique Notifies with IFSystemMessage Colors CustomUniqueNotifiers::InitializeCustomUniqueNotifies();
DevKit_DLL->Source Files Create CustomUniqueNotifiers.cpp after Add this
Code:
#include "CustomUniqueNotifiers.h"
#include <memory/hook.h>
#include "CTextStringManager.h"
std::vector<std::pair<std::wstring, std::wstring>> CustomUniqueNotifiers::CustomUniqueNotifies;
std::wstring* CustomUniqueNotifiers::HasCustomUniqueNotify(std::wstring* NameStrID)
{
typedef std::vector<std::pair<std::wstring, std::wstring>>::iterator iterator_t;
for (iterator_t i = CustomUniqueNotifies.begin(); i != CustomUniqueNotifies.end(); i++)
{
if (wcscmp(i->first.c_str(), NameStrID->c_str()) == 0)
{
return &i->second;
}
}
return NULL;
}
bool CustomUniqueNotifiers::AddCustomUniqueNotify(std::wstring NameStrID, std::wstring MsgCode)
{
if (!HasCustomUniqueNotify(&NameStrID))
{
CustomUniqueNotifies.push_back(std::pair<std::wstring, std::wstring>(NameStrID, MsgCode));
return true;
}
return false;
}
bool CustomUniqueNotifiers::RemoveCustomUniqueNotify(std::wstring NameStrID)
{
for (int i = 0; i < CustomUniqueNotifies.size(); i++)
{
std::pair<std::wstring, std::wstring> notify = CustomUniqueNotifies[i];
if (wcscmp(notify.first.c_str(), NameStrID.c_str()) == 0)
{
CustomUniqueNotifies.erase(CustomUniqueNotifies.begin() + i);
return true;
}
}
return false;
}
void CustomUniqueNotifiers::InitializeCustomUniqueNotifies(void)
{
replaceOffset(0x00875444, addr_from_this(&CTextStringManager::OnUniqueNameRetrieve));
//UIIT_MSG_APPEAR_KERBEROS & UIIT_MSG_APPEAR_IVY -> textuisystem.txt
//SN_MOB_EU_KERBEROS & SN_MOB_AM_IVY -> textdata_object.txt
AddCustomUniqueNotify(std::wstring(L"SN_MOB_EU_KERBEROS"), std::wstring(L"UIIT_MSG_APPEAR_KERBEROS"));
AddCustomUniqueNotify(std::wstring(L"SN_MOB_AM_IVY"), std::wstring(L"UIIT_MSG_APPEAR_IVY"));
AddCustomUniqueNotify(std::wstring(L"SN_MOB_RM_ROC"), std::wstring(L"UIIT_MSG_APPEAR_ROC"));
}
Code:
#pragma once
#include <Windows.h>
#include <iostream>
#include <vector>
class CustomUniqueNotifiers
{
public:
static std::vector<std::pair<std::wstring, std::wstring>> CustomUniqueNotifies;
static std::wstring* HasCustomUniqueNotify(std::wstring* NameStrID);
static bool AddCustomUniqueNotify(std::wstring NameStrID, std::wstring MsgCode);
static bool RemoveCustomUniqueNotify(std::wstring NameStrID);
static void InitializeCustomUniqueNotifies();
};
DevKit_DLL->Source Files Create CTextStringManager.cpp after Add this
Code:
#include "CTextStringManager.h"
#include <GInterface.h>
#include "CustomUniqueNotifiers.h"
#include "IFSystemMessage.h"
#include <BSLib/multibyte.h>
const DWORD OnJE = 0x00875ABE;
const DWORD OnJNE = 0x00875449;
std::wstring* CTextStringManager::GetStringByNameStrID(std::wstring* NameStrID)
{
return reinterpret_cast <std::wstring*(__thiscall*)(CTextStringManager*, std::wstring*)>(0x008C9BB0)(this, NameStrID);
}
void CTextStringManager::OnUniqueNameRetrieve(std::wstring* NameStrID)
{
std::wstring* MsgCheck = CustomUniqueNotifiers::HasCustomUniqueNotify(NameStrID);
if (MsgCheck)
{
CGInterface* myface = CGInterface::GetInterface();
std::wstring* mymsg = this->GetStringByNameStrID(MsgCheck);
CALL(mymsg);
__asm {
add esp, 0x1C;
jmp OnJE;
}
}
this->GetStringByNameStrID(NameStrID);
__asm {
add esp, 0x1C;
jmp OnJNE;
}
}
void CTextStringManager::CALL(std::wstring* Message)
{
g_pCGInterface->ShowMessage_Notice(Message->c_str());
g_pCGInterface->ShowMessage_Quest(Message->c_str());
g_pCGInterface->ShowMessage_Warning(Message->c_str());
//IFSystemMessage Normal
//g_pCGInterface->WriteSystemMessage(SYSLOG_NONE, NameStrID->c_str());
//IFSystemMessageColors
IFSystemMessage *systemmessage = reinterpret_cast<IFSystemMessage *>(g_pCGInterface->m_IRM.GetResObj(68, 1));
systemmessage->write(0xFF, 0xff004b, Message->c_str(), 0, 1);
}
Code:
#pragma once
#include <iostream>
class CTextStringManager
{
public:
std::wstring* GetStringByNameStrID(std::wstring* NameStrID);
void OnUniqueNameRetrieve(std::wstring* NameStrID);
void CALL(std::wstring * NameStrID);
};
ClientLib->Source Files Edit in IFSystemMessage.cpp
Code:
// CIFSystemMessage::write(int a1, int color, wchar_t* msg, int a2, int a3) .text:007B89E0 sro_client_dev.exe:$3B89E0 #3B89E0 <sub_7B89E0>
void IFSystemMessage::write(int a1, int color, const wchar_t* msg, int a2, int a3)
{
// Redirection to original client code
reinterpret_cast<void(__thiscall*)(IFSystemMessage*, int, int, wchar_t, int, int)>(0x007B89E0)(this, a1, color, reinterpret_cast<wchar_t>(msg), a2, a3);
}
ClientLib->Header Files Edit in IFSystemMessage.h
Code:
void write(int a1, int color,const wchar_t* msg, int a2, int a3);
Code:
1 UIIT_MSG_APPEAR_KERBEROS 타림분지에 우르치가 등장하였습니다. 0 0 0 0 0 0 Cerberus has appeared on Desperado Hill. 0 0 0 0 0 0 0 0 1 UIIT_MSG_APPEAR_IVY 타클라마칸에 로드야르칸이 등장하였습니다. 0 0 0 0 0 0 Ivy has appeared on Ararat Mountain. 0 0 0 0 0 0 0 0
ClientLib->Header Files Add in GInterface.h
Code:
//GetInterface static CGInterface* GetInterface();
ClientLib->Source Files Add in GInterface.cpp
Code:
CGInterface* CGInterface::GetInterface(void)
{
return *reinterpret_cast<CGInterface**>(0x0110F80C);
}
this system have one problem try to figure out and fix it
Good Luck to Everyone






