Jump to content
  • 0
stiflerxx

Fakename /[TAG]

Question

hello
I'm thinking of by [tags] on my server however I learned that with @fakename has to do but with the @fakename he demonstrates not the "guild or party" as I do for by the fakename command does not fail to show the clan and the group and the PM continues the same without having to by [TAG]?
Thank You.
 
 
BR(pt-br):

olá
estou pensando em por [TAGs] no meu servidor porem fiquei sabendo que com @fakename tem como fazer porem com o @fakename ele não monstra o "guild nem party" como faço pra por o comando fakename não deixar de mostra o clã eo grupo eo PM continua o mesmo sem ter que por [TAG]?Obrigado e tenha um ótimo dia.

Edited by stiflerxx

Share this post


Link to post
Share on other sites

24 answers to this question

Recommended Posts

  • 0

So, you want to include [TAG] into a player's name, while also making it show Guild and Party. BUT, you don't want to have to type [TAG]PlayerName to PM them?

If so, then this currently can't be done with scripting alone as far as I know. You would need to edit the src as well so that the corresponding clif->packet that deals with PM / Public chat will ignore [TAG] as part of name when attempting to PM someone. And I'm not even sure how to do that, if I did I'd release a plugin allowing you to do just that. But, sorry I don't know how.

Share this post


Link to post
Share on other sites
  • 0

So, you want to include [TAG] into a player's name, while also making it show Guild and Party. BUT, you don't want to have to type [TAG]PlayerName to PM them?

If so, then this currently can't be done with scripting alone as far as I know. You would need to edit the src as well so that the corresponding clif->packet that deals with PM / Public chat will ignore [TAG] as part of name when attempting to PM someone. And I'm not even sure how to do that, if I did I'd release a plugin allowing you to do just that. But, sorry I don't know how.

yes it would be ^^
I saw here in the forum a diff to let the monster to and the party guild just do not remember where I saw it.
 
the PM I still do not know how to do: /
will be to make a claim in the src area would help?
 
Edited by stiflerxx

Share this post


Link to post
Share on other sites
  • 0

Hmm, can you provide a link to this diff? I can't seem to find it. I can try taking a look at it and see if what they did can easily be applied to packet that deals with PMs.

Share this post


Link to post
Share on other sites
  • 0

Hmm, can you provide a link to this diff? I can't seem to find it. I can try taking a look at it and see if what they did can easily be applied to packet that deals with PMs.

not found here in the forum: / I remember seeing but do not know where: /
 I found these two link up more and rAthena and eAthena

Share this post


Link to post
Share on other sites
  • 0

I see, well I'll take a look at them later, and I'll see if I can port them to Hercules so you can make use of it.

 

Edit:

Okay, so I took a look at them, and it seems they could easily be converted to Hercules, however i'm not 100% sure if it'll work. And if it does work, you'll still have the same issues as Digos posted when he released the whisper patch. That is, if someone uses @fakename to disguise their name as an existing player name, they won't be PM-able since it checks for real names first then fake names.

 

Also last thing of note is, I could make a diff for the changes, but I'm too dumb to make them plugins xD. I don't know how to do the pre/post hooking yet.

Edited by GmOcean

Share this post


Link to post
Share on other sites
  • 0

I see, well I'll take a look at them later, and I'll see if I can port them to Hercules so you can make use of it.

 

Edit:

Okay, so I took a look at them, and it seems they could easily be converted to Hercules, however i'm not 100% sure if it'll work. And if it does work, you'll still have the same issues as Digos posted when he released the whisper patch. That is, if someone uses @fakename to disguise their name as an existing player name, they won't be PM-able since it checks for real names first then fake names.

 

Also last thing of note is, I could make a diff for the changes, but I'm too dumb to make them plugins xD. I don't know how to do the pre/post hooking yet.

Lets pray and wait, it will be awesome to have [Title]Player Name(PartyName) and work as it was original name, what ever script use ranking can give player title if he has achieved certain condition

Share this post


Link to post
Share on other sites
  • 0

Well, I can get it to successfully show Fakename + Guild / Party name. However, the way herc stores fakenames differs from how rAthena does, so only making these changes results in a client crash when PMing the player while trying to use the fake name as the whisper name. I suggest, taking your request to src_request / plugin_request section as there are far more skilled people there willing to help. Sorry, this was too great a task for me :/

Share this post


Link to post
Share on other sites
  • 0

Well, I can get it to successfully show Fakename + Guild / Party name. However, the way herc stores fakenames differs from how rAthena does, so only making these changes results in a client crash when PMing the player while trying to use the fake name as the whisper name. I suggest, taking your request to src_request / plugin_request section as there are far more skilled people there willing to help. Sorry, this was too great a task for me :/

 

Need Mod to Move thist thread to src support..

Share this post


Link to post
Share on other sites
  • 0

I see, well I'll take a look at them later, and I'll see if I can port them to Hercules so you can make use of it.

 

Edit:

Okay, so I took a look at them, and it seems they could easily be converted to Hercules, however i'm not 100% sure if it'll work. And if it does work, you'll still have the same issues as Digos posted when he released the whisper patch. That is, if someone uses @fakename to disguise their name as an existing player name, they won't be PM-able since it checks for real names first then fake names.

 

Also last thing of note is, I could make a diff for the changes, but I'm too dumb to make them plugins xD. I don't know how to do the pre/post hooking yet.

 

 

I see, well I'll take a look at them later, and I'll see if I can port them to Hercules so you can make use of it.

 

Edit:

Okay, so I took a look at them, and it seems they could easily be converted to Hercules, however i'm not 100% sure if it'll work. And if it does work, you'll still have the same issues as Digos posted when he released the whisper patch. That is, if someone uses @fakename to disguise their name as an existing player name, they won't be PM-able since it checks for real names first then fake names.

 

Also last thing of note is, I could make a diff for the changes, but I'm too dumb to make them plugins xD. I don't know how to do the pre/post hooking yet.

Lets pray and wait, it will be awesome to have [Title]Player Name(PartyName) and work as it was original name, what ever script use ranking can give player title if he has achieved certain condition

plus the second link diff causes the real name is searched first in and not think automatically looks for false ie works!
the big problem would be the client has [VIP] and when a friend tries to send the PM to receive mansagem that the character does not exist or is offline.
 
ps: if someone wants to make the diff compatible with Hercules and the moderator can move applications src I would be grateful ^^

Share this post


Link to post
Share on other sites
  • 0

Topic moved to Source Request.

 

On topic, this is useless if your charnames are bigger, since client have limitation of 24 characters, so kinda not useful.(except if all your titles are really small and char limit name decerease on your server )

Share this post


Link to post
Share on other sites
  • 0

Topic moved to Source Request.

 

On topic, this is useless if your charnames are bigger, since client have limitation of 24 characters, so kinda not useful.(except if all your titles are really small and char limit name decerease on your server )

but I've seen a guy that can increase the number of characters in max hexed .... at least I think I saw I can not remember

Share this post


Link to post
Share on other sites
  • 0

Topic moved to Source Request.

 

On topic, this is useless if your charnames are bigger, since client have limitation of 24 characters, so kinda not useful.(except if all your titles are really small and char limit name decerease on your server )

how to limit name on char creation so i can make it right some time they are crazy player make a crazy name and looong unreadable pharase, how to limit it to like 16 ?

Share this post


Link to post
Share on other sites
  • 0

The default length for names is 24, the players shouldn't be making anything longer than that because the client literally doesn't support it.

But if you're set on limiting it to something smaller then it's located in mmo.h at this line.

Share this post


Link to post
Share on other sites
  • 0

The default length for names is 24, the players shouldn't be making anything longer than that because the client literally doesn't support it.

But if you're set on limiting it to something smaller then it's located in mmo.h at this line.

if it was set that way then entire

//For character names, title names, guilds, maps, etc.//Includes null-terminator as it is the length of the array.

will be included limited to 16, the think i want is only the naming on creating char will be limited 16 so there is 8 char left..

Share this post


Link to post
Share on other sites
  • 0

That would require a far larger edit. First, you need to add this to your mmo.h

#define Guild_Name_Length (23 + 1)#define Title_Name_Length (23 + 1)#define Map_Name_Length (23 + 1)

Then you'd have to look through each src file and find any reference of: Name_Length

and determine if it's being used for either GuildName, MapName or TitleName.

If so, then replace it with the respective one above.

 

However, do note, that change Name_Length to 16 will only affect the visual names of maps, not the file name (this is limited to 12).

Share this post


Link to post
Share on other sites
  • 0

That would require a far larger edit. First, you need to add this to your mmo.h

#define Guild_Name_Length (23 + 1)#define Title_Name_Length (23 + 1)#define Map_Name_Length (23 + 1)

Then you'd have to look through each src file and find any reference of: Name_Length

and determine if it's being used for either GuildName, MapName or TitleName.

If so, then replace it with the respective one above.

 

However, do note, that change Name_Length to 16 will only affect the visual names of maps, not the file name (this is limited to 12).

 

Then i can't use the word/char left if that the case, let say i change it as your suggestion, when i create a char and give it a name lenght more than set-ed value it will reject char creation and success if it were less or equal to set-ed value, and if i create a title like [Title]LengthNameeeeee16(PartyName) if it were more than set-ed value it will not visualy apeared on screen, worse scene is if it can crashed the server, the thing i want is just a name lenght let it be 24 char as it was client max limitation but when on char creation one can just use 16 so there will be 8 more left to use as a tittle

Edited by Litro

Share this post


Link to post
Share on other sites
  • 0

Well I'm not sure how many times this is referenced in char.c, but you can limit the size of new_name in char.h here.

However, you'll need to search char.c for every instance of new_name  and when ever you see NAME_LENGTH you'd pretty much need to enter the same value.

 

OR

 

define one in mmo.h and use that as the value.

#define CHAR_NAME_LENGTH (15 + 1)

 

But, I don't recommend editing char.h or char.c for this fix. The potential dmg far out weighs the gain :/

Share this post


Link to post
Share on other sites
  • 0

@stiflerxx - Like I said, hercules and *athena handle fake names differently. In that diff, they are pulling the fakename as session data, where as hercules stores fakenames as a char.

I don't know the proper way to convert it as such so that " dstsd = fakename " in clif_process_WisProcess (I think thats the clif name).

Share this post


Link to post
Share on other sites
  • 0

But, I don't recommend editing char.h or char.c for this fix. The potential dmg far out weighs the gain :/

 

Thats it what fear come from.. well it will less trouble when money involved :heh: since im have less on it i will take my time learning on it at least i have a good internet to put in good use :heh: even if failing come to much to handle :pif:

 

 

Good with this diff I got through to the guild and party up!
just missing the PM researched a lot about and found nothing except this topic on eAthena
link:

can you take the diff from ther an upload it here, im kind of forgot what email used when register there i have forgoten my password :swt3:

Share this post


Link to post
Share on other sites
  • 0

 

But, I don't recommend editing char.h or char.c for this fix. The potential dmg far out weighs the gain :/

 

Thats it what fear come from.. well it will less trouble when money involved :heh: since im have less on it i will take my time learning on it at least i have a good internet to put in good use :heh: even if failing come to much to handle :pif:

 

Good with this diff I got through to the guild and party up!
just missing the PM researched a lot about and found nothing except this topic on eAthena
link:

can you take the diff from ther an upload it here, im kind of forgot what email used when register there i have forgoten my password :swt3:

 

 

diff --git src/map/clif.c src/map/clif.c

index d913047..be805cf 100644

--- src/map/clif.c

+++ src/map/clif.c

@@ -9920,6 +9920,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)

char *target, *message;

int namelen, messagelen;

 

+ char fake_output[254]; // Fake name support [Digos]

+

// validate packet and retrieve name and message

if( !clif_process_message(sd, 1, &target, &namelen, &message, &messagelen) )

return;

@@ -10005,6 +10007,16 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)

 

// searching destination character

dstsd = map_nick2sd(target);

+

+ // If no name was found check for a fake name [Digos]

+ if (dstsd == NULL) {

+ dstsd = map_fakename2sd(target);

+ // player found

+ if (dstsd != NULL) {

+ // update target with the real player name

+ strcpy(target,dstsd->status.name);

+ }

+ }

 

if (dstsd == NULL || strcmp(dstsd->status.name, target) != 0)

{

@@ -11531,6 +11547,11 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)

 

t_sd = map_nick2sd(name);

 

+ // If no name was found check for a fake name [Digos]

+ if (t_sd == NULL) {

+ t_sd = map_fakename2sd(name);

+ }

+

if(t_sd && t_sd->state.noask)

{// @noask [LuzZza]

clif_noask_sub(sd, t_sd, 1);

@@ -12714,6 +12735,12 @@ void clif_parse_GMRc(int fd, struct map_session_data* sd)

struct map_session_data* dstsd;

name[23] = '0';

dstsd = map_nick2sd(name);

+

+ // If no name was found check for a fake name [Digos]

+ if (dstsd == NULL) {

+ dstsd = map_fakename2sd(name);

+ }

+

if( dstsd == NULL )

return;

 

@@ -13079,6 +13106,11 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)

 

f_sd = map_nick2sd((char*)RFIFOP(fd,2));

 

+ // If no name was found check for a fake name [Digos]

+ if (f_sd == NULL) {

+ f_sd = map_fakename2sd((char*)RFIFOP(fd,2));

+ }

+

// Friend doesn't exist (no player with this name)

if (f_sd == NULL) {

clif_displaymessage(fd, msg_txt(3));

@@ -13637,7 +13669,14 @@ void clif_parse_Check(int fd, struct map_session_data *sd)

 

safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), sizeof(charname));

 

- if( ( pl_sd = map_nick2sd(charname) ) == NULL || pc_isGM(sd) < pc_isGM(pl_sd) )

+ pl_sd = map_nick2sd(charname);

+

+ // If no name was found check for a fake name [Digos]

+ if (pl_sd == NULL) {

+ pl_sd = map_fakename2sd(charname);

+ }

+

+ if( pl_sd == NULL || pc_isGM(sd) < pc_isGM(pl_sd) )

{

return;

}

diff --git src/map/intif.c src/map/intif.c

index 92deeec..16ce227 100644

--- src/map/intif.c

+++ src/map/intif.c

@@ -823,6 +823,12 @@ int intif_parse_WisMessage(int fd)

 

safestrncpy(name, (char*)RFIFOP(fd,32), NAME_LENGTH);

sd = map_nick2sd(name);

+

+ // If no name was found check for a fake name [Digos]

+ if (sd == NULL) {

+ sd = map_fakename2sd(name);

+ }

+

if(sd == NULL || strcmp(sd->status.name, name) != 0)

{ //Not found

intif_wis_replay(id,1);

@@ -857,6 +863,12 @@ int intif_parse_WisEnd(int fd)

if (battle_config.etc_log)

ShowInfo("intif_parse_wisend: player: %s, flag: %dn", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target

sd = (struct map_session_data *)map_nick2sd((char *) RFIFOP(fd,2));

+

+ // If no name was found check for a fake name [Digos]

+ if (sd == NULL) {

+ sd = (struct map_session_data *)map_fakename2sd((char *) RFIFOP(fd,2));

+ }

+

if (sd != NULL)

clif_wis_end(sd->fd, RFIFOB(fd,26));

 

diff --git src/map/map.c src/map/map.c

index 9616b15..2b97b99 100644

--- src/map/map.c

+++ src/map/map.c

@@ -1748,6 +1748,56 @@ struct map_session_data * map_nick2sd(const char *nick)

}

 

/*==========================================

+ * copy of the above function to search

+ * for a fake name [Digos]

+ *------------------------------------------*/

+struct map_session_data * map_fakename2sd(const char *fakenick)

+{

+ struct map_session_data* sd;

+ struct map_session_data* found_sd;

+ struct s_mapiterator* iter;

+ size_t fakenicklen;

+ int qty = 0;

+

+ if( fakenick == NULL )

+ return NULL;

+

+ fakenicklen = strlen(fakenick);

+ iter = mapit_getallusers();

+

+ found_sd = NULL;

+ for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )

+ {

+ if( battle_config.partial_name_scan )

+ {// partial name search

+ if( strnicmp(sd->fakename, fakenick, fakenicklen) == 0 )

+ {

+ found_sd = sd;

+

+ if( strcmp(sd->fakename, fakenick) == 0 )

+ {// Perfect Match

+ qty = 1;

+ break;

+ }

+

+ qty++;

+ }

+ }

+ else if( strcasecmp(sd->fakename, fakenick) == 0 )

+ {// exact search only

+ found_sd = sd;

+ break;

+ }

+ }

+ mapit_free(iter);

+

+ if( battle_config.partial_name_scan && qty != 1 )

+ found_sd = NULL;

+

+ return found_sd;

+}

+

+/*==========================================

* id”Ô?‚Ì•¨‚ð’T‚·

* ˆêŽObject‚Ìꇂ͔z—ñ‚ðˆø‚­‚Ì‚Ý

*------------------------------------------*/

diff --git src/map/map.h src/map/map.h

index 93b9697..6fc64e4 100644

--- src/map/map.h

+++ src/map/map.h

@@ -617,6 +617,7 @@ void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...);

void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...);

void map_foreachiddb(int (*func)(struct block_list* bl, va_list args), ...);

struct map_session_data * map_nick2sd(const char*);

+struct map_session_data * map_fakename2sd(const char *fakenick); // For fakename extended support [Digos]

struct mob_data * map_getmob_boss(int m);

struct mob_data * map_id2boss(int id);

 

 

 

Share this post


Link to post
Share on other sites
  • 0

sorry stupid browser make my post tripled please kindly delete it

errors in diff:
map.c:

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(1810): warning C4013: 'mapit_first' undefined; assuming extern returning int

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(1810): warning C4013: 'mapit_exists' undefined; assuming extern returning int

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(1810): warning C4013: 'mapit_next' undefined; assuming extern returning int

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(1833): warning C4013: 'mapit_free' undefined; assuming extern returning int

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(2200): error C2371: 'mapit_free' : redefinition; different basic types

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(2212): error C2040: 'mapit_first' : 'block_list *(s_mapiterator *)' differs in levels of indirection from 'int ()'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(2246): error C2040: 'mapit_next' : 'block_list *(s_mapiterator *)' differs in levels of indirection from 'int ()'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(2287): error C2371: 'mapit_exists' : redefinition; different basic types

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6214): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(s_mapiterator *)'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6215): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'block_list *(__cdecl *)(s_mapiterator *)'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6215): warning C4047: '=' : 'block_list *(__cdecl *)(s_mapiterator *)' differs in levels of indirection from 'int (__cdecl *)()'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6217): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'block_list *(__cdecl *)(s_mapiterator *)'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6217): warning C4047: '=' : 'block_list *(__cdecl *)(s_mapiterator *)' differs in levels of indirection from 'int (__cdecl *)()'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6219): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'bool (__cdecl *)(s_mapiterator *)'

c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.c(6219): warning C4133: '=' : incompatible types - from 'int (__cdecl *)()' to 'bool (__cdecl *)(s_mapiterator *)'

 
map.h:
c:usersjonhdownloadshercules-master (1)hercules-mastersrcmapmap.h(991): error C2032: 'map_fakename2sd' : function cannot be member of struct 'map_interface'
 
 site with error:
 
map.h:
struct map_session_data * map_fakename2sd(const char *fakenick); // For fakename extended support [Digos]
 
map.c:
line(1810):

for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )

{

if( battle_config.partial_name_scan )

{// partial name search

if( strnicmp(sd->fakename, fakenick, fakenicklen) == 0 )

{

found_sd = sd;

 

if( strcmp(sd->fakename, fakenick) == 0 )

{// Perfect Match

qty = 1;

break;

}

 

qty++;

}

}

else if( strcasecmp(sd->fakename, fakenick) == 0 )

{// exact search only

found_sd = sd;

break;

}

}

 
I help?

Share this post


Link to post
Share on other sites
  • 0

I help?

 

yo cant add it without changing the diff so it will compatible with hercules, that why you have many errors

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.