|
You last visited: Today at 06:46
Advertisement
[Release] Colored global,notices source code via DevKit
Discussion on [Release] Colored global,notices source code via DevKit within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
04/02/2021, 21:11
|
#1
|
elite*gold: 0
Join Date: Feb 2021
Posts: 33
Received Thanks: 40
|
[Release] Colored global,notices source code via DevKit
Heyo everyone, its a very very simple release and i am sure it'll going to help too much people who is coding in the DevKit Project,
ClientLib->SourceFiles->unsorted.cpp Under ( case CHAT_Notice: { ) put the following code
Code:
if (strMessageCopy[0] == '~') {
strMessageCopy.erase(0, 1);
g_pCGInterface->ShowMessage_Notice(strMessageCopy);
local_64 = L"(";
local_64 += TSM_GETTEXTPTR("UIIT_MSG_NOTIFY");
local_64 += L"):";
std::n_wstring tmp = local_64 + strMessageCopy;
CIFSystemMessage* systemmessage = g_pCGInterface->GetSystemMessageView();
systemmessage->WriteMessage(255, 0xffc81177, tmp.c_str(), 0, 1);
}
else if (strMessageCopy[0] == 'L') {
strMessageCopy.erase(0, 1);
local_64 = L"(Announcement):";
std::n_wstring tmp = local_64 + strMessageCopy;
g_pCGInterface->ShowMessage_Quest(tmp);
g_pCGInterface->FUN_00777c30(CHAT_All, tmp.c_str(), 0xff1AC3B2, 1);//colored notice
}
for the colored globals part put the following code under ( case CHAT_Global: )
NOTE : you have to mark the color with any symbol you want.
Code:
if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'O') { //Light Orange
color = D3DCOLOR(0xffffa500);
strMessageCopy.erase(0, 2);
}
else if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'S') { //Sky blue
color = D3DCOLOR(0xff87CEEB);
strMessageCopy.erase(0, 2);
}
Special thanks to florian0
|
|
|
04/03/2021, 18:51
|
#2
|
elite*gold: 0
Join Date: Oct 2014
Posts: 175
Received Thanks: 47
|
hello sir
Quote:
Originally Posted by #KB
Heyo everyone, its a very very simple release and i am sure it'll going to help too much people who is coding in the DevKit Project,
ClientLib->SourceFiles->unsorted.cpp Under ( case CHAT_Notice: { ) put the following code
Code:
if (strMessageCopy[0] == '~') {
strMessageCopy.erase(0, 1);
g_pCGInterface->ShowMessage_Notice(strMessageCopy);
local_64 = L"(";
local_64 += TSM_GETTEXTPTR("UIIT_MSG_NOTIFY");
local_64 += L"):";
std::n_wstring tmp = local_64 + strMessageCopy;
CIFSystemMessage* systemmessage = g_pCGInterface->GetSystemMessageView();
systemmessage->WriteMessage(255, 0xffc81177, tmp.c_str(), 0, 1);
}
else if (strMessageCopy[0] == 'L') {
strMessageCopy.erase(0, 1);
local_64 = L"(Announcement):";
std::n_wstring tmp = local_64 + strMessageCopy;
g_pCGInterface->ShowMessage_Quest(tmp);
g_pCGInterface->FUN_00777c30(CHAT_All, tmp.c_str(), 0xff1AC3B2, 1);//colored notice
}
for the colored globals part put the following code under ( case CHAT_Global: )
NOTE : you have to mark the color with any symbol you want.
Code:
if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'O') { //Light Orange
color = D3DCOLOR(0xffffa500);
strMessageCopy.erase(0, 2);
}
else if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'S') { //Sky blue
color = D3DCOLOR(0xff87CEEB);
strMessageCopy.erase(0, 2);
}
Special thanks to florian0
|
can be add from item id sir ?
maybe clientlib source can help on this:
|
|
|
04/03/2021, 23:58
|
#3
|
elite*gold: 0
Join Date: Aug 2019
Posts: 55
Received Thanks: 10
|
Quote:
Originally Posted by #KB
Heyo everyone, its a very very simple release and i am sure it'll going to help too much people who is coding in the DevKit Project,
ClientLib->SourceFiles->unsorted.cpp Under ( case CHAT_Notice: { ) put the following code
Code:
if (strMessageCopy[0] == '~') {
strMessageCopy.erase(0, 1);
g_pCGInterface->ShowMessage_Notice(strMessageCopy);
local_64 = L"(";
local_64 += TSM_GETTEXTPTR("UIIT_MSG_NOTIFY");
local_64 += L"):";
std::n_wstring tmp = local_64 + strMessageCopy;
CIFSystemMessage* systemmessage = g_pCGInterface->GetSystemMessageView();
systemmessage->WriteMessage(255, 0xffc81177, tmp.c_str(), 0, 1);
}
else if (strMessageCopy[0] == 'L') {
strMessageCopy.erase(0, 1);
local_64 = L"(Announcement):";
std::n_wstring tmp = local_64 + strMessageCopy;
g_pCGInterface->ShowMessage_Quest(tmp);
g_pCGInterface->FUN_00777c30(CHAT_All, tmp.c_str(), 0xff1AC3B2, 1);//colored notice
}
for the colored globals part put the following code under ( case CHAT_Global: )
NOTE : you have to mark the color with any symbol you want.
Code:
if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'O') { //Light Orange
color = D3DCOLOR(0xffffa500);
strMessageCopy.erase(0, 2);
}
else if (strMessageCopy[0] == '&' && strMessageCopy[1] == 'S') { //Sky blue
color = D3DCOLOR(0xff87CEEB);
strMessageCopy.erase(0, 2);
}
Special thanks to florian0
|
ithink this a colored global is just for command just like in the code S
when you type S in the Global chat the Color will be Sky Light like
S Test Color
thats what ithink idont know if that true or not
|
|
|
04/04/2021, 01:10
|
#4
|
elite*gold: 0
Join Date: Feb 2021
Posts: 33
Received Thanks: 40
|
Quote:
Originally Posted by ryaneichner
can be add from item id sir ?
maybe clientlib source can help on this:

|
i have no idea about matching itemID via the client only,
Quote:
Originally Posted by omar125
ithink this a colored global is just for command just like in the code S
when you type S in the Global chat the Color will be Sky Light like
S Test Color
thats what ithink idont know if that true or not
|
yea thats true , same for notices, otherwise you need a filter for such features.
|
|
|
04/04/2021, 08:33
|
#5
|
elite*gold: 0
Join Date: May 2013
Posts: 2,223
Received Thanks: 1,482
|
Quote:
Originally Posted by #KB
otherwise you need a filter for such features.
|
wrong  you can do it without filter ! I have colored global via Item ID in my devkit without filter access^^
|
|
|
04/04/2021, 13:10
|
#6
|
elite*gold: 0
Join Date: Sep 2020
Posts: 122
Received Thanks: 64
|
these examples already exist in devkit.
|
|
|
04/04/2021, 19:59
|
#7
|
elite*gold: 0
Join Date: Oct 2014
Posts: 175
Received Thanks: 47
|
hello sir
Quote:
Originally Posted by NorseGodTyr
wrong  you can do it without filter ! I have colored global via Item ID in my devkit without filter access^^
|
can you explain for we how make it, thanks and sorry if i'm boring sir!
|
|
|
04/04/2021, 20:24
|
#8
|
elite*gold: 0
Join Date: May 2013
Posts: 2,223
Received Thanks: 1,482
|
Quote:
Originally Posted by ryaneichner
can you explain for we how make it, thanks and sorry if i'm boring sir!
|
na i dont give info about it but you can start from here
|
|
|
04/04/2021, 21:47
|
#9
|
elite*gold: 0
Join Date: Aug 2019
Posts: 55
Received Thanks: 10
|
Quote:
Originally Posted by NorseGodTyr
na i dont give info about it but you can start from here

|
yeah but its need to use the filter for the packets
|
|
|
04/05/2021, 08:32
|
#10
|
elite*gold: 0
Join Date: May 2013
Posts: 2,223
Received Thanks: 1,482
|
Quote:
Originally Posted by omar125
yeah but its need to use the filter for the packets
|
i don't say that you have to use it complete  you have to edit some parts
|
|
|
04/06/2021, 01:32
|
#11
|
elite*gold: 0
Join Date: Feb 2021
Posts: 33
Received Thanks: 40
|
Quote:
Originally Posted by NorseGodTyr
wrong  you can do it without filter ! I have colored global via Item ID in my devkit without filter access^^
|
Quote:
Originally Posted by NorseGodTyr
na i dont give info about it.
|
atleast i shared all what i know about this feature, comparing this with your reply means alot 
have a nice time.
|
|
|
04/06/2021, 09:19
|
#12
|
elite*gold: 29
Join Date: Apr 2011
Posts: 482
Received Thanks: 224
|
Quote:
Originally Posted by omar125
yeah but its need to use the filter for the packets
|
Quote:
Originally Posted by #KB
i have no idea about matching itemID via the client only,
|
In the code that everyone posts here, it is done like this, it looks which ItemId is used, and depending on that, a different packet is sent to the server.
Sending different packets to distinguish which global is used, leads you to use a filter and intercept the packets. Instead of that I send an edited message, which for example has the ascii value 20 added to the last position for a red global.
Then when the message is received, you simply check if it is a global message, if so, you look at the last character of the message and set the color of the message.
|
|
|
Similar Threads
|
[Release] Merging HB's Code into the devkit
11/20/2020 - SRO PServer Guides & Releases - 7 Replies
Whatsup everyone around here? this is my first release, i am merging @HB's client notification handler into the devkit , so you should be able to create new types of server notification aka 0x300C as HB mentioned.
You can find CPSMisson.cpp, .h Here
Code in .cpp
#define UNIQUE_SPAWN 0x0C05
#define UNIQUE_DIE 0x0C06
#define MOB_CH_TIGERWOMAN 1954
|
[Release] Blackrogue how to send ingame notices
03/14/2017 - SRO PServer Guides & Releases - 2 Replies
Heroo
Maybe you have noticed if you are a filter coder that sending notices and so on is different on Blackrogue files, this is how you do it without getting disconnected/client crashing.
C# Filter side
public void SendNotice(string Message)
{
Packet packet = new Packet(0x3026);
packet.WriteUInt8((byte)7);
|
All times are GMT +1. The time now is 06:47.
|
|