Jump to content
  • 0
LCD

Player's Level next to username

Question

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 :P, 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 :).

Share this post


Link to post
Share on other sites

31 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

Yeah, it's possible i saw someone in eAthena making this kind of *Modification. i forgot the name, i think he is a Spanish Moderator.

 

Aha, i remember now!


This Modification: http://roworks.webatu.com/?p=60
By: darkmeistersphttp://www.eathena.ws/board/index.php?showuser=194763


Well, i'd be happy if someone would also make this kind of Modification.

Edited by Vlync

Share this post


Link to post
Share on other sites
  • 0

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);

 

:meow:

Share this post


Link to post
Share on other sites
  • 0

+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. :rolleyes:

Edited by Vlync

Share this post


Link to post
Share on other sites
  • 0

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) 

:meow:

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

 

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) 

:meow:

 

This is the one i used.

Tested RA Trunk 17231

Edited by Vlync

Share this post


Link to post
Share on other sites
  • 0

You gotta be careful when adding source changes from Hercules to rAthena. Hercules has been implementing Renewal Changes as you can see from various commit history. Your best bet is to not try using Hercules Mods on rAthena because our source is different. If you know what you're doing, then go ahead xD

Share this post


Link to post
Share on other sites
  • 0

Oh yeah! i will switch now to Hercules. probably, there is an issue that conflict with rAthena Emulator.  :D

That's why i'm saying it's buggy~ sorry for it*

Share this post


Link to post
Share on other sites
  • 0

Hello there, done switching after i i test. it works but just curios, why i can't invite a player for a PARTY?

it says 'The Character is currently online does not exist' if i click the name it will appear like this e.g [255/99] Vlync

So by means, that name appear is currently offline because the player's name is Vlync it will not be invited.

How do i fix this one?

 

post-386-0-30371100-1366051504_thumb.png


Correct me if i'm wrong.

Thank you!

Edited by Vlync

Share this post


Link to post
Share on other sites
  • 0

here you have it..so sizzling hot..:D

 

--- src/map/clif.c Tue Apr 16 22:33:58 2013+++ src/map/clif.c Tue Apr 16 22:54:32 2013@@ -8361,7 +8325,6 @@	 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)@@ -8373,8 +8336,7 @@	  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);	 if( ssd->status.party_id ) {	  p = party_search(ssd->status.party_id);@@ -8488,7 +8450,6 @@  int cmd = 0x195, ps = -1;  struct party_data *p = NULL;  struct guild *g = NULL;+ char name[NAME_LENGTH];  nullpo_retv(ssd);@@ -8498,8 +8459,7 @@  WBUFW(buf,0) = cmd;  WBUFL(buf,2) = ssd->bl.id;+ 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)@@ -11694,8 +11654,6 @@{  struct map_session_data *t_sd;  char *name = (char*)RFIFOP(fd,2);+ char *pname;+  name[NAME_LENGTH-1] = '0';  if(map[sd->bl.m].flag.partylock) { // Party locked.@@ -11703,9 +11661,7 @@   return;  }+ pname=strrchr(name,' ');+ memcpy(pname, &pname[1], strlen(pname));+ t_sd = map_nick2sd(pname);- t_sd = map_nick2sd(name);  if(t_sd && t_sd->state.noask) { // @noask [LuzZza]   clif->noask_sub(sd, t_sd, 1);

:meow:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.