Changing players name color (like pvp mode)
Is there a way to permanently change a players name color, like what happens when you enable GM mode or enable PVP from the Priest of Discord?
I can edit the source, and tried to change the PVP function, but not sure how SendAppearancePacket functions. |
Client name color is client-sided, so you would have to have a custom .dll or modify the existing .exe to do that.
|
I was hoping I could disable PVP but still set them as PVP so the name changed. I guess Ill keep trying at that for right now.
Thanks for the help |
You could do that but it would require changes to combat/spell code. The red name is purely aesthetic to the client iirc.
|
Quote:
|
Heres a quick patch to make races have a red nameplate (ala PVP mode). This code was all borrowed from a Xachary fork
url = https://github.com/Xackery/Server.git I just removed all the pvp stuff out, and made compatible with current source. Credits Xachary (Shin Noir?) and I believe secrets, sorry if I left any one out Its set to have Ogres and Iksar carry a red nameplate. But other than their name being red, they are clients like any other( can group ect ect). Of course if you want them to be green instead of red its just a matter of setting the first value of SendAppearancePacket to the gm setting #define AT_PVP 4 // 0 = blue, 1 = pvp (red) #define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM Very basic stuff. If you wanted this to be acquirable (ie, red/green nameplate via a quest), that needs a different solution. Code:
diff --git a/zone/client.cpp b/zone/client.cpp |
This is a sample of using perl to manipulate the nameplates, I know you wanted "permanent" but just to get an idea on the appearance packet usage.
This could be used for temporary short term changes to a players nameplate, ie, maybe they got mind controlled, diseased, whatever. This will send an appearance packet but only people currently in the zone would see it, so if a client zones in after another client has this special appearance, they would see their "normal" appearance (green if gm, red if pvp enabled, blue else). Also, when the affected client zones, they would resume their normal appearance. Code:
diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp Code:
sub EVENT_SAY { |
All times are GMT -4. The time now is 12:35 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.