Player's Level next to username

LCD

New member
Messages
16
Points
0
Location
Las Vegas, NV
Discord
LCD#0069
Emulator
rAthena
hey Ind/dev people, i have a perm request for the server, Showing the players Current level next to their players name like done on other mmos :3, with like changeable format like lets say the default format would be like

[Lv:99]Username, instead make it so people can change whether it says [Lv:99]Username, or [99]Username

this idea i stole from a request on rA
default_tongue.png
, i tried to do it myself but i r a noob ;_;, also if its possible to make it by every 10 levels the color of the number changes for instance like, lvl 1-10 is gray, 11-20 is blue, 21-30 is orange, etc make that customizeable as well via source tho
default_smile.png
.

 
lol yeah i talked to ind about it, the color thing is actually client sided, but the level next to username is full on server sided so just stick to that i guess. if possible :3

 
try this

@clif.c

case BL_PC:  { struct map_session_data *ssd = (struct map_session_data *)bl; struct party_data *p = NULL; struct guild *g = NULL;   +char name[NAME_LENGTH]; //Requesting your own "shadow" name. [Skotlex] if (ssd->fd == fd && ssd->disguise)   WBUFL(buf,2) = -bl->id; if( ssd->fakename[0] ) {   WBUFW(buf, 0) = cmd = 0x195;   memcpy(WBUFP(buf,6), ssd->fakename, NAME_LENGTH);   WBUFB(buf,30) = WBUFB(buf,54) = WBUFB(buf,78) = 0;   break; }   +sprintf(name, "[%d/%d] %s", ssd->status.base_level, ssd->status.job_level,ssd->status.name);   +memcpy(WBUFP(buf,6), name, NAME_LENGTH);   -memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);

default_ani_meow.gif


 
Last edited by a moderator:
+1 it works, but everytime i type /leave the [%d/%d] 

it will gone in the char, when i reconnect it will appear again.

How to fix this one?

Sorry if i'm asking to much in here, i'm always finding bugs so that it really works 100%


Thank you.
default_rolleyes.gif


 
Last edited by a moderator:
default_ani_meow.gif
 
default_ani_meow.gif
 
default_ani_meow.gif
 Okay, malufett thanks a lot. i've been looking for this mod since eA but no one release this. 
default_ani_meow.gif
 
default_ani_meow.gif
 
default_ani_meow.gif


 
here you have it...

Index: clif.c===================================================================--- clif.c (revision 11504)+++ clif.c (working copy)@@ -8325,6 +8332,7 @@ struct map_session_data *ssd = (struct map_session_data *)bl; struct party_data *p = NULL; struct guild *g = NULL;+   char name[NAME_LENGTH]; //Requesting your own "shadow" name. [Skotlex] if (ssd->fd == fd && ssd->disguise)@@ -8336,7 +8344,9 @@   WBUFB(buf,30) = WBUFB(buf,54) = WBUFB(buf,78) = 0;   break; }-   memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+   //memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+   sprintf(name, "[%d/%d] %s", ssd->status.base_level, ssd->status.job_level,ssd->status.name);+   memcpy(WBUFP(buf,6), name, NAME_LENGTH); if( ssd->status.party_id ) {   p = party_search(ssd->status.party_id);@@ -8450,6 +8460,7 @@  int cmd = 0x195, ps = -1;  struct party_data *p = NULL;  struct guild *g = NULL;+ char name[NAME_LENGTH];  nullpo_retv(ssd);@@ -8459,7 +8470,9 @@  WBUFW(buf,0) = cmd;  WBUFL(buf,2) = ssd->bl.id;- memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+ sprintf(name, "[%d/%d] %s", ssd->status.base_level, ssd->status.job_level,ssd->status.name);+ memcpy(WBUFP(buf,6), name, NAME_LENGTH);+ //memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);  if (!battle_config.display_party_name) { if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = ssd->guild) != NULL) 
default_ani_meow.gif

 
can't reproduce either. Make sure you added it in properly

 
Just as advice: don't change NAME_LENGTH configuration, but your users name length should have up to (NAME_LENGTH - 8) characters or you'll exceed your NAME_LENGTH.

 
well..I forgot that since most of players don't name their characters more than 15 characters...hahaha..

default_ani_meow.gif


 
Last edited by a moderator:
here you have it...



Index: clif.c===================================================================--- clif.c (revision 11504)+++ clif.c (working copy)@@ -8325,6 +8332,7 @@ struct map_session_data *ssd = (struct map_session_data *)bl; struct party_data *p = NULL; struct guild *g = NULL;+   char name[NAME_LENGTH]; //Requesting your own "shadow" name. [Skotlex] if (ssd->fd == fd && ssd->disguise)@@ -8336,7 +8344,9 @@   WBUFB(buf,30) = WBUFB(buf,54) = WBUFB(buf,78) = 0;   break; }-   memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+   //memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+   sprintf(name, "[%d/%d] %s", ssd->status.base_level, ssd->status.job_level,ssd->status.name);+   memcpy(WBUFP(buf,6), name, NAME_LENGTH); if( ssd->status.party_id ) {   p = party_search(ssd->status.party_id);@@ -8450,6 +8460,7 @@  int cmd = 0x195, ps = -1;  struct party_data *p = NULL;  struct guild *g = NULL;+ char name[NAME_LENGTH];  nullpo_retv(ssd);@@ -8459,7 +8470,9 @@  WBUFW(buf,0) = cmd;  WBUFL(buf,2) = ssd->bl.id;- memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);+ sprintf(name, "[%d/%d] %s", ssd->status.base_level, ssd->status.job_level,ssd->status.name);+ memcpy(WBUFP(buf,6), name, NAME_LENGTH);+ //memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);  if (!battle_config.display_party_name) { if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = ssd->guild) != NULL) 
default_ani_meow.gif
This is the one i used.

Tested RA Trunk 17231

 
Last edited by a moderator:
Back
Top